Flood disaster event detection method and device based on social media data
By using word vector models and deep learning models on Chinese social media, and combining address analysis tools, the technical gap in flood disaster event detection is solved, and accurate detection and evaluation of flood disasters is achieved. Improved flood risk management capabilities.
Patent Information
- Application Number
- CN202410492970.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-12-20
AI Technical Summary
There has been no research on using Chinese social media to conduct flood disaster event detection in the existing technology, and it is impossible to effectively monitor and evaluate flood disaster risks.
By obtaining text data from social media, using word vector model to extract words related to heavy rain and floods, combining the deep learning model BERT to train and classify the data, combining the address analysis tool CPCA to obtain city information, and count the average time interval of text data. Judge the occurrence and end of a disaster.
Accurate detection and evaluation of flood disaster events has been achieved, real-time and historical flood disaster data have been provided, and flood risk management capabilities have been improved.
Smart Images

Figure CN119166805A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flood disaster monitoring and risk assessment, and in particular to a flood disaster event detection method and device based on social media data. Background Art
[0002] Global climate change has made extreme precipitation events at regional and local scales more frequent. A series of serious flood disasters have occurred around the world, and flood disasters have become a common public safety problem faced by many countries. High-quality and reliable flood disaster data can provide sufficient information for flood monitoring, emergency response, risk assessment and disaster relief decision-making, thereby improving the flood risk management capabilities of government departments.
[0003] In the existing technology, when a flood occurs, people will post microblogs related to the flood on social media platforms, discuss the social impact of the flood, and release rescue information. Researchers have used social media data to conduct a number of studies related to flood disasters, including flood mapping, topic detection, community resilience, and emergency rescue. Flood disaster detection research based on Twitter has launched a global flood event database.
[0004] However, current research is limited to the topic classification of flood disaster events, and research on flood disaster event detection using Chinese social media has not yet appeared. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for detecting flood disaster events based on social media data, which can solve the problem in the prior art that flood disaster events have not yet been detected using Chinese social media.
[0006] The embodiment of the present invention provides a flood disaster event detection method based on social media data, comprising the following steps: obtaining text data of a flood disaster from social media, extracting words related to heavy rain and flood in the text data through a word vector model, downloading disaster text data within a long period of time from social media according to the related words, wherein the disaster text data within the long period of time is annual data; dividing the text data into disaster-related data and disaster-irrelevant data through manual labeling, training a deep learning model BERT using the disaster-related data and the disaster-irrelevant data, and obtaining a trained model; using the trained model to classify the disaster text data within a long period of time, and obtaining the disaster-related text data within a long period of time; extracting city information of the disaster-related text data within a long period of time through an address resolution tool CPCA, and sorting the disaster-related text data within a long period of time in chronological order according to the city classification; screening out the disaster-related text data of each city in the non-rainy season each year from the classified and sorted disaster-related text data within a long period of time, counting the sum of the disaster-related text data of one hour and two hours before and after the hour, and calculating the average value, obtaining the average time interval for publishing the disaster-related text data, and comparing it with a preset average time interval threshold, and detecting the occurrence and end of the disaster event through the comparison result.
[0007] Furthermore, the extracting of words related to heavy rain and floods in text data specifically includes: using the word vector model Word2Vec to learn media text data and automatically extracting key words related to heavy rain and floods.
[0008] Furthermore, the text data is divided into disaster-related data and disaster-irrelevant data through manual labeling, and the specific steps include: manually checking the media text data, labeling each media text data, and distinguishing between disaster-related data and disaster-irrelevant data; after labeling, randomly dividing the media text data according to 7:2:1, where 7 is used as a training set, 2 is used as a test set, and 1 is used as a verification set.
[0009] Furthermore, the extracting of city information from disaster-related text data within a long period of time by using the address parsing tool CPCA specifically includes: when no place name or address information can be detected from the disaster-related text data within a long period of time, the data is automatically filtered out.
[0010] Furthermore, the filtering out disaster-related text data in the non-rainy season of each city each year specifically includes: taking January to April and October to December each year as the non-rainy season time, and filtering out disaster-related text data in the non-rainy season of each city each year.
[0011] Furthermore, the step of obtaining the average time interval for publishing disaster-related text data specifically includes:
[0012] The average number of disaster-related text data per hour in each city during the non-rainy season is calculated by summing up the number of disaster-related text data in each hour and the two hours before and after, and calculating the mean value to obtain the mean number of flood damage information at that time. The formula is:
[0013]
[0014] Among them, n represents the number of disaster-related text data per hour; h represents time;
[0015] Correction factor c at hour h h Equal to the number of flood damage information in that hour Multiply by 24, and then divide by the sum of the average number of disaster-related text data in the 24 hours of the day in which the hour falls, to obtain the correction factor c for each hour. h , the formula is:
[0016]
[0017] When two records are in the same hour, c h is the correction factor of the current time h. When two records do not belong to the same hour, the correction factor of the hour h of the next record is used in the calculation. The corrected interval time Δt between the disaster-related text data of two adjacent times is c , the formula is:
[0018] Δt c =Δt*c h
[0019] Where Δt represents the time interval between the release of two records, and the correction factor c h The value will be greater than 1 during the day and less than 1 at night, which can compress the time interval of disaster damage information at night and stretch the time interval of disaster damage information during the day.
[0020] Furthermore, the specific steps of judging the occurrence and end of a disaster event include: presetting an average time interval threshold as the start and end threshold for judging the occurrence of a disaster; when the average time interval for publishing disaster-related text data is less than the average time interval threshold, judging that a disaster event is occurring; when the average time interval for publishing disaster-related text data is greater than the average time interval threshold, judging that the disaster event has ended.
[0021] The embodiment of the present invention provides a flood disaster event detection device based on social media data, including: a data acquisition module, used to obtain text data of a flood disaster from social media, and extract words related to heavy rain and floods in the text data through a word vector model, and download disaster text data within a long period of time from social media according to the relevant words, wherein the disaster text data within the long period of time is annual data; a model training module, used to divide the text data into disaster-related data and disaster-irrelevant data through manual labeling, and use the disaster-related data and disaster-irrelevant data to train a deep learning model BERT to obtain a trained model; a data screening module, used to use the trained model to train the disaster text data within a long period of time The data is classified to obtain disaster-related text data within a long period of time; the city information of the disaster-related text data within a long period of time is extracted through the address parsing tool CPCA, and the disaster-related text data within a long period of time is sorted in chronological order after being classified by city; the disaster judgment module is used to filter out the disaster-related text data of each city in the non-rainy season each year from the classified and sorted disaster-related text data within a long period of time, and to count the sum of the disaster-related text data of one hour and the two hours before and after the hour and calculate the average value, to obtain the average time interval for the release of the disaster-related text data, and to compare it with the preset average time interval threshold, and to detect the occurrence and end of disaster events through the comparison results.
[0022] The embodiment of the present invention provides a flood disaster event detection method and device based on social media data. Compared with the prior art, the beneficial effects thereof are as follows:
[0023] The text data of a flood disaster is obtained from social media, and words related to heavy rain and floods in the text data are extracted. According to the relevant words, the disaster text data within a long range is downloaded from social media; the text data is divided into disaster-related data and disaster-irrelevant data through manual labeling, and the disaster-related data and disaster-irrelevant data are used to train the deep learning model BERT and obtain the trained model; the trained model is used to classify the disaster text data within a long range to obtain the disaster-related text data within a long range; the city information of the disaster-related text data within a long range is extracted through the address parsing tool CPCA, and the disaster-related text data within a long range is sorted in chronological order according to the city classification; the disaster-related text data in each city in the non-rainy season each year is screened out, the average time interval for the release of the disaster-related text data is obtained, and it is compared with the pre-set average time interval threshold, and the occurrence and end of the disaster event are detected by the comparison result.
[0024] Among them, the deep learning model BERT is trained through text data, so that the trained model can accurately classify disaster text data over a long period of time, obtain disaster-related text data over a long period of time, and then judge the occurrence of disaster events based on the average time interval for publishing disaster-related text data over a long period of time. The accurate classification of the trained model can screen out all irrelevant data, and accurately obtain disaster-related text data on social media. According to the accurate average time interval for publishing accurate data, the occurrence and end of flood disaster events can be accurately judged. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A technical flow chart of a flood disaster event detection method and device based on social media data provided by an embodiment of the present invention;
[0026] Figure 2 An example of text data of microblogs of a rainstorm and flood disaster in a certain place, provided by a flood disaster event detection method and device based on social media data in an embodiment of the present invention;
[0027] Figure 3 A monthly change chart of text data of rainstorm and flood microblogs from 2012 to 2023, which is a flood disaster event detection method and device based on social media data provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of flood event detection based on changes in the time frequency of microblog text releases is provided in an embodiment of the present invention, which is a flood disaster event detection method and device based on social media data. DETAILED DESCRIPTION
[0029] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0030] Global climate change has caused frequent and group-based rainstorm and flood disasters in Chinese cities. In response to this problem, the present invention provides a method for detecting urban rainstorm and flood disaster events based on social media data, which downloads rainstorm and flood-related Weibo text data from the Sina Weibo platform, classifies the Weibo text data using the BERT deep learning model, extracts real flood disaster Weibo texts, and then detects the outbreak of urban rainstorm and flood disaster events based on the changes in the frequency of flood disaster Weibo text releases. Compared with in-situ monitoring and remote sensing observations, social media has a faster perception of floods and is more current, while also having the ability to detect flood events in a large range and in near real time. The present invention can not only detect historical flood events, but also detect ongoing flood events in real time, which is crucial for emergency management and emergency rescue of flood disasters.
[0031] See also Figures 1 to 4 The embodiment of the present invention provides a flood disaster event detection method based on social media data, comprising the following steps:
[0032] Step 1: Download the Weibo text data of a certain heavy rainstorm and flood event from Sina Weibo based on specific keywords through web crawlers and API interfaces.
[0033] The specific keywords here refer to keywords related to the extremely heavy rainstorm and flood events that occurred in history. In this project embodiment, the keyword "heavy rain in a certain place" is used, and a large number of microblog texts related to the heavy rain event in a certain place are downloaded.
[0034] Step 2: Use the word vector model to learn the Weibo text data downloaded in the first step and extract keywords related to "heavy rain" and "flood".
[0035] The word vector model mentioned here mainly refers to the Word2Vec word vector model, which is an unsupervised machine learning model. By learning the Weibo text downloaded in step 1, all keywords related to "heavy rain" and "flood" are automatically extracted.
[0036] Step 3: Use the “heavy rain” and “flood” related keywords extracted in step 2 to download long-term heavy rain and flood related Weibo text data from Sina Weibo again.
[0037] The long time series mentioned here does not refer to the time of a specific rainstorm and flood event, but downloads the rainstorm and flood-related Weibo in the whole country on the Sina Weibo platform. Therefore, the time span of Weibo data download is calculated on a yearly scale. For example, using the keywords related to "rainstorm" and "flood" to directly download all the rainstorm and flood-related Weibo text data for the whole year of 2023.
[0038] Step 4: For the Weibo text data downloaded in step 1, use the manual labeling method to classify the text into Weibo texts that are truly related to floods and Weibo texts that are not related to floods, and then use the BERT deep learning model to learn and train the text.
[0039] Because whether it is the microblog text data of a specific event downloaded in step one, or the flood-related microblog texts downloaded in step three based on the keywords related to "heavy rain" and "flood", there are a large number of microblog texts that are not related to flood disasters, and these irrelevant microblog texts need to be filtered.
[0040] The manual labeling method is used to classify texts, which means that each text is labeled through manual inspection to mark whether each text is truly related to flood disasters or unrelated to flood disasters.
[0041] After manual labeling, the Weibo text dataset was randomly classified according to the ratio of 7:2:1, with 7 sets as training sets, 2 sets as test sets, and 1 set as validation set. The BERT deep learning model was used for training and evaluation of the model training effect and its accuracy on the validation set.
[0042] Step 5: Use the trained BERT deep learning model on the long-term rainstorm and flood-related Weibo text data downloaded in step 3 to extract the real Weibo text related to floods.
[0043] Once the BERT deep learning model is trained, it can predict the microblog texts downloaded in step 3 to determine whether each text is actually related to flood disasters. This operation can filter out all microblog texts that are not related to flood disasters.
[0044] Step 6: Use CPCA place name and address parsing tool to extract the place name and address information in the microblog text in step 5, classify all real microblog texts related to floods by city, and sort them according to the time when the microblogs were published.
[0045] For the microblog texts filtered in step 5, although these microblog texts are all related to flood disasters, some texts do not contain place name and address information. These texts cannot know the city where the flood disaster described is located, so they are useless. The present invention uses the CPCA place name and address parsing tool to perform place name and address parsing on each text. If the place name and address information cannot be detected from the microblog text, it will be automatically filtered out. Finally, all the microblog texts related to flood disasters with city information are retained. Then they are classified according to the city, and each microblog text is classified into a different city.
[0046] Step 7: Count the average interval between the release of rainstorm and flood microblogs in each city during the non-rainy season each year, reasonably set the percentage of the average interval time to mark the thresholds for the occurrence and end of rainstorm and flood, and detect the number of rainstorm and flood disaster events in the city.
[0047] When a flood disaster occurs, a large number of users will post flood-related microblogs on Sina Weibo. Due to the increase in the posting frequency, the time interval between posting flood-related microblogs will be greatly shortened. The present invention detects the occurrence of floods by detecting changes in the average interval between microblog posting times.
[0048] Therefore, we first need to count the time intervals between the release of rainstorm and flood microblogs when no real floods occur, which is relatively long. The present invention uses rainstorm and flood microblogs in the non-rainy season (January to April and October to December each year) to count the average time intervals between microblogs.
[0049] After calculating the average time interval between the release of rainstorm and flood microblogs in the non-rainy season, a value much smaller than the average time interval can be manually set as the start and end threshold of flood outbreaks. Once it is detected that the average time interval between the release of rainstorm and flood microblogs is sharply reduced, the occurrence of flood disasters can be detected. After marking the occurrence of floods, once the average time interval between the release of rainstorm and flood microblogs is greater than the end threshold, the flood event is marked as over.
[0050] The above-mentioned rainstorm and flood disaster event detection is carried out in all cities, and the occurrence and end time of rainstorm and flood events in each city are counted to form a flood disaster database.
[0051] The present invention is a method for detecting urban rainstorm and flood disaster events based on social media data. The method can directly detect the number of flood disasters in each city and record the occurrence and end time of each flood disaster. The flood disaster dataset from the perspective of social media can be a useful supplement to China's historical flood disaster database. In particular, a large amount of small and medium-sized flood disaster information can provide a reference for China to cope with increasingly frequent flood disasters, and can also provide a basis for resilience evaluation for China's resilient city construction.
[0052] An embodiment of the present invention provides a flood disaster event detection device based on social media data, comprising:
[0053] The data acquisition module is used to obtain text data of a flood disaster from social media, and extract words related to heavy rain and floods in the text data through the word vector model, and download disaster text data within a long range from social media according to the relevant words, and the disaster text data within a long range is annual data. The model training module is used to divide the text data into disaster-related data and disaster-irrelevant data through manual labeling, and use the disaster-related data and disaster-irrelevant data to train the deep learning model BERT to obtain the trained model. The data screening module is used to classify the disaster text data within a long range using the trained model to obtain the disaster-related text data within a long range; extract the city information of the disaster-related text data within a long range through the address parsing tool CPCA, and sort the disaster-related text data within a long range in chronological order according to the city classification. The disaster judgment module is used to filter out the disaster-related text data of each city in the non-rainy season every year from the classified and sorted disaster-related text data within a long range, count the sum of the disaster-related text data of one hour and the two hours before and after the hour, and calculate the average value, obtain the average time interval for the release of the disaster-related text data, and compare it with the preset average time interval threshold, and detect the occurrence and end of the disaster event through the comparison result.
[0054] A specific embodiment is as follows:
[0055] Step 1: Download the microblog text data of a heavy rainstorm and flood event from Sina Weibo based on specific keywords through web crawlers and API interfaces;
[0056] The amount of data on the Weibo platform is huge. People share what they see and hear in daily life on the platform, and trillions of data are generated every day. In order to capture Weibo texts related to flood disasters, it is necessary to search according to specific keywords. The present invention first extracts a flood keyword set from Weibo texts of specific flood events.
[0057] like Figure 1 As shown, the present invention selects a rainstorm event in a certain place as an example to download the microblog text data of flood events. Using a web crawler and a microblog API interface, with the keyword "rainstorm in a certain place", the microblog text data of the rainstorm and flood disaster event is downloaded, totaling more than 80,000. Figure 2 This is an example of downloaded microblog text data about a rainstorm and flood disaster in a certain place. The microblog text data mainly includes key information such as the microblog posting user name, microblog text, microblog posting time, microblog topic, number of reposts, number of comments, number of likes, etc.
[0058] Although this embodiment takes a rainstorm in a certain place as an example, the present invention is not limited to this flood event, and any method of constructing a sample data set based on other flood events also falls within the protection scope of the present invention.
[0059] Step 2: Use the word vector model to learn the Weibo text data downloaded in the first step and extract keywords related to "heavy rain" and "flood";
[0060] The present invention uses the Word2Vec word vector model to extract keywords related to "heavy rain" and "flood" from the downloaded microblog text sample data of flood disasters. Word2Vec is a model proposed by Google for efficient word vector training. The present invention uses Word2Vec to learn the downloaded microblog text data and extracts synonyms related to "heavy rain" and "flood" respectively, as follows:
[0061] Heavy rain related: rain, rainstorm, heavy rain, torrential rain, heavy rainfall, moderate rain, heavy to heavy rain, strong wind, short time, cloudy, moderate to heavy rain, rain, storm, light rain, rain stop, lightning and thunder, getting heavier, patter, heavy rain, heavy precipitation, rainfall, rainfall, precipitation, rainfall amount;
[0062] Flood-related: flood, heavy rain, rainstorm, flood, big water, rainwater, torrent, wash away, water flow, river water, mountain torrent, flood, waterlogging, landslide, collapse, collapse, water depth, waist-high, waterlogging, landslide
[0063] Step 3: Use the “heavy rain” and “flood” related keywords extracted in the second step to download long-term heavy rain and flood related Weibo text data through Sina Weibo again;
[0064] Based on the keywords extracted in step 2, long-term microblog data related to rainstorms and floods are downloaded directly from the Sina Weibo platform according to specific time. This embodiment downloads the text data of rainstorms and floods from 2012 to 2023 from the Sina Weibo platform. Figure 3 This is a graph showing the monthly changes in the amount of Weibo text.
[0065] Step 4: For the Weibo text data downloaded in the first step, the texts were classified into Weibo texts related to floods and Weibo texts not related to floods using the manual labeling method, and then the BERT deep learning model was used to train the texts;
[0066] Although a large amount of Weibo text data was downloaded from the Sina Weibo platform in the third step, in fact most of the texts have nothing to do with real flood disaster events, but are just people mentioning rainfall or flood keywords in their daily lives. Therefore, it is necessary to filter the downloaded Weibo texts and retain the real Weibo texts related to flood disasters.
[0067] The present invention uses the BERT deep learning model to classify microblog texts. BERT is a pre-trained language representation model that emphasizes that it no longer uses the traditional unidirectional language model or the shallow splicing method of two unidirectional language models for pre-training as in the past, but uses a new MLM to generate deep bidirectional language representations.
[0068] In this embodiment, the present invention first manually marks the texts that are actually related to flood disasters and the texts that are not related to flood disasters in the downloaded microblog texts of a rainstorm event in a certain place, and randomly classifies the microblog text data set according to 7:2:1, with 7 parts as training sets, 2 parts as test sets, and 1 part as validation set. The BERT deep learning model is used for learning and training, and the model training effect and the accuracy on the validation set are evaluated.
[0069] Step 5: Use the trained BERT deep learning model on the long-term rainstorm and flood-related Weibo text data downloaded in the third step to extract the real Weibo text related to floods.
[0070] Once the BERT deep learning model is trained, it can predict the microblog texts downloaded in the third step to determine whether each text is actually related to flood disasters. This operation can filter out all microblog texts that are not related to flood disasters.
[0071] Step 6: Use CPCA place name and address parsing tool to extract place name and address information from the microblog texts in step 5, classify all real microblog texts related to floods by city, and sort them according to the time when the microblogs were published;
[0072] For the microblog texts filtered in the fifth step, although these microblog texts are all related to flood disasters, some texts do not contain place name and address information. These texts cannot know the city where the flood disaster described is located, so they are useless. The present invention uses the CPCA place name and address parsing tool to perform place name and address parsing on each text. If the place name and address information cannot be detected from the microblog text, it will be automatically filtered out. Finally, all the microblog texts related to flood disasters with city information are retained. Then they are classified according to the city, and each microblog text is classified into a different city.
[0073] Step 7: Count the average interval between the release of rainstorm and flood microblogs in each city during the non-rainy season each year, reasonably set the percentage of the average interval time to mark the thresholds for the occurrence and end of rainstorm and flood, and detect the number of rainstorm and flood disaster events in the city.
[0074] When a flood disaster occurs, a large number of users will post flood-related microblogs on Sina Weibo. Due to the increase in the posting frequency, the time interval between posting flood-related microblogs will be greatly shortened. The present invention detects the occurrence of floods by detecting changes in the average interval between microblog posting times.
[0075] In order to eliminate the periodic fluctuation of the information release time interval due to the day / night change, the release time interval needs to be corrected.
[0076] First, the average number of microblogs per hour in the city is counted. As shown in the following formula, the number of microblog texts in each hour and the 2 hours before and after each hour, a total of 5 hours, is summed up and the mean is calculated to obtain the mean number of flood damage information in the hth hour.
[0077]
[0078] Next, calculate the correction factor for each hour. As shown in the following formula, the correction factor c for the hth hour h c h Equal to the average number of flood damage information in that hour Multiply by 24, and then divide by the sum of the 24-hour average number of microblog texts for that hour:
[0079]
[0080] Finally, the corrected interval time Δt between two adjacent microblog texts is c Δt c It can be calculated using the following formula. When two records are in the same hour, then c h It is the correction factor of the current time h. When two records do not belong to the same hour, the correction factor of the hour h of the later record is used in the calculation.
[0081] △t c =Δt*c h
[0082] Δt represents the time interval between the release of two adjacent microblog texts. The correction factor c h c h The value during the day is usually greater than 1, and at night it is less than 1. The effect of this operation is to automatically compress the time interval of flood damage information at night and appropriately stretch the time interval of flood damage information during the day.
[0083] After calculating the average time interval between the release of rainstorm and flood microblogs in the non-rainy season, a value much smaller than the average time interval can be manually set as the start and end threshold of flood outbreaks. Once it is detected that the average time interval between the release of rainstorm and flood microblogs is sharply reduced, the occurrence of flood disasters can be detected. After marking the occurrence of floods, once the average time interval between the release of rainstorm and flood microblogs is greater than the end threshold, the flood event is marked as over.
[0084] like Figure 4 As shown, the present invention sets a 24-hour time window, and detects the outbreak of flood events by detecting the change of the time interval of microblog text release within the time window, and the method is as follows:
[0085] First, to detect the mutation of the time interval between microblog text releases, we need to know the average time interval between microblog text releases that has not undergone mutation. Correction factor c based on each hour h c h , first count the corrected intervals between all two adjacent microblog texts. Considering that people discuss rainstorms and floods at different frequencies in the rainy season and the non-rainy season, the distribution of microblog texts will also be different. Therefore, when calculating the average interval time, the present invention excludes the data of the rainy season from May to September, and only uses the data from January to April and October to December to calculate the average value. In addition, considering that the number of microblog texts in different years is different, the average interval time is calculated separately in different years. The formula is as follows:
[0086]
[0087] Where m is the number of flood damage information from January to April, n is the number of flood damage information from October to December, and c is the number of flood damage information from January to April. i+1 and c j+1 Represent the correction factors for the i+1th and j+1th hours respectively.
[0088] Secondly, it is necessary to set the start and end time interval thresholds for flood outbreaks. In the present invention, the flood outbreak start threshold is set as the average interval time between microblog text releases. The end threshold is set to the average interval time of 4.5%. 30% of.
[0089] Again, using a 24-hour time window, traverse the urban flood damage information hour by hour. Assuming that the current hour is h0, there are 24 hours of data from h0 to h0+23 in the time window. The average interval time t between flood damage information in the time window is calculated. When the time t is found to be less than If the flood event is not marked, the flood event is marked as the beginning, and the subsequent flood damage information is traversed hour by hour according to the time window until the average interval time t at a certain moment is greater than 30% of the start time and the end time of the flood event are marked as finished.
[0090] Finally, the flood events with a duration of less than 1 hour are deleted, and the flood events with an interval of less than 24 hours are merged to obtain a list of flood events in different cities. It should be noted that the present invention can not only detect historical rainstorm and flood events, but also detect the flood events that are happening in real time. Figure 4 The method shown detects the changes in the time intervals of rainstorm and flood microblog texts and detects the occurrence of flood disasters in real time.
[0091] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A flood disaster event detection method based on social media data, characterized in that: The following steps are involved: Obtain text data of a flood disaster from social media, and extract words related to heavy rain and floods in the text data through a word vector model, and download disaster text data over a long period of time from social media based on the relevant words, where the disaster text data over a long period of time is annual data; The text data is divided into disaster-related data and disaster-irrelevant data through manual labeling, and the disaster-related data and disaster-irrelevant data are used to train the deep learning model BERT to obtain the trained model; Use the trained model to classify disaster text data over a long period of time and obtain disaster-related text data over a long period of time; extract city information of disaster-related text data over a long period of time through the address parsing tool CPCA, and sort the disaster-related text data over a long period of time in chronological order after classifying them according to cities; The disaster-related text data of each city in the non-rainy season each year are screened out from the classified and sorted disaster-related text data over a long period of time. The sum of the disaster-related text data for one hour and the two hours before and after the hour is counted and the average value is calculated. The average time interval for the release of disaster-related text data is obtained and compared with the pre-set average time interval threshold. The occurrence and end of disaster events are detected by comparing the results.
2. A flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The extracting of words related to heavy rain and floods in text data specifically includes: using the word vector model Word2Vec to learn media text data and automatically extracting key words related to heavy rain and floods.
3. The flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The text data is divided into disaster-related data and disaster-irrelevant data through manual labeling, and the specific steps include: The media text data is manually checked and each media text data is labeled to distinguish between disaster-related data and disaster-irrelevant data; After labeling, the media text data is randomly divided into 7:2:1, where 7 is used as the training set, 2 is used as the test set, and 1 is used as the validation set.
4. The flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The city information of disaster-related text data within a long period of time is extracted by using the address parsing tool CPCA, specifically including: When place name and address information cannot be detected in disaster-related text data over a long period of time, the data is automatically filtered out.
5. The flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The method of screening out disaster-related text data in the non-rainy season of each city each year specifically includes: taking January to April and October to December each year as the non-rainy season time, and screening out disaster-related text data in the non-rainy season of each city each year.
6. The flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The specific steps of obtaining the average time interval for publishing disaster-related text data include: The average number of disaster-related text data per hour in each city during the non-rainy season is calculated by summing up the number of disaster-related text data in each hour and the two hours before and after, and calculating the mean value to obtain the mean number of flood damage information at that time. The formula is: Among them, n represents the number of disaster-related text data per hour; h represents time; Correction factor c at hour h h Equal to the number of flood damage information in that hour Multiply by 24, and then divide by the sum of the average number of disaster-related text data in the 24 hours of the day in which the hour falls, to obtain the correction factor c for each hour. h , the formula is: When two records are in the same hour, c h is the correction factor of the current time h. When two records do not belong to the same hour, the correction factor of the hour h of the next record is used in the calculation. The corrected interval time Δt between the disaster-related text data of two adjacent times is c , the formula is: Δt c =Δt*c h Where Δt represents the time interval between the release of two records, and the correction factor c h The value will be greater than 1 during the day and less than 1 at night, which can compress the time interval of disaster damage information at night and stretch the time interval of disaster damage information during the day.
7. The flood disaster event detection method based on social media data as claimed in claim 1, characterized in that: The specific steps of judging the occurrence and end of a disaster event include: Pre-set an average time interval threshold as the start and end threshold for judging the occurrence of a disaster; When the average time interval between the release of disaster-related text data is less than the average time interval threshold, it is judged that a disaster event is occurring; When the average time interval between the release of disaster-related text data is greater than the average time interval threshold, it is determined that the disaster event has ended.
8. A flood disaster event detection device based on social media data, characterized in that: include: A data acquisition module is used to obtain text data of a flood disaster from social media, and extract words related to heavy rain and floods in the text data through a word vector model, and download disaster text data over a long period of time from social media based on the relevant words, wherein the disaster text data over a long period of time is annual data; The model training module is used to divide text data into disaster-related data and disaster-irrelevant data through manual labeling, and use the disaster-related data and disaster-irrelevant data to train the deep learning model BERT to obtain the trained model; The data screening module is used to classify disaster text data within a long period of time using the trained model to obtain disaster-related text data within a long period of time; extract the city information of disaster-related text data within a long period of time through the address parsing tool CPCA, and sort the disaster-related text data within a long period of time in chronological order after classifying them according to the city; The disaster judgment module is used to filter out the disaster-related text data of each city in the non-rainy season every year from the classified and sorted disaster-related text data over a long period of time, count the sum of the disaster-related text data of one hour and the two hours before and after the hour, calculate the average value, obtain the average time interval for the release of disaster-related text data, and compare it with the pre-set average time interval threshold, and detect the occurrence and end of disaster events through the comparison results.
Citation Information
Patent Citations
Construction method of social media disaster effective information detection model
CN114818724A
Typhoon disaster assessment method based on deep learning
CN117875709A
Flood early warning method based on similarity between heavy rainfall and floods
JP7385088B1
Disaster detecting system using social media
KR1020150046793A
