Typhoon disaster identification method and system based on improved convolutional network and social media data

By improving the two-stage identification method of convolutional network and social media data, combined with typhoon attribute information, the problems of low typhoon disaster recognition accuracy and difficult false information recognition in the existing technology are solved, and more accurate disaster information recognition and higher recognition accuracy.

CN118820477BActive Publication Date: 2024-11-26GUANGDONG URBAN & RURAL PLANNING & DESIGN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411297546.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-11-26
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

The existing technology relies on single-stage and single-label classification methods in the identification of typhoon disasters, resulting in low recognition accuracy, inability to fully identify disaster information, and it is difficult to distinguish false information.

Method used

Using a two-stage recognition method based on improved convolutional network and social media data, first performs rough classification, then performs multi-label classification, combined with typhoon attribute information for auxiliary identification, and uses BERT pre-trained model and Sit-CNN for text feature extraction and classification , improve recognition accuracy through multi-task learning.

Benefits of technology

It improves the accuracy and comprehensiveness of typhoon disaster recognition, can more accurately identify typhoon-related texts and specific disaster categories, and enhances the ability to identify false information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820477B_ABST
    Figure CN118820477B_ABST
Patent Text Reader

Abstract

The present invention provides a typhoon disaster recognition method and system based on an improved convolutional network and social media data. The method comprises: firstly performing preprocessing, BERT text representation extraction and grouping operations on social media texts in sequence, and then performing two-stage typhoon disaster recognition, in which sentence vectors are used in combination with typhoon attribute information for binary classification in the first stage, and word matrix is ​​used for multi-label classification in the second stage, and the two stages are jointly trained through multi-task learning; the present invention integrates the outputs of each hidden layer of BERT, and groups the outputs of each hidden layer, so as to achieve higher recognition accuracy; in addition, the present invention adds typhoon attributes for auxiliary recognition in the coarse classification stage, and sets Sit-CNN in the multi-label classification stage, and Sit-CNN can dynamically and selectively extract semantic information of different levels and groups, so as to further improve the disaster recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of typhoon prediction, and more specifically, to a two-stage typhoon disaster identification method and system based on an improved convolutional network and social media data. Background Art

[0002] As an extreme weather event, typhoons not only affect marine activities, but also cause significant losses to the lives of people in coastal areas and the urban economy. Therefore, the timely collection and accurate identification of typhoon information has always been the focus of attention of cities in coastal areas.

[0003] Traditional methods for collecting typhoon disaster information include field surveys and remote sensing satellite technology. Field surveys are conducted by staff on-site and then reported. This method can reflect the disaster situation more comprehensively, but it consumes a lot of manpower, material resources and time. Remote sensing satellite technology monitors changes in disaster areas through remote sensing images. This method can reflect large-scale disasters, but it has limited ability to obtain disasters that are closely related to daily life, such as power outages, suspension of work and school, and other disaster impacts. The characteristics of traditional methods limit the effective implementation of disaster emergency and rescue work.

[0004] In recent years, with the popularization of the Internet, many social media platforms such as Sina Weibo and WeChat in China, Twitter and Facebook abroad have developed rapidly, and more and more people have begun to use social media platforms to express their opinions and activities. At different stages of the typhoon process, as the geographical background such as typhoon intensity, rainfall and wind speed changes, people quickly and sensitively publish a large amount of disaster-related information like "sensors". Social media text has become an important part of disaster information collection due to its low collection cost and rich expression content. However, due to the openness and freedom of social media platforms, false or speculative information is often mixed in social media text. Most existing studies rely solely on text content for typhoon identification, ignoring the high sensitivity of text to disaster-related geographical backgrounds, making it difficult to distinguish such false or speculative information, which has a negative impact on emergency rescue work.

[0005] Text classification is the key to obtaining typhoon disaster information. With the development and progress of machine learning, classification models and methods continue to emerge. For example, common text representation models include Word2Vec and Glove based on the bag-of-words model, GPT based on Transformer, BERT (Bidirectional Encoder Representations from Transformers), and other series of models. Classic text classification models include DCNN and TextCNN based on CNN, and LSTM (Long Short-Term Memory) and BiLSTM (Bi-directional Long Short-Term Memory) based on RNN, and other series of models.

[0006] The combination of text representation model and text classification model helps to enhance the text semantic understanding of the model. However, in terms of classification methods, most of the existing methods are based on single-stage, single-label classification. For example, a typhoon prediction and alarm method is disclosed in an existing patent document, and the steps are: 1. Normalize historical typhoon data; 2. Analyze the normalized data sequence to analyze the impact of rainfall, evaporation and wind force on typhoon formation and path; 3. Establish a model training data set S1; 4. Establish a typhoon prediction model; 5. Establish a real-time error correction model training data set S2, the input is the same as S1, and the prediction error of the typhoon prediction model is used as the output; 6. Establish a typhoon real-time error correction model; 7. For the real-time monitored rainfall, evaporation and wind force, use the typhoon prediction model to predict the real-time data, use the typhoon real-time error correction model to correct it, obtain the final prediction value, and output the typhoon data to make real-time adjustments to the coastal defense monitoring and issue an alarm before the typhoon arrives; the classification method based on a single label has a deviation in the semantic understanding of complex text and cannot fully identify disaster information. Summary of the invention

[0007] In order to overcome the defect of low typhoon disaster recognition accuracy caused by the above-mentioned prior art relying only on text content for recognition and single-label classification, the present invention provides a two-stage typhoon disaster recognition method and system based on an improved convolutional network and social media data. Typhoon recognition is performed based on a two-stage classification scheme, first performing coarse classification and then performing two-stage multi-label classification. Typhoon attribute information is added in the coarse classification stage for auxiliary recognition, which makes the recognition more comprehensive and can effectively improve the typhoon disaster recognition accuracy.

[0008] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0009] A typhoon disaster recognition method based on an improved convolutional network and social media data includes the following steps:

[0010] S1: Collecting netizens’ comments from various social media platforms on the Internet, and building a text dataset based on the attributes of the commented typhoons; and preprocessing the text dataset;

[0011] S2: Using the BERT pre-trained model to extract text features from the preprocessed text data set to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data;

[0012] Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set;

[0013] S3: constructing a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence;

[0014] The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster;

[0015] The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text;

[0016] S4: inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model;

[0017] S5: Obtain text data to be identified and input it into the trained typhoon disaster identification model for identification, to obtain a typhoon disaster identification result.

[0018] Preferably, in step S1, the attributes of the typhoon include: typhoon level, wind speed, air pressure, moving speed and geographical location information. The typhoon attribute data is used as a geographical background to analyze the credibility of social media texts, which helps to improve the accuracy of typhoon disaster-related text recognition in the coarse classification stage.

[0019] Preferably, in step S1, preprocessing the text data set includes:

[0020] Word segmentation encoding: All texts in the text data set are divided into individual words by a word segmenter, and all words are converted into corresponding codes using a preset vocabulary to obtain the encoded text data set;

[0021] Add tags: Add the beginning tag and the end tag to the beginning and the end of all encoded texts, and convert all the texts after adding tags into corresponding text vectors;

[0022] Fill blanks: fill the end of all text vectors whose length is less than the preset value with zero vectors to make the length of each text vector consistent;

[0023] Position embedding: Set the embedding information for each text vector to represent the position order of the words in the text vector to complete the preprocessing.

[0024] Preferably, in step S2, the BERT pre-training model includes several layers of sequentially connected Transformer encoders;

[0025] The text features extracted by each of the Transformer encoders are saved together as the text feature dataset.

[0026] Preferably, in step S2, entity disambiguation includes:

[0027] For each text feature extracted by the Transformer encoder:

[0028] Calculate first similarities between different sentence vectors in pairs, and fuse information between two sentence vectors whose first similarities are greater than or equal to a preset first threshold;

[0029] Calculating the second similarity between different word matrices in pairs, fusing information of two word matrices whose second similarity is greater than or equal to a preset second threshold, and completing entity disambiguation;

[0030] The calculation formula of the similarity is:

[0031]

[0032] in, Two text features and The similarity between and There are two text features and The corresponding attribute information.

[0033] Preferably, in step S2, the number of Transformer encoder layers in the BERT pre-training model is specifically 12, and the grouping includes:

[0034] Group the text features output by the 12-layer Transformer encoder according to any of the following rules:

[0035] Rule 1: Set a group that only contains text features output by the 12th layer Transformer encoder;

[0036] Rule 2: Set a group containing all text features output by the 1st to 12th layer Transformer encoder;

[0037] Rule 3: Set up two groups, containing the text features output by the 1st to 6th layers and the 7th to 12th layers of Transformer encoders respectively;

[0038] Rule 4: Set up three groups, including the text features output by the Transformer encoders of the 1st to 4th layers, the 5th to 8th layers, and the 9th to 12th layers respectively;

[0039] Rule 5: Set four groups, including the text features output by the Transformer encoders at layers 1 to 3, 4 to 6, 7 to 9, and 10 to 12 respectively;

[0040] Rule 6: Set six groups, including the text features output by the 1st to 2nd layer, 3rd to 4th layer, 5th to 6th layer, 7th to 8th layer, 9th to 10th layer, and 11th to 12th layer Transformer encoders respectively;

[0041] Rule 7: Set twelve groups, each containing the text features output by the 1st to 12th layer Transformer encoder.

[0042] Preferably, in step S3, the coarse classification network includes: a BiLSTM neural network, a group attention layer, a first fully connected layer and a first Softmax activation layer connected in sequence;

[0043] The sentence vectors of different groups of text data are used to extract sentence features through the BiLSTM neural network, and the group attention layer is used to match and fuse the sentence features with the attributes of the typhoon to obtain sentence features containing geographical background features. The features are input into the first fully connected layer and the first Softmax activation layer, and the binary classification probability of the text data belonging to the relevant text of the typhoon disaster is output.

[0044] Preferably, in step S3, the multi-label classification network includes: a Sit-CNN neural network, a group exchange layer, a second fully connected layer, a first splicing layer, a third fully connected layer and a Sigmoid activation layer connected in sequence;

[0045] The Sit-CNN neural network includes: a dimension filling layer, a grouped convolution layer, an average pooling layer, a fourth fully connected layer, a reshaping layer, a second Softmax activation layer, a maximum pooling layer and a second splicing layer connected in sequence; the output of the grouped convolution layer is also connected to the output of the second Softmax activation layer by weighted multiplication;

[0046] Convolution kernels of different sizes are arranged in the grouped convolution layer;

[0047] The input of the Sit-CNN is the word matrix of different groups of text data related to the typhoon disaster. The word matrix is ​​first dimensionally expanded through a dimension filling layer, and then convolved using a convolution kernel of a corresponding size in a group convolution layer to extract convolution features; all convolution features are weighted and summed after passing through an average pooling layer to obtain intermediate features; the intermediate features are input into the fourth fully connected layer for expansion, and are shuffled and reshaped using a reshaping layer to obtain reshaped features; the reshaped features are input into the second Softmax activation layer to obtain the core attention weights of different convolution kernels; the convolution features of each convolution kernel are weighted and multiplied with the corresponding core attention weight to obtain selective features; all selective features are sequentially input into the maximum pooling layer and the second splicing layer to obtain the semantic features of the corresponding groups;

[0048] The semantic features of each group are input into the group exchange layer to disrupt the semantic features of each group to avoid information isolation caused by group convolution; then the second fully connected layer is used to integrate the features, and the first concatenation layer is used to concatenate the semantic features to obtain the final semantic features of the text data;

[0049] The final semantic features of the text data are sequentially input into the third fully connected layer and the Sigmoid activation layer for multi-label classification to obtain the specific disaster category of the typhoon, which is used as the typhoon disaster identification result.

[0050] Preferably, in step S4, when the coarse classification network and the multi-label classification network are jointly optimized and trained, a total loss function is set, specifically:

[0051]

[0052] in, is the total loss function, and They are BCE binary cross entropy loss function and Focal multi-label classification loss function, respectively. and are the first and second weighting factors respectively.

[0053] The present invention also provides a typhoon disaster recognition system based on an improved convolutional network and social media data, which uses the above-mentioned typhoon disaster recognition method based on an improved convolutional network and social media data, including:

[0054] Preprocessing unit: used to collect netizens' comment texts from various social media platforms on the Internet, and build a text dataset based on the attributes of the commented typhoons; preprocess the text dataset;

[0055] Feature extraction unit: used to extract text features from the preprocessed text data set using the BERT pre-training model to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data;

[0056] Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set;

[0057] Model building unit: used to build a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence;

[0058] The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster;

[0059] The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text;

[0060] Model training unit: used for inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model;

[0061] Typhoon disaster recognition unit: used to obtain text data to be recognized and input it into the trained typhoon disaster recognition model for recognition, so as to obtain typhoon disaster recognition results.

[0062] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0063] The present invention provides a typhoon disaster recognition method and system based on an improved convolutional network and social media data. First, netizens' comment texts are collected from various social media platforms on the Internet, and a text data set is constructed in combination with the attributes of the commented typhoons; the text data set is preprocessed; a BERT pre-training model is used to extract text features from the preprocessed text data set to obtain a text feature data set; all sentence vectors and all word matrices in the text feature data set are respectively and sequentially subjected to entity disambiguation and grouping to obtain grouped sentence vector data sets and word matrix data sets; a typhoon disaster recognition model is constructed, and the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence; the grouped sentence vector data set is input into the coarse classification network, the grouped word matrix data set is input into the multi-label classification network, and the coarse classification network and the multi-label classification network are jointly optimized and trained by multi-task learning to obtain a trained typhoon disaster recognition model; finally, the text data to be recognized is obtained and input into the trained typhoon disaster recognition model for recognition to obtain a typhoon disaster recognition result;

[0064] The present invention performs two-stage typhoon recognition based on an improved convolutional network and social media data. First, a rough classification is performed to determine whether the input text is a typhoon-related text; then a two-stage multi-label classification is performed to further subdivide the typhoon-related text into more specific disaster categories, so that the recognition is more comprehensive and the accuracy is higher; secondly, the present invention adds typhoon attribute information in the rough classification stage to analyze the credibility of the input social media text, thereby improving the accuracy of the rough classification; at the same time, in order to better utilize the different semantic information of each layer of BERT, the present invention groups the sentence vectors and word matrices extracted from each layer of BERT, and determines the optimal grouping rules and representation of the text by comparing the results of different groups, thereby improving the recognition accuracy; in addition, in the multi-label classification stage, the present invention extracts features of different semantic levels from the word matrix of the typhoon disaster text based on Sit-CNN. Sit-CNN can dynamically and selectively extract semantic information of different levels and groups, and finally classify the typhoon disaster text into specific disaster categories, effectively improving the disaster recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 This is a flow chart of a typhoon disaster identification method based on an improved convolutional network and social media data provided in Example 1.

[0066] Figure 2 This is an architecture diagram of a typhoon disaster identification method based on an improved convolutional network and social media data provided in Example 1.

[0067] Figure 3 This is an architecture diagram of a typhoon disaster identification method based on an improved convolutional network and social media data provided in Example 2.

[0068] Figure 4 This is a structural diagram of the BERT pre-training model provided in Example 2.

[0069] Figure 5 This is the BiLSTM neural network structure diagram provided in Example 2.

[0070] Figure 6 This is the Sit-CNN neural network structure diagram provided in Example 2.

[0071] Figure 7 The experimental result diagrams are of the total loss, binary classification F1 score and multi-label classification F1 score of the typhoon disaster recognition model provided in Example 2 on the training set, validation set and test set respectively.

[0072] Figure 8 This is a structural diagram of a typhoon disaster identification system based on an improved convolutional network and social media data provided in Example 3. DETAILED DESCRIPTION

[0073] The accompanying drawings are only used for illustrative purposes and are not to be construed as limiting the present invention;

[0074] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0075] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0076] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0077] Example 1

[0078] like Figure 1 As shown, this embodiment provides a typhoon disaster identification method based on an improved convolutional network and social media data, comprising the following steps:

[0079] S1: Collecting netizens’ comments from various social media platforms on the Internet, and building a text dataset based on the attributes of the commented typhoons; and preprocessing the text dataset;

[0080] S2: Using the BERT pre-trained model to extract text features from the preprocessed text data set to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data;

[0081] Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set;

[0082] S3: constructing a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence;

[0083] The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster;

[0084] The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text;

[0085] S4: inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model;

[0086] S5: Obtain the text data to be identified and input it into the trained typhoon disaster identification model for identification, and obtain the typhoon disaster identification result;

[0087] In step S1, the attributes of the typhoon include: typhoon level, wind speed, air pressure, moving speed and geographical location information. The typhoon attribute data is used as a geographical background to analyze the credibility of social media texts, which helps to improve the accuracy of typhoon disaster-related text recognition in the rough classification stage;

[0088] In the step S1, preprocessing the text data set includes:

[0089] Word segmentation encoding: All texts in the text data set are divided into individual words by a word segmenter, and all words are converted into corresponding codes using a preset vocabulary to obtain the encoded text data set;

[0090] Add tags: Add the beginning tag and the end tag to the beginning and the end of all encoded texts, and convert all the texts after adding tags into corresponding text vectors;

[0091] Fill blanks: fill the end of all text vectors whose length is less than the preset value with zero vectors to make the length of each text vector consistent;

[0092] Position embedding: Set the embedding information for each text vector to represent the position order of the words in the text vector to complete the preprocessing.

[0093] In the specific implementation process, Figure 2 As shown, the solution of this embodiment is divided into three steps: text data collection and preprocessing, typhoon disaster coarse classification and typhoon disaster fine classification (multi-label classification);

[0094] In this embodiment, Weibo is used as the source of social media data. First, the comments of netizens are collected from Weibo, and the text dataset is constructed based on the attributes of the commented typhoons.

[0095] The Weibo text data comes from Sina Weibo. Through web crawler technology, we set a reasonable crawling frequency and exception handling method, and call the Weibo API interface to request, parse and store data.

[0096] Typhoon attribute data comes from the Typhoon Network of the China Meteorological Observatory. The selection of typhoon attribute data is mainly based on its degree of connection with typhoon changes and its applicability to Weibo texts. The typhoon grade is a comprehensive indicator reflecting the intensity of a typhoon, while wind speed, air pressure and moving speed reflect the intensity and changing trend of a typhoon at a specific time. At the same time, these typhoon attributes have rich time characteristics and can provide corresponding typhoon geographical background information for Weibo texts released in different time periods.

[0097] In the rough classification stage of typhoon disaster, typhoon attribute data is combined to identify typhoon disaster-related texts from microblog texts containing the keyword "typhoon". Most existing solutions rely only on text content without considering the actual typhoon changes, which can easily lead to incorrect identification of typhoon disasters. For example, "The typhoon is very strong, and I heard that some places have been flooded". It is difficult to determine whether such speculative texts are related to typhoon disasters based on the content alone. Therefore, the solution of this embodiment uses typhoon attribute data such as typhoon level, wind speed, air pressure and moving speed as geographical background information to analyze the credibility of microblog texts, which helps to improve the accuracy of typhoon disaster-related text identification.

[0098] The text dataset is then preprocessed; the microblog text is preprocessed to generate text vectors, which are then used to combine typhoon attribute data with BERT and a coarse classification network to achieve coarse classification of typhoon disasters, and to classify microblog texts as disaster-related or disaster-irrelevant; among them, texts related to typhoon disasters will be further subdivided into five specific disaster categories based on a multi-label classification model: traffic impact, social impact, power impact, forestry impact, and waterlogging;

[0099] Text vectorization refers to converting text that is easy for humans to understand into digital form that can be understood by computers, and representing it in the form of vectors or matrices. Words represented by vectors are called word embeddings. Converting text information into vector representation is a prerequisite for text classification tasks. Weibo text vectorization includes the following four steps:

[0100] 1) Word segmentation encoding: All texts in the text dataset are divided into separate words through the word segmenter, and all words are converted into corresponding codes using the preset vocabulary to obtain the encoded text dataset;

[0101] 2) Adding tags: Add the beginning tag and the end tag at the beginning and end of all encoded texts, and convert all the texts after adding tags into corresponding text vectors;

[0102] 3) Filling blanks: Fill the end of all text vectors whose length is less than the preset value with a zero vector so that the length of each text vector is consistent;

[0103] 4) Position embedding: Set the embedding information for each text vector to represent the position order of the word in the text vector to complete the preprocessing;

[0104] At present, the pre-trained language model BERT and multi-class classification methods are widely used in text classification; however, since most existing solutions only use the last layer output of BERT for classification, they do not achieve the best results; in addition, multi-class classification does not match the complexity of text expression; therefore, this embodiment integrates the hidden layer of BERT for feature extraction, thereby improving recognition accuracy;

[0105] After completing the text preprocessing, the BERT pre-trained model is used to extract text features from the preprocessed text dataset to obtain a text feature dataset; entity disambiguation and grouping are performed on all sentence vectors and all word matrices in the text feature dataset respectively to obtain a grouped sentence vector dataset and word matrix dataset;

[0106] The output of BERT is divided into two parts: sentence vector and word matrix. The sentence vector is used for binary classification (coarse classification) because it has better overall semantic representation, while the word matrix is ​​used for typhoon disaster multi-label classification (fine classification) because it has more detailed local semantic representation.

[0107] Then, a typhoon disaster recognition model is constructed. The typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence. The coarse classification network captures the high- and low-level semantic representations of the sentence vectors of the text to determine whether the text belongs to typhoon disasters, and inputs the text belonging to typhoon disasters into the next stage. The multi-label classification network extracts features of different semantic levels from the word matrix of the typhoon disaster text through Sit-CNN, and classifies the typhoon disaster text into specific disaster categories.

[0108] The grouped sentence vector dataset is input into the coarse classification network, and the grouped word matrix dataset is input into the multi-label classification network. The coarse classification network and the multi-label classification network are jointly optimized and trained using multi-task learning to obtain a trained typhoon disaster recognition model.

[0109] Finally, the text data to be recognized is obtained and input into the trained typhoon disaster recognition model for recognition, and the typhoon disaster recognition result is obtained;

[0110] This method performs two-stage typhoon recognition based on an improved convolutional network and social media data. It first performs coarse classification to determine whether the input text is typhoon-related text; then performs a two-stage multi-label classification to further subdivide the typhoon-related text into more specific disaster categories, making the recognition more comprehensive and more accurate.

[0111] Example 2

[0112] This embodiment provides a typhoon disaster identification method based on an improved convolutional network and social media data, comprising the following steps:

[0113] S1: Collecting netizens’ comments from various social media platforms on the Internet, and building a text dataset based on the attributes of the commented typhoons; and preprocessing the text dataset;

[0114] S2: Using the BERT pre-trained model to extract text features from the preprocessed text data set to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data;

[0115] Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set;

[0116] S3: constructing a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence;

[0117] The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster;

[0118] The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text;

[0119] S4: inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model;

[0120] S5: Obtain the text data to be identified and input it into the trained typhoon disaster identification model for identification, and obtain the typhoon disaster identification result;

[0121] In step S1, the attributes of the typhoon include: typhoon level, wind speed, air pressure, moving speed and geographical location information. The typhoon attribute data is used as a geographical background to analyze the credibility of social media texts, which helps to improve the accuracy of typhoon disaster-related text recognition in the rough classification stage;

[0122] In the step S1, preprocessing the text data set includes:

[0123] Word segmentation encoding: All texts in the text data set are divided into individual words by a word segmenter, and all words are converted into corresponding codes using a preset vocabulary to obtain the encoded text data set;

[0124] Add tags: Add the beginning tag and the end tag to the beginning and the end of all encoded texts, and convert all the texts after adding tags into corresponding text vectors;

[0125] Fill blanks: fill the end of all text vectors whose length is less than the preset value with zero vectors to make the length of each text vector consistent;

[0126] Position embedding: Set the embedding information for each text vector to represent the position order of the words in the text vector to complete the preprocessing;

[0127] In step S2, the BERT pre-trained model includes 12 layers of sequentially connected Transformer encoders;

[0128] The text features extracted by each of the Transformer encoders are saved together as the text feature dataset;

[0129] In step S2, entity disambiguation includes:

[0130] For each text feature extracted by the Transformer encoder:

[0131] Calculate first similarities between different sentence vectors in pairs, and fuse information between two sentence vectors whose first similarities are greater than or equal to a preset first threshold;

[0132] Calculating the second similarity between different word matrices in pairs, fusing information of two word matrices whose second similarity is greater than or equal to a preset second threshold, and completing entity disambiguation;

[0133] The calculation formula of the similarity is:

[0134]

[0135] in, Two text features and The similarity between and There are two text features and Corresponding attribute information;

[0136] In step S2, the text features output by the 12-layer Transformer encoder are grouped according to any one of the following rules:

[0137] Rule 1: Set a group that only contains text features output by the 12th layer Transformer encoder;

[0138] Rule 2: Set a group containing all text features output by the 1st to 12th layer Transformer encoder;

[0139] Rule 3: Set up two groups, containing the text features output by the 1st to 6th layers and the 7th to 12th layers of Transformer encoders respectively;

[0140] Rule 4: Set up three groups, including the text features output by the Transformer encoders of the 1st to 4th layers, the 5th to 8th layers, and the 9th to 12th layers respectively;

[0141] Rule 5: Set four groups, including the text features output by the Transformer encoders at layers 1 to 3, 4 to 6, 7 to 9, and 10 to 12 respectively;

[0142] Rule 6: Set six groups, including the text features output by the 1st to 2nd layer, 3rd to 4th layer, 5th to 6th layer, 7th to 8th layer, 9th to 10th layer, and 11th to 12th layer Transformer encoders respectively;

[0143] Rule 7: Set twelve groups, each containing the text features output by the 1st to 12th layer Transformer encoders;

[0144] In step S3, the coarse classification network includes: a BiLSTM neural network, a group attention layer, a first fully connected layer, and a first Softmax activation layer connected in sequence;

[0145] The sentence vectors of different groups of text data are extracted through the BiLSTM neural network. The sentence features are matched and fused with the attributes of the typhoon using the group attention layer to obtain sentence features containing geographical background features. The features are input into the first fully connected layer and the first Softmax activation layer, and the binary classification probability of the text data belonging to the text related to the typhoon disaster is output.

[0146] In step S3, the multi-label classification network includes: a Sit-CNN neural network, a group exchange layer, a second fully connected layer, a first splicing layer, a third fully connected layer and a Sigmoid activation layer connected in sequence;

[0147] The Sit-CNN neural network includes: a dimension filling layer, a grouped convolution layer, an average pooling layer, a fourth fully connected layer, a reshaping layer, a second Softmax activation layer, a maximum pooling layer and a second splicing layer connected in sequence; the output of the grouped convolution layer is also connected to the output of the second Softmax activation layer by weighted multiplication;

[0148] Convolution kernels of different sizes are arranged in the grouped convolution layer;

[0149] The input of the Sit-CNN is the word matrix of different groups of text data related to the typhoon disaster. The word matrix is ​​first dimensionally expanded through a dimension filling layer, and then convolved using a convolution kernel of a corresponding size in a group convolution layer to extract convolution features; all convolution features are weighted and summed after passing through an average pooling layer to obtain intermediate features; the intermediate features are input into the fourth fully connected layer for expansion, and are shuffled and reshaped using a reshaping layer to obtain reshaped features; the reshaped features are input into the second Softmax activation layer to obtain the core attention weights of different convolution kernels; the convolution features of each convolution kernel are weighted and multiplied with the corresponding core attention weight to obtain selective features; all selective features are sequentially input into the maximum pooling layer and the second splicing layer to obtain the semantic features of the corresponding groups;

[0150] The semantic features of each group are input into the group exchange layer to disrupt the semantic features of each group to avoid information isolation caused by group convolution; then the second fully connected layer is used to integrate the features, and the first concatenation layer is used to concatenate the semantic features to obtain the final semantic features of the text data;

[0151] The final semantic features of the text data are sequentially input into the third fully connected layer and the Sigmoid activation layer for multi-label classification to obtain the specific disaster category of the typhoon and use it as the typhoon disaster identification result;

[0152] In step S4, when the coarse classification network and the multi-label classification network are jointly optimized and trained, a total loss function is set, specifically:

[0153]

[0154] in, is the total loss function, and They are BCE binary cross entropy loss function and Focal multi-label classification loss function, respectively. and are the first and second weighting factors respectively.

[0155] In the specific implementation process, Figure 3As shown in the architecture diagram, the solution of this embodiment is divided into three steps: 1) data processing, including preprocessing of text, BERT extraction of text representation and grouping operation; 2) binary classification stage, BiLSTM is used to capture the high-level semantic representation of the sentence vector of the text, determine whether the text belongs to typhoon disaster, and input the text belonging to typhoon disaster into the next stage; 3) multi-label classification stage, Sit-CNN is used to extract features of different semantic levels from the word matrix of the typhoon disaster text, and the typhoon disaster text is classified into specific disaster categories;

[0156] In this embodiment, Weibo is used as the source of social media data. First, the comments of netizens are collected from Weibo, and the text dataset is constructed based on the attributes of the commented typhoons.

[0157] The Weibo text data comes from Sina Weibo. Through web crawler technology, reasonable crawling frequency and exception handling methods are set, and the Weibo API interface is called for data request, analysis and storage. In the end, a total of 49,041 Weibo texts during the typhoon landing in Guangdong Province were collected, covering more than 20 typhoons.

[0158] The typhoon attribute data comes from the China Meteorological Administration Typhoon Network. The selection of typhoon attribute data is mainly based on its degree of connection with typhoon changes and its applicability to Weibo texts. The typhoon grade is a comprehensive indicator reflecting the typhoon intensity, while the wind speed, air pressure and moving speed reflect the intensity and change trend of the typhoon at a specific time. At the same time, these typhoon attributes have rich time characteristics and can provide corresponding typhoon geographical background information for Weibo texts released in different time periods, as shown in Table 1.

[0159] Table 1 Example of typhoon attribute data

[0160]

[0161] In the rough classification stage of typhoon disaster, typhoon attribute data is combined to identify typhoon disaster-related texts from microblog texts containing the keyword "typhoon". Most existing solutions rely only on text content without considering the actual typhoon changes, which can easily lead to incorrect identification of typhoon disasters. For example, "The typhoon is very strong, and I heard that some places have been flooded". It is difficult to determine whether such speculative texts are related to typhoon disasters based on the content alone. Therefore, the solution of this embodiment uses typhoon attribute data such as typhoon level, wind speed, air pressure and moving speed as geographical background information to analyze the credibility of microblog texts, which helps to improve the accuracy of typhoon disaster-related text identification.

[0162] We randomly selected microblog texts from the database for manual annotation, and judged whether they were related to the typhoon disaster based on the text content, and obtained 2500 positive samples (related to the typhoon disaster) and 2500 negative samples (not related to the typhoon disaster). We referred to the disaster reporting standards of the "Technical Specifications for Meteorological Disaster Investigation and Meteorological Disaster Information Collection" and combined the text's ability to reflect the disaster, and divided the typhoon disaster into five categories: traffic impact, social impact, power impact, forestry impact, and waterlogging, as shown in Table 2.

[0163] Table 2 Typhoon disaster classification system

[0164]

[0165] Based on the typhoon disaster classification system, multi-label annotation is performed on positive samples, that is, if a text contains information on multiple disaster categories, the text is annotated into multiple categories at the same time, as shown in Table 3;

[0166] Table 3 Multi-label text examples

[0167]

[0168] Among the 2500 positive samples, the number of each category is distributed as follows: traffic impact (883, 35.3%), social impact (1238, 49.5%), power impact (637, 25.5%), forestry impact (190, 7.6%) and waterlogging (892, 35.7%); then 70% of the data was randomly selected as the training set, 15% as the validation set, and 15% as the test set;

[0169] The text dataset is then preprocessed; the microblog text is preprocessed to generate text vectors, which are then used to combine typhoon attribute data with BERT and a coarse classification network to achieve coarse classification of typhoon disasters, and to classify microblog texts as disaster-related or disaster-irrelevant; among them, texts related to typhoon disasters will be further subdivided into five specific disaster categories based on a multi-label classification model: traffic impact, social impact, power impact, forestry impact, and waterlogging;

[0170] Text vectorization refers to converting text that is easy for humans to understand into digital form that can be understood by computers, and representing it in the form of vectors or matrices. Words represented by vectors are called word embeddings. Converting text information into vector representation is a prerequisite for text classification tasks.

[0171] Before entering the BERT model, microblog texts need to undergo a series of preprocessing, including segmenting the text into words or characters through word segmentation; adding a special marker [CLS] at the beginning; converting the text after word segmentation into corresponding vectors; and padding the zero vector after the shorter text to ensure that all input texts have the same length. This method sets the maximum text length to 130 by counting the length of the sample text.

[0172] Currently, the pre-trained language model BERT and multi-category classification methods are widely used in text classification, such as Figure 4 As shown in the figure, the BERT model consists of a 12-layer Transformer encoder, which includes multi-head attention, feedforward neural network, residual connection and layer normalization. The core of the Transformer encoder is the attention mechanism, which is to understand the semantic information of the context by weighing the importance of each word and other words. Each hidden layer of BERT has 768 nodes, which is obtained by pre-training on a large-scale Chinese text corpus, including data from Wikipedia, news, social media and other fields. However, since most existing solutions only use the output of the last layer of BERT for classification, they do not achieve the best results. In addition, multi-category classification does not match the complexity of text expression. Therefore, this embodiment integrates the hidden layer of BERT for feature extraction, thereby improving recognition accuracy.

[0173] After completing the text preprocessing, the BERT pre-trained model is used to extract text features from the preprocessed text dataset, and the output of each layer of BERT is used as the text feature dataset; the output of BERT is divided into two parts: sentence vector and word matrix. The sentence vector is used for binary classification (coarse classification) because it has a better overall semantic representation, and the word matrix is ​​used for typhoon disaster multi-label classification (fine classification) because it has a more detailed local semantic representation;

[0174] After completing the information extraction, a large number of entities and relationships are extracted from the unstructured case records. Since there may be multiple synonyms, the knowledge extracted from the text may contain a large amount of repeated data. Therefore, this method will use information fusion to solve the problems of entity disambiguation and coreference resolution. In this embodiment, the Transformer encoder is used to set a threshold to determine whether each entity matches, thereby realizing information fusion. The calculation formula is as follows:

[0175]

[0176] in, Two text features and The similarity between and There are two text features and Corresponding attribute information; The larger the value, the higher the semantic similarity between the two. Whether the value reaches the threshold is used to determine whether the two can be merged into the same entity;

[0177] After entity disambiguation is completed, in order to better utilize the different semantic information of each layer of BERT, this embodiment groups the 12 layers of sentence vectors and word matrices. Considering that the training of the BERT model is a process of gradual abstraction of text semantic representation, the grouping is performed from low to high levels, and the best representation of the text is obtained by comparing the results of different groups; the grouping rules are shown in Table 4, and different grouping forms will affect the final recognition accuracy:

[0178] Table 4 Grouping rules for sentence vectors and word matrices

[0179]

[0180] Then, a typhoon disaster recognition model is constructed. The typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence. The coarse classification network captures the high- and low-level semantic representations of the sentence vectors of the text to determine whether the text belongs to typhoon disasters, and inputs the text belonging to typhoon disasters into the next stage. The multi-label classification network extracts features of different semantic levels from the word matrix of the typhoon disaster text through Sit-CNN, and classifies the typhoon disaster text into specific disaster categories.

[0181] In this embodiment, the coarse classification network divides the sentence vectors of the microblog text into two categories based on the BiLSTM network to determine whether the text is related to the typhoon disaster, such as Figure 3 As shown, the coarse classification network includes a BiLSTM neural network, a group attention layer, a first fully connected layer, and a first Softmax activation layer connected in sequence; sentence vectors of different groups of text data are extracted sentence features through the BiLSTM neural network, and the group attention layer is used to match and fuse the sentence features with the attributes of the typhoon to obtain sentence features containing geographical background features, and input them into the first fully connected layer and the first Softmax activation layer, and the binary classification probability of the text data belonging to the text related to the typhoon disaster is output;

[0182] BiLSTM is a bidirectional long short-term memory network LSTM, which consists of forward and backward LSTM. The forward LSTM processes word vectors from left to right, while the backward LSTM does the opposite. Figure 5 As shown in the figure, it is the model structure diagram of BiLSTM; each layer of LSTM contains memory cells that determine the state of the current time step, as well as forget gates, input gates and output gates responsible for controlling the flow of information at different time steps; forget gate ( )、Input Gate( ) and the output gate ( ) respectively control the information of forgetting, input and output in the cell state, and the calculation formula is as follows:

[0183]

[0184]

[0185]

[0186] Where: , , is the weight matrix; , , is the bias vector; is the hidden state of the previous time step; is the input word vector of the current time step; It is a sigmoid function, which controls the gate value between 0 and 1;

[0187] Temporary cell state ( ) represents the new information input into the cell state, and the calculation formula is:

[0188]

[0189] Where: is the weight matrix; is the bias vector; is the hyperbolic tangent function;

[0190] Then, update the cell state at the current time step ( ) and hidden state ( ), the calculation formula is as follows:

[0191]

[0192]

[0193] Where: is the cell state at the previous time step;

[0194] For the 12 hidden layers of the sentence vector, the number of layers in each group is set to the time step. BiLSTM captures semantic information at different levels in different groups and outputs it after average pooling. The group attention mechanism integrates the semantic features of different groups to represent the text. Then the fully connected layer and activation layer predict whether the text is related to the typhoon disaster.

[0195] If the result of the binary classification stage is related to the typhoon disaster, the corresponding word matrix of the text is input into the multi-class multi-label classification of the five disaster categories. In this stage, this embodiment proposes Sit-CNN, which dynamically selects convolution kernels of different sizes for the 12 hidden layers of BERT to dynamically and selectively extract semantic information at different levels.

[0196] like Figure 6 As shown in the figure, Sit-CNN pads each group of word matrices to ensure the consistency of dimensions after convolution. Then, the word matrix is ​​processed by the convolution layer, where the size of the convolution kernel is k×768 (k ranges from 2 to 4, 768 is the size of each word vector), and there are 12 convolution kernels of different sizes to dynamically capture semantic information; the convolution features of each kernel are averaged and summed to obtain intermediate features; these features are then expanded and reshaped through a fully connected layer to obtain the attention weights of different convolution kernels calculated by the softmax activation function; the convolution features are multiplied by their respective kernel attention weights to generate selective features, and then these features are max-pooled and connected to obtain the semantic features of each group; Sit-CNN dynamically adopts and selectively emphasizes certain kernels in the convolution layer, so that the model pays attention to semantic information at different levels during training and inference;

[0197] In order to avoid information isolation caused by group convolution, this embodiment adopts a group exchange method (such as Figure 3 As shown in the second stage in the figure, the semantic features of each group are disrupted and integrated through a fully connected layer; the semantic features of each group are connected in series to obtain the final semantic features of the text; in order to achieve multi-class and multi-label classification, the fully connected layer infers the probability of each typhoon disaster category through the sigmoid activation function; each text can correspond to multiple typhoon disaster categories at the same time, and a threshold is set to determine whether the text is associated with a specific category;

[0198] After the model is built, the grouped sentence vector dataset is input into the coarse classification network, and the grouped word matrix dataset is input into the multi-label classification network. Multi-task learning is used to jointly optimize the coarse classification network and the multi-label classification network to obtain a trained typhoon disaster recognition model.

[0199] In this embodiment, the total loss of the model is obtained by weighting the binary classification loss and the multi-label classification loss through the weight factor, which is expressed as:

[0200]

[0201] in, is the total loss function, and They are BCE binary cross entropy loss function and Focal multi-label classification loss function, respectively. and are the first and second weight factors respectively;

[0202] The Binary Cross Entropy (BCE) loss function measures the distance between the model's predicted value and the actual value and is used as a loss function for binary classification (coarse classification). The formula is as follows:

[0203]

[0204] Where: is the true label of the sample (0 or 1); is the predicted output of the model (a probability value between 0 and 1), indicating the probability that the text is related to the typhoon disaster;

[0205] Focal Loss is used to evaluate the difference between the model output and the true label in multi-label classification. This loss can effectively solve the model performance problem caused by sample imbalance. The formula is as follows:

[0206]

[0207] Where: is the number of disaster categories; Is the text related to a specific disaster category The probability of is the attenuation factor, which is used to adjust the weight of difficult and easy samples. Set to 2;

[0208] Throughout the training process, Adam was used as the optimizer to dynamically adjust the learning rate to accelerate the convergence of parameters. The maximum number of training epochs was set to 50, and the parameters were updated using the mini-batch gradient descent method. The early stopping method was used to avoid overfitting, that is, if the loss function did not decrease within 3 rounds, the training was stopped. The model weight with the smallest loss was selected for inference. All models were built based on Python 3.7 and the PyTorch deep learning framework.

[0209] In this embodiment, the effects of different grouping strategies and weight factors on model performance are compared. First, different grouping strategies are compared to check the performance of the model. Considering the difference between the two stages, in order to balance the losses of the two stages, this embodiment sets the weight factor range from 0.01 to 0.1 and initializes it to 0.05 to select the best grouping strategy. The results are shown in Table 5.

[0210] Table 5 Recognition accuracy of different grouping rules

[0211]

[0212] As shown in Table 5, Table 5 shows that the most effective grouping strategy is G3; this grouping strategy divides the 12 hidden layer outputs of BERT into 3 groups. In the first stage of identifying typhoon disaster-related texts, its accuracy, recall rate and F1 score are 0.895, 0.945 and 0.919 respectively; in the second stage of multi-class multi-label classification of 5 disaster categories, its accuracy, recall rate and F1 score are 0.890, 0.916 and 0.846 respectively; compared with using only the output of the last layer of BERT, the two-stage method proposed in this embodiment can effectively utilize the information within and between the 12 hidden layer groups of BERT by integrating semantic features at different levels to obtain the best text representation;

[0213] In addition, this embodiment also discusses how to balance the importance of the two stages in the end-to-end framework to optimize the performance of the overall model; the weight factor plays a vital role in balancing the two stages. As mentioned above, this embodiment sets its range to 0.01 to 0.1, and takes 12 values ​​at intervals of 0.01 for comparison. The results are shown in Table 6.

[0214] Table 6 Recognition accuracy of different weight factors

[0215]

[0216] As shown in Table 6, for binary coarse classification and multi-label classification, the highest F1 scores of 0.921 and 0.846 are generated when the weight factors are 0.07 and 0.05 respectively; compared with training the two stages separately, the joint optimization method proposed in this embodiment further improves the classification performance of the two stages; the weight factor affects the direction of gradient update by changing the loss weights of the two stages, and integrates the features learned from different stages to optimize the text representation; finally, this embodiment adopts G3 and 0.05 as the optimal grouping strategy and weight factor of the model, thereby achieving the best performance improvement;

[0217] To check the generalization performance of the best model, this example also examines the model loss and F1 score on the training, validation, and test sets. Figure 7 As shown; According to the early stopping method of this embodiment, the model stops training in the 7th round, when the validation loss reaches the minimum value of 0.023, and does not decrease in the next 3 rounds; In this method, the initial weights of the model are set to the pre-trained weights of "bert-base-chinese", and are fine-tuned by optimizing the grouping strategy and weight factors; In the first stage of identifying disaster-related texts, the best validation and test F1 scores are 0.912 and 0.919; In the second stage of multi-class multi-label classification of 5 disaster categories, the best validation and test F1 scores are 0.849 and 0.846 respectively; In general, this method achieves robust results on both validation and test sets in both stages;

[0218] Finally, the text data to be recognized is obtained and input into the best typhoon disaster recognition model for recognition, and the typhoon disaster recognition result is obtained;

[0219] This method performs two-stage typhoon recognition based on an improved convolutional network and social media data. First, a rough classification is performed to determine whether the input text is typhoon-related text; then a two-stage multi-label classification is performed to further subdivide the typhoon-related text into more specific disaster categories, making the recognition more comprehensive and more accurate; secondly, this method adds typhoon attribute information to the input social media text in the rough classification stage to analyze the credibility of the input, thereby improving the accuracy of the rough classification; at the same time, in order to better utilize the different semantic information of each layer of BERT, this method groups the sentence vectors and word matrices extracted from each layer of BERT, and determines the optimal grouping rules and representation of the text by comparing the results of different groupings, thereby improving the recognition accuracy; in addition, in the multi-label classification stage, this method extracts features of different semantic levels from the word matrix of the typhoon disaster text based on Sit-CNN. Sit-CNN can dynamically and selectively extract semantic information of different levels and groups, and finally classify the typhoon disaster text into specific disaster categories, effectively improving the accuracy of disaster recognition.

[0220] Example 3

[0221] like Figure 8 As shown, this embodiment provides a typhoon disaster recognition system based on an improved convolutional network and social media data, and applies a typhoon disaster recognition method based on an improved convolutional network and social media data described in Embodiment 1 or 2, including:

[0222] Preprocessing unit 301: used to collect netizens' comment texts from various social media platforms on the Internet, and construct a text dataset based on the attributes of the commented typhoons; preprocess the text dataset;

[0223] Feature extraction unit 302: used to extract text features from the preprocessed text data set using the BERT pre-training model to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data;

[0224] Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set;

[0225] Model building unit 303: used to build a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence;

[0226] The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster;

[0227] The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text;

[0228] Model training unit 304: used to input the grouped sentence vector data set into the coarse classification network, input the grouped word matrix data set into the multi-label classification network, and use multi-task learning to jointly optimize and train the coarse classification network and the multi-label classification network to obtain a trained typhoon disaster recognition model;

[0229] The typhoon disaster identification unit 305 is used to obtain the text data to be identified and input it into the trained typhoon disaster identification model for identification, so as to obtain the typhoon disaster identification result.

[0230] In the specific implementation process, firstly, the preprocessing unit 301 collects the comment texts of netizens from various social media platforms on the Internet, and constructs a text dataset in combination with the attributes of the commented typhoons; preprocesses the text dataset;

[0231] The feature extraction unit 302 uses the BERT pre-training model to extract text features from the preprocessed text data set to obtain a text feature data set; then, all sentence vectors and all word matrices in the text feature data set are respectively disambiguated and grouped in turn to obtain a grouped sentence vector data set and a word matrix data set;

[0232] The model building unit 303 builds a typhoon disaster recognition model, which includes a coarse classification network and a multi-label classification network connected in sequence;

[0233] The model training unit 304 inputs the grouped sentence vector data set into the coarse classification network, inputs the grouped word matrix data set into the multi-label classification network, and uses multi-task learning to jointly optimize and train the coarse classification network and the multi-label classification network to obtain a trained typhoon disaster recognition model;

[0234] Finally, the typhoon disaster recognition unit 305 obtains the text data to be recognized and inputs it into the trained typhoon disaster recognition model for recognition, thereby obtaining the typhoon disaster recognition result;

[0235] This system performs two-stage typhoon recognition based on an improved convolutional network and social media data. It first performs coarse classification to determine whether the input text is typhoon-related text; then it performs a two-stage multi-label classification to further subdivide the typhoon-related text into more specific disaster categories, making the recognition more comprehensive and more accurate.

[0236] The same or similar reference numerals correspond to the same or similar components;

[0237] The terms used to describe the positional relationship in the drawings are only used for illustrative purposes and should not be construed as limiting the present invention;

[0238] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A typhoon disaster recognition method based on improved convolutional network and social media data, characterized in that: The following steps are involved: S1: Collecting netizens’ comments from various social media platforms on the Internet, and constructing a text dataset based on the attributes of the commented typhoons; and preprocessing the text dataset; S2: Using the BERT pre-trained model to extract text features from the preprocessed text data set to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data; The BERT pre-trained model includes 12 layers of sequentially connected Transformer encoders; The text features extracted by each of the Transformer encoders are saved together as the text feature dataset; Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set; Entity disambiguation includes: For each text feature extracted by the Transformer encoder: Calculate first similarities between different sentence vectors in pairs, and fuse information between two sentence vectors whose first similarities are greater than or equal to a preset first threshold; Calculating the second similarity between different word matrices in pairs, fusing information of two word matrices whose second similarity is greater than or equal to a preset second threshold, and completing entity disambiguation; The calculation formula of the similarity is: in, Two text features and The similarity between and There are two text features and Corresponding attribute information; The groups include: Group the text features output by the 12-layer Transformer encoder according to any of the following rules: Rule 1: Set a group that only contains text features output by the 12th layer Transformer encoder; Rule 2: Set a group containing all text features output by the 1st to 12th layer Transformer encoder; Rule 3: Set up two groups, containing the text features output by the Transformer encoders of layers 1 to 6 and 7 to 12 respectively; Rule 4: Set up three groups, including the text features output by the 1st to 4th layers, 5th to 8th layers, and 9th to 12th layers of Transformer encoders; Rule 5: Set four groups, including the text features output by the 1st to 3rd layers, 4th to 6th layers, 7th to 9th layers, and 10th to 12th layers of Transformer encoders; Rule 6: Set six groups, including the text features output by the 1st to 2nd layer, 3rd to 4th layer, 5th to 6th layer, 7th to 8th layer, 9th to 10th layer, and 11th to 12th layer Transformer encoders respectively; Rule 7: Set twelve groups, each containing the text features output by the 1st to 12th layer Transformer encoders; S3: constructing a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence; The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster; The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text; S4: inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model; S5: Obtain text data to be identified and input it into the trained typhoon disaster identification model for identification, to obtain a typhoon disaster identification result.

2. The typhoon disaster identification method based on improved convolutional network and social media data according to claim 1, characterized in that: In step S1, the attributes of the typhoon include: typhoon level, wind speed, air pressure, moving speed and geographical location information.

3. The typhoon disaster identification method based on improved convolutional network and social media data according to claim 1 is characterized in that: In the step S1, preprocessing the text data set includes: Word segmentation encoding: All texts in the text data set are divided into individual words by a word segmenter, and all words are converted into corresponding codes using a preset vocabulary to obtain the encoded text data set; Add tags: Add the beginning tag and the end tag to the beginning and the end of all encoded texts, and convert all the texts after adding tags into corresponding text vectors; Fill blanks: fill the end of all text vectors whose length is less than the preset value with zero vectors to make the length of each text vector consistent; Position embedding: Set the embedding information for each text vector to represent the position order of the words in the text vector to complete the preprocessing.

4. A typhoon disaster identification method based on improved convolutional network and social media data according to any one of claims 1 to 3, characterized in that: In step S3, the coarse classification network includes: a BiLSTM neural network, a group attention layer, a first fully connected layer, and a first Softmax activation layer connected in sequence; The sentence vectors of different groups of text data are used to extract sentence features through the BiLSTM neural network, and the group attention layer is used to match and fuse the sentence features with the attributes of the typhoon to obtain sentence features containing geographical background features. The features are input into the first fully connected layer and the first Softmax activation layer, and the binary classification probability of the text data belonging to the relevant text of the typhoon disaster is output.

5. The typhoon disaster identification method based on improved convolutional network and social media data according to claim 4 is characterized in that: In step S3, the multi-label classification network includes: a Sit-CNN neural network, a group exchange layer, a second fully connected layer, a first splicing layer, a third fully connected layer and a Sigmoid activation layer connected in sequence; The Sit-CNN neural network includes: a dimension filling layer, a grouped convolution layer, an average pooling layer, a fourth fully connected layer, a reshaping layer, a second Softmax activation layer, a maximum pooling layer and a second splicing layer connected in sequence; the output of the grouped convolution layer is also connected to the output of the second Softmax activation layer by weighted multiplication; Convolution kernels of different sizes are arranged in the grouped convolution layer; The input of the Sit-CNN is the word matrix of different groups of text data related to the typhoon disaster. The word matrix is ​​first dimensionally expanded through a dimension filling layer, and then convolved using a convolution kernel of a corresponding size in a group convolution layer to extract convolution features; all convolution features are weighted and summed after passing through an average pooling layer to obtain intermediate features; the intermediate features are input into the fourth fully connected layer for expansion, and are shuffled and reshaped using a reshaping layer to obtain reshaped features; the reshaped features are input into the second Softmax activation layer to obtain the core attention weights of different convolution kernels; the convolution features of each convolution kernel are weighted and multiplied with the corresponding core attention weight to obtain selective features; all selective features are sequentially input into the maximum pooling layer and the second splicing layer to obtain the semantic features of the corresponding groups; The semantic features of each group are input into the group exchange layer to disrupt the semantic features of each group to avoid information isolation caused by group convolution; then the second fully connected layer is used to integrate the features, and the first concatenation layer is used to concatenate the semantic features to obtain the final semantic features of the text data; The final semantic features of the text data are sequentially input into the third fully connected layer and the Sigmoid activation layer for multi-label classification to obtain the specific disaster category of the typhoon, which is used as the typhoon disaster identification result.

6. A typhoon disaster identification method based on improved convolutional network and social media data according to claim 1 or 5, characterized in that: In step S4, when the coarse classification network and the multi-label classification network are jointly optimized and trained, a total loss function is set, specifically: in, is the total loss function, and They are BCE binary cross entropy loss function and Focal multi-label classification loss function, respectively. and are the first and second weighting factors respectively.

7. A typhoon disaster recognition system based on improved convolutional network and social media data, applying a typhoon disaster recognition method based on improved convolutional network and social media data as described in any one of claims 1 to 6, characterized in that: include: Preprocessing unit: used to collect netizens' comment texts from various social media platforms on the Internet and build a text dataset based on the attributes of the commented typhoons; Preprocessing the text data set; Feature extraction unit: used to extract text features from the preprocessed text data set using the BERT pre-training model to obtain a text feature data set; the text feature data set includes a sentence vector and a character matrix corresponding to each text data; Perform entity disambiguation and grouping on all sentence vectors and all word matrices in the text feature data set, respectively, to obtain a grouped sentence vector data set and a word matrix data set; Model building unit: used to build a typhoon disaster recognition model; the typhoon disaster recognition model includes a coarse classification network and a multi-label classification network connected in sequence; The coarse classification network is used to determine whether the input text data belongs to the text related to the typhoon disaster; The multi-label classification network is based on an improved convolutional network Sit-CNN, and is used to further identify specific disaster categories contained in the typhoon disaster-related text; Model training unit: used for inputting the grouped sentence vector data set into the coarse classification network, inputting the grouped word matrix data set into the multi-label classification network, and jointly optimizing and training the coarse classification network and the multi-label classification network by multi-task learning to obtain a trained typhoon disaster recognition model; Typhoon disaster identification unit: used to obtain text data to be identified and input it into the trained typhoon disaster identification model for identification, so as to obtain typhoon disaster identification results.