CN111222330B - Chinese event detection method and system - Google Patents

Chinese event detection method and system Download PDF

Info

Publication number
CN111222330B
CN111222330B CN201911366648.XA CN201911366648A CN111222330B CN 111222330 B CN111222330 B CN 111222330B CN 201911366648 A CN201911366648 A CN 201911366648A CN 111222330 B CN111222330 B CN 111222330B
Authority
CN
China
Prior art keywords
event type
character
detected
characters
preliminary
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.)
Active
Application number
CN201911366648.XA
Other languages
Chinese (zh)
Other versions
CN111222330A (en
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.)
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jibei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jibei Electric Power 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 State Grid Corp of China SGCC, Beijing University of Posts and Telecommunications, China Electric Power Research Institute Co Ltd CEPRI, State Grid Jibei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201911366648.XA priority Critical patent/CN111222330B/en
Publication of CN111222330A publication Critical patent/CN111222330A/en
Application granted granted Critical
Publication of CN111222330B publication Critical patent/CN111222330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

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

Abstract

The invention provides a Chinese event detection method, which comprises the following steps: converting a text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types. The invention can search the classification of other events in the text by utilizing the co-occurrence relation among the event types for the uncertain result output by the original basic model detection, correct partial error output results and improve the Chinese event detection performance.

Description

Chinese event detection method and system
Technical Field
The invention belongs to the technical field of natural language processing, and particularly relates to a method and a system for detecting a Chinese event.
Background
With the development of computer technology, the computing power of computers is greatly improved, the research of machine learning and deep learning obtains a series of important achievements, and natural language processing is gradually and widely applied, for example, user preferences in commodity comments are mined through an emotion analysis technology, foreign language contents are automatically translated for users through a machine translation technology, and the like. Meanwhile, with the popularization of the internet and particularly the rapid development of social media, the generated text data shows explosive test growth, and has important significance and value for automatically processing and analyzing a large amount of information. Therefore, the natural language processing technology has gained wide attention of society by virtue of its efficient text processing and analysis capability. For the country, the processing and analysis of Chinese is closely related to the life work of people. The Chinese event detection is used as a basic task for extracting Chinese information, is based on tasks such as Chinese word segmentation, Chinese part-of-speech tagging, named entity identification and the like, and is widely applied to the fields such as automatic abstracting, automatic question answering, information retrieval, event reasoning and the like.
Conventional methods for event detection include pattern matching, structured perceptrons, maximum entropy models, and the like. In recent years, a feed-forward neural network, a long-short term memory model, a convolutional neural network, an attention mechanism and the like in deep learning are used for an event detection task and achieve good effects on a public data set, while natural language processing needs to complete the classification and text label extraction of massive texts in a large amount of text information at an extremely high speed, and high-efficiency detection performance is needed, so that how to improve the performance of Chinese event detection is a problem to be solved by the technical personnel in the field.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method for detecting a Chinese event, which comprises the following steps:
converting the text to be detected into a character vector sequence and a word vector sequence;
inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of the text to be detected and a corresponding event type;
the Chinese event detection model takes into account co-occurrence relationships between event types.
Preferably, converting the text to be detected into a character vector sequence and a word vector sequence includes:
converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Preferably, the establishment of the chinese event detection model includes:
constructing a training set based on the text with the determined trigger words and the event types;
constructing a basic model, and training the basic model by adopting a training set to obtain a trigger word in a training set text and a preliminary event type characteristic and a preliminary event type probability distribution corresponding to each character;
constructing a co-occurrence relation layer for modeling co-occurrence relation among event types on a basic model, taking the initial event type characteristics and the initial event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type characteristics corresponding to each character and considering the co-occurrence relation among the event types;
and constructing a classification layer on the co-occurrence relation layer, taking the event type characteristics of the co-occurrence relation among the considered event types corresponding to the characters obtained by the co-occurrence relation layer as input, calculating the event type probability distribution of the co-occurrence relation among the considered event types corresponding to the characters, and taking the event type with the highest probability as an event type result.
Preferably, the establishing of the chinese event detection model further includes:
obtaining a cross entropy loss function of model training based on the event type probability distribution predicted by the classification layer and the real event type probability distribution;
and solving the inverse gradient of the cross entropy loss function, and updating the parameters in the co-occurrence relation layer and the classification layer according to the learning rate.
Preferably, the step of calculating the event type feature considering the co-occurrence relationship between the event types corresponding to each character by using the preliminary event type feature and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relationship layer includes:
sequentially calculating the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters on the basis of the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevancy scoring between the preliminary event type characteristics corresponding to the character to be detected and other characters, sequentially calculating the relevancy weight between the preliminary event type characteristics corresponding to the character to be detected and other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
Preferably, based on the probability distribution of the preliminary event type corresponding to the character to be detected and the preliminary event types corresponding to other characters, the relevance scores between the character to be detected and the preliminary event type corresponding to other characters are sequentially calculated, and the calculation formula is as follows:
Figure BDA0002338606320000021
wherein the content of the first and second substances,
Figure BDA0002338606320000022
is the preliminary event type characteristic corresponding to the character to be detected,
Figure BDA0002338606320000023
is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjAnd scoring the correlation degree between the preliminary event type characteristics corresponding to the character to be detected and the jth character.
Preferably, based on the relevance score between the preliminary event type features corresponding to the character to be detected and other characters, the relevance weight between the preliminary event type features corresponding to the character to be detected and other characters is sequentially calculated, and the calculation formula is as follows:
Figure BDA0002338606320000031
wherein s iscjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjAnd the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character is obtained.
Preferably, based on the correlation weight between the character to be detected and the preliminary event type features corresponding to other characters, the co-occurrence relationship features corresponding to the character to be detected are calculated, and the calculation formula is as follows:
Figure BDA0002338606320000032
wherein, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,
Figure BDA0002338606320000033
indicating the preliminary event type feature corresponding to the jth character,
Figure BDA0002338606320000034
the co-occurrence relation characteristic corresponding to the character to be detected.
Preferably, based on the co-occurrence relationship characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected, the event type characteristic of the character to be detected considering the co-occurrence relationship is calculated, and the calculation formula is as follows:
Figure BDA0002338606320000035
wherein the content of the first and second substances,
Figure BDA0002338606320000036
for the co-occurrence characteristics corresponding to the pre-detection characters,
Figure BDA0002338606320000037
is the preliminary event type characteristic corresponding to the character to be detected,
Figure BDA0002338606320000038
event type characteristics of co-occurrence relations are considered for the characters to be detected.
Based on the same inventive concept, the invention also provides a Chinese event detection system, which comprises:
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word and a corresponding event type of the text to be detected;
the Chinese event detection model takes into account co-occurrence relationships between event types.
Preferably, the text processing module includes:
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Preferably, the chinese event detection module includes:
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, which take into account co-occurrence relations among event types;
and the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and correspond to the characters and take the co-occurrence relation among the event types into consideration as input, calculating the event type probability distribution which corresponds to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result.
Compared with the closest prior art, the invention has the following beneficial effects:
the invention provides a Chinese event detection method, which comprises the following steps: converting the text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types. The invention can search the classification of other events in the text by utilizing the co-occurrence relation among the event types for the uncertain result output by the original basic model detection, correct partial error output results and improve the Chinese event detection performance.
Drawings
FIG. 1 is a schematic diagram of a method for detecting a Chinese event according to the present invention;
FIG. 2 is a schematic diagram of a system for detecting a Chinese event according to the present invention;
FIG. 3 is a diagram illustrating a Chinese event detection model according to the present invention;
fig. 4 is a schematic process diagram for acquiring character-level features and word-level features of a character to be detected according to an embodiment of the present invention;
fig. 5 is a schematic process diagram for fusing character-level features and word-level features corresponding to characters to be detected, provided in the embodiment of the present invention;
fig. 6 is a schematic diagram of a process for calculating a boundary type of a trigger word and a corresponding event type according to an embodiment of the present invention.
Detailed Description
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
Example 1:
the schematic diagram of the method for detecting a Chinese event provided by the invention is shown in fig. 1, and the method comprises the following steps: converting the text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types.
In this embodiment, the length of the character of the input chinese text is N, the character to be detected is C, j represents any character in the text, and the specific detection method is as follows:
101, for a given Chinese text, performing word segmentation by using a jieba Chinese word segmentation tool, converting the word segmentation tool into a character sequence and a word sequence, and converting the character sequence into a character vector sequence and the word sequence into a word vector sequence through an existing character vector table and an existing word vector table;
102, using a Nugget Proposal Networks for Chinese Event Detection as a basic model layer, sequentially using each character as a character to be detected, inputting a corresponding character vector sequence and a word vector sequence, acquiring task-related characteristics for each character by using a convolution network, and outputting a trigger word and preliminary Event type characteristics and preliminary Event type probability distribution corresponding to each character in the text;
specifically, taking the process of acquiring the trigger word, the preliminary event type feature and the preliminary event type probability distribution corresponding to the character c to be detected as an example, the calculation steps are as follows:
102-1 As shown in FIG. 4, Word/Position Embedding represents a Word/Position vector, relational Feature Map represents a Convolutional Feature mapping, Compositional Feature represents a synthetic Feature, Token Level Feature represents a Token Level Feature, Lexical Feature represents a Lexical Level Feature, and Dynamic Multi-Pooling represents Dynamic Multi-Pooling forInput character vector sequence
Figure BDA0002338606320000051
And corresponding word vector sequence
Figure BDA0002338606320000052
Utilizing DMCNN (namely dynamic multi-pool convolution neural network) to respectively obtain character level characteristics and word level characteristics corresponding to the character c to be detected, wherein the calculation processes of the two characteristics are the same and are described in a unified way as follows:
xj=[ej:pj]formula (2-1)
rij=tanh(Wixj:j+h-1+bi) Formula (2-2)
ri left=maxj<crijFormula (2-3)
ri right=maxj≥crijFormula (2-4)
fc=[rleft:rright:ec-1:ec+1]Formula (2-5)
Where h denotes the sequence width covered by the convolution kernel, ejRepresenting an embedded representation of the jth character or word, pjIndicating that the position corresponding to position j is embedded in the representation, WiRepresenting the trainable i-th convolution kernel, biRepresenting the offset, r, corresponding to the trainable i-th convolution kernelijRepresenting character features calculated by the ith convolution kernel for the jth character, fcThe character-level features (denoted as
Figure BDA0002338606320000055
) Or word-level features (denoted as
Figure BDA0002338606320000056
)。
102-2 as shown in fig. 5, the model calculates the trigger word calculation boundary feature and the event type feature corresponding to the character c to be detected by using the character level feature and the word level feature corresponding to the character c to be detected, which are obtained by fusing Hybrid Representation Learning (DMCNN) (i.e. dynamic multi-pooling convolutional neural network), and has three implementation forms:
the Concat Hybrid mode is shown below:
Figure BDA0002338606320000061
Figure BDA0002338606320000062
the General Hybrid mode is shown below:
Figure BDA0002338606320000063
Figure BDA0002338606320000064
Figure BDA0002338606320000065
the Task-specific Hybrid approach is shown as follows:
Figure BDA0002338606320000066
Figure BDA0002338606320000067
Figure BDA0002338606320000068
Figure BDA0002338606320000069
wherein, WN、UN、bN、WT、UT、bTFor trainable parameters, s is an activation function, z is a weight unified by the character information in calculating the trigger word boundary type and event class, zNAnd zTWeights corresponding to the character information when calculating the trigger word boundary type and the event category,
Figure BDA00023386063200000610
and
Figure BDA00023386063200000611
and calculating boundary characteristics and preliminary event type characteristics for the trigger words corresponding to the characters c to be detected.
102-3 as shown in fig. 6, the Nugget Generator represents a shell Generator for calculating a boundary of a trigger Word, the Type Classifier represents an event Classifier for outputting a result of event classification, the Hybrid Char-Word retrieval Learning represents Word mixed Representation Learning, the boundary feature and the event Type feature are calculated based on the trigger Word corresponding to the character c to be detected, and the boundary probability distribution and the corresponding event Type feature probability distribution are calculated by the Nuggets pro positive Networks.
Calculating boundary probability distribution according to the trigger word, and determining that if the set maximum character sequence length of the trigger word is L, the corresponding possible boundary containing the current character has
Figure BDA00023386063200000612
In one embodiment, the boundary types represent a condition that the trigger word covers the character c to be detected, and the calculated probability is as follows:
Figure BDA00023386063200000613
Figure BDA00023386063200000614
Figure BDA00023386063200000615
Figure BDA0002338606320000071
wherein, WG、bG、WC、bCIn order to train the parameters, the user may,
Figure BDA0002338606320000072
and
Figure BDA0002338606320000073
and respectively taking the probability of the nth boundary and the probability of the kth event category for the character c to be detected.
102-4, calculating boundary probability distribution according to the trigger words, and determining the trigger word calculation boundary corresponding to the maximum probability in the probability distribution as the trigger word boundary corresponding to the character c to be detected;
102-5, calculating a trigger word corresponding to the character c to be detected according to the trigger word boundary corresponding to the character c to be detected;
102-6 according to steps 102-1 to 102-5, all trigger words in the text are identified;
103, building a Self-orientation layer for modeling a co-occurrence relation between event types on the basic model layer, wherein the Self-orientation layer is the co-occurrence relation layer, inputting the preliminary event type characteristics and the preliminary event type probability distribution corresponding to the character c to be detected obtained in the step 102-3 into the co-occurrence relation layer, and outputting the event type characteristics considering the co-occurrence relation corresponding to the character c to be detected, wherein the calculation process is as follows:
Figure BDA0002338606320000074
Figure BDA0002338606320000075
Figure BDA0002338606320000076
Figure BDA0002338606320000077
wherein the content of the first and second substances,
Figure BDA0002338606320000078
is the preliminary event type characteristic corresponding to the character to be detected,
Figure BDA0002338606320000079
is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,
Figure BDA00023386063200000710
indicating the preliminary event type feature corresponding to the jth character,
Figure BDA00023386063200000711
is the co-occurrence relation characteristic corresponding to the character to be detected,
Figure BDA00023386063200000712
is the preliminary event type characteristic corresponding to the character to be detected,
Figure BDA00023386063200000713
event type characteristics corresponding to the characters to be detected and considering the co-occurrence relationship;
104, inputting the event type characteristics, which are corresponding to the character c to be detected and take the co-occurrence relationship into a Classifier layer (classification layer) in the step 103, calculating new event type probability distribution, wherein the event type result with the highest probability is the event type result corresponding to the character c to be detected, and the classification layer comprises a full connection layer and a Softmax activation function;
105, constructing a cross entropy loss function for model training based on the probability distribution of the event class predicted in the step 104 and the probability distribution of the real event class, and calculating by adopting cross entropy as shown in the following formula:
L(θ)=-∑(x,y)∈Slog P (y | x; theta) formula (5-1)
The method comprises the steps that S represents a training set, each piece of training data comprises a character vector sequence, a word vector sequence and an event type corresponding to a marked character sequence, x represents the character vector sequence and the word vector sequence corresponding to a character to be detected, y represents a correct event type result of the character to be detected, and theta represents parameters of a model, a word vector table and a word vector table;
106, solving the inverse gradient of the cross entropy loss function in the step 105, and updating parameters of a Self-Attention layer (a co-occurrence relation layer) and a full connection layer according to the learning rate to obtain a new Chinese event detection model;
and 107, based on the trained Chinese event detection model, performing Chinese event detection on the Chinese text according to the steps 101 to 104 to obtain a trigger word and an event type corresponding to the text.
Detecting a text by using the trained chinese event detection model, as shown in fig. 3, inputting text information into a basic model layer of the chinese event detection model after processing the text information in step 101 to obtain a trigger word and a corresponding event type of the text to be detected, including:
processing text information and inputting the processed text information into a basic model layer of a Chinese event detection model to obtain trigger words of a text to be detected and old event type distribution and old event classification characteristics corresponding to each character, wherein the old event type distribution is primary event type probability distribution, and the old event classification characteristics are primary event classification characteristics;
inputting the old event type distribution and the old event classification characteristics corresponding to each character into a Self-Attention layer (co-occurrence relation layer) to obtain new event classification characteristics corresponding to each character, wherein the new event classification characteristics are the event classification characteristics considering contribution relation;
and inputting the new event type characteristics of each character considering the co-occurrence relationship into a Classiier layer (classification layer) to obtain the event type corresponding to the text trigger word.
Example 2:
the schematic diagram of the system for detecting a chinese event provided by the present invention is shown in fig. 2, and includes:
the system comprises a text processing module and a file detection module;
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain trigger words and corresponding event types of the text to be detected;
the Chinese event detection model considers the co-occurrence relationship among event types, namely: because of the inherent correlation between events, some event types often appear together in text, while some event types do not.
Wherein, the text processing module comprises:
the word segmentation module and the conversion module;
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Wherein, the Chinese incident detection module includes:
the device comprises a training set building module, a basic model building module, a co-occurrence relation layer building module and a classification layer building module;
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, which take into account co-occurrence relations among event types;
and the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and correspond to the characters and take the co-occurrence relation among the event types into consideration as input, calculating the event type probability distribution which corresponds to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result. The classification layer comprises a full connection layer and an activation function layer.
The invention supplements the co-occurrence relation characteristics corresponding to other characters in the same text in the event type characteristics of the original basic model, and for the uncertain results output by the original basic model detection, the invention can search the classification of other events in the text by using the co-occurrence relation among the event types, correct partial wrong output results and improve the Chinese event detection performance.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present application and not for limiting the scope of protection thereof, and although the present application is described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that after reading the present application, they can make various changes, modifications or equivalents to the specific embodiments of the application, but these changes, modifications or equivalents are all within the scope of protection of the claims to be filed.

Claims (9)

1. A method for detecting Chinese events is characterized by comprising the following steps:
converting the text to be detected into a character vector sequence and a word vector sequence;
inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of the text to be detected and a corresponding event type;
the Chinese event detection model considers the co-occurrence relation among event types;
the establishment of the Chinese event detection model comprises the following steps:
constructing a training set based on the text with the determined trigger words and the event types;
constructing a basic model, and training the basic model by adopting a training set to obtain a trigger word in a training set text and a preliminary event type characteristic and a preliminary event type probability distribution corresponding to each character;
constructing a co-occurrence relation layer for modeling co-occurrence relation among event types on a basic model, taking the initial event type characteristics and the initial event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type characteristics corresponding to each character and considering the co-occurrence relation among the event types;
constructing a classification layer on a co-occurrence relation layer, taking the event type characteristics of the co-occurrence relation among the considered event types corresponding to the characters obtained by the co-occurrence relation layer as input, calculating the event type probability distribution of the co-occurrence relation among the considered event types corresponding to the characters, and taking the event type with the highest probability as an event type result; the classification layer comprises a full connection layer and an activation function layer; taking the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type features corresponding to each character and considering the co-occurrence relation among the event types, wherein the event type features include:
sequentially calculating the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters on the basis of the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevancy scoring between the preliminary event type characteristics corresponding to the character to be detected and other characters, sequentially calculating the relevancy weight between the preliminary event type characteristics corresponding to the character to be detected and other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
2. The method of claim 1, wherein converting the text to be detected into a sequence of character vectors and a sequence of word vectors comprises:
converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
3. The method of claim 1, wherein the establishing of the chinese event detection model further comprises:
obtaining a cross entropy loss function of model training based on the event type probability distribution predicted by the classification layer and the real event type probability distribution;
and solving the inverse gradient of the cross entropy loss function, and updating the parameters in the co-occurrence relation layer and the classification layer according to the learning rate.
4. The method according to claim 1, wherein the relevance scores between the preliminary event type features corresponding to the characters to be detected and the other characters are sequentially calculated based on the preliminary event type probability distributions corresponding to the preliminary event type features corresponding to the characters to be detected and the other characters, and the calculation formula is as follows:
Figure FDA0003613286730000021
wherein the content of the first and second substances,
Figure FDA0003613286730000022
is the preliminary event type characteristic corresponding to the character to be detected,
Figure FDA0003613286730000023
is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjAnd scoring the correlation degree between the preliminary event type characteristics corresponding to the character to be detected and the jth character.
5. The method according to claim 1, wherein the correlation weights between the characters to be detected and the preliminary event type features corresponding to other characters are sequentially calculated based on the correlation scores between the characters to be detected and the preliminary event type features corresponding to other characters, and the calculation formula is as follows:
Figure FDA0003613286730000024
wherein s iscjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjAnd the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character is obtained.
6. The method according to claim 1, wherein the co-occurrence relationship characteristic corresponding to the character to be detected is calculated based on the correlation weight between the preliminary event type characteristics corresponding to the character to be detected and each of the other characters and the preliminary event type characteristics corresponding to each of the other characters, and the calculation formula is as follows:
Figure FDA0003613286730000031
wherein, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,
Figure FDA0003613286730000032
indicating the preliminary event type feature corresponding to the jth character,
Figure FDA0003613286730000033
and the co-occurrence relation characteristic corresponding to the character to be detected.
7. The method according to claim 1, wherein the event type feature of the character to be detected, which takes the co-occurrence relationship into consideration, is calculated based on the co-occurrence relationship feature corresponding to the character to be detected and the preliminary event type feature corresponding to the character to be detected, and the calculation formula is as follows:
Figure FDA0003613286730000034
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003613286730000035
for the co-occurrence relationship characteristic corresponding to the pre-detection character,
Figure FDA0003613286730000036
is the preliminary event type characteristic corresponding to the character to be detected,
Figure FDA0003613286730000037
event type characteristics of co-occurrence relations are considered for the characters to be detected.
8. A Chinese event detection system, comprising:
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain trigger words and corresponding event types of the text to be detected;
the Chinese event detection model takes the co-occurrence relation among event types into consideration;
the Chinese event detection module comprises:
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, where the co-occurrence relation between the event types is considered;
the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and are corresponding to the characters and take the co-occurrence relation among the event types as input, calculating the event type probability distribution which is corresponding to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result; the classification layer comprises a full connection layer and an activation function layer;
taking the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type features corresponding to each character and considering the co-occurrence relation among the event types, wherein the event type features include:
sequentially calculating the relevancy scores between the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type characteristics corresponding to other characters based on the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters, sequentially calculating the relevance weights between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
9. The system of claim 8, wherein the text processing module comprises:
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
CN201911366648.XA 2019-12-26 2019-12-26 Chinese event detection method and system Active CN111222330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911366648.XA CN111222330B (en) 2019-12-26 2019-12-26 Chinese event detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911366648.XA CN111222330B (en) 2019-12-26 2019-12-26 Chinese event detection method and system

Publications (2)

Publication Number Publication Date
CN111222330A CN111222330A (en) 2020-06-02
CN111222330B true CN111222330B (en) 2022-07-12

Family

ID=70829207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911366648.XA Active CN111222330B (en) 2019-12-26 2019-12-26 Chinese event detection method and system

Country Status (1)

Country Link
CN (1) CN111222330B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767402B (en) * 2020-07-03 2022-04-05 北京邮电大学 Limited domain event detection method based on counterstudy
CN113722481B (en) * 2021-08-23 2023-09-22 国家计算机网络与信息安全管理中心 Text multi-event detection method and device based on category and instance enhancement
CN114841162B (en) * 2022-05-20 2024-01-05 中国电信股份有限公司 Text processing method, device, equipment and medium
CN116705058B (en) * 2023-08-04 2023-10-27 贝壳找房(北京)科技有限公司 Processing method of multimode voice task, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446333A (en) * 2019-01-16 2019-03-08 深兰人工智能芯片研究院(江苏)有限公司 A kind of method that realizing Chinese Text Categorization and relevant device
CN109710919A (en) * 2018-11-27 2019-05-03 杭州电子科技大学 A kind of neural network event extraction method merging attention mechanism
CN109726293A (en) * 2018-11-14 2019-05-07 数据地平线(广州)科技有限公司 A kind of causal event map construction method, system, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908635B (en) * 2017-09-26 2021-04-16 百度在线网络技术(北京)有限公司 Method and device for establishing text classification model and text classification

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726293A (en) * 2018-11-14 2019-05-07 数据地平线(广州)科技有限公司 A kind of causal event map construction method, system, device and storage medium
CN109710919A (en) * 2018-11-27 2019-05-03 杭州电子科技大学 A kind of neural network event extraction method merging attention mechanism
CN109446333A (en) * 2019-01-16 2019-03-08 深兰人工智能芯片研究院(江苏)有限公司 A kind of method that realizing Chinese Text Categorization and relevant device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦彦霞等.基于混合表示的中文事件检测方法研究.《中文信息学报》.2019,(第04期), *

Also Published As

Publication number Publication date
CN111222330A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
US11631007B2 (en) Method and device for text-enhanced knowledge graph joint representation learning
CN110427463B (en) Search statement response method and device, server and storage medium
CN111222330B (en) Chinese event detection method and system
CN113011533A (en) Text classification method and device, computer equipment and storage medium
CN116795973B (en) Text processing method and device based on artificial intelligence, electronic equipment and medium
CN110633366B (en) Short text classification method, device and storage medium
CN107193796B (en) Public opinion event detection method and device
CN112256866B (en) Text fine-grained emotion analysis algorithm based on deep learning
CN111143569A (en) Data processing method and device and computer readable storage medium
CN113360582B (en) Relation classification method and system based on BERT model fusion multi-entity information
US11669740B2 (en) Graph-based labeling rule augmentation for weakly supervised training of machine-learning-based named entity recognition
CN111368082A (en) Emotion analysis method for domain adaptive word embedding based on hierarchical network
CN113742733A (en) Reading understanding vulnerability event trigger word extraction and vulnerability type identification method and device
CN113486645A (en) Text similarity detection method based on deep learning
Fogarolli Word sense disambiguation based on wikipedia link structure
Lee et al. Detecting suicidality with a contextual graph neural network
CN113901224A (en) Knowledge distillation-based secret-related text recognition model training method, system and device
CN111723583B (en) Statement processing method, device, equipment and storage medium based on intention role
CN113705207A (en) Grammar error recognition method and device
CN115905187B (en) Intelligent proposition system oriented to cloud computing engineering technician authentication
CN117216617A (en) Text classification model training method, device, computer equipment and storage medium
CN116644148A (en) Keyword recognition method and device, electronic equipment and storage medium
CN115510230A (en) Mongolian emotion analysis method based on multi-dimensional feature fusion and comparative reinforcement learning mechanism
WO2023173554A1 (en) Inappropriate agent language identification method and apparatus, electronic device and storage medium
CN114186020A (en) Semantic association method

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
GR01 Patent grant
GR01 Patent grant