CN114722817A - Event processing method and device - Google Patents

Event processing method and device Download PDF

Info

Publication number
CN114722817A
CN114722817A CN202011529993.3A CN202011529993A CN114722817A CN 114722817 A CN114722817 A CN 114722817A CN 202011529993 A CN202011529993 A CN 202011529993A CN 114722817 A CN114722817 A CN 114722817A
Authority
CN
China
Prior art keywords
vector
candidate entity
coding
event
entity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011529993.3A
Other languages
Chinese (zh)
Inventor
白静
李长亮
李小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Digital Entertainment Co Ltd
Original Assignee
Beijing Kingsoft Digital Entertainment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Digital Entertainment Co Ltd filed Critical Beijing Kingsoft Digital Entertainment Co Ltd
Priority to CN202011529993.3A priority Critical patent/CN114722817A/en
Publication of CN114722817A publication Critical patent/CN114722817A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The application provides an event processing method and device, wherein the event processing method comprises the following steps: acquiring candidate entity fragments and determining candidate entity fragment coding vectors corresponding to the candidate entity fragments; carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors; inputting the candidate entity coding vectors and the candidate entity scores into a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments; and determining event type label vectors corresponding to the candidate entity fragments, inputting the candidate entity coding vectors, the candidate entity scores and the event type label vectors into an element extraction model for pruning, splicing the pruning result and the event type label vectors, and then performing prediction processing to obtain target event elements in the candidate entity fragments.

Description

Event processing method and device
Technical Field
The present application relates to the field of machine learning technologies, and in particular, to an event processing method and apparatus.
Background
With the development of the internet technology, the machine learning technology is applied to more and more fields, and the rapid development of the machine learning technology is further promoted, so that more use requirements of users are met; in an Event extraction scene, an Event generally consists of an Event Trigger word (Event Trigger) and an Event element (attribute) for describing an Event structure, and the Event Trigger word and the Event element can be automatically extracted through a machine learning technology, so that text processing processes such as abstract generation, automatic question answering or information retrieval and the like are automatically completed, manpower and material resources can be effectively saved, and text processing efficiency can be improved; however, in the prior art, when event extraction is implemented, usually, event trigger words are extracted first, and then event elements are extracted, so that information is not shared between two tasks, which causes insufficient mutual constraint and affects extraction efficiency and accuracy; or the event trigger word and the event element are extracted as a relationship at the same time, there is a problem that an error in extracting the event trigger word may be introduced into the task of constructing the event element, resulting in poor extraction efficiency.
Disclosure of Invention
In view of this, the embodiments of the present application provide an event processing method to solve the technical defects in the prior art. The embodiment of the application also provides an event processing device, a model training method, a model training device, a computing device and a computer readable storage medium.
According to a first aspect of embodiments of the present application, there is provided an event processing method, including:
obtaining candidate entity fragments and determining candidate entity fragment coding vectors corresponding to the candidate entity fragments;
carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
inputting the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments;
and determining an event type label vector corresponding to the candidate entity fragment, inputting the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splicing a pruning result and the event type label vector, and then performing prediction processing to obtain a target event element in the candidate entity fragment.
Optionally, before the step of obtaining candidate entity fragments is executed, the method further includes:
obtaining a sentence to be processed, and performing word segmentation processing on the sentence to be processed to obtain a plurality of word units;
correspondingly, the obtaining of the candidate entity fragment includes:
determining the candidate entity fragment based on at least one of the word units.
Optionally, the determining a candidate entity fragment encoding vector corresponding to the candidate entity fragment includes:
inputting the candidate entity fragment into a coding module, processing the candidate entity fragment through a statement coding network in the coding module to obtain a statement feature vector, and processing the candidate entity fragment through a character coding network in the coding module to obtain a character feature vector;
splicing the statement feature vector and the character feature vector into a target feature vector, and processing the target feature vector through a text coding network in the coding module to obtain a text feature vector;
and performing attention processing on the text feature vector to obtain the candidate entity fragment coding vector corresponding to the candidate entity fragment.
Optionally, the performing entity identification processing and scoring processing on the candidate entity fragment coding vector through an entity identification model to obtain a candidate entity coding vector and a candidate entity score corresponding to the candidate entity coding vector includes:
inputting the candidate entity fragment coding vector into the entity recognition model, and performing entity recognition processing on the candidate entity fragment coding vector to obtain the candidate entity coding vector;
and scoring the candidate entity coding vectors through a feed-forward neural network in the entity recognition model to obtain the candidate entity scores corresponding to the candidate entity coding vectors.
Optionally, the inputting the candidate entity coding vector and the candidate entity score to a trigger extraction model for pruning and prediction to obtain a target event trigger in the candidate entity segment includes:
inputting the candidate entity coding vectors and the candidate entity scores into the trigger word extraction model, and pruning the candidate entity coding vectors according to parameters set by the trigger word extraction model to obtain first identification pruning coding vectors;
and determining a first target identification pruning coding vector based on the candidate entity score and the first identification pruning coding vector, and performing prediction processing on the first target identification pruning coding vector through the trigger word extraction model to obtain the target event trigger word.
Optionally, the performing, by the trigger word extraction model, prediction processing on the first target recognition pruning coding vector to obtain the target event trigger word includes:
inputting the first target identification pruning coding vector into the trigger word extraction model, and generating a first label vector by coding a classification label of the first target identification pruning coding vector;
and determining a target event trigger word encoding vector based on the first label vector and the first target recognition pruning encoding vector, and outputting the target event trigger word through the trigger word extraction model.
Optionally, the determining an event type tag vector corresponding to the candidate entity fragment includes:
and classifying the first target identification pruning coding vector through the trigger word extraction model to obtain the event type label vector corresponding to the first target identification pruning coding vector.
Optionally, the inputting the candidate entity encoding vector, the candidate entity score, and the event type label vector into an element extraction model for pruning, and performing prediction processing after splicing a pruning processing result and the event type label vector to obtain a target event element in the candidate entity segment includes:
inputting the candidate entity coding vector, the candidate entity score and the event type label vector into the element extraction model, and pruning the candidate entity coding vector according to parameters set by the element extraction model to obtain a second identification pruning coding vector;
determining a second target identification pruning coding vector based on the candidate entity score and the second identification pruning coding vector, and splicing the second target identification pruning coding vector and the event type label vector to obtain a spliced coding vector;
and performing prediction processing on the spliced coding vector through the element extraction model to obtain the target event elements in the candidate entity fragments.
Optionally, the performing prediction processing on the spliced coding vector through the element extraction model to obtain the target event element in the candidate entity fragment includes:
generating an initial element encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector;
classifying and predicting the initial element coding vectors to obtain intermediate element coding vectors, and scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model;
and obtaining a target element coding vector according to a scoring processing result and the intermediate element coding vector, processing the target element coding vector through an output layer in the element extraction model, and outputting the target event element.
Optionally, the obtaining a target element encoding vector according to the scoring processing result and the intermediate element encoding vector includes:
generating a weight score based on the scoring processing result of the intermediate element coding vector, and sequentially performing attention processing on element extraction coding vectors corresponding to the intermediate element coding vector based on the weight score to obtain an intermediate vector;
gating processing is carried out on the intermediate vector and the element extraction coding vector corresponding to the intermediate element coding vector to obtain a gating vector;
extracting a coding vector according to the gating vector, the intermediate vector and an element corresponding to the intermediate element coding vector to carry out recoding, and generating a recoded updated coding vector;
generating the target element encoding vector based on the updated encoding vector and the classification label of the updated encoding vector.
Optionally, the generating an initial element-encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector includes:
encoding the classification label of the spliced encoding vector to generate a second label vector;
and integrating the second label vector and the splicing encoding vector, and generating the initial element encoding vector according to an integration result.
Optionally, the generating an initial element-encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector includes:
encoding the classification label of the spliced encoding vector to generate a second label vector;
determining a semantic vector corresponding to the spliced coding vector based on the position of the second target identification pruning coding vector in the candidate entity fragment;
and integrating the semantic vector, the second label vector and the splicing coding vector, and generating the initial element coding vector according to an integration result.
Optionally, the method further comprises:
and taking the context information of the candidate entity fragment corresponding to the semantic identification bit of the coding module as an event classification task.
Optionally, the entity recognition model, the trigger word extraction model and the element extraction model share a feed-forward neural network for scoring.
According to a second aspect of embodiments of the present application, there is provided an event processing apparatus, including:
the acquisition module is configured to acquire candidate entity fragments and determine candidate entity fragment coding vectors corresponding to the candidate entity fragments;
the entity processing module is configured to perform entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
the trigger word extraction module is configured to input the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments;
and the element extraction module is configured to determine an event type label vector corresponding to the candidate entity fragment, input the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splice a pruning result and the event type label vector, and perform prediction processing to obtain a target event element in the candidate entity fragment.
According to a third aspect of embodiments of the present application, there is provided a model training method, including:
obtaining a sample candidate entity pair and a sample event type label vector, and determining a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
inputting the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
inputting the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing to obtain sample event elements;
and respectively determining loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, and training the entity recognition model, the trigger word extraction model and the element extraction model.
According to a fourth aspect of embodiments of the present application, there is provided a model training apparatus, including:
the system comprises an acquisition sample module, a sample event type label module and a sample event type label module, wherein the acquisition sample module is configured to acquire a sample candidate entity pair and a sample event type label vector, and determine a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
the first processing module is configured to input the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
the second processing module is configured to input the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing to obtain sample event elements;
a training module configured to determine loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, respectively, and train the entity recognition model, the trigger word extraction model and the element extraction model.
According to a fifth aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions that, when executed by the processor, implement the steps of the event processing and model training methods.
According to a sixth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the event processing and model training methods.
After the candidate entity fragment is obtained, the candidate entity fragment coding vector corresponding to the candidate entity fragment is determined, then the entity fragment coding vector is identified and scored through an entity identification model, the candidate entity coding vector and the candidate entity score are obtained, at the moment, the candidate entity coding vector and the candidate entity score are input into a trigger word extraction model to be processed, a target event trigger word in the candidate entity fragment is extracted, meanwhile, the candidate entity coding vector, the candidate entity score and an event type label vector are input into an element extraction model to be processed, a target event element in the candidate entity fragment is extracted, and therefore an event extraction task in the candidate entity fragment is completed, the event extraction efficiency can be improved by utilizing a classification label of the trigger word during element extraction, the method can also avoid the influence of errors on two extraction tasks, and effectively improves the precision and efficiency of the multi-task model during event extraction.
Drawings
Fig. 1 is a flowchart of an event processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an event processing method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an event processing method applied to an event extraction scenario according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an event processing apparatus according to an embodiment of the present application;
FIG. 5 is a flow chart of a model training method provided by an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a model training apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application.
First, the noun terms to which one or more embodiments of the present invention relate are explained.
Event Extraction (Event Extraction): the method is to present the unstructured text containing the event information in a structured form, and has wide application in the fields of automatic abstracting, automatic question answering, information retrieval and the like.
Event: is composed of Event Trigger words (Event Trigger) and elements (attribute) describing the Event structure. The event trigger word (trigger) is a word capable of triggering an event to occur, is a feature word which determines the most important type of the event, and determines the category/subcategory of the event. An event element refers to a participant of an event. Trigger words and event elements are generally composed of entities.
Entity identification: is a basic task in natural language processing, and has a very wide application range. A named entity generally refers to an entity in text that has a particular meaning or strong reference, and typically includes a person's name, place name, organization name, time of day, proper noun, and the like. The entity identification model needs to extract the entities from the unstructured input text, and can identify more kinds of entities according to business requirements, such as product names, models, prices, and the like. Therefore, the concept of entity can be very wide, and any special text segment required by the service can be called an entity.
And (3) extracting the relation: relationship is defined as some kind of relation between two or more entities, and entity relationship learning is to automatically detect and identify some kind of semantic relationship between entities from the text, and also to extract the relationship. The output of the relationship extraction is typically a triplet (entity 1, relationship, entity 2). For example, the relationship expressed in the sentence "beijing is capital, political center, and cultural center of china" can be expressed as (china, capital, beijing), (china, political center, beijing), and (china, cultural center, beijing).
Encoding vector (encoding vector): refers to a vector expression obtained by encoding the features.
Pruning: data or nodes with lower importance are deleted to reduce the complexity of calculation or processing.
Grading: the method is a process of carrying out score evaluation/prediction on a certain characteristic through a scoring strategy or model matched with a scene; based on the score evaluation/prediction results, a specific score can be given for the feature.
Feed-forward Neural Network (FFNN): the simplest neural network is characterized in that the neurons are arranged in a layered mode, each neuron is only connected with the neuron of the previous layer, the output of the previous layer is received and output to the next layer, no feedback exists between the layers, and the most simple neural network is one of the artificial neural networks which are widely applied and developed most rapidly at present.
Convolutional Neural Networks (CNN): the method is a feedforward neural network containing convolution calculation and having a deep structure, and is one of algorithms represented by deep learning (deep learning).
Classification label: an identification for identifying a type of the coding vector.
The accuracy is as follows: the ratio of the number of the identified correct entities to the number of the identified entities is between 0 and 1, and the larger the numerical value is, the higher the accuracy is.
The recall ratio is as follows: the ratio of the number of the identified correct entities to the number of the entities of the sample is between 0 and 1, and the larger the numerical value is, the higher the recovery rate is.
Weighted harmonic mean: also known as F1 value, F1 value ═ 2 × accuracy ═ recall)/(accuracy + recall).
In the present application, an event processing method is provided. The embodiment of the application also provides an event processing device, a model training method, a model training device, a computing device and a computer readable storage medium, which are individually described in detail in the following embodiments.
In an Event extraction scene, an Event generally consists of an Event Trigger word (Event Trigger) and an Event element (attribute) for describing an Event structure, and the Event Trigger word and the Event element can be automatically extracted through a machine learning technology, so that text processing processes such as abstract generation, automatic question answering or information retrieval and the like are automatically completed, manpower and material resources can be effectively saved, and text processing efficiency can be improved; however, in the prior art, when event extraction is implemented, usually, event trigger words are extracted first, and then event elements are extracted, so that information is not shared between two tasks, which causes insufficient mutual constraint and affects extraction efficiency and accuracy; or, the event trigger word and the event element are extracted simultaneously as a relationship, and there is a problem that an error in extracting the event trigger word may be introduced into the task of constructing the event element, resulting in poor extraction efficiency.
After the candidate entity fragment is obtained, the candidate entity fragment coding vector corresponding to the candidate entity fragment is determined, then the entity fragment coding vector is identified and scored through an entity identification model, the candidate entity coding vector and the candidate entity score are obtained, at the moment, the candidate entity coding vector and the candidate entity score are input into a trigger word extraction model to be processed, a target event trigger word in the candidate entity fragment is extracted, meanwhile, the candidate entity coding vector, the candidate entity score and an event type label vector are input into an element extraction model to be processed, a target event element in the candidate entity fragment is extracted, and therefore an event extraction task in the candidate entity fragment is completed, the event extraction efficiency can be improved by utilizing a classification label of the trigger word during element extraction, the method can also avoid the influence of errors on two extraction tasks, and effectively improves the precision and efficiency of the multi-task model during event extraction.
Fig. 1 shows a flowchart of an event processing method according to an embodiment of the present application, which specifically includes the following steps:
step S102: and acquiring candidate entity fragments, and determining candidate entity fragment coding vectors corresponding to the candidate entity fragments.
Specifically, the candidate entity fragment specifically refers to a fragment composed of candidate entities in the sentence, text, and paragraph waiting-to-process text, that is, the candidate entity fragment is a fragment composed of candidate entities that determine event trigger words and event elements in the sentence, text, and paragraph waiting-to-process text; and the candidate entity fragment coding vector is the corresponding coding vector of the candidate entity fragment after coding processing.
Further, since the target event trigger word and the target event element that need to be extracted belong to the to-be-processed sentence, the candidate entity fragment also belongs to the to-be-processed sentence, and the candidate entity fragment can be obtained only after the to-be-processed sentence is processed, so as to be used for subsequent trigger word and event extraction, in this embodiment, the process of processing the to-be-processed sentence is as follows:
obtaining a sentence to be processed, and performing word segmentation processing on the sentence to be processed to obtain a plurality of word units;
determining the candidate entity fragment based on at least one of the word units.
Specifically, the sentence to be processed is a sentence that needs to be processed in the event extraction task, and the sentence may be an article, or a text paragraph, or a sentence, and in practical application, the sentence to be processed is a text that a user needs to extract an event for the text, and the text to be processed is set according to an input requirement of the user, which is not limited herein; correspondingly, the word unit specifically refers to a word unit obtained after the word segmentation processing is performed on the text to be processed.
Based on this, after the statement to be processed is obtained, it is determined that the trigger words and elements in the statement to be processed need to be extracted, in order to improve the extraction accuracy and efficiency, the statement to be processed is subjected to word segmentation processing to obtain a plurality of word units corresponding to the statement to be processed, and then the candidate entity fragments can be screened out from the word units. It should be noted that, because each candidate entity segment is composed of at least one word unit, and a word unit is also composed of at least one word unit, the candidate entity segment may be screened from the plurality of word units, that is, the candidate entity segment may be composed of at least one word unit, or a plurality of word units.
Furthermore, after the candidate entity segments are determined, in order to enable extraction of elements and trigger words in a subsequent convenient model, each candidate entity segment may be preferentially converted into a candidate entity segment coding vector at this time, so as to lay a foundation for a subsequent processing procedure, in this embodiment, a specific implementation manner is as follows:
inputting the candidate entity fragment into a coding module, processing the candidate entity fragment through a statement coding network in the coding module to obtain a statement feature vector, and processing the candidate entity fragment through a character coding network in the coding module to obtain a character feature vector;
splicing the statement feature vector and the character feature vector into a target feature vector, and processing the target feature vector through a text coding network in the coding module to obtain a text feature vector;
and after the text feature vector is introduced into an attention mechanism, calculating to obtain the candidate entity fragment encoding vector corresponding to the candidate entity fragment.
Specifically, the encoding network for encoding the candidate entity segment into the candidate entity segment encoding vector may be an LSTM network or a pre-trained BERT network, and in order to encode the candidate entity segment into the candidate entity segment encoding vector, whichever of the two networks is adopted needs to be trained, and the training requirement needs to meet the requirement required by the present embodiment, that is, a sample meeting an event extraction scenario is obtained in advance to train the network, so that the network may encode the candidate entity segment encoding vector.
Further, after acquiring a candidate entity fragment in the statement to be processed, firstly inputting the candidate entity fragment to the encoding module, and processing the candidate entity fragment through a statement encoding network in the encoding module to obtain the statement feature vector; then, in order to improve the encoding accuracy, the candidate entity segments are processed through a character encoding network in the encoding module to obtain the character feature vectors; secondly, splicing the sentence characteristic vector and the character characteristic vector into a target characteristic vector, and processing the target characteristic vector through a text coding network in the coding module to obtain the text characteristic vector; and finally, performing attention processing on the text feature vector to obtain the candidate entity fragment encoding vector corresponding to the candidate entity fragment.
In practical application, the attention processing on the text feature vector specifically means that an attention mechanism is introduced to process the text feature before determining the candidate entity encoding vector, and corresponding information can be extracted from information of a source text through the attention mechanism as assistance to provide accuracy for determining the candidate entity encoding vector, wherein the information serving as the assistance is attribute information related to the source text, such as the number of text words, text paragraphs, paragraph identifiers, and the like.
It should be noted that the components in the embodiment should be understood as functional modules that are required to implement the steps of the flow or the steps of the method, and each functional module is not limited to be actually functionally divided or separated. A functional module architecture defined by such a set of functional modules should be understood as a functional module architecture that implements the solution primarily through what is described in the specification, and should not be understood as a physical device that implements the solution primarily through hardware means.
For example, the sentence to be processed is "a pencil with a small and bright purchase value of two dollars", at this time, the sentence to be processed is subjected to word segmentation and word segmentation processing to obtain word units { small, bright, buy, price, value, two, yuan, money, lead, pen }, respectively, and then a plurality of word units are input into a pre-trained BERT model to be subjected to coding processing to obtain character feature vectors W1, W2 … … W13; and determining the encoding vector of the candidate entity segment, namely determining the encoding vector of the candidate entity segment a1 corresponding to the character feature vector [ W1, W2] as E1, the encoding vector of the candidate entity segment a2 corresponding to the character feature vector [ W1, W2, W3] as E2, and the encoding vector of the candidate entity segment A3 corresponding to the character feature vector [ W2, W3] as E3 … …, and the encoding vector of the candidate entity segment a13 corresponding to the character feature vector [ W12, W13] as E13.
In addition, after the sentence to be processed is obtained, in order to improve the accuracy of extracting the trigger word and the element in the sentence, the sentence to be processed may be subjected to standardization processing, that is, punctuation marks in the sentence are deleted, sentence breaking is performed on the sentence again, and the like, so as to obtain a standard sentence to be processed, and then the standard sentence to be processed is processed, so that the accuracy of obtaining the candidate entity fragment may be improved.
And the context information of the candidate entity fragment corresponding to the semantic identification bit of the coding module can be used as an event classification task. The method comprises the steps of generating a word-to-word (BERT) model, generating a word-to-word (CLS) mark, generating a word-to-word-to-word mark, and word-to-word (word) mark.
Furthermore, in the process of extracting candidate entity segments, after the sentence to be processed is converted into character feature vectors, the candidate entity segments are formed based on the character feature vectors, and the candidate entity segment encoding vectors corresponding to the candidate entity segments can also be determined according to the formed vectors.
In conclusion, by processing the to-be-processed sentence in a set manner, the candidate entity segment in the to-be-processed sentence can be quickly extracted, and the conversion of the candidate entity segment coding vector is performed through the coding network, so that the efficiency of subsequently extracting elements and trigger words is further improved, and a foundation is laid for the subsequent processing process.
And step S104, carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors.
Specifically, on the basis of obtaining the candidate entity segment coding vector, in order to accurately extract the target event trigger word and the target event element, entity recognition and scoring are performed through the entity recognition model, that is, the candidate entity segment is input to the entity recognition model for entity recognition processing, so as to obtain the candidate entity coding vector; meanwhile, the candidate entity coding vectors are subjected to scoring processing through a feedforward neural network in the entity recognition model, and then candidate entity scores corresponding to the candidate entity coding vectors can be obtained; the candidate entity coding vector specifically refers to a coding vector corresponding to a candidate entity extracted from each candidate entity fragment, and the candidate entity score specifically refers to a score corresponding to each candidate entity, and can be used for subsequent auxiliary extraction of event trigger words and event elements through the score.
In this embodiment, the entity recognition model performs entity recognition processing and scoring processing on the candidate entity fragment code vectors to obtain candidate entity code vectors and candidate entity scores corresponding to the candidate entity code vectors, and the specific implementation manner is as follows:
inputting the candidate entity fragment coding vector into the entity recognition model, and performing entity recognition processing on the candidate entity fragment coding vector to obtain the candidate entity coding vector;
and scoring the candidate entity coding vectors through a feed-forward neural network in the entity recognition model to obtain the candidate entity scores corresponding to the candidate entity coding vectors.
According to the above example, after candidate entity segment coding vectors E1-E13 corresponding to the statements to be processed are obtained, the candidate entity segment coding vectors are input into the entity recognition model at the moment to be subjected to entity recognition processing, and candidate entity coding vectors En 1-En 13 are obtained; and scoring each candidate entity coding vector through a feed-forward neural network in the entity recognition model to obtain a candidate entity score of the candidate entity coding vector En1 of S1, and a candidate entity score of the candidate entity coding vector En2 of S2 … … and a candidate entity score of the candidate entity coding vector En13 of S13.
In summary, in order to accurately extract the target event trigger word and the target event element, the entity recognition model is used to perform entity recognition processing and scoring on each candidate entity segment code vector, so as to accurately extract the candidate entity in the sentence to be processed in advance, and simultaneously perform scoring on the candidate entity code vector corresponding to each candidate entity, thereby realizing that the target event trigger word and the target event element can be more accurately extracted subsequently, and ensuring the extraction accuracy of the trigger word and the element.
And step S106, inputting the candidate entity coding vectors and the candidate entity scores into a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments.
Specifically, after the candidate entity segment coding vector is processed by the entity identification model, the candidate entity coding vector and a candidate entity score corresponding to the candidate entity coding vector are obtained, further, at this time, a target event trigger word can be determined according to the candidate entity coding vector and the candidate entity score, that is, the candidate entity coding vector and the candidate entity score are input to a trigger word extraction model for pruning and prediction, and the target event trigger word output by the model can be obtained after the trigger word extraction model is processed.
The trigger word extraction model specifically refers to a model for extracting a target event trigger word from a to-be-processed statement, and the target event trigger word specifically refers to a word capable of triggering an event to occur and is a feature word determining the most important event type, namely a feature word capable of expressing the event type in the to-be-processed statement; correspondingly, the pruning processing through the trigger extraction model specifically refers to the processing of removing the coding vector with low event correlation degree from the candidate entity coding vectors, and the prediction processing specifically refers to the processing of predicting the target event trigger according to the candidate entity coding vector with high event correlation degree.
In this embodiment, the candidate entity coding vectors and the candidate entity scores are input to a trigger word extraction model for pruning and prediction to obtain target event trigger words in the candidate entity segments, that is, step S106 may be implemented by steps S1062 to S1064, and the following is specifically implemented:
step S1062, inputting the candidate entity code vectors and the candidate entity scores into the trigger word extraction model, and performing pruning processing on the candidate entity code vectors through parameters set by the trigger word extraction model to obtain first recognition pruning code vectors.
Specifically, the first identified pruning coded vector is a coded vector obtained by pruning the candidate entity coded vector through the trigger word extraction model; based on this, after the candidate entity coding vector and the candidate entity score are identified, in order to delete the candidate entity with lower relevance in the candidate entity coding, pruning is performed through the trigger word extraction model, that is, the candidate entity coding vector and the candidate entity score are input into the trigger word extraction model, and pruning is performed on the candidate entity coding vector through the parameters set by the trigger word extraction model, so that the first identified pruning coding vector can be obtained.
In practical application, the candidate entity coding vectors are pruned through the parameters set in the trigger word extraction model, specifically, the entity type corresponding to each candidate entity coding vector is determined, that is, the candidate entity coding vectors are determined to be a positive type or a negative type, then the candidate entity coding vectors belonging to the negative type are pruned, and then the first recognition pruning coding vector meeting the subsequent processing requirement can be obtained, that is, the candidate entity coding vectors which do not meet the processing requirement are deleted.
In the above example, taking the existence of five classes of candidate entity coding vectors as an example, after obtaining the candidate entity coding vectors En1 to En13, determining that En1, En2 and En3 belong to the first class, the candidate entity coding vectors En4, En5 and En7 belong to the second class, the candidate entity coding vectors En6, En8 and En9 belong to the third class, the candidate entity coding vectors En10 and En11 belong to the fourth class, the candidate entity coding vectors En12 and En13 belong to the fifth class, determining that the fifth class is a negative class, performing pruning processing according to the hyper-parameter candidate entity coding vectors En1 to En13 set by the trigger extraction model, namely performing p% pruning processing on the candidate entity coding vectors of the fifth class, the other candidate entity coding vectors remain unchanged, and the remaining candidate entity coding vectors are used as the first recognition pruning coding vector, namely, i.e. the first recognition coding vector 1 includes the candidate entity coding vectors En2, en3, En4, En5, En6, En7, En8, En9, En10, En11, En 12.
In summary, after the candidate entity code vectors are input to the trigger word extraction model, in order to improve the extraction accuracy and efficiency of the target event trigger word, pruning is performed on the candidate entity code vectors according to the set parameters, so as to reduce the number of code vectors and improve the accuracy and efficiency of the subsequent prediction of the target event trigger word.
Step S1064, determining a first target identification pruning coding vector based on the candidate entity score and the first identification pruning coding vector, and performing prediction processing on the first target identification pruning coding vector through the trigger word extraction model to obtain the target event trigger word.
Specifically, the first target identification pruning coding vector is a coding vector obtained by performing secondary pruning on the first identification pruning coding vector according to the candidate entity scores; based on this, after the first recognition pruning coding vector is obtained after pruning is performed through the parameters set by the trigger word extraction model, in order to improve the processing efficiency, secondary pruning can be performed on the first recognition pruning coding vector by combining with the candidate entity scores to obtain the first target recognition pruning coding vector, and finally prediction processing is performed on the first target recognition pruning coding vector through the trigger word extraction model, so that the target event trigger word can be obtained.
Furthermore, in the process of performing prediction processing by using the trigger extraction model, in order to accurately predict the target event trigger, a classification label of the first target identification pruning code vector may be further combined, that is, step S1064 may be implemented by steps S10642 to S10644, and the following is specifically implemented:
step S10642, inputting the first target identification pruning coding vector into the trigger word extraction model, and generating a first label vector by coding the classification label of the first target identification pruning coding vector;
step S10644, determining a target event trigger word encoding vector based on the first tag vector and the first target identification pruning encoding vector, and outputting the target event trigger word through the trigger word extraction model.
Specifically, the first tag vector specifically refers to a classification tag of a first target identification pruning coding vector, and it should be noted that, because there is only one first target identification pruning coding vector obtained through secondary pruning, each first target identification pruning coding vector corresponds to its own classification tag, and when the target event trigger word is subsequently determined, the determination needs to be performed according to the first target identification pruning coding vector and the corresponding first tag vector.
Based on this, first target identification pruning coding vectors are firstly input into the trigger word extraction model, classification labels corresponding to the first target identification pruning coding vectors are determined through the trigger word extraction model, then the classification labels are coded, so that first label coding vectors corresponding to the first target identification pruning coding vectors can be obtained, finally the target event trigger word coding vectors can be determined according to the first label vectors and the first target identification pruning coding vectors, and then the target event trigger word coding vectors are converted through an output layer in the trigger word extraction model, so that the target event trigger words of the to-be-processed sentences can be obtained.
According to the above example, after the first identification pruning coding vectors (En1, En2, En3, En4, En5, En6, En7, En8, En9, En10, En11, and En12) are obtained, secondary pruning is performed according to the candidate entity scores of each first identification pruning coding vector, so as to obtain first target identification pruning coding vectors meeting the subsequent processing requirements, that is, the candidate entity scores corresponding to each first identification pruning coding vector are compared with the preset score threshold, the first identification pruning coding vectors smaller than the preset score threshold are deleted according to the comparison result, and the remaining first identification pruning coding vectors are used as the first target identification pruning coding vectors, so as to determine that the first target identification pruning coding vector is (En4, En5, En 6).
Then, determining that the classification label of the first target identification pruning coding vector En4 is label _4, the classification label of the first target identification pruning coding vector En5 is label _5, and the classification label of the first target identification pruning coding vector En6 is label _6, then performing coding processing on each classification label, generating a first label vector corresponding to the classification label _4 as span4_ label _ embedding, generating a first label vector corresponding to the classification label _5 as span5_ label _ embedding, and generating a first label vector corresponding to the classification label _6 as span6_ label _ embedding; and finally, performing prediction processing on the target event trigger words through a trigger word extraction model, determining that the target event trigger word encoding vector output by the trigger word extraction model is L4, namely converting the target event trigger word encoding vector L4 according to an output layer of the trigger word extraction model, and determining that the target event trigger words are purchased, namely determining that the target event trigger words in the to-be-processed sentence ' a pencil with two dollars in value is purchased ' are purchased '.
In summary, the target event trigger words are determined by combining with the first tag coding vector, so that the accuracy of determining the target event trigger words is effectively improved, the trigger words in the to-be-processed sentences can be accurately extracted in the processing process of the to-be-processed sentences, and the processing accuracy of processing the to-be-processed sentences by upstream and downstream businesses is further improved.
Step S108, determining an event type label vector corresponding to the candidate entity fragment, inputting the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splicing a pruning processing result and the event type label vector, and then performing prediction processing to obtain a target event element in the candidate entity fragment.
Specifically, after the task of extracting the target event trigger word is completed, the target event elements in the candidate entity segment are further extracted, and in order to improve the extraction accuracy and consider the influence of extracting the target event trigger word, before extracting the target event elements, an event type label vector is determined, and then the candidate entity coding vector, the candidate entity score and the event type label vector are input to an element extraction model for pruning, and after a pruning result and the event type label vector are spliced, prediction processing is performed, so that the target event elements in the candidate entity segment can be obtained.
The event tag vector specifically refers to a vector corresponding to a tag applied when the target event trigger word is determined, the element extraction model specifically refers to a model capable of pruning a coding vector and predicting a target event element, the target event element specifically refers to a participant of an event, and if the first player participates in a football game, the first player and the football game are both participants of the event.
Based on this, in order to improve the accuracy of predicting the target event trigger word and the target event element and improve the mutual constraint force between the target event trigger word and the target event element, in the process of predicting the target event element, a vector corresponding to an event type label involved in predicting the target event trigger word is introduced, and then pruning processing and prediction processing are performed through an element extraction model, so that the target event element can be obtained, that is, extraction of the target event trigger word and the target event element in the to-be-processed sentence is completed, and thus, the main event content corresponding to the to-be-processed sentence is determined.
It should be noted that the trigger extraction model and the element extraction model in this embodiment should be understood as models that need to be established to implement trigger prediction and element prediction, and each model is not actually defined by functional segmentation or separation; the two prediction processes may be respectively completed, or may be packaged in the same neural network to complete the prediction processes, and the specific implementation manner may be set according to an actual application scenario, and this embodiment is not limited herein.
Further, in order to improve the accuracy of subsequently determining the target event element, an event type tag vector is introduced in the process of predicting the target event element, that is, a tag vector involved in determining the target event trigger word is introduced, in this embodiment, a specific implementation manner of determining the event type tag vector is as follows:
and classifying the first target identification pruning coding vector through the trigger word extraction model to obtain the event type label vector corresponding to the first target identification pruning coding vector.
Specifically, because there are many labels involved in the process of determining the target event trigger word, and all labels are not applied in the process of determining the target event element, in order to avoid that the labels excessively affect the accuracy of determining the target event element, a trigger word extraction model may be used to classify a first target identification pruning coded vector, and a label corresponding to the first target identification pruning coded vector is used as the event type label applied in the process of extracting the target event element, so as to improve the accuracy of subsequently predicting the target event element.
In this embodiment, the candidate entity encoding vectors, the candidate entity scores, and the event type label vectors are input to an element extraction model for pruning, and prediction processing is performed after a pruning processing result and the event type label vectors are spliced to obtain target event elements in the candidate entity segments, that is, step S108 can be implemented through steps S1082 to S1086, and the following specific implementation is as follows:
step S1082, inputting the candidate entity code vectors, the candidate entity scores and the event type label vectors into the element extraction model, and pruning the candidate entity code vectors according to parameters set by the element extraction model to obtain second recognition pruning code vectors.
Specifically, the second identified pruning encoding vector is an encoding vector obtained by pruning the candidate entity encoding vector through the element extraction model; based on this, in the process of determining the target event element, in order to improve the efficiency of determining the target event element, the candidate entity coding vector is pruned through the parameters set by the element extraction model, and the second recognition pruning coding vector is obtained.
In practical application, the candidate entity coding vectors are pruned through the parameters set in the element extraction model, specifically, the entity type corresponding to each candidate entity coding vector is determined, that is, the candidate entity coding vectors are determined to be a positive type or a negative type, then the candidate entity coding vectors belonging to the negative type are pruned, and then a second recognition pruning coding vector meeting the subsequent processing requirement can be obtained, that is, the candidate entity coding vectors which do not meet the processing requirement are deleted.
Along the above example, after determining that the first target recognition pruning coding vector is (En4, En5, En6), determining that the classification labels corresponding to the respective vectors are label _4, label _5 and label _6, and correspondingly, the first label vectors are span4_ label _ embedding, span5_ label _ embedding and span6_ label _ embedding; based on this, according to the target event trigger a4, span4_ label _ embedding can be determined as an event type label vector, i.e. when determining the target event element, a label vector when determining the target event trigger is introduced.
Further, at this time, candidate entity coding vectors En1 to En13, candidate entity scores S1 to S13 corresponding to the candidate entity coding vectors, and event type label vectors span4_ label _ embedding are input into an element extraction model, and the candidate entity coding vectors are pruned by super parameters preset by the element extraction model, so that it is determined that the candidate entity coding vectors En1, En2, and En3 belong to a first class, the candidate entity coding vectors En4, En5, and En6 belong to a second class, the candidate entity coding vectors En7, En8, and En9 belong to a third class, the candidate entity coding vectors En10, En11, and En12 belong to a fourth class, and the candidate entity coding vector En13 belongs to a fifth class, wherein the fifth class is a negative class; then p 1% pruning processing is carried out on the candidate entities of the first class, p 2% pruning processing is carried out on the candidate entities of the second class, p 3% pruning processing is carried out on the candidate entities of the third class, p 4% pruning processing is carried out on the candidate entities of the fourth class, p 5% pruning processing is carried out on the candidate entities of the fifth class, and the residual candidate entity coding vectors are used as second recognition pruning coding vectors, namely the second recognition pruning coding vectors comprise candidate entity coding vectors En1, En3, En5, En6, En7 and En 13.
Step S1084, determining a second target identification pruning coded vector based on the candidate entity score and the second identification pruning coded vector, and splicing the second target identification pruning coded vector and the event type label vector to obtain a spliced coded vector.
Specifically, the second target identification pruning coding vector is a coding vector obtained by performing secondary pruning on the second identification pruning coding vector according to the candidate entity score; the splicing coding vector is specifically a coding vector generated by splicing each second target identification pruning coding vector with an event type label vector.
Based on this, after the candidate entity coding vector is pruned for the first time through the element extraction model, the second recognition pruning coding vector is obtained, at this time, in order to improve the efficiency of subsequently predicting the target event element, the second recognition pruning coding vector is pruned for the second time by combining the candidate entity score to obtain the second target recognition pruning coding vector, and the splicing coding vector can be spliced by combining the event type label vector to be used for extracting the target event element accurately in the subsequent process.
In the above example, after the second identification pruning coding vector (En1, En3, En5, En6, En7, En13) is obtained, in order to further improve the determination accuracy of the target event element, secondary pruning may be performed through the candidate entity scores, so as to obtain a second target identification pruning coding vector meeting the subsequent processing requirement, that is, comparing the candidate entity scores corresponding to the respective second identification pruning coding vectors with the preset score threshold, deleting the second identification pruning coding vector smaller than the preset score threshold according to the comparison result, taking the remaining second identification pruning coding vector as the second target identification pruning coding vector, and determining that the second target identification pruning coding vector is (En3, En7, En 13).
Based on this, the second target identification pruning coding vectors are spliced with the event type label vector, namely span4_ label _ embedding and the second target identification pruning coding vector En3, to obtain a spliced coding vector En 3_ span4_ label _ embedding, span4_ label _ embedding and the second target identification pruning coding vector En7 are spliced to obtain a spliced coding vector En 7_ span4_ label _ embedding, and span4_ label _ embedding and the second target identification pruning coding vector En13 are spliced to obtain a spliced coding vector En13 _ span4_ label _ embedding.
In summary, considering that there may be mutual influence between event trigger words and event elements, in order to extract a target event element accurately, a label vector involved in extracting the target event trigger word is introduced when the target event element is extracted, so that the extraction accuracy of the target event element is considered from multiple angles, and the event in the sentence to be processed is determined accurately.
Step S1086, the splicing coding vector is predicted through the element extraction model, and the target event element in the candidate entity fragment is obtained.
Specifically, after the event type label vector is introduced, a plurality of spliced encoding vectors can be obtained, and finally, the spliced encoding vectors are subjected to prediction processing through the element extraction model, so that the target event elements in the candidate entity fragment can be obtained.
In this embodiment, the target event element in the candidate entity fragment is obtained by performing prediction processing on the spliced coding vector through the element extraction model, that is, step S1086 may be implemented through steps S10862 to S10866, and the specific implementation manner is as follows:
step S10862, generating an initial element encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector.
Specifically, in order to improve the accuracy of determining the target event element, it is also required to combine the classification tag of the concatenated coding vector to generate the initial element coding vector, where the initial element coding vector is a coding vector corresponding to an element prepared before predicting the target event element; accordingly, the initial element encoding vector may be determined by: determining the classification label of the splicing coding vector through the element extraction model, and then coding the classification label of the splicing coding vector to generate a second label vector; and integrating the second label vector and the splicing encoding vector, and generating the initial element encoding vector according to an integration result.
In the above example, after determining the splicing encoding vectors En3 × span4_ label _ encoding, En7 × span4_ label _ encoding, and En13 × span4_ label _ encoding, the second label encoding vector of each splicing encoding vector is spliced with the corresponding splicing encoding vector, so as to obtain initial element encoding vectors, which are respectively El3 ═ span3_ element _ encoding ═ torch (En3 × span4_ label _ encoding) — (torch). Cat ([ En7 × span4_ label _ embedding ]); cat ([ En13 × span4_ label _ embedding ]).
Furthermore, the initial element encoding vector may be determined by: encoding the classification label of the spliced encoding vector to generate a second label vector; determining a semantic vector corresponding to the spliced coding vector based on the position of the second target identification pruning coding vector in the candidate entity fragment; and integrating the semantic vector, the second label vector and the splicing coding vector, and generating the initial element coding vector according to an integration result.
In summary, by integrating the second tag vectors corresponding to the splicing encoding vectors with the splicing encoding vectors, the accuracy of predicting the target event element by the element extraction model can be further improved, so that the accuracy of identifying the middle event of the to-be-processed sentence is improved.
Step S10864, classifying and predicting the initial element encoding vectors to obtain intermediate element encoding vectors, and scoring the intermediate element encoding vectors through a feedforward neural network in the element extraction model.
Specifically, the intermediate element encoding vector refers to an encoding vector obtained by performing classification prediction on an initial element encoding vector through the element extraction model; correspondingly, the scoring processing specifically refers to the processing of predicting and scoring through each intermediate element coding vector of a feedforward neural network in an element extraction model; based on the above, in order to accurately predict the target event element in the following, firstly, each initial element coding vector is subjected to classified prediction, and the intermediate element coding vector is obtained according to the classified prediction result; and then, scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model to obtain the corresponding scores of the intermediate element coding vectors.
Along the above example, after obtaining the initial element code vectors El3, El7 and El13, performing classified prediction on each initial element code vector at this time to obtain an intermediate element code vector corresponding to the initial element code vector El3 as El 3; the intermediate element code vector corresponding to the initial element code vector El7 is Elm 7; the intermediate element code vector corresponding to the initial element code vector El13 is Elm 13; and then, scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model, namely, performing secondary scoring on the screened candidate entity coding vectors, and determining that the score corresponding to the intermediate element coding vector Elm3 is Slm3, the score corresponding to the intermediate element coding vector Elm7 is Slm7, and the score corresponding to the intermediate element coding vector Elm13 is Slm 13.
Step S10866, obtaining a target element code vector according to the scoring processing result and the intermediate element code vector, processing the target element code vector through an output layer in the element extraction model, and outputting the target event element.
Specifically, the target element encoding vector is a vector corresponding to a target event trigger word predicted by the element extraction model; based on this, the target element code vector can be predicted according to the scoring result corresponding to each intermediate element code vector and the intermediate element code vector, and finally, the target element code vector is processed through an output layer in the element extraction model, and the target event element can be output.
After the scores corresponding to the intermediate element coding vectors are obtained, the target element coding vector can be determined by selecting the score to be earlier, and the intermediate element coding vector Elm3 corresponding to the score Slm3 and the intermediate element coding vector Elm7 corresponding to the score Slm7 can be selected as the target element coding vector by comparing the scores Slm3 which is Slm7 > Slm 13; finally, it can be determined that A3 and a7 are target event elements in the statement to be processed through the intermediate element encoding vector Elm3 and the intermediate element encoding vector Elm7, and the target element encoding vectors (the intermediate element encoding vector Elm3 and the intermediate element encoding vector Elm7) are converted through an output layer in the element extraction network, so that a target event element- (xiaoming, pencil) output by the element extraction model for the text to be processed can be obtained.
In conclusion, the event type label when the target event trigger word is determined is introduced in the process of determining the target event element, so that the mutual interference between the trigger word and the element during extraction can be reduced, the constraint force between the trigger word and the element can be improved, and the extraction accuracy of the trigger word and the element can be improved.
In addition, in the process of determining the target element encoding vector, in order to accurately screen out the target element encoding vector, weight determination may be combined, and in this embodiment, a specific implementation manner is as follows:
generating a weight score based on the scoring processing result of the intermediate element coding vector, and sequentially performing attention processing on element extraction coding vectors corresponding to the intermediate element coding vector based on the weight score to obtain an intermediate vector;
extracting a coding vector based on the intermediate vector and an element corresponding to the intermediate element coding vector to perform gating processing to obtain a gating vector;
extracting a coding vector according to the gating vector, the intermediate vector and an element corresponding to the intermediate element coding vector to carry out recoding, and generating a recoded updated coding vector;
generating the target element encoding vector based on the updated encoding vector and the classification label of the updated encoding vector.
Specifically, the weight score specifically refers to a weight value obtained according to a score after each intermediate element coding vector is scored; the intermediate vector is specifically a vector obtained by coding the vector according to the intermediate element after an attention mechanism is introduced.
Based on the method, firstly, a scoring result corresponding to each intermediate element coding vector is determined, a weight score of each intermediate element coding vector is generated according to the scoring result, attention processing is sequentially carried out on element extraction coding vectors corresponding to the intermediate element coding vectors on the basis of the weight scores, and then the intermediate vectors can be obtained; secondly, extracting a coding vector based on the intermediate vector and an element corresponding to the intermediate element coding vector to perform gating processing to obtain a gating vector; extracting a coding vector for recoding according to the gating vector, the intermediate vector and an element corresponding to the intermediate element coding vector to generate a recoded updated coding vector; and finally, determining a classification label of the updated encoding vector according to the element extraction model, and generating the target element encoding vector based on the updated encoding vector and the classification label of the updated encoding vector.
In practical application, in the process of generating the target element encoding vector according to the updated encoding vector and the classification label of the updated encoding vector, specifically, the classification label of the updated encoding vector is encoded, and then a vector corresponding to the encoded classification label and the updated encoding vector are spliced, so that the target element encoding vector can be generated.
In specific implementation, the entity recognition model, the trigger word extraction model and the element extraction model provided by the embodiment may share one feedforward neural network for scoring; the entity extraction model, the trigger word extraction model and the element extraction model are organically combined and share a feed-forward neural network for scoring, so that the information sharing among the entity extraction model, the trigger word extraction model and the element extraction model can be realized, and the accuracy and the recall rate of the entity extraction model, the trigger word extraction model and the element extraction model are improved.
After the candidate entity fragment is obtained, the candidate entity fragment coding vector corresponding to the candidate entity fragment and the event type label vector corresponding to the candidate entity fragment are determined, then the entity fragment coding vector is identified and graded through an entity identification model to obtain a candidate entity coding vector and a candidate entity score, at the moment, the candidate entity coding vector and the candidate entity score are input into a trigger word extraction model to be processed, a target event trigger word in the candidate entity fragment is extracted, meanwhile, the candidate entity coding vector, the candidate entity score and the event type label vector are input into an element extraction model to be processed, and a target event element in the candidate entity fragment is extracted, so that the event extraction task in the candidate entity fragment is completed, the event extraction efficiency can be improved, the method can also avoid the influence of errors on two extraction tasks, and effectively improves the accuracy and efficiency of the multi-task model in event extraction.
The following describes the event processing method further by taking the application of the event processing method provided by the present application to event extraction as an example, with reference to fig. 3. Fig. 3 shows a processing flow chart of an event processing method applied in an event extraction scenario according to an embodiment of the present application, which specifically includes the following steps:
step S302, a text to be processed is obtained, and the text to be processed is preprocessed to obtain a standard text to be processed.
Step S304, inputting the standard text to be processed into an encoder for encoding processing, and generating candidate entity segment encoding vectors.
In this embodiment, a text to be processed is "… … a which sets up a 10-billion institute … …", and it should be noted that, because the text to be processed is long, only the characters mainly related to in this embodiment are specifically described for convenience of description, and other omitted characters are expressed in the form of letters, which will not be described herein again.
Based on the method, after a text to be processed is obtained, word segmentation processing is firstly carried out on the text to be processed to obtain a plurality of word units which are O1 and O2 … … Om respectively, then the word units are input into a pre-trained BERT model to be processed standard text to be coded to obtain character characteristic vectors at character level, meanwhile, sentence characteristic vectors and the character characteristic vectors are spliced to be target characteristic vectors, coding processing is carried out on the target characteristic vectors through a bidirectional LSTM network to obtain text characteristic vectors with context characteristics, and finally the text characteristic vectors are introduced into an attention mechanism to calculate candidate entity segment coding vectors corresponding to candidate entity segments.
Namely: determining character feature vectors corresponding to all character units as O1 ═ W1, O2 ═ W2 … … Om ═ Wm, extracting candidate entity segments based on the character feature vectors, determining that character feature vectors [ W1, W2] correspond to the candidate entity segment A1, character feature vectors [ W1, W2, W3] correspond to the candidate entity segment A2, and character feature vectors [ W2, W3] correspond to the candidate entity segment A3 … …; and finally, obtaining candidate entity coding vectors corresponding to the candidate entity fragments as follows: determining that the encoding vector corresponding to a1 is E1, the encoding vector corresponding to a2 is E2, the encoding vector corresponding to A3 is E3, the encoding vector corresponding to a4 is E4, the encoding vector corresponding to a5 is E5, the encoding vector corresponding to A6 is E6, the encoding vector corresponding to a7 is E7, the encoding vector corresponding to A8 is E8, and the encoding vector corresponding to a9 is E9, so that a mode of acquiring and encoding candidate entity segments is realized to make sufficient preparation for a subsequent event extraction task, and the processing efficiency of the subsequent event extraction task is improved.
In addition, after the coding is realized through the pre-trained BERT model, the text classification task can be realized according to the [ CLS ] identification bit of the BERT model, specifically, a [ CLS ] symbol is inserted in front of the text by the BERT model, and an output vector corresponding to the symbol is used as semantic identification of the text to be processed for text classification, namely, the event classification task is completed based on the BERT model.
Step S306, inputting the candidate entity segment coding vector into the entity recognition model, and obtaining the candidate entity coding vector by carrying out entity recognition processing on the candidate entity segment coding vector.
Step S308, the candidate entity coding vectors are scored through a feedforward neural network in the entity recognition model, and candidate entity scores corresponding to the candidate entity coding vectors are obtained.
Specifically, after obtaining the coding vectors corresponding to a1 to a9, in order to extract the target event trigger word and the target event element from the text to be processed accurately, entity recognition processing and scoring are performed through the entity recognition model, that is, the coding vectors of E1 to E9 are input into the entity recognition model to perform entity recognition processing, so as to obtain candidate entity coding vectors (En1, En2, En3, En4, En5, En6, En7, En8, En9), and scoring is performed on the candidate entity coding vectors through a feedforward neural network in the entity recognition model, so as to obtain the candidate entity score of the candidate entity coding vector En1 as S1, the candidate entity score of the candidate entity coding vector En2 as S2, the candidate entity of the candidate entity coding vector En3 as S3, the candidate entity score of the entity coding vector En4 as S9358, and the candidate entity coding vector as S3872 as S5, the candidate entity score for candidate entity-encoding vector En6 is S6, the candidate entity score for candidate entity-encoding vector En7 is S7, the candidate entity score for candidate entity-encoding vector En8 is S8, and the candidate entity score for candidate entity-encoding vector En9 is S9.
Step S310, inputting the candidate entity code vectors and the candidate entity scores into a trigger word extraction model, and pruning the candidate entity code vectors through parameters set by the trigger word extraction model to obtain first recognition pruning code vectors.
Specifically, the candidate entity-encoding vectors in this embodiment are described by taking five categories as examples, wherein the candidate entity-coded vectors En1 and En2 belong to a first class, the candidate entity-coded vectors En3 and En7 belong to a second class, the candidate entity-coded vector En4 belongs to a third class, the candidate entity-coded vectors En5 and En6 belong to a fourth class, the candidate entity-coded vectors En8 and En9 belong to a fifth class, wherein the fifth class is a negative class, the candidate entity coding vectors En 1-En 9 are pruned according to the hyper parameters set by the trigger extraction model, that is, only the candidate entity code vectors of the fifth category are subjected to p% pruning treatment, other categories are kept unchanged, the remaining candidate entity code vectors are used as the first identification pruning code vectors, that is, the first identified pruned coded vector is to include candidate entity coded vectors En1, En2, En3, En4, En5, En6, En7, En 8.
In step S312, a first target identification pruning coding vector is determined based on the candidate entity score and the first identification pruning coding vector.
Specifically, after the pruned first identification pruning coding vectors (En1, En2, En3, En4, En5, En6, En7, and En8) are obtained, in order to further improve the determination accuracy of the target event trigger word, secondary pruning may be performed through the candidate entity scores, so as to obtain first target identification pruning coding vectors meeting the subsequent processing requirements, that is, the candidate entity scores corresponding to the respective first identification pruning coding vectors are compared with a preset score threshold, the first identification pruning coding vectors smaller than the preset score threshold are deleted according to the comparison result, and the remaining first identification pruning coding vectors are used as the first target identification pruning coding vectors to determine that the first target identification pruning coding vectors are (En4, En5, En 6).
Step S314, determining a classification label of the first target identification pruning coding vector, and performing coding processing on the classification label to generate a first label vector.
Step S316, determining a target event trigger word based on the first target identification pruning coded vector and the first tag vector.
Specifically, it is determined that the classification label of the first target identification pruning coding vector En4 is label _4, the classification label of the first target identification pruning coding vector En5 is label _5, and the classification label of the first target identification pruning coding vector En6 is label _6, and then each classification label is encoded, so that the first label vector corresponding to the classification label _4 is span4_ label _ embedding, the first label vector corresponding to the classification label _5 is span5_ label _ embedding, and the first label vector corresponding to the classification label _6 is span6_ label _ embedding.
Based on this, after the first target identification pruning code vector and the first label vector are determined, a4 can be determined as a target event trigger word in the text to be processed, and finally, the target trigger word code vector is converted through an output layer in the trigger word extraction model, so that the target event trigger word-setup of the trigger word extraction model for the text to be processed output can be obtained.
Step S318, determining an event type label vector in the first label vector, inputting the event type label vector, the candidate entity coding vector and the candidate entity score into an element extraction model, and pruning the candidate entity coding vector according to parameters set by the element extraction model to obtain a second identification pruning coding vector.
Specifically, after determining that the first tag vectors are span4_ label _ embedding, span5_ label _ embedding and span6_ label _ embedding, respectively, span4_ label _ embedding is determined as an event type tag vector according to a target event trigger word a4 of a text to be processed, and then event type tag vectors span4_ label _ embedding, candidate entity encoding vectors (En1, En2, En3, En4, En5, En6, En7, En8, En9) and candidate entity scores (S1, S2, S3, S4, S5, S6, S7, S8, S9) are input to the element extraction model.
Pruning the candidate entity coding vectors through a super parameter preset by an element extraction model, and determining that the candidate entity coding vectors En1 and En2 belong to a first class, the candidate entity coding vectors En3, En7 and En9 belong to a second class, the candidate entity coding vector En4 belongs to a third class, the candidate entity coding vectors En5 and En6 belong to a fourth class, and the candidate entity coding vector En8 belongs to a fifth class, wherein the fifth class is a negative class; then p 1% pruning processing is carried out on the candidate entities of the first class, p 2% pruning processing is carried out on the candidate entities of the second class, p 3% pruning processing is carried out on the candidate entities of the third class, p 4% pruning processing is carried out on the candidate entities of the fourth class, p 5% pruning processing is carried out on the candidate entities of the fifth class, and the residual candidate entity coding vectors are used as second recognition pruning coding vectors, namely the second recognition pruning coding vectors comprise candidate entity coding vectors En1, En3, En5, En6, En7 and En 9.
Step S320, determining a second target identification pruning coding vector based on the candidate entity score and the second identification pruning coding vector.
Specifically, after the second identification pruning coding vector (En1, En3, En5, En6, En7, En9) is obtained, in order to further improve the determination accuracy of the target event element, secondary pruning may be performed through the candidate entity scores, so as to obtain a second target identification pruning coding vector meeting the subsequent processing requirement, that is, the candidate entity scores corresponding to each second identification pruning coding vector are compared with a preset score threshold, the second identification pruning coding vector smaller than the preset score threshold is deleted according to the comparison result, the remaining second identification pruning coding vector is used as the second target identification pruning coding vector, and the second target identification pruning coding vector is determined to be (En3, En7, En 9).
And step S322, splicing the second target identification pruning coded vector and the event type label vector to obtain a spliced coded vector.
Specifically, considering the mutual influence of the event trigger word and the event element, and in order to accurately determine the event of the text to be processed, the classification label obtained when the trigger word extraction model extracts the trigger word may be introduced into the element extraction model, so that the trigger word extraction model and the element extraction model may be constrained and influenced with each other, and the extraction accuracy of the target event element is promoted, that is, the correlation between the target event element and the target event trigger word is high, so that the target event in the text to be processed can be more indicated.
Based on this, the second target identification pruning coding vectors are spliced with the event type label vectors, namely, the span4_ label _ embedding and the second target identification pruning coding vector En3, so as to obtain a spliced coding vector En 3_ span4_ label _ embedding, the span4_ span _ embedding and the second target identification pruning coding vector En7 are spliced, so as to obtain a spliced coding vector En 7_ span4_ span _ embedding, and the span4_ span _ embedding and the second target identification pruning coding vector En9 are spliced, so as to obtain a spliced coding vector En 9_ span4_ span _ embedding.
Step S324, determining a classification label of the concatenated coding vector, and performing coding processing on the classification label to obtain a second label vector.
And step S326, splicing the second label vector and the splicing coding vector to obtain an initial element coding vector.
Specifically, the initial element encoding vector El3 obtained after splicing is span3_ element _ elements ═ torch.cat ([ En3 × span4_ label _ encoding ]); let El7 be span7_ element _ elements ═ tch ([ En7 by span4_ label _ embedding ]); cat ([ En9 ] span4_ label _ embedding ]).
Step S328, performing classification prediction on the initial element encoding vectors to obtain intermediate element encoding vectors, and performing scoring processing on the intermediate element encoding vectors through a feed-forward neural network in the element extraction network.
Specifically, after obtaining the initial element code vectors (El3, El7, El9), in order to determine the target event elements in the text to be processed more accurately at this time, classification prediction is performed on each initial element code vector to obtain intermediate element code vectors (El3, El7, El9), where the intermediate element code vector Elm3 corresponds to the initial element code vector El3, the intermediate element code vector Elm7 corresponds to the initial element code vector El7, and the intermediate element code vector Elm9 corresponds to the initial element code vector El 9; and then, scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model, namely, performing secondary scoring on the screened candidate entity coding vectors, and determining that the score corresponding to the intermediate element coding vector Elm3 is Slm3, the score corresponding to the intermediate element coding vector Elm7 is Slm7, and the score corresponding to the intermediate element coding vector Elm9 is Slm 9.
And step S330, obtaining a target element coding vector according to the scoring processing result and the intermediate element coding vector, processing the target element coding vector through an output layer in the element extraction model, and outputting a target event element.
Specifically, after the scores corresponding to the intermediate element coding vectors are obtained, the target element coding vector can be determined by selecting the score to be earlier, and by comparing the scores Slm3, Slm7 > Slm9, the intermediate element coding vector Elm3 corresponding to the score Slm3 and the intermediate element coding vector Elm7 corresponding to the score Slm7 can be selected as the target element coding vectors.
And finally, determining that A3 and A7 are target event elements in the text to be processed through the intermediate element encoding vector Elm3 and the intermediate element encoding vector Elm7, and converting the target element encoding vectors (the intermediate element encoding vector Elm3 and the intermediate element encoding vector Elm7) through an output layer in the element extraction network to obtain a target event element- (A, research institute) output by the element extraction model for the text to be processed.
In summary, the target event triggering word-setup output by the triggering word extraction model and the target event element- (a, institute) output by the element extraction model can determine the event of the text to be processed as [ set up institute at a site ].
After the candidate entity fragment is obtained, the candidate entity fragment coding vector corresponding to the candidate entity fragment is determined, then the entity fragment coding vector is identified and scored through an entity identification model, the candidate entity coding vector and the candidate entity score are obtained, at the moment, the candidate entity coding vector and the candidate entity score are input into a trigger word extraction model to be processed, a target event trigger word in the candidate entity fragment is extracted, meanwhile, the candidate entity coding vector, the candidate entity score and an event type label vector are input into an element extraction model to be processed, a target event element in the candidate entity fragment is extracted, and therefore an event extraction task in the candidate entity fragment is completed, and by introducing a classification label of the trigger word during element extraction, the event extraction efficiency can be improved, the method can also avoid the influence of errors on two extraction tasks, and effectively improves the precision and efficiency of the multi-task model during event extraction.
Corresponding to the above method embodiment, the present application further provides an event processing device embodiment, and fig. 4 shows a schematic structural diagram of an event processing device provided in an embodiment of the present application. As shown in fig. 4, the apparatus includes:
an obtaining module 402 configured to obtain candidate entity segments and determine candidate entity segment encoding vectors corresponding to the candidate entity segments;
an entity processing module 404, configured to perform entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model, so as to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
a trigger extraction module 406, configured to input the candidate entity coding vectors and the candidate entity scores to a trigger extraction model for pruning and prediction processing, so as to obtain target event trigger words in the candidate entity segments;
the element extraction module 408 is configured to determine an event type tag vector corresponding to the candidate entity fragment, input the candidate entity coding vector, the candidate entity score and the event type tag vector to an element extraction model for pruning, and perform prediction processing after splicing a pruning processing result and the event type tag vector to obtain a target event element in the candidate entity fragment.
In an optional embodiment, the event processing apparatus further includes:
the sentence acquisition module is configured to acquire a sentence to be processed and perform word segmentation on the sentence to be processed to obtain a plurality of word units;
accordingly, the obtaining module 402 is further configured to:
determining the candidate entity fragment based on at least one of the word units.
In an optional embodiment, the obtaining module 402 is further configured to:
inputting the candidate entity fragment into a coding module, processing the candidate entity fragment through a statement coding network in the coding module to obtain a statement feature vector, and processing the candidate entity fragment through a character coding network in the coding module to obtain a character feature vector; splicing the statement feature vector and the character feature vector into a target feature vector, and processing the target feature vector through a text coding network in the coding module to obtain a text feature vector; and performing attention processing on the text feature vector to obtain the candidate entity fragment encoding vector corresponding to the candidate entity fragment.
In an optional embodiment, the obtaining module 402 is further configured to:
inputting the candidate entity fragment vector into an event type extraction model for classification processing to obtain an event type label corresponding to the candidate entity fragment; and converting the event type label to obtain the event type label vector.
In an optional embodiment, the entity processing module 404 is further configured to:
inputting the candidate entity fragment coding vector into the entity recognition model, and performing entity recognition processing on the candidate entity fragment coding vector to obtain the candidate entity coding vector; and scoring the candidate entity coding vectors through a feed-forward neural network in the entity recognition model to obtain the candidate entity scores corresponding to the candidate entity coding vectors.
In an optional embodiment, the trigger extraction module 406 is further configured to:
inputting the candidate entity coding vectors and the candidate entity scores into the trigger word extraction model, and pruning the candidate entity coding vectors according to parameters set by the trigger word extraction model to obtain first identification pruning coding vectors; and determining a first target identification pruning coding vector based on the candidate entity score and the first identification pruning coding vector, and performing prediction processing on the first target identification pruning coding vector through the trigger word extraction model to obtain the target event trigger word.
In an optional embodiment, the trigger extraction module 406 is further configured to:
inputting the first target identification pruning coding vector into the trigger word extraction model, and generating a first label vector by coding a classification label of the first target identification pruning coding vector; and determining a target event trigger word encoding vector based on the first label vector and the first target recognition pruning encoding vector, and outputting the target event trigger word through the trigger word extraction model.
In an optional embodiment, the element extraction module 408 is further configured to:
and classifying the first target identification pruning code vector through the trigger word extraction model to obtain the event type label vector corresponding to the first target identification pruning code vector.
In an alternative embodiment, the element extraction module 408 is further configured to:
inputting the candidate entity coding vector, the candidate entity score and the event type label vector into the element extraction model, and pruning the candidate entity coding vector according to parameters set by the element extraction model to obtain a second identification pruning coding vector; determining a second target identification pruning coding vector based on the candidate entity score and the second identification pruning coding vector, and splicing the second target identification pruning coding vector and the event type label vector to obtain a spliced coding vector; and predicting the spliced coding vector through the element extraction model to obtain the target event elements in the candidate entity fragments.
In an optional embodiment, the element extraction module 408 is further configured to:
generating an initial element encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector; classifying and predicting the initial element coding vectors to obtain intermediate element coding vectors, and scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model; and obtaining a target element coding vector according to a scoring processing result and the intermediate element coding vector, processing the target element coding vector through an output layer in the element extraction model, and outputting the target event element.
In an optional embodiment, the element extraction module 408 is further configured to:
generating a weight score based on the scoring processing result of the intermediate element coding vector, and sequentially performing attention processing on element extraction coding vectors corresponding to the intermediate element coding vector based on the weight score to obtain an intermediate vector; extracting a coding vector based on the intermediate vector and an element corresponding to the intermediate element coding vector to perform gating processing to obtain a gating vector; extracting a coding vector according to the gating vector, the intermediate vector and an element corresponding to the intermediate element coding vector to carry out recoding, and generating a recoded updated coding vector; generating the target element encoding vector based on the updated encoding vector and the classification label of the updated encoding vector.
In an optional embodiment, the element extraction module 408 is further configured to:
encoding the classification label of the spliced encoding vector to generate a second label vector; and integrating the second label vector and the splicing encoding vector, and generating the initial element encoding vector according to an integration result.
In an optional embodiment, the element extraction module 408 is further configured to:
encoding the classification label of the spliced encoding vector to generate a second label vector; determining a semantic vector corresponding to the splicing coding vector based on the position of the second target identification pruning coding vector in the candidate entity fragment; and integrating the semantic vector, the second label vector and the splicing coding vector, and generating the initial element coding vector according to an integration result.
In an optional embodiment, the event processing apparatus further includes:
and the event classification module is configured to use the context information of the candidate entity fragment corresponding to the semantic identification bit of the coding module as an event classification task.
In an alternative embodiment, the entity recognition model, the trigger extraction model, and the element extraction model share a feed-forward neural network for scoring.
After the candidate entity fragment is obtained, the candidate entity fragment coding vector corresponding to the candidate entity fragment is determined, then the entity fragment coding vector is identified and scored through the entity identification model, the candidate entity coding vector and the candidate entity score are obtained, at the moment, the candidate entity coding vector and the candidate entity score are input into the trigger word extraction model to be processed, the target event trigger word in the candidate entity fragment is extracted, meanwhile, the candidate entity coding vector, the candidate entity score and the event type label vector are input into the element extraction model to be processed, the target event element in the candidate entity fragment is extracted, and therefore the event extraction task in the candidate entity fragment is completed, the event extraction efficiency can be improved by introducing the classification label of the trigger word during the element extraction, the method can also avoid the influence of errors on two extraction tasks, and effectively improves the precision and efficiency of the multi-task model during event extraction.
The above is a schematic scheme of an event processing apparatus of the present embodiment. It should be noted that the technical solution of the event processing device and the technical solution of the event processing method belong to the same concept, and for details that are not described in detail in the technical solution of the event processing device, reference may be made to the description of the technical solution of the event processing method. Further, the components in the device embodiment should be understood as functional blocks that must be created to implement the steps of the program flow or the steps of the method, and each functional block is not actually divided or separately defined. The device claims defined by such a set of functional modules are to be understood as a functional module framework for implementing the solution mainly by means of a computer program as described in the specification, and not as a physical device for implementing the solution mainly by means of hardware.
Fig. 5 is a flowchart illustrating a model training method according to an embodiment of the present application, which specifically includes the following steps:
step S502, obtaining a sample candidate entity pair and a sample event type label vector, and determining a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model.
Step S504, inputting the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing, and obtaining sample event trigger words.
Step S506, inputting the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing, and obtaining sample event elements.
Step S508, determining loss values of the entity recognition model, the trigger word extraction model, and the element extraction model based on the sample event trigger word and the sample event element, respectively, and training the entity recognition model, the trigger word extraction model, and the element extraction model.
Corresponding to the above method embodiment, the present application further provides an embodiment of a model training device, and fig. 6 shows a schematic structural diagram of the model training device provided in an embodiment of the present application. As shown in fig. 6, the apparatus includes:
an obtain sample module 602 configured to obtain a sample candidate entity pair and a sample event type tag vector, and determine a sample candidate entity encoding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
a first processing module 604, configured to input the sample candidate entity encoding vector and the sample candidate entity score to a trigger word extraction model for processing, so as to obtain a sample event trigger word; and
a second processing module 606 configured to input the sample candidate entity encoding vector, the sample candidate entity score, and the sample event type tag vector to an element extraction model for processing, so as to obtain sample event elements;
a training module 608 configured to determine loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, respectively, and train the entity recognition model, the trigger word extraction model and the element extraction model.
The above is a schematic scheme of a model training apparatus of the present embodiment. It should be noted that the technical solution of the model training apparatus and the technical solution of the model training method belong to the same concept, and details that are not described in detail in the technical solution of the model training apparatus can be referred to the description of the technical solution of the model training method. Further, the components in the device embodiment should be understood as functional blocks that must be created to implement the steps of the program flow or the steps of the method, and each functional block is not actually divided or separately defined. The device claims defined by such a set of functional modules are to be understood as a functional module framework for implementing the solution mainly by means of a computer program as described in the specification, and not as a physical device for implementing the solution mainly by means of hardware.
Fig. 7 illustrates a block diagram of a computing device 700 provided according to an embodiment of the present application. The components of the computing device 700 include, but are not limited to, memory 710 and a processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 740, access device 740 enabling computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 740 may include one or more of any type of network interface, e.g., a Network Interface Card (NIC), wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of the computing device 700 and other components not shown in fig. 7 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 7 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 700 may also be a mobile or stationary server.
Wherein processor 720 is configured to execute the following computer-executable instructions:
acquiring candidate entity fragments, and determining candidate entity fragment coding vectors and event type label vectors corresponding to the candidate entity fragments;
carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
inputting the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity fragments;
and inputting the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splicing a pruning result and the event type label vector, and then performing prediction processing to obtain a target event element in the candidate entity segment.
Alternatively, the first and second electrodes may be,
obtaining a sample candidate entity pair and a sample event type label vector, and determining a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
inputting the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
inputting the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing to obtain sample event elements;
and respectively determining loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, and training the entity recognition model, the trigger word extraction model and the element extraction model.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solutions of the two methods described above belong to the same concept, and details that are not described in detail in the technical solutions of the computing device can be referred to the descriptions of the technical solutions of the two methods described above.
An embodiment of the present application further provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are configured to:
obtaining candidate entity fragments, and determining candidate entity fragment coding vectors and event type label vectors corresponding to the candidate entity fragments;
carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
inputting the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments;
and inputting the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splicing a pruning result and the event type label vector, and then performing prediction processing to obtain a target event element in the candidate entity segment.
Alternatively, the first and second electrodes may be,
obtaining a sample candidate entity pair and a sample event type label vector, and determining a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
inputting the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
inputting the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing to obtain sample event elements;
and respectively determining loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, and training the entity recognition model, the trigger word extraction model and the element extraction model.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium and the technical solutions of the two methods described above belong to the same concept, and details that are not described in detail in the technical solutions of the storage medium can be referred to the descriptions of the technical solutions of the two methods described above.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (19)

1. An event processing method, comprising:
obtaining candidate entity fragments and determining candidate entity fragment coding vectors corresponding to the candidate entity fragments;
carrying out entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
inputting the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments;
and determining an event type label vector corresponding to the candidate entity fragment, inputting the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splicing a pruning result and the event type label vector, and then performing prediction processing to obtain a target event element in the candidate entity fragment.
2. The method of claim 1, wherein before the step of obtaining candidate entity fragments is performed, the method further comprises:
obtaining a sentence to be processed, and performing word segmentation processing on the sentence to be processed to obtain a plurality of word units;
correspondingly, the obtaining of the candidate entity fragment includes:
determining the candidate entity fragment based on at least one of the word units.
3. The method of claim 1, wherein the determining a candidate entity fragment encoding vector corresponding to the candidate entity fragment comprises:
inputting the candidate entity fragment into a coding module, processing the candidate entity fragment through a statement coding network in the coding module to obtain a statement feature vector, and processing the candidate entity fragment through a character coding network in the coding module to obtain a character feature vector;
splicing the statement feature vector and the character feature vector into a target feature vector, and processing the target feature vector through a text coding network in the coding module to obtain a text feature vector;
and performing attention processing on the text feature vector to obtain the candidate entity fragment encoding vector corresponding to the candidate entity fragment.
4. The method of claim 1, wherein the performing entity identification processing and scoring processing on the candidate entity segment code vectors through an entity identification model to obtain candidate entity code vectors and candidate entity scores corresponding to the candidate entity code vectors comprises:
inputting the candidate entity fragment coding vector into the entity recognition model, and performing entity recognition processing on the candidate entity fragment coding vector to obtain the candidate entity coding vector;
and scoring the candidate entity coding vectors through a feed-forward neural network in the entity recognition model to obtain the candidate entity scores corresponding to the candidate entity coding vectors.
5. The method of claim 1, wherein the inputting the candidate entity encoding vectors and the candidate entity scores into a trigger extraction model for pruning and prediction to obtain target event triggers in the candidate entity segments comprises:
inputting the candidate entity coding vectors and the candidate entity scores into the trigger word extraction model, and pruning the candidate entity coding vectors according to parameters set by the trigger word extraction model to obtain first identification pruning coding vectors;
and determining a first target identification pruning coding vector based on the candidate entity score and the first identification pruning coding vector, and performing prediction processing on the first target identification pruning coding vector through the trigger word extraction model to obtain the target event trigger word.
6. The method according to claim 5, wherein the performing prediction processing on the first target recognition pruning coding vector through the trigger word extraction model to obtain the target event trigger word comprises:
inputting the first target identification pruning coding vector into the trigger word extraction model, and generating a first label vector by coding a classification label of the first target identification pruning coding vector;
and determining a target event trigger word encoding vector based on the first label vector and the first target recognition pruning encoding vector, and outputting the target event trigger word through the trigger word extraction model.
7. The method of claim 5, wherein the determining the event type label vector corresponding to the candidate entity fragment comprises:
and classifying the first target identification pruning coding vector through the trigger word extraction model to obtain the event type label vector corresponding to the first target identification pruning coding vector.
8. The method according to claim 1, wherein the inputting the candidate entity encoding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, and performing prediction processing after splicing a pruning processing result and the event type label vector to obtain a target event element in the candidate entity fragment comprises:
inputting the candidate entity coding vector, the candidate entity score and the event type label vector into the element extraction model, and pruning the candidate entity coding vector according to parameters set by the element extraction model to obtain a second identification pruning coding vector;
determining a second target identification pruning coding vector based on the candidate entity score and the second identification pruning coding vector, and splicing the second target identification pruning coding vector and the event type label vector to obtain a spliced coding vector;
and performing prediction processing on the spliced coding vector through the element extraction model to obtain the target event elements in the candidate entity fragments.
9. The method of claim 8, wherein the predicting the spliced coding vector by the element extraction model to obtain the target event element in the candidate entity segment comprises:
generating an initial element encoding vector based on the splicing encoding vector and the classification label of the splicing encoding vector;
classifying and predicting the initial element coding vectors to obtain intermediate element coding vectors, and scoring the intermediate element coding vectors through a feedforward neural network in the element extraction model;
and obtaining a target element coding vector according to a grading processing result and the intermediate element coding vector, processing the target element coding vector through an output layer in the element extraction model, and outputting the target event element.
10. The method of claim 9, wherein deriving the target element-encoding vector from the scoring result and the intermediate element-encoding vector comprises:
generating a weight score based on the scoring processing result of the intermediate element coding vector, and sequentially performing attention processing on element extraction coding vectors corresponding to the intermediate element coding vector based on the weight score to obtain an intermediate vector;
extracting a coding vector based on the intermediate vector and an element corresponding to the intermediate element coding vector to perform gating processing to obtain a gating vector;
extracting a coding vector according to the gating vector, the intermediate vector and an element corresponding to the intermediate element coding vector to carry out recoding, and generating a recoded updated coding vector;
generating the target element encoding vector based on the updated encoding vector and the classification label of the updated encoding vector.
11. The method of claim 9, wherein generating an initial element-encoded vector based on the concatenated encoded vector and the class labels of the concatenated encoded vector comprises:
encoding the classification label of the spliced encoding vector to generate a second label vector;
and integrating the second label vector and the splicing encoding vector, and generating the initial element encoding vector according to an integration result.
12. The method of claim 9, wherein generating an initial element-encoded vector based on the concatenated encoded vector and the class labels of the concatenated encoded vector comprises:
encoding the classification label of the spliced encoding vector to generate a second label vector;
determining a semantic vector corresponding to the splicing coding vector based on the position of the second target identification pruning coding vector in the candidate entity fragment;
and integrating the semantic vector, the second label vector and the splicing coding vector, and generating the initial element coding vector according to an integration result.
13. The method of claim 3, further comprising:
and taking the context information of the candidate entity fragment corresponding to the semantic identification bit of the coding module as an event classification task.
14. The method of claim 3 or 9, wherein the entity recognition model, the trigger word extraction model, and the element extraction model share a feed-forward neural network for scoring.
15. An event processing apparatus, comprising:
the acquisition module is configured to acquire candidate entity fragments and determine candidate entity fragment coding vectors corresponding to the candidate entity fragments;
the entity processing module is configured to perform entity identification processing and scoring processing on the candidate entity fragment coding vectors through an entity identification model to obtain candidate entity coding vectors and candidate entity scores corresponding to the candidate entity coding vectors;
the trigger word extraction module is configured to input the candidate entity coding vectors and the candidate entity scores to a trigger word extraction model for pruning and prediction processing to obtain target event trigger words in the candidate entity segments;
and the element extraction module is configured to determine an event type label vector corresponding to the candidate entity fragment, input the candidate entity coding vector, the candidate entity score and the event type label vector into an element extraction model for pruning, splice a pruning result and the event type label vector, and perform prediction processing to obtain a target event element in the candidate entity fragment.
16. A method of model training, comprising:
obtaining a sample candidate entity pair and a sample event type label vector, and determining a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
inputting the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
inputting the sample candidate entity coding vector, the sample candidate entity score and the sample event type label vector into an element extraction model for processing to obtain sample event elements;
and respectively determining loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, and training the entity recognition model, the trigger word extraction model and the element extraction model.
17. A model training apparatus, comprising:
the system comprises an acquisition sample module, a sample event type label module and a sample event type label module, wherein the acquisition sample module is configured to acquire a sample candidate entity pair and a sample event type label vector, and determine a sample candidate entity coding vector and a sample candidate entity score of the sample candidate entity pair through an entity identification model;
the first processing module is configured to input the sample candidate entity coding vectors and the sample candidate entity scores to a trigger word extraction model for processing to obtain sample event trigger words; and
a second processing module, configured to input the sample candidate entity encoding vector, the sample candidate entity score and the sample event type label vector to an element extraction model for processing, so as to obtain sample event elements;
a training module configured to determine loss values of the entity recognition model, the trigger word extraction model and the element extraction model based on the sample event trigger word and the sample event element, respectively, and train the entity recognition model, the trigger word extraction model and the element extraction model.
18. A computing device, comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions to perform the steps of the method of any one of claims 1 to 14 or 16.
19. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 14 or 16.
CN202011529993.3A 2020-12-22 2020-12-22 Event processing method and device Pending CN114722817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011529993.3A CN114722817A (en) 2020-12-22 2020-12-22 Event processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011529993.3A CN114722817A (en) 2020-12-22 2020-12-22 Event processing method and device

Publications (1)

Publication Number Publication Date
CN114722817A true CN114722817A (en) 2022-07-08

Family

ID=82230168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011529993.3A Pending CN114722817A (en) 2020-12-22 2020-12-22 Event processing method and device

Country Status (1)

Country Link
CN (1) CN114722817A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778688A (en) * 2023-08-18 2023-09-19 深圳市宝腾互联科技有限公司 Machine room alarm event processing method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046350A (en) * 2019-04-12 2019-07-23 百度在线网络技术(北京)有限公司 Grammatical bloopers recognition methods, device, computer equipment and storage medium
CN110298038A (en) * 2019-06-14 2019-10-01 北京奇艺世纪科技有限公司 A kind of text scoring method and device
CN110852107A (en) * 2019-11-08 2020-02-28 北京明略软件***有限公司 Relationship extraction method, device and storage medium
US20200134422A1 (en) * 2018-10-29 2020-04-30 International Business Machines Corporation Relation extraction from text using machine learning
CN111339780A (en) * 2020-05-14 2020-06-26 北京金山数字娱乐科技有限公司 Word processing method and device based on multitask model
CN111353310A (en) * 2020-02-28 2020-06-30 腾讯科技(深圳)有限公司 Named entity identification method and device based on artificial intelligence and electronic equipment
CN111428505A (en) * 2020-01-17 2020-07-17 北京理工大学 Entity relation extraction method fusing trigger word recognition features
US20200285737A1 (en) * 2019-03-05 2020-09-10 Microsoft Technology Licensing, Llc Dynamic cybersecurity detection of sequence anomalies
CN111950297A (en) * 2020-08-26 2020-11-17 桂林电子科技大学 Abnormal event oriented relation extraction method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200134422A1 (en) * 2018-10-29 2020-04-30 International Business Machines Corporation Relation extraction from text using machine learning
US20200285737A1 (en) * 2019-03-05 2020-09-10 Microsoft Technology Licensing, Llc Dynamic cybersecurity detection of sequence anomalies
CN110046350A (en) * 2019-04-12 2019-07-23 百度在线网络技术(北京)有限公司 Grammatical bloopers recognition methods, device, computer equipment and storage medium
CN110298038A (en) * 2019-06-14 2019-10-01 北京奇艺世纪科技有限公司 A kind of text scoring method and device
CN110852107A (en) * 2019-11-08 2020-02-28 北京明略软件***有限公司 Relationship extraction method, device and storage medium
CN111428505A (en) * 2020-01-17 2020-07-17 北京理工大学 Entity relation extraction method fusing trigger word recognition features
CN111353310A (en) * 2020-02-28 2020-06-30 腾讯科技(深圳)有限公司 Named entity identification method and device based on artificial intelligence and electronic equipment
CN111339780A (en) * 2020-05-14 2020-06-26 北京金山数字娱乐科技有限公司 Word processing method and device based on multitask model
CN111950297A (en) * 2020-08-26 2020-11-17 桂林电子科技大学 Abnormal event oriented relation extraction method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
唐颖;曹春萍;: "基于LSTM的生物医学核心实体提取模型研究", 软件导刊, no. 05, 15 May 2018 (2018-05-15) *
庄传志;靳小龙;朱伟建;刘静伟;白龙;程学旗;: "基于深度学习的关系抽取研究综述", 中文信息学报, no. 12, 15 December 2019 (2019-12-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778688A (en) * 2023-08-18 2023-09-19 深圳市宝腾互联科技有限公司 Machine room alarm event processing method, device, equipment and storage medium
CN116778688B (en) * 2023-08-18 2023-11-10 深圳市宝腾互联科技有限公司 Machine room alarm event processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108920622B (en) Training method, training device and recognition device for intention recognition
CN109918680B (en) Entity identification method and device and computer equipment
CN110717325B (en) Text emotion analysis method and device, electronic equipment and storage medium
CN111241237B (en) Intelligent question-answer data processing method and device based on operation and maintenance service
CN113051916B (en) Interactive microblog text emotion mining method based on emotion offset perception in social network
CN106484664A (en) Similarity calculating method between a kind of short text
CN111159485B (en) Tail entity linking method, device, server and storage medium
CN110347790B (en) Text duplicate checking method, device and equipment based on attention mechanism and storage medium
CN110209802B (en) Method and device for extracting abstract text
CN112100365A (en) Two-stage text summarization method
CN113159187B (en) Classification model training method and device and target text determining method and device
CN111462752A (en) Client intention identification method based on attention mechanism, feature embedding and BI-L STM
CN111444695B (en) Text generation method, device and equipment based on artificial intelligence and storage medium
CN113408287A (en) Entity identification method and device, electronic equipment and storage medium
CN116737922A (en) Tourist online comment fine granularity emotion analysis method and system
CN115408488A (en) Segmentation method and system for novel scene text
CN111814450A (en) Aspect-level emotion analysis method based on residual attention
US11972218B1 (en) Specific target-oriented social media tweet sentiment analysis method
CN114138969A (en) Text processing method and device
CN114722817A (en) Event processing method and device
CN116932736A (en) Patent recommendation method based on combination of user requirements and inverted list
WO2023137903A1 (en) Reply statement determination method and apparatus based on rough semantics, and electronic device
CN112364666B (en) Text characterization method and device and computer equipment
CN113590768B (en) Training method and device for text relevance model, question answering method and device
CN115526176A (en) Text recognition method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination