Construction method of fragment pointer interaction model and social sensing disaster monitoring method

Through the fragment pointer interaction model, the pointer network and Highway network are used to detect event trigger words in social media text, solving the problem of low detection efficiency of disaster event trigger words in the prior art, and achieving fast and accurate disaster monitoring.

CN114943221BActive Publication Date: 2024-11-22HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210374738.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2024-11-22
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

The existing technology lacks effective method for detecting disaster incident trigger word based on short text on social media, resulting in poor timely acquisition of disaster incident information and low efficiency.

Method used

A fragment pointer interaction model is proposed, including the entity-aware encoding layer, the pointer network detection layer and the interval interaction perception layer based on the pre-trained language model. By acquiring and preprocessing social media text data, the pointer network architecture and the Highway network are used for event triggering. word detection and recognition.

Benefits of technology

It realizes faster event detection than traditional CRF methods, improves detection efficiency and accuracy, and can effectively and quickly identify event trigger words in social media texts, improving the real-time and accuracy of disaster monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943221B_ABST
    Figure CN114943221B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a fragment pointer interaction model and a social sensing disaster monitoring method, wherein the method for constructing the fragment pointer interaction model comprises: obtaining a training text set; inputting the training text into an entity perception coding layer to obtain a semantic representation of the training text; inputting the semantic representation of the training text into a pointer network detection layer to obtain a starting interval representation and an ending interval representation of each word in the training text; inputting the starting interval representation and the ending interval representation into an interval interaction perception layer, and the interval interaction perception layer performs feature interaction on the starting interval representation and the ending interval representation to obtain a starting category label and an ending category label after feature interaction; generating a corresponding starting category list and an ending category list based on the starting category label and the ending category label, and decoding based on the starting category list and the ending category list to obtain a disaster event trigger word. The present invention can realize effective and rapid event detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method for constructing a fragment pointer interaction model and a social sensing disaster monitoring method. Background Art

[0002] The occurrence of natural disasters has brought many inconveniences to people, and it is necessary to carry out disaster relief work in a timely manner to restore normal life order. Traditional disaster information collection work is mainly completed manually by relevant staff, but it is difficult for limited staff to achieve full coverage of disaster events in a short period of time, and some disaster information requires on-site investigation and reporting by staff, and it is often necessary to effectively grasp the disaster information after a long time of disaster occurrence. That is, traditional disaster information collection work consumes a lot of manpower and material resources and has poor timeliness. In recent years, with the development of social media, social media users can conveniently send their living conditions through mobile devices. At the first time of a disaster, social media users, as a direct contact group of the disaster, play the role of dynamic sensors, and the short texts sent by social media users act as social sensing information. This part of the disaster-related short texts, as a carrier of social sensing, greatly broadens the way to obtain disaster conditions, and this information is very real-time and does not require manual re-entry, which can effectively improve the efficiency of disaster handling.

[0003] The disaster event detection based on the above short text focuses on the detection of disaster event trigger words. Disaster event trigger words refer to words used to indicate the occurrence of disaster events. For example, the word "collapse" in the sentence "The typhoon directly hit XX District, XX City, causing the collapse of green trees on many main roads in XX District, blocking traffic" is a disaster event trigger word. Usually, the disaster facts can be detected by detecting the disaster event trigger words.

[0004] However, the existing technology lacks an effective disaster event trigger word detection method based on short texts in social media. Summary of the invention

[0005] The problem solved by the present invention is how to implement a disaster event trigger word detection method based on social media short texts.

[0006] The present invention proposes a method for constructing a segment pointer interaction model, wherein the segment pointer interaction model comprises an entity perception encoding layer based on a pre-trained language model, a pointer network detection layer, and an interval interaction perception layer; the method for constructing the segment pointer interaction model comprises the following steps:

[0007] Acquire a training text set, wherein the training text set is text data obtained after a preprocessing operation on social media text data;

[0008] Inputting training text in the training text set into the entity-aware coding layer, and obtaining a semantic representation of the training text output by the entity-aware coding layer;

[0009] Inputting the semantic representation of the training text into the pointer network detection layer to obtain the start interval representation and the end interval representation of each word in the training text predicted by the pointer network detection layer;

[0010] Inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, the interval interaction perception layer performs feature interaction on the starting interval representation and the ending interval representation to obtain a starting category label and an ending category label after feature interaction;

[0011] A corresponding starting category list and a terminating category list are generated based on the starting category label and the terminating category label, and a disaster event trigger word is obtained by decoding based on the starting category list and the terminating category list.

[0012] Optionally, the preprocessing operation comprises the following steps:

[0013] Extracting entity information from the social media text based on a preset word segmentation algorithm, wherein the entity information includes an entity type of the extracted entity word and position information of the entity word in the social media text;

[0014] appending the entity type and location information of the entity word extracted from the social media text to the social media text as the training text;

[0015] The pre-trained language model is a BERT model; the step of inputting the training text in the training text set into the entity-aware coding layer to obtain the semantic representation of the training text output by the entity-aware coding layer includes an input coding step when inputting the entity-aware coding layer, specifically including:

[0016] The social media text is encoded into a form of upper and lower sentences, wherein one sentence corresponds to a sequential encoding of the full text of the social media text, and the other sentence corresponds to an encoding of entity types and position information of entity words extracted from the social media text.

[0017] Optionally, before the step of extracting entity information from the social media text based on a preset word segmentation algorithm, the preprocessing operation further includes the following steps:

[0018] Obtaining original social media text data, and processing the original social media text data by performing at least one of the following operations:

[0019] Deduplication processing is performed on the original social media text data;

[0020] Using a preset keyword template to filter the original social media text data, wherein the keywords in the keyword template include text that is irrelevant to disaster facts;

[0021] The non-event sentences in the original social media text data are filtered.

[0022] Optionally, the step of inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and performing feature interaction on the starting interval representation and the ending interval representation by the interval interaction perception layer to obtain the starting category label and the ending category label after the feature interaction comprises the following steps:

[0023] After interacting with the start interval representation and the end interval representation, the first feature is obtained by integrating the original semantic representation of the training text;

[0024] After linear processing of the first feature, a second feature is obtained;

[0025] After the first feature and the second feature interact, a starting category label or a ending category label is output.

[0026] Optionally, the inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and the interval interaction perception layer performing feature interaction on the starting interval representation and the ending interval representation, to obtain the starting category label and the ending category label after the feature interaction includes:

[0027] r = tanh(W D ·concat(u s ,u e )), (1)

[0028] m (1) =W (1) concat(h,r)+b (1) , (2)

[0029] m (2) =W (2) ·(LayerNorm(m (1) ))+b (2) , (3)

[0030] P HIN (h,u s ,u e )=W (3) ·concat(m (1) ,m (2) )+b (3) , (4)

[0031] Wherein, formula (1) includes interacting the starting interval representation and the ending interval representation; formula (2) includes interacting the starting interval representation and the ending interval representation, and then integrating the original semantic representation of the training text to obtain a first feature; formula (3) includes linearly processing the first feature to obtain a second feature; formula (4) includes interacting the first feature and the second feature, and outputting a starting category label or a ending category label;

[0032] r refers to the feature obtained after the interaction between the starting interval representation and the ending interval, u s Refers to the starting interval, u e refers to the terminal interval representation, h refers to the original semantic representation of the training text, and m (1) Refers to the first feature, m (2) Refers to the second characteristic, P HIN (h,u s ,u e ) refers to the starting category label or the ending category label, W D , W (1) , W (2) , W (3) are weight matrices, b (1) , b (2) , b (3) These are bias parameters.

[0033] Optionally, generating a corresponding starting category list and a terminating category list based on the starting category label and the terminating category label includes:

[0034] P start = argmax eachrow (P HINstart ),

[0035] P end = argmax eachrow (P HINend ),

[0036] Among them, P start represents the starting category list, P end represents the termination category list, P HINstart represents the starting category label, P HINend Represents the termination category label.

[0037] Optionally, the pointer network detection layer includes a starting position determination module and an ending position determination module; the step of inputting the semantic representation of the training text into the pointer network detection layer to obtain the starting interval representation and the ending interval representation of each word in the training text predicted by the pointer network detection layer includes the following steps:

[0038] Inputting the semantic representation of the training text into the starting position determination module to obtain the starting interval representation of each word in the training text predicted by the starting position determination module;

[0039] The real starting interval representation of each word in the training text is obtained, and the real starting interval representation and the semantic representation of the training text are input into the end position determination module to obtain the end interval representation of each word in the training text predicted by the end position determination module.

[0040] The present invention also proposes a social sensing disaster monitoring method based on a fragment pointer interaction model, comprising:

[0041] Acquire social media text data, perform preprocessing operations on the social media text data, and obtain disaster monitoring text;

[0042] The disaster monitoring text is input into a trained segment pointer interaction model to obtain a disaster event trigger word output by the segment pointer interaction model, wherein the segment pointer interaction model is constructed by the segment pointer interaction model construction method described above.

[0043] Optionally, the segment pointer interaction model includes an entity perception encoding layer, a pointer network detection layer and an interval interaction perception layer based on a pre-trained language model, and the pointer network detection layer includes a start position determination module and an end position determination module; the inputting the disaster monitoring text into the trained segment pointer interaction model to obtain the disaster event trigger word output by the segment pointer interaction model includes the following steps:

[0044] Inputting the disaster monitoring text into the entity-aware coding layer, and obtaining the semantic representation of the disaster monitoring text output by the entity-aware coding layer;

[0045] Inputting the semantic representation of the disaster monitoring text into the starting position determination module to obtain the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module;

[0046] Inputting the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module and the semantic representation of the disaster monitoring text into the ending position determination module to obtain the ending interval representation of each word in the disaster monitoring text predicted by the ending position determination module;

[0047] Inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, the interval interaction perception layer performs feature interaction on the starting interval representation and the ending interval representation to obtain a starting category label and an ending category label after feature interaction;

[0048] A corresponding starting category list and a terminating category list are generated based on the starting category label and the terminating category label, and a disaster event trigger word is obtained by decoding based on the starting category list and the terminating category list.

[0049] The present invention also proposes a social sensing disaster monitoring device based on a fragment pointer interaction model, comprising a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the social sensing disaster monitoring method based on the fragment pointer interaction model as described above is implemented.

[0050] The present invention uses a pointer network detection layer based on a pointer network architecture to detect and identify event trigger words in social media text data by framing entity intervals. Because the pointer network architecture has a faster prediction speed, it can achieve faster event detection than the traditional CRF (conditional random field) method, which can effectively improve the detection efficiency. In addition, there are many irrelevant tags in social media text data, and they are colloquial. The traditional CRF method is not effective in extracting event trigger words for sparsely labeled data such as social media text data. The use of a pointer network architecture can also improve prediction accuracy. In addition, an interval interaction perception layer based on a highway network is used to improve the interactive ability of trigger word interval information. After the interval termination position information and the interval starting position information are fully integrated, they are used to determine the final starting category list and the termination category list, thereby improving the detection accuracy of the model and achieving effective and rapid event detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of an embodiment of the overall structure of a fragment pointer interaction model in a method for constructing a fragment pointer interaction model in an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of an embodiment of a pointer network detection layer structure of a fragment pointer interaction model of a method for constructing a fragment pointer interaction model according to an embodiment of the present invention;

[0053] Figure 3 It is a schematic diagram of an embodiment of a pointer interval interaction perception layer structure of a fragment pointer interaction model of a method for constructing a fragment pointer interaction model in an embodiment of the present invention;

[0054] Figure 4 It is a flow chart of a method for constructing a fragment pointer interaction model according to an embodiment of the present invention;

[0055] Figure 5 It is a schematic diagram of an embodiment of a text encoding method in a method for constructing a fragment pointer interaction model in an embodiment of the present invention;

[0056] Figure 6 It is a schematic diagram of an embodiment of an entity perception coding layer in a method for constructing a fragment pointer interaction model according to an embodiment of the present invention;

[0057] Figure 7 It is a schematic diagram of an embodiment of the preprocessing operation in the method for constructing the fragment pointer interaction model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0059] The present invention proposes a method for constructing a segment pointer interaction model, which is used to implement a social sensing disaster monitoring method. The segment pointer interaction model in the present invention includes an entity perception encoding layer based on a pre-trained language model, a pointer network detection layer, and an interval interaction perception layer, and the interval interaction perception layer includes an interaction perception module. Figure 1 A schematic diagram of an embodiment of the overall structure of the fragment pointer interaction model constructed in the present invention.

[0060] In one embodiment of the present invention, Figure 4 , the method for constructing the fragment pointer interaction model comprises the following steps:

[0061] Step S1, obtaining a training text set, wherein the training text set is text data obtained after social media text data is preprocessed.

[0062] Among them, social media text data refers to text data posted by users on social media such as Weibo or WeChat. When constructing a training text set, firstly, a preprocessing operation is performed on the social media text data, and then the preprocessed text data is annotated with disaster events, and then divided into a training text set and a test text set. The training text set is used to perform training operations including steps S2-S6. After the training is completed, the test text set is used to be sent to the fragment pointer interaction model to evaluate the results of the fragment pointer interaction model training.

[0063] Among them, the pre-processed text data is annotated with disaster events. For example, the social media text data is "Due to the typhoon, the palm trees in the roadside green belt collapsed, and the traffic on the relevant road sections was closed." Then "collapse" is the trigger word for vegetation loss, and "closure" is the trigger word for traffic failure. The first and last characters of the trigger words are annotated with corresponding disaster events, and "collapse" and "collapse" are respectively marked as vegetation loss, and "closure" and "closure" are respectively marked as traffic failure.

[0064] Optionally, the preprocessing operation includes at least one of the following operations: deduplicating the original social media text data; filtering the original social media text data using a preset keyword template; filtering non-event sentences in the original social media text data.

[0065] Among them, the deduplication processing of the original social media text data is carried out. Specifically, because the users of social media have strong autonomy, the same user may publish multiple texts with the same content, and different users may also publish texts with the same content. Moreover, in the encoding mechanism of some social media, such as the encoding mechanism of Weibo, users forwarding content and publishing new content will obtain a unique ID identification. Therefore, the crawler program distinguished by user ID may repeatedly crawl a large amount of similar or identical content. Therefore, it is necessary to deduplicate the original social media text data to reduce the amount of data processing without affecting disaster detection. Optionally, in order to efficiently remove duplicate text data, an embodiment of the present invention adopts the SimHash algorithm, which generates a feature vector of a sentence based on the words contained in the original sentence, without the need for external data and phrase library, which can greatly save time and space resources and improve computing efficiency. Specifically, the SimHash algorithm first segments the original data into words, then sets weights for the words, calculates the hash value of each word through the hash method, multiplies it by the corresponding weight to get the weighted vector of each word, and finally adds the weighted vectors of all words to get the weighted vector value of the whole sentence. The weighted vector value of the whole sentence is binarized to get the fingerprint vector of the sentence, and then the similarity is obtained by calculating the Hamming distance between the fingerprint vectors of different sentences. Sentences with similarity greater than a certain value are determined to be repeated sentences, and then deduplication is performed.

[0066] The original social media text data is filtered and processed by using a preset keyword template. Among them, the keywords in the keyword template include texts that are irrelevant to the facts of the disaster. Because the content of social media text data is rich and diverse, it is not necessarily all texts related to the disaster. Moreover, in the early stage of a meteorological disaster, relevant departments and media will also issue certain information for early warning based on the forecast results. This non-factual text will interfere with the data construction of this article. Therefore, a keyword template is set to filter out texts that are irrelevant to the facts of the disaster. Optionally, the keyword template includes a common sense science template and a warning information class, wherein the common sense science class contains keyword templates such as popular science knowledge and meteorological knowledge, and the warning information class contains keyword templates such as warning, reminder, and prediction.

[0067] Regarding filtering the non-event sentences in the original social media text data. Because there are quite a lot of short texts in the social media text data that do not mention events, it is necessary to filter the non-event sentences therein. Here, a logistic regression (LR) model can be used to build a binary classification model to distinguish event sentences from non-event sentences. Specifically, training data with binary classification event annotations can be constructed for model training. Since the logistic regression (LR) model is a commonly used model, it will not be described here.

[0068] Alternatively, if Figure 7 The preprocessing operation includes: firstly, performing deduplication processing on the original social media text data, then filtering the original social media text data using a preset keyword template, and finally filtering the non-event sentences in the original social media text data.

[0069] Through the above preprocessing operations, duplicate data, disaster-irrelevant data and non-event data in the original social media text data can be screened out. Without affecting the model training effect of the fragment pointer interaction model, the data processing volume can be reduced, the time spent on manual labeling can be reduced, the interference of irrelevant data can be reduced, and the data quality can be improved, thereby improving the training efficiency and training effect of the fragment pointer interaction model.

[0070] Step S2: input the training text in the training text set into the entity-aware coding layer, and obtain the semantic representation of the training text output by the entity-aware coding layer.

[0071] After the training text is input into the entity-aware encoding layer, the entity-aware encoding layer outputs a semantic representation in the form of a vector. The pre-trained language model can be the BERT model.

[0072] Step S3, inputting the semantic representation of the training text into the pointer network detection layer, and obtaining the start interval representation and the end interval representation of each word in the training text predicted by the pointer network detection layer.

[0073] Figure 2 This is a schematic diagram of an embodiment of the pointer network detection layer structure of the segment pointer interaction model constructed by the present invention. Figure 2 The pointer network detection layer includes a start index block (SIB) and an end index block (EIB). Figure 2The starting position determination module includes Dropout processing, Linear linearization processing and Relu function processing, and the ending position determination module includes the starting interval representation input Startlogit, Dropout processing, fusion processing, Dense1 processing (first full connection processing), Tanh function processing, LayerNorm processing (normalization processing), Dense2 processing (second full connection processing) and Relu function processing.

[0074] Specifically, the starting position determination module SIB converts the input sequence mark into c classification for each word, thereby obtaining the starting interval representation of each word, where c is the number of event categories. The starting interval representation obtained by the starting position determination module SIB is as follows:

[0075] U start =softmax eachrow (Relu(E·T start +b end ))∈R n*c ,

[0076] Among them, U start is the output probability of the starting position determination module SIB, E∈R n*d represents the semantic representation output of BERT, T start ∈R d*c is the weight matrix, d is the BERT vector dimension, n is the number of input words, i.e. the sentence length, and b end is the bias parameter, and eachrow means c classification is performed on each word.

[0077] In order to obtain the end interval representation of each word, the end position determination module EIB also uses c classification for each word, but needs to input the start interval representation as additional information to improve entity interval perception, that is, the end position determination module EIB takes the semantic representation of the training text combined with the start interval representation as input. The end interval representation obtained by the end position determination module EIB is as follows:

[0078] U end =softmax eachrow (Relu(M·T end +b end ))∈R n*c ,

[0079] M = Layernorm(Z),

[0080] Z i =tanh(W·concat(U istart ,E i )),

[0081] Among them, U end is the output probability of the terminal position determination module EIB, U istart Refers to the starting interval of the i-th word, E i refers to the semantic representation of the i-th word, W refers to the weight of Dense1, M refers to the weight of Dense2, T end ∈R d*c is the weight matrix.

[0082] Among them, because the starting position determination module SIB is still in the training stage, its prediction result is not accurate. If it outputs an erroneous result, it will also affect the training of the end position determination module EIB. Therefore, in the training process, in order to avoid the problem of error accumulation and propagation and accelerate the convergence of the model, the real starting interval representation is input into the end position determination module EIB. Specifically, the step S3 includes the following steps: inputting the semantic representation of the training text into the starting position determination module to obtain the starting interval representation of each word in the training text predicted by the starting position determination module; obtaining the real starting interval representation of each word in the training text, inputting the real starting interval representation and the semantic representation of the training text into the end position determination module, and obtaining the end interval representation of each word in the training text predicted by the end position determination module.

[0083] Step S4, inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and the interval interaction perception layer performs feature interaction on the starting interval representation and the ending interval representation to obtain a starting category label and an ending category label after feature interaction.

[0084] In order to further improve the effect of entity interval detection, an interval interaction perception layer is set. In the pointer network detection layer, although the end position determination module EIB can perceive the starting position, it cannot obtain the interval end information when predicting the starting position, which causes deviation in the prediction stage. Therefore, in the interval interaction perception layer, the starting interval representation and the end interval representation are interactively represented to generate the starting category label and the end category label.

[0085] Optionally, step S4 includes the following steps: after interacting the starting interval representation and the ending interval representation, integrating the original semantic representation of the training text to obtain a first feature; after linearly processing the first feature, obtaining a second feature; after interacting the first feature and the second feature, outputting a starting category label or an ending category label.

[0086] Specifically, if Figure 3The interactive perception modules in the interval interactive perception layer include: Linear (linear function) and LayerNorm (normalization). The starting category label or the ending category label is calculated in the following way:

[0087] r = tanh(W D ·concat(u s ,u e )), (1)

[0088] m (1) =W (1) concat(h, r)+b (1) , (2)

[0089] m (2) =W (2) ·(LayerNorm(m (1) ))+b (2) , (3)

[0090] P HIN (h,u s ,u e )=W (3) ·concat(m (1) , m (2) )+b (3) , (4)

[0091] Wherein, formula (1) includes interacting the starting interval representation and the ending interval representation; formula (2) includes interacting the starting interval representation and the ending interval representation, and then integrating the original semantic representation of the training text to obtain a first feature; formula (3) includes linearly processing the first feature to obtain a second feature; formula (4) includes interacting the first feature and the second feature, and outputting a starting category label or a ending category label;

[0092] r refers to the feature obtained after the interaction between the starting interval representation and the ending interval, u s Refers to the starting interval, u e refers to the terminal interval representation, h refers to the original semantic representation of the training text, and m (1) Refers to the first feature, m (2) Refers to the second characteristic, P HIN (h,u s ,u e ) refers to the starting category label or the ending category label, W D , W (1) , W (2) , W (3) are weight matrices, b (1) 、b (2), b (3) are all bias parameters, among which W D is the weight matrix linearized by Linear.

[0093] Among them, each uses an interactive perception module as described above to calculate the starting category label (P HINstart ) and the termination category label (P HINend ), the two are completely symmetrical twin-tower structures, with only different training targets, one for judging the head of the interval and the other for judging the tail of the interval. Different training data labels can be constructed during the training phase to train the corresponding parameters and achieve the corresponding training targets. For example, the social media text data is "Due to the typhoon, the palm trees in the roadside green belt collapsed and the relevant road sections were closed", "collapsed" is the trigger word for vegetation loss, and "closed" is the trigger word for traffic failure. The first and last characters of the trigger words are labeled with corresponding disaster events, and "collapsed" and "collapsed" are respectively labeled as vegetation loss, and "closed" and "closed" are respectively labeled as traffic failures. Then, the training samples of the interactive perception module for identifying the starting category label are: texts with the first character of the trigger word, that is, texts with the disaster event labels of "collapsed" and "closed". At this time, other irrelevant words in the sentence use the other label; the training samples of the interactive perception module for identifying the termination category label are: texts with the last character of the trigger word, that is, texts with the disaster event labels of "collapsed" and "closed". At this time, other irrelevant words in the sentence use the other label; the training samples of the interactive perception module for identifying the termination category label are: texts with the last character of the trigger word, that is, texts with the disaster event labels of "collapsed" and "closed". At this time, other irrelevant words in the sentence use the other label.

[0094] The trigger word interval information is extracted through the fragment pointer architecture, and the Highway network is used to enhance the interaction capability of the trigger word interval information, thereby effectively achieving fast and effective event detection through interval interaction.

[0095] Step S5, generating a corresponding starting category list and a terminating category list based on the starting category label and the terminating category label, and decoding based on the starting category list and the terminating category list to obtain a disaster event trigger word.

[0096] Optionally, the starting category label and the ending category label may be subjected to argmax processing respectively to obtain a starting category list and a ending category list, and the starting category list and the ending category list obtained after argmax processing are 1-dimensional category label lists. Specifically, the generating of the corresponding starting category list and the ending category list based on the starting category label and the ending category label in step S5 includes:

[0097] P start = argmax eachrow (P HINstart ),

[0098] P end= argmax eachrow (P HINend ),

[0099] Among them, P start represents the starting category list, P end represents the termination category list, P HINstart represents the starting category label, P HINend Represents the termination category label.

[0100] Decoding is performed based on the starting category list and the ending category list to obtain the disaster event trigger word. Specifically, the sentence length length of the input training text and the maximum length S of the trigger word are obtained. For each word in the training text, first, the starting category of the word is obtained from the starting category list, and it is determined whether the starting category of the word is a non-event category label. If it is a non-event category label, the current word is directly skipped and the next word is processed. If it is an event category label, the current word is used as the starting boundary of the current event trigger word. The position after the current word in the ending category list is limited to the maximum length S of the trigger word to find the ending boundary. If a word with the same category label is found, the search for the current event trigger word ends, and the search for the next trigger word continues.

[0101] The embodiment of the present invention uses a pointer network detection layer based on a pointer network architecture to detect and identify event trigger words in social media text data by framing entity intervals. Because the pointer network architecture has a faster prediction speed, it can achieve faster event detection than the traditional CRF method, which can effectively improve the detection efficiency. In addition, there are many irrelevant tags in social media text data, and they are colloquial. The traditional CRF method is not effective in extracting event trigger words for sparsely labeled data such as social media text data. The use of a pointer network architecture can also improve prediction accuracy. In addition, an interval interaction perception layer based on Highway network is used to improve the interactive ability of trigger word interval information. After the interval end position information and the interval start position information are fully integrated, they are used to determine the final start category list and end category list, thereby improving the detection accuracy of the model and achieving effective and rapid event detection.

[0102] Optionally, the preprocessing operation comprises the following steps:

[0103] Entity information is extracted from the social media text based on a preset word segmentation algorithm, wherein the entity information includes entity types of the extracted entity words and position information of the entity words in the social media text; the entity types and position information of the entity words extracted from the social media text are appended to the social media text as the training text.

[0104] Due to the complexity of language, different events may have the same event trigger words to indicate different event types, for example, S1 "The typhoon directly hit XX District, XX City, causing the green trees on many main roads in XX District to collapse and block traffic", S2 "At the scene of the incident, the main building of XX Building was blown down by the strong wind and collapsed", where the collapse in S1 indicates "traffic problems" and the collapse in S2 indicates "people's livelihood problems". Therefore, it is necessary to pay attention to the ambiguity of trigger words.

[0105] Through observation of disaster data, it is found that the objective entities of nouns, place names, and names of people in disaster texts can play an auxiliary role in distinguishing the categories of events, thereby solving the ambiguity of trigger words. Therefore, a preset word segmentation algorithm such as Jieba is used to perform word segmentation on social media texts, extract entity information, record the corresponding entity type (the entity type is the place name, thing name, etc. recognized by Jieba) and the corresponding subscript of the text (the subscript is the location information of the entity), and append the entity type and location information of the extracted entity word to the social media text as training text.

[0106] Furthermore, the pre-trained language model is a BERT model; the step S2 includes an input encoding step when inputting the entity-aware encoding layer, specifically including:

[0107] The social media text is encoded into a form of upper and lower sentences, wherein one sentence corresponds to a sequential encoding of the full text of the social media text, and the other sentence corresponds to an encoding of entity types and position information of entity words extracted from the social media text.

[0108] In order to plug and play entity information into the pre-trained language model, the present invention is different from the traditional text information input method such as Figure 5 (a) Using Figure 5 (b) The text encoding method shown, Figure 5 In (a), the text is encoded in the form of [cls]text[sep], and the position of each word is encoded in sequence, while Figure 5 In (b), the text is encoded in the form of [cls]text[sep]text-entity[sep], where text-entity is used to encode the entity type and the position encoding uses the position of the corresponding entity word.

[0109] Furthermore, if Figure 6The input code consists of three parts: word code is used to represent semantics; segment code is used to learn context information; position code is used to provide position information. The present invention makes changes based on the original input method of the BERT model, changing the single sentence input in the form of [cls]text[sep] to context input. In one embodiment, Figure 6 , the upper sentence corresponds to the sequential encoding of the full text of the social media text, and the lower sentence corresponds to the encoding of the entity type and position information of the entity words extracted from the social media text, which is in the form of [cls]text[sep]text-entity[sep]. The position encoding is modified, and the upper half of the sentence is represented in sequence, and the position corresponding to each entity in the lower half of the sentence. In another embodiment, the upper sentence corresponds to the encoding of the entity type and position information of the entity words extracted from the social media text, and the lower sentence corresponds to the sequential encoding of the full text of the social media text.

[0110] By changing the traditional text encoding method, extracting event-related entity word information, integrating it into the text encoding, and making full use of the entity information in the sentence, it is possible to reduce the interference of trigger word ambiguity in event detection problems and effectively improve prediction accuracy.

[0111] Optionally, before the step of extracting entity information from the social media text based on a preset word segmentation algorithm, the preprocessing operation further includes the following steps:

[0112] The original social media text data is obtained, and the original social media text data is processed by at least one of the following operations: deduplication processing is performed on the original social media text data; filtering processing is performed on the original social media text data using a preset keyword template, wherein the keywords in the keyword template include text irrelevant to the disaster facts; filtering processing is performed on non-event sentences in the original social media text data. The specific contents of the above three operations have been described in detail above and will not be repeated here.

[0113] Optionally, the present invention uses a cross entropy loss function to train the segment pointer interaction model. The loss function of the segment pointer interaction model is expressed as follows:

[0114] L start =CE(P start , Y start ),

[0115] L end =CE(P end , Y end ),

[0116] L=L start +L end ,

[0117] Among them, L start Refers to the loss function of the starting position determination module, L end refers to the termination position determination module, L refers to the total loss function of the segment pointer interaction model, and P start Refers to the interval starting position predicted by the starting position determination module, Y start Refers to the actual starting position of the interval, P end Refers to the interval end position predicted by the end position determination module, Y end Refers to the actual end position of the interval.

[0118] The present invention also proposes a social sensing disaster monitoring method based on a fragment pointer interaction model. In one embodiment of the present invention, the social sensing disaster monitoring method based on a fragment pointer interaction model includes:

[0119] Acquire social media text data, perform preprocessing operations on the social media text data, and obtain disaster monitoring text.

[0120] The disaster monitoring text is input into a trained segment pointer interaction model to obtain a disaster event trigger word output by the segment pointer interaction model, wherein the segment pointer interaction model is constructed by the segment pointer interaction model construction method described above.

[0121] Among them, social media text data refers to text data posted by users on social media such as Weibo or WeChat. Real-time social media text data can be continuously crawled by crawlers and input into the trained fragment pointer interaction model for event detection. The preprocessing operation includes at least one of the following operations: deduplication processing of the original social media text data; filtering processing of the original social media text data using a preset keyword template. The specific content of the above operations has been detailed above and will not be repeated here.

[0122] Optionally, in actual use after the segment pointer interaction model is trained, the latest historical data is input into the trained segment pointer interaction model for incremental training to enhance the performance of the model, wherein the latest historical data may refer to the historical data of the previous day or previous days.

[0123] Optionally, the segment pointer interaction model includes an entity perception encoding layer based on a pre-trained language model, a pointer network detection layer, and an interval interaction perception layer, and the pointer network detection layer includes a start position determination module and an end position determination module. The inputting of the disaster monitoring text into the trained segment pointer interaction model to obtain the disaster event trigger words output by the segment pointer interaction model includes the following steps:

[0124] Inputting the disaster monitoring text into the entity-aware coding layer, and obtaining the semantic representation of the disaster monitoring text output by the entity-aware coding layer;

[0125] Inputting the semantic representation of the disaster monitoring text into the starting position determination module to obtain the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module;

[0126] Inputting the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module and the semantic representation of the disaster monitoring text into the ending position determination module to obtain the ending interval representation of each word in the disaster monitoring text predicted by the ending position determination module;

[0127] Inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, the interval interaction perception layer performs feature interaction on the starting interval representation and the ending interval representation to obtain a starting category label and an ending category label after feature interaction;

[0128] A corresponding starting category list and a terminating category list are generated based on the starting category label and the terminating category label, and a disaster event trigger word is obtained by decoding based on the starting category list and the terminating category list.

[0129] The relevant explanations of the above steps have been detailed in the previous article. What is different from the fragment pointer interaction model construction process / training process described in the previous article is that in the actual use of the trained fragment pointer interaction model here, the input of the end position determination module is the starting interval representation predicted by the starting position determination module and the semantic representation of the disaster monitoring text, rather than the actual starting interval representation and the semantic representation of the disaster monitoring text.

[0130] The embodiment of the present invention obtains the disaster event trigger words output by the fragment pointer interaction model by inputting the disaster monitoring text into the trained fragment pointer interaction model, and the fragment pointer interaction model realizes the detection and recognition of event trigger words in social media text data by framing entity intervals by utilizing the pointer network detection layer based on the pointer network architecture. Since the pointer network architecture has a faster prediction speed, it can realize faster event detection than the traditional CRF method, which can effectively improve the detection efficiency. In addition, there are many irrelevant labels in social media text data, and they are colloquial. The traditional CRF method is not effective in extracting event trigger words for data with sparse labels such as social media text data. The use of the pointer network architecture can also improve the prediction accuracy. In addition, the interval interaction perception layer based on the Highway network is used to improve the interactive ability of the trigger word interval information. After the interval end position information and the interval start position information are fully integrated, they are used to determine the final start category list and end category list, thereby improving the detection accuracy of the model and realizing effective and rapid event detection.

[0131] In one embodiment of the present invention, a social sensing disaster monitoring device based on a fragment pointer interaction model includes a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the social sensing disaster monitoring method based on the fragment pointer interaction model as described above is implemented. The beneficial effects of the social sensing disaster monitoring device based on the fragment pointer interaction model of the present invention relative to the prior art are consistent with those of the social sensing disaster monitoring method based on the fragment pointer interaction model, and are not described in detail here.

[0132] The reader should understand that in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0133] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for constructing a fragment pointer interaction model, characterized in that: The segment pointer interaction model includes an entity perception encoding layer based on a pre-trained language model, a pointer network detection layer, and an interval interaction perception layer; the method for constructing the segment pointer interaction model includes the following steps: Acquire a training text set, wherein the training text set is text data obtained after a preprocessing operation on social media text data; Inputting training text in the training text set into the entity-aware coding layer, and obtaining a semantic representation of the training text output by the entity-aware coding layer; Inputting the semantic representation of the training text into the pointer network detection layer to obtain the start interval representation and the end interval representation of each word in the training text predicted by the pointer network detection layer; Inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and performing feature interaction on the starting interval representation and the ending interval representation by the interval interaction perception layer to obtain the starting category label and the ending category label after the feature interaction, including the following steps: After interacting with the start interval representation and the end interval representation, the first feature is obtained by integrating the original semantic representation of the training text; After linear processing of the first feature, a second feature is obtained; After interacting the first feature and the second feature, outputting a starting category label or a ending category label; A corresponding starting category list and a terminating category list are generated based on the starting category label and the terminating category label, and a disaster event trigger word is obtained by decoding based on the starting category list and the terminating category list.

2. The method for constructing a fragment pointer interaction model according to claim 1, characterized in that: The pre-processing operation comprises the following steps: Extracting entity information from the social media text based on a preset word segmentation algorithm, wherein the entity information includes an entity type of the extracted entity word and position information of the entity word in the social media text; appending the entity type and location information of the entity word extracted from the social media text to the social media text as the training text; The pre-trained language model is a BERT model; the step of inputting the training text in the training text set into the entity-aware coding layer to obtain the semantic representation of the training text output by the entity-aware coding layer includes an input coding step when inputting the entity-aware coding layer, specifically including: The social media text is encoded into a form of upper and lower sentences, wherein one sentence corresponds to a sequential encoding of the full text of the social media text, and the other sentence corresponds to an encoding of entity types and position information of entity words extracted from the social media text.

3. The method for constructing a fragment pointer interaction model according to claim 2, characterized in that: Before the step of extracting entity information from the social media text based on a preset word segmentation algorithm, the preprocessing operation further includes the following steps: Obtaining original social media text data, and processing the original social media text data by performing at least one of the following operations: Deduplication processing is performed on the original social media text data; Using a preset keyword template to filter the original social media text data, wherein the keywords in the keyword template include text that is irrelevant to disaster facts; The non-event sentences in the original social media text data are filtered.

4. The method for constructing a fragment pointer interaction model according to claim 1, characterized in that: The inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and the interval interaction perception layer performing feature interaction on the starting interval representation and the ending interval representation to obtain the starting category label and the ending category label after the feature interaction includes: r=tanh(W D ·concat(u s ,u e )), (1) m (1) =W (1) ·concat(h,r)+b (1) , (2) m (2) =W (2) ·(LayerNorm(m (1) ))+b (2) , (3) P HIN (h,u s ,u e )=W (3) ·concat(m (1) ,m (2) )+b (3) , (4) Wherein, formula (1) includes interacting the starting interval representation and the ending interval representation; formula (2) includes interacting the starting interval representation and the ending interval representation, and then integrating the original semantic representation of the training text to obtain a first feature; formula (3) includes linearly processing the first feature to obtain a second feature; formula (4) includes interacting the first feature and the second feature, and outputting a starting category label or a ending category label; r refers to the feature obtained after the interaction between the starting interval representation and the ending interval, u s Refers to the starting interval, u e refers to the terminal interval representation, h refers to the original semantic representation of the training text, and m( 1 ) refers to the first feature, m( 2 ) refers to the second characteristic, P HIN (h,u s ,u e ) refers to the starting category label or the ending category label, W D , W (1) , W (2) , W (3) are weight matrices, b (1) 、b (2) 、b (3) These are bias parameters.

5. The method for constructing a fragment pointer interaction model according to claim 4, characterized in that: The generating a corresponding starting category list and a terminating category list based on the starting category label and the terminating category label comprises: P start =argmax eachrow (P HINstart ), P end =argmax eachrow (P HINend ), Among them, P start represents the starting category list, P end represents the termination category list, P HINstart represents the starting category label, P HINend Represents the termination category label.

6. The method for constructing a fragment pointer interaction model according to claim 1, characterized in that: The pointer network detection layer includes a starting position determination module and an ending position determination module; the step of inputting the semantic representation of the training text into the pointer network detection layer to obtain the starting interval representation and the ending interval representation of each word in the training text predicted by the pointer network detection layer includes the following steps: Inputting the semantic representation of the training text into the starting position determination module to obtain the starting interval representation of each word in the training text predicted by the starting position determination module; The real starting interval representation of each word in the training text is obtained, and the real starting interval representation and the semantic representation of the training text are input into the end position determination module to obtain the end interval representation of each word in the training text predicted by the end position determination module.

7. A social sensing disaster monitoring method based on a fragment pointer interaction model, characterized in that: include: Acquire social media text data, perform preprocessing operations on the social media text data, and obtain disaster monitoring text; The disaster monitoring text is input into a trained fragment pointer interaction model to obtain a disaster event trigger word output by the fragment pointer interaction model, wherein the fragment pointer interaction model is constructed by the fragment pointer interaction model construction method according to any one of claims 1 to 6.

8. The social sensing disaster monitoring method based on the fragment pointer interaction model as claimed in claim 7, characterized in that: The segment pointer interaction model includes an entity perception encoding layer based on a pre-trained language model, a pointer network detection layer and an interval interaction perception layer, and the pointer network detection layer includes a starting position determination module and an ending position determination module; the disaster monitoring text is input into the trained segment pointer interaction model, and the disaster event trigger word output by the segment pointer interaction model is obtained, which includes the following steps: Inputting the disaster monitoring text into the entity-aware coding layer, and obtaining the semantic representation of the disaster monitoring text output by the entity-aware coding layer; Inputting the semantic representation of the disaster monitoring text into the starting position determination module to obtain the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module; Inputting the starting interval representation of each word in the disaster monitoring text predicted by the starting position determination module and the semantic representation of the disaster monitoring text into the ending position determination module to obtain the ending interval representation of each word in the disaster monitoring text predicted by the ending position determination module; Inputting the starting interval representation and the ending interval representation into the interval interaction perception layer, and performing feature interaction on the starting interval representation and the ending interval representation by the interval interaction perception layer to obtain the starting category label and the ending category label after the feature interaction, including the following steps: After interacting with the start interval representation and the end interval representation, the first feature is obtained by integrating the original semantic representation of the training text; After linear processing of the first feature, a second feature is obtained; After interacting the first feature and the second feature, outputting a starting category label or a ending category label; A corresponding starting category list and a terminating category list are generated based on the starting category label and the terminating category label, and a disaster event trigger word is obtained by decoding based on the starting category list and the terminating category list.

9. A social sensing disaster monitoring device based on a fragment pointer interaction model, characterized in that: It comprises a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the social sensing disaster monitoring method based on the fragment pointer interaction model as claimed in claim 7 or 8 is implemented.