CN112347783B - Alarm condition and stroke data event type identification method without trigger words - Google Patents

Alarm condition and stroke data event type identification method without trigger words Download PDF

Info

Publication number
CN112347783B
CN112347783B CN202011256331.3A CN202011256331A CN112347783B CN 112347783 B CN112347783 B CN 112347783B CN 202011256331 A CN202011256331 A CN 202011256331A CN 112347783 B CN112347783 B CN 112347783B
Authority
CN
China
Prior art keywords
event type
data
entity
sentences
sentence
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
CN202011256331.3A
Other languages
Chinese (zh)
Other versions
CN112347783A (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.)
Hunan Shuding Intelligent Technology Co ltd
Original Assignee
Hunan Shuding Intelligent Technology 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 Hunan Shuding Intelligent Technology Co ltd filed Critical Hunan Shuding Intelligent Technology Co ltd
Priority to CN202011256331.3A priority Critical patent/CN112347783B/en
Publication of CN112347783A publication Critical patent/CN112347783A/en
Application granted granted Critical
Publication of CN112347783B publication Critical patent/CN112347783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

Aiming at the characteristics of the short sentence, the ellipses, the fuzzification and the spoken language phenomena of the alert data, the invention provides an alert list data event type identification method without trigger words, which can fully utilize characters and corresponding entities in alert list data to identify event types of the alert list data compared with the event type identification method based on trigger words, and well solve the problems of the event type identification method based on trigger words.

Description

Alarm condition and stroke data event type identification method without trigger words
Technical Field
The invention relates to the technical field of natural language processing and deep learning, in particular to an event type identification method for transcript data in the public security alert field.
Background
The event type identification (Event Type Recognition) facing the warning situation and the recording data is an important link for the extraction of warning situation and recording information events, and the task of the event type identification is to identify events contained in a text and event types from unstructured texts.
At present, an event type identification method of alert transcript data is mainly based on event type identification of trigger words. Through careful analysis of the warning situation record data, the warning situation data is found to be characterized by fuzzification and spoken language expression. If the conventional trigger word-based event recognition method is adopted, the following problems are faced:
1. the short sentence phenomenon causes that a certain event description contains a plurality of trigger words, and the plurality of trigger words trigger a plurality of events. Therefore, in this case, if trigger words are still used for event recognition, co-reference resolution is also required for these multiple events. This not only increases the amount of tasks, but also causes error propagation, resulting in reduced event extraction performance;
2. the ellipsis phenomenon omits a trigger word in the event description, so that the event cannot be triggered, and the recall rate of event extraction is reduced;
3. the phenomena of blurring and spoken language enable the event trigger word description modes to be various, the trigger word list is enlarged, and the trigger word classification difficulty is improved.
Disclosure of Invention
Aiming at the characteristics of short sentence, ellipsis, fuzzification and spoken language of alert data, the invention provides a trigger-word-free alert stroke data event type identification method, which can effectively solve the problems of error propagation and recall rate reduction caused by irregular data such as short sentence, spoken language and the like in the trigger-word-based event type identification method and improve the alert stroke event type identification performance.
In order to achieve the technical purpose, the invention adopts the following specific technical scheme:
the warning condition and stroke record data event type identification method without trigger words comprises the following steps:
s1, collecting a large amount of original warning situation record data in the warning situation processing process, screening warning situation data sentences with rich semantics from the original warning situation record data by taking sentences as units to form a training data set S, and setting M warning situation data sentences in the training data set; predefining k entity tag types and q event type tags; and carrying out manual label labeling of entity and event types on each warning condition data sentence in the training data set by a professional.
S2, carrying out named entity recognition on the warning condition data sentences of the training data set to obtain entity labels corresponding to each character in each sentence, establishing a comparison table of the entity labels and the characters, and replacing corresponding entities in each sentence with the corresponding characters to obtain the processed warning condition data sentences.
S3, constructing an event type recognition model, determining a loss function, and performing model training by using the processed warning condition data sentences obtained in the S2 to obtain a trained event type recognition model.
S4, carrying out named entity recognition on the warning condition data sentences to be processed to obtain entity labels corresponding to each character in the sentences, replacing corresponding entities in the sentences with the corresponding characters according to the comparison table of the entity labels and the characters to obtain processed warning condition data sentences, and inputting the processed warning condition data sentences into a trained event type recognition model to obtain event types triggered by the warning condition data sentences.
In the invention, the implementation method of S2 comprises the following steps:
s2.1, vectorizing each character in the warning condition data sentence.
Specifically, the alert data sentence uses x= { X 1 ,x 2 ,…,x n Represented by x, where x i Representing characters in the warning condition data sentences, wherein n is the length of the warning condition data sentences; inputting X corresponding to the warning condition data sentence into a pre-training language model BERT, and obtaining vectorization representation corresponding to each character in the warning condition data sentence through the pre-training language model BERT.
S2.2, inputting the vectorization representation corresponding to each character in the alert data sentence into a bidirectional LSTM layer to obtain state vectors of each character for k kinds of entity labels, and forming a state matrix Z of the alert data sentence.
S2.3, carrying out named entity recognition on the state matrix Z of the warning condition data sentence through linear CRF to obtain a predicted entity tag sequence corresponding to the warning condition data sentence.
S2.4, establishing a comparison table of the entity tag and the character, and replacing the character corresponding to the corresponding entity in the alert data sentence according to the comparison table of the entity tag and the character and the predicted entity tag sequence to obtain the processed alert data sentence.
The invention describes a named entity recognition task as an entity tag sequence labeling problem, and uses a BIEO labeling coding scheme to label an entity tag sequence for a warning condition data sentence, so as to obtain a predicted entity tag sequence corresponding to the warning condition data sentence. S2.3, calculating a path which accords with BIEO labeling coding rules and has the largest path score in the state matrix Z of the alert data sentence by using a conditional random field modelThe corresponding entity tag sequence is used as a predicted entity tag sequence of Z. Specifically, the implementation method is as follows: randomly initializing a transfer matrix V, wherein V is a matrix of (k+2) x (k+2), k is the number of predefined entity labels, and k+2 is the addition of two special labels "START" and "END", and the elements V in the transfer matrix V ij Representing the fraction of entity tag i transferred to entity tag j.
For alert data sentence x= { X 1 ,x 2 ,…,x n Randomly selecting an entity tag sequence u= { U } 1 ,u 2 ,…,u n -calculating its path score P, where u i Entity tag representing the ith character selection of sentence, u i Belonging to one of the predefined k kinds of entity tags.
Alert data sentence x= { X 1 ,x 2 ,…,x n Each character in the sequence has k entity label choices, so the path has r pieces, and r=k n . The path scores corresponding to the r paths are P 1 、P 2 …P r One of the r paths is a preset correct path, and the path score of the r paths is P real . The loss function is thus defined as follows:
when the score P of the correct path real As the specific gravity of all path scores becomes greater, loss is decreasing. And taking the model with the minimum loss as an entity tag sequence prediction model, and outputting a result, namely an entity tag corresponding to each character in the alert data sentence, to form a predicted entity tag sequence.
The construction method of the event type recognition model in the S3 of the invention is as follows:
the alert data sentences in the training data set S are input into a word2vec model and converted into a vector matrix psi of dimension n x dim, dim being set to 300, n being the length of the sentence.
And converting the predicted entity tag sequence corresponding to the warning condition data sentence into an n multiplied by 1-dimensional matrix E according to a preset entity dictionary table.
And splicing the psi and E together to form a vector matrix F with n multiplied by 301 dimensions.
Randomly initializing a q multiplied by 301 dimensional matrix T as an event type matrix, wherein each event type is represented by a 301 dimensional vector; matrix T ith row vector T i Representing vector information corresponding to the ith event type.
The first layer of the constructed event type identification model is a Bi-LSTM layer, two unidirectional LSTM models are used, one model realizes forward information transmission, and the other model realizes backward information transmission; f is the input of the first layer of the model, the output is H, H is a vector matrix of dimension n×301, H= [ H ] 1 ,…,hn]Where hk represents the kth input x k Hidden layer output of corresponding Bi-LSMT unit, k E [1, n ]],x k Is X= [ X ] 1 ,…,xn]Is the k-th vector of (c).
The second layer of the constructed event type recognition model is the attention layer, H and T are the inputs of the second layer, defineIs corresponding to the current event type t i ,x k The specific gravity of attention occupied in the whole sentence is:
wherein:representing the current event type t i ,x k Is a concentration score of (2);
the output layer of the constructed event type identification model adopts a sigmoid function:
V att =S att ·t i
O i =σ(V att )
where σ is a sigmoid function, O i For event type t i Whether or not a result occurs.
Calculating t according to the above steps i The vector β= [ O ] is obtained 1 ,O 2 ,…,O q ]Beta is the event type prediction result of the alert data sentences output by the model.
For alert data sentences, the loss function is calculated as follows:
where y is an event type vector obtained by labeling the alert data sentences by the professional in S1,namely, beta, y and +.>Are all 1 xq vectors.
For the entire training dataset S, the loss function is as follows:
wherein Y= [ Y ] 1 ,…,y M ],Y and->Are vector matrices of m×q; y is 1 ,…,y M The training data set is the first 1 st, the first, the third, and the fourth of the expert, and M alert data sentences in the S1 are respectively carried out by the expertLabeling the obtained event type vector; />And (3) respectively outputting event type prediction results of M alert data sentences in the training data set of the model.
The beneficial effects of the invention are as follows:
aiming at the characteristics of warning condition data short sentence, ellipsis, fuzzification and spoken language, the invention provides a warning condition stroke data event type identification method without trigger words. On the premise of not manually marking the trigger words, the method can effectively solve the problem of error propagation and recall rate reduction caused by irregular data such as short sentence, spoken language and the like in the current warning condition and stroke event extraction. The method has small dependency on the standardability of the text, and can improve the accuracy and recall rate of the recognition of the police condition and the record event type. Moreover, the model does not depend on trigger words in the warning situation note data to identify event types, so that the cost of manually combing the trigger word list is reduced, the performance of identifying the warning situation note event types is improved, and data support and convenience are brought to public security departments for preventing crimes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of example 1;
fig. 2 is a block diagram of a constructed event type recognition model constructed in embodiment 1.
Detailed Description
In order to make the technical scheme and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1 to 2, the method for identifying the alert transcript data event type without trigger words provided in embodiment 1 includes the following steps:
s1, in cooperation with a public security system, a large amount of warning condition record data generated in the real warning condition case acceptance process are collected. And selecting answering sentences with proper length and rich semantics from the warning condition transcript data, and dividing the answering sentences through punctuation marks such as periods, semicolons and the like to obtain warning condition data sentences. The alert data sentences form a training data set S, and M alert data sentences are arranged in the training data set.
K entity tag types (including person name, time, place, etc.) and q event type tags are predefined by the expert group in close proximity to the business.
And taking sentences as units, and marking the artificial labels of the entity and event types for each warning condition data sentence in the training data set according to the label system. The entity tag label adopts a BIEO labeling mode, and the event type tag label is y= [ y ] 1 ,…,y q ]Wherein y is i ∈{0,1},y i When=1, the occurrence of the ith event is represented, y i =0 represents that the ith event does not occur.
S2, carrying out named entity recognition on the warning condition data sentences of the training data set to obtain entity labels corresponding to each character in each sentence, establishing a comparison table of the entity labels and the characters, and replacing corresponding entities in each sentence with the corresponding characters to obtain the processed warning condition data sentences.
In the embodiment, a BERT+BiLSTM+CRF method is adopted to conduct named entity recognition on police condition data sentences in the data training set. The specific implementation method is as follows:
s2.1 each alert data sentence in training dataset S is represented by X= { X 1 ,x 2 ,…,x n Represented by x, where x i Representing characters in the alert data sentence, n being the length of the alert data sentence. Inputting X corresponding to each warning condition data sentence into a pre-training language model BERT, and obtaining the warning condition data sentences through the pre-training language model BERTEach character x in the sub i The corresponding vectorized representation w= { w 1 ,w 2 ,…,w 768 768 is the dimension of the pre-trained language model BERT. And obtaining a vectorization matrix W after the X corresponding to each warning condition data sentence passes through the pre-training language model BERT, wherein W is n multiplied by 768.
S2.2 dividing each character x in the alert data sentence i Is input to the bi-directional LSTM layer to obtain the character x i State vector z= { z for k kinds of entity tags 1 ,z 2 ,…,z k And k is the kind of the entity tag. For X corresponding to each warning condition data sentence, a state matrix Z is obtained through the bidirectional LSTM layer, and the dimension of Z is n multiplied by k.
S2.3, carrying out named entity recognition on the state matrix Z of the warning condition data sentence through linear CRF to obtain a corresponding predicted entity tag sequence.
Describing the named entity recognition task as an entity tag sequence labeling problem, and using a BIEO (start, interior, end and exterior) labeling coding scheme to label the entity tag sequence of the alert data sentences so as to obtain a predicted entity tag sequence corresponding to the alert data sentences. And (3) adopting a BIEO labeling coding scheme to allocate a certain label in a BIEO for each mark in the alert data sentence. Since an entity consists of a plurality of consecutive tags in a sentence, this can identify the start and end positions of the entity and its type (e.g., organization). Specifically, B-type (start) is assigned to the first tag of an entity, E-type (end) is assigned to the last tag of an entity, I-type (inside) is assigned to other tags inside an entity, and O-tags (outside) are assigned if the tags are not part of an entity. For example, the input text is "the dry police of the public security office is three", and the aim is to predict the entity tag sequence of "B-organization I-organization E-organization O B-person name E-person name".
In this embodiment, CRF (conditional random field model) is used to calculate a path that accords with the BIEO labeling coding rule and has the largest path score in the state matrix Z of the alert data sentence, and the entity tag sequence corresponding to the path with the largest path score is used as the predicted entity tag sequence of Z.
There are several limitations to BIEO label coding rules, such as the inability of the B-organization to follow the I-person, and the inability of the O to follow the I-type.
First randomly initializing a transfer matrix V, V being a matrix of (k+2) x (k+2), k being the number of predefined entity tags, k+2 being the addition of two special tags "START" and "END", where V ij Representing the fraction of entity tag i transferred to entity tag j. The transfer matrix V is updated during training as the training iterates.
For alert data sentence x= { X 1 ,x 2 ,…,x n Randomly selecting an entity tag sequence u= { U } 1 ,u 2 ,…,u n -calculating its path score P, where u i Entity tag representing the ith character selection of sentence, u i The calculation formula of the path score P belongs to one entity tag in the predefined k entity tags as follows:
p=EmissionScore+TransitionScore
wherein z is 0,START And z n+1,END The value of the water is set to be 0,the i-th character in the state matrix Z is represented by the entity tag u i State scores at time;
wherein the method comprises the steps ofCollectively denoted as v i→j Form v of (v) i→j Representing V in the transfer matrix V ij I.e. the transfer fraction of entity tag i to entity tag j.
And because alert data sentence x= { X 1 ,x 2 ,…,x n Each character in the sequence has k entity label choices, so the path has r pieces, and r=k n The path scores corresponding to the r paths are P respectively 1 、P 2 …P r One of the r paths is a preset correct path, and the path score of the r paths is p real The loss function is thus defined as follows:
when the score p of the correct path real As the specific gravity of all path scores becomes greater, loss is decreasing. Training all data once to serve as one epoch, training 10 epochs, storing a model by taking loss as a name after each epoch training is finished, and taking a model with minimum loss as an entity tag sequence prediction model. And outputting the entity label corresponding to each character in the alert data sentence by the state matrix of the input alert data sentence of the entity label sequence prediction model to form a predicted entity label sequence.
S2.4, establishing a comparison table of the entity tag and the character, and replacing the character corresponding to the corresponding entity in the alert data sentence (for example, the name of a person is replaced by 'according to the comparison table of the entity tag and the character and the predicted entity tag sequence'"substitute") to obtain the processed alert data sentence N.
For example, after the entity special symbol substitution processing, the processed alert data sentence N is obtained: "In%sucking ≡ ∈ -: "person name", "NA", "place", "NA", "type".
S3, constructing an event type recognition model, determining a loss function, and performing model training by using the processed warning condition data sentences obtained in the S2 to obtain a trained event type recognition model.
S3.1, inputting the warning condition data sentences in the training data set S into a word2vec model, and converting the warning condition data sentences into a vector matrix ψ of n multiplied by dim dimensions, wherein dim is set to 300, and n is the length of the sentences.
S3.2, converting the predicted entity tag sequence corresponding to the warning condition data sentence into an n multiplied by 1 dimensional matrix E according to a preset entity dictionary table. The physical dictionary forms are as follows: { NA:0, name: 1, place name: 2..the type 9}. After NS conversion as in the above example, e= [1,0,2,0,0,9 ]] T
S3.3, splicing the psi and E together to form an n multiplied by 301 vector matrix F. A q x 301-dimensional matrix t is randomly initialized as a matrix of event types (q event types are predefined in the previous step), each event type being represented by a 301-dimensional vector. t is t i Representing the vector information corresponding to the ith event type, i.e. the ith row vector of matrix t.
S3.4, the first layer of the constructed event type identification model is a Bi-LSTM layer, two unidirectional LSTM models are used, one model is used for realizing forward information transmission, and the other model is used for realizing backward information transmission. F is the input of the first layer of the model, the output is H, and the F is an n×301-dimensional vector matrix. H may be represented as h= [ H ] 1 ,…,h n ]Wherein h is k Represents the kth input x k Hidden layer output of corresponding Bi-LSMT unit, k E [1, n ]],x k Is X= [ X ] 1 ,…,x n ]Is the k-th vector of (c).
The second layer of the constructed event type recognition model is the Attention layer (Attention layer), and h and t are inputs to the second layer.
Definition of the definitionIs corresponding to the current event type t i ,x k Attention specific gravity value occupied in the whole sentence. />Representing for the current eventType t i ,x k Is a score of attention of (a). />Is an n x 1 vector. />The calculation formula of (2) is as follows:
since the output is only 0 and 1, the output layer of the constructed event type identification model adopts a sigmoid function:
V att =S att ·t i
O i =σ(V att )
where σ is a sigmoid function, O i For event type t i Whether or not a result occurs.
Calculating t according to the above steps i The total result of (i e (1, q)) yields vector β= [ O ] 1 ,O 2 ,…,O q ]Beta is the event type prediction result of the alert data sentences output by the model.
For alert data sentences, the loss function is calculated as follows:
where y is an event type vector obtained by labeling the alert data sentences by the professional in S1,namely beta represents event type prediction results of alert data sentences output by the modelY and->Are all 1 xq vectors.
The loss function of the whole training dataset S is as follows:
wherein Y= [ Y ] 1 ,…,y M ],Y and->Are vector matrices of m×q; y is 1 ,…,y M Respectively marking event type vectors obtained by the first 1 st, the first, the third and the fourth of the M alert data sentences in the training data set by the professional in the S1;and (3) respectively outputting event type prediction results of M alert data sentences in the training data set of the model.
Training all training data once to be used as one epoch, training 50 epochs, and storing a model with the maximum F1 value as a final trained event type recognition model.
Referring to fig. 2, a warning condition data sentence with an entity naming result is taken as an input, and becomes a digital vector through a word embedding layer. The numeric vector is classified into two categories by q groups (q types of events in total) of different attention, and for each group of attention mechanisms, a result is obtained, and it is determined whether the text contains an event type corresponding to the group of attention mechanism parameters, and when the two categories of q types of events are all 0, the sentence is considered to be not containing predefined q types of events.
S4, inputting the warning condition data sentences to be processed into the entity tag sequence prediction model to obtain entity tags corresponding to each character, replacing corresponding entities in the sentences with corresponding characters according to a comparison table of the entities and the characters to obtain processed warning condition data sentences, and inputting the processed warning condition data sentences into the trained event type recognition model to obtain event types triggered by the warning condition data sentences.
If the sentence text of the warning condition data to be processed is: the forward and backward direction Jiang Ge of the machine borrows 3 and 4 times, which is about 7000 to 8000.
The result of named entity recognition is as follows: i (name)/forward and backward sharing/Jiang Ge (name)/borrow/3 or 4 times (measurement)/money, which is about/7000/(measurement)/to/8000 (measurement)/or so.
After obtaining the result of named entity recognition, processing the original text according to the result of named entity recognition, establishing a comparison table of specific entities and characters, replacing the result of named entity recognition by special symbols, and utilizing the comparison table of the following entities and characters: "person name"," Mobile phone number- "A.C.)>"," vector ∈ "," organization ∈ ->"," place-male "," measurement- ->"," number letter- "is used for the first time>"," date- "time-" type- ∈ "]. Replacing a specific entity in the sentence with a corresponding character according to the information in the comparison table, and obtaining the following result after replacing:
(name of person) O is O in the same direction as O->(name of person) "O borrows O +.>(metering), O->(metering) money O, O is approximately O ∈>(metering) to O->(metering) left and right O'
By comparing the alert data sentences before and after the processing, the length of the sentences can be effectively shortened, and the influence degree of noise data such as names, places, time and the like is also effectively reduced.
And inputting the processed warning condition data sentences into a trained event type recognition model to obtain event types triggered by the warning condition data sentences. The result of event recognition as above is: "funds inflow event".
In view of the foregoing, it will be evident to those skilled in the art that these embodiments are thus presented in terms of a simplified form, and that these embodiments are not limited to the particular embodiments disclosed herein.

Claims (10)

1. The warning condition and stroke record data event type identification method without trigger words is characterized by comprising the following steps of:
s1, collecting a large amount of original warning situation record data in the warning situation processing process, screening warning situation data sentences with rich semantics from the original warning situation record data by taking sentences as units to form a training data set S, and setting M warning situation data sentences in the training data set; predefining types of k entity tags and q event types; carrying out artificial tag labeling of entity and event types on each warning condition data sentence in the training data set by a professional;
s2, carrying out named entity recognition on the warning condition data sentences of the training data set to obtain entity labels corresponding to each character in each sentence, establishing a comparison table of the entity labels and the characters, and replacing corresponding entities in each sentence with the corresponding characters to obtain the processed warning condition data sentences;
s3, constructing an event type recognition model, determining a loss function, and performing model training by using the processed warning condition data sentences obtained in the S2 to obtain a trained event type recognition model;
s4, carrying out named entity recognition on the warning condition data sentences to be processed to obtain entity labels corresponding to each character in the sentences, replacing corresponding entities in the sentences with the corresponding characters according to the comparison table of the entity labels and the characters to obtain processed warning condition data sentences, and inputting the processed warning condition data sentences into a trained event type recognition model to obtain event types triggered by the warning condition data sentences.
2. The trigger-word-free alert transcript data event type identification method according to claim 1, wherein: the implementation method of the S2 comprises the following steps:
s2.1, vectorizing each character in the alert data sentence;
s2.2, inputting the vectorization representation corresponding to each character in the alert data sentence into a bidirectional LSTM layer to obtain state vectors of each character for k entity tags, and forming a state matrix Z of the alert data sentence;
s2.3, carrying out named entity recognition on the state matrix Z of the warning condition data sentence through linear CRF to obtain a predicted entity tag sequence corresponding to the warning condition data sentence;
s2.4, establishing a comparison table of the entity tag and the character, and replacing the character corresponding to the corresponding entity in the alert data sentence according to the comparison table of the entity tag and the character and the predicted entity tag sequence to obtain the processed alert data sentence.
3. According to claim 2The alarm condition and stroke record data event type identification method without trigger words is characterized by comprising the following steps of: in S2.1, the alert data sentence uses X= { X 1 ,x 2 ,…,x n Represented by x, where x i Representing characters in the warning condition data sentences, wherein n is the length of the warning condition data sentences; inputting X corresponding to the warning condition data sentence into a pre-training language model BERT, and obtaining vectorization representation corresponding to each character in the warning condition data sentence through the pre-training language model BERT.
4. The trigger-word-free alert transcript data event type identification method according to claim 2, wherein: and S2.3, describing a named entity recognition task as an entity tag sequence labeling problem, and using a BIEO labeling coding scheme to label the entity tag sequence of the warning condition data sentence so as to obtain a predicted entity tag sequence corresponding to the warning condition data sentence.
5. The trigger-word-free alert transcript data event type identification method as claimed in claim 4 wherein: s2.3, calculating a path which accords with the BIEO labeling coding rule and has the maximum path score in a state matrix Z of the alert data sentence by using a conditional random field model, wherein an entity tag sequence corresponding to the path with the maximum path score is used as a predicted entity tag sequence of Z.
6. The trigger-word-free alert transcript data event type identification method according to claim 5 wherein: the implementation method of S2.3 is as follows: randomly initializing a transfer matrix V, wherein V is a matrix of (k+2) x (k+2), k is the number of predefined entity labels, and k+2 is the addition of two special labels "START" and "END", and the elements V in the transfer matrix V ij A score representing the transfer of entity tag i to entity tag j;
for alert data sentence x= { X 1 ,x 2 ,…,x n Randomly selecting an entity tag sequence u= { U } 1 ,u 2 ,…,u n -calculating its path score P, where u i Representation ofEntity tag for selecting ith character of sentence, u i One of the k predefined entity tags;
alert data sentence x= { X 1 ,x 2 ,…,x n Each character in the sequence has k entity label choices, so the path has r pieces, and r=k n The path scores corresponding to the r paths are P 1 、P 2 …P r One of the r paths is a preset correct path, and the path score of the r paths is P real The loss function is thus defined as follows:
when the score P of the correct path real When the proportion of the scores of all paths is continuously increased, the loss is continuously reduced; and taking the model with the minimum loss as an entity tag sequence prediction model, and outputting a result, namely an entity tag corresponding to each character in the alert data sentence, to form a predicted entity tag sequence.
7. The trigger-word-free alert transcript data event type identification method as claimed in claim 6 wherein: the calculation method of the path score P in S2.3 comprises the following steps:
P=EmissionScore+TransitionScore
wherein z is 0,START And z n+1,END The value of the water is set to be 0,the i-th character in the state matrix Z is represented by the entity tag u i State scores at time;
wherein the method comprises the steps ofCollectively denoted as v i→j Form v of (v) i→j Representing V in the transfer matrix V ij I.e. the transfer fraction of entity tag i to entity tag j.
8. The trigger-word-free alert transcript data event type identification method according to any one of claims 1 to 7, wherein the method for constructing the event type identification model in S3 is as follows:
inputting the warning condition data sentences in the training data set S into a word2vec model to convert the warning condition data sentences into a vector matrix psi with dimension of n multiplied by dim, wherein dim is set to 300, and n is the length of the warning condition data sentences;
converting a predicted entity tag sequence corresponding to the warning condition data sentence into an n multiplied by 1 matrix E according to a preset entity dictionary table;
splicing the psi and E together into a vector matrix F with n multiplied by 301 dimensions;
randomly initializing a q×301-dimensional matrix T as an event type matrix, wherein each event type is represented by a 301-dimensional vector; matrix t row i vector t i Representing vector information corresponding to the ith event type;
the first layer of the constructed event type identification model is a Bi-LSTM layer, two unidirectional LSTM models are used, one model realizes forward information transmission, and the other model realizes backward information transmission; f is the input of the first layer of the model, the output is H, H is a vector matrix of dimension n×301, H= [ H ] 1 ,…,h n ]Wherein h is k Represents the kth input x k Hidden layer output of corresponding Bi-LSMT unit, k E [1, n ]],x k Is X= [ X ] 1 ,…,x n ]Is the kth vector of (a);
the second layer of the constructed event type recognition model is the attention layer, and H and T are the inputs of the second layer, definingIs corresponding to the current event type t i ,x k The specific gravity of attention occupied in the whole sentence is:
wherein:representing the current event type t i ,x k Is a concentration score of (2);
the output layer of the constructed event type identification model adopts a sigmoid function:
V att =S att ·t i
O i =σ(V att )
where σ is a sigmoid function, O i For event type t i Whether or not a result occurs;
calculating t according to the above steps i The vector β= [ O ] is obtained 1 ,O 2 ,…,O q ]Beta is the event type prediction result of the alert data sentences output by the model.
9. The trigger-less alert profile data event type recognition method of claim 8, wherein in S3, the penalty function for alert profile sentences is as follows:
where y is an event type vector obtained by labeling the alert data sentences by the professional in S1,namely, beta, y and +.>Are all 1 xq vectors;
the loss function for the entire training dataset S is as follows:
wherein Y= [ Y ] 1 ,…,y M ],Y and->Are vector matrices of m×q; y is 1 ,…,y M Respectively marking the 1 st, … th and M alert data sentences in the training data set by the professional in S1 to obtain event type vectors; />And respectively predicting the event type of the 1 st and … th and M alert data sentences in the training data set output by the model.
10. The trigger-word-free warning situation and stroke data event type recognition method according to claim 9, wherein in S3, all training data are trained once to be used as one epoch, a plurality of epochs are trained, and a model with the maximum F1 value is saved as a final trained event type recognition model.
CN202011256331.3A 2020-11-11 2020-11-11 Alarm condition and stroke data event type identification method without trigger words Active CN112347783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011256331.3A CN112347783B (en) 2020-11-11 2020-11-11 Alarm condition and stroke data event type identification method without trigger words

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011256331.3A CN112347783B (en) 2020-11-11 2020-11-11 Alarm condition and stroke data event type identification method without trigger words

Publications (2)

Publication Number Publication Date
CN112347783A CN112347783A (en) 2021-02-09
CN112347783B true CN112347783B (en) 2023-10-31

Family

ID=74363500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011256331.3A Active CN112347783B (en) 2020-11-11 2020-11-11 Alarm condition and stroke data event type identification method without trigger words

Country Status (1)

Country Link
CN (1) CN112347783B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420015A (en) * 2021-06-07 2021-09-21 浙江嘉兴数字城市实验室有限公司 Automatic classification method of social management events based on neural network
CN113420559A (en) * 2021-06-22 2021-09-21 苏州智汇谷科技服务有限公司 Method for identifying alarm information hierarchical elements and computer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107844609A (en) * 2017-12-14 2018-03-27 武汉理工大学 A kind of emergency information abstracting method and system based on style and vocabulary
CN111222318A (en) * 2019-11-19 2020-06-02 陈一飞 Trigger word recognition method based on two-channel bidirectional LSTM-CRF network
CN111507107A (en) * 2020-04-15 2020-08-07 长沙理工大学 Sequence-to-sequence-based extraction method for alert condition record events

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9971763B2 (en) * 2014-04-08 2018-05-15 Microsoft Technology Licensing, Llc Named entity recognition
US20180285397A1 (en) * 2017-04-04 2018-10-04 Cisco Technology, Inc. Entity-centric log indexing with context embedding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107844609A (en) * 2017-12-14 2018-03-27 武汉理工大学 A kind of emergency information abstracting method and system based on style and vocabulary
CN111222318A (en) * 2019-11-19 2020-06-02 陈一飞 Trigger word recognition method based on two-channel bidirectional LSTM-CRF network
CN111507107A (en) * 2020-04-15 2020-08-07 长沙理工大学 Sequence-to-sequence-based extraction method for alert condition record events

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种面向公安警情领域的事件抽取方法;邓秋严 等;中文信息学报;第36卷(第9期);全文 *
中文事件抽取与缺失角色填充的研究;侯立斌;中国优秀硕士学位论文全文数据库;全文 *

Also Published As

Publication number Publication date
CN112347783A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN108628823B (en) Named entity recognition method combining attention mechanism and multi-task collaborative training
CN106980683B (en) Blog text abstract generating method based on deep learning
CN111985239B (en) Entity identification method, entity identification device, electronic equipment and storage medium
CN111966812B (en) Automatic question answering method based on dynamic word vector and storage medium
CN108874896B (en) Humor identification method based on neural network and humor characteristics
CN110263325A (en) Chinese automatic word-cut
CN112347783B (en) Alarm condition and stroke data event type identification method without trigger words
CN114548101B (en) Event detection method and system based on backtracking sequence generation method
CN107977353A (en) A kind of mixing language material name entity recognition method based on LSTM-CNN
CN111666373A (en) Chinese news classification method based on Transformer
CN112818698A (en) Fine-grained user comment sentiment analysis method based on dual-channel model
CN114510946B (en) Deep neural network-based Chinese named entity recognition method and system
CN115600597A (en) Named entity identification method, device and system based on attention mechanism and intra-word semantic fusion and storage medium
CN111222329A (en) Sentence vector training method and model, and sentence vector prediction method and system
CN117094325B (en) Named entity identification method in rice pest field
Chowdhury et al. A continuous space neural language model for bengali language
CN116522165A (en) Public opinion text matching system and method based on twin structure
CN115906846A (en) Document-level named entity identification method based on double-graph hierarchical feature fusion
US20230153522A1 (en) Image captioning
CN114911940A (en) Text emotion recognition method and device, electronic equipment and storage medium
CN114580376A (en) Chinese abstract generating method based on component sentence method analysis
CN114510569A (en) Chemical emergency news classification method based on Chinesebert model and attention mechanism
Pattanayak et al. Natural language processing using recurrent neural networks
Wang et al. Event extraction via dmcnn in open domain public sentiment information
CN110766073A (en) Mobile application classification method for strengthening topic attention mechanism

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