Social media flood event real-time detection method and system based on MACD histogram

By analyzing text information related to flood events using MACD histograms on social media, identifying and detecting flood events outbreaks, the problem of difficult to extract flood events outbreak characteristics in the existing technology is solved, and the rapid and accurate identification and early warning of flood events is achieved. .

CN119493916APending Publication Date: 2025-02-21ZHEJIANG TONGJI VOCATIONAL COLLEGE OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411539203.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively extract flood event outbreak characteristics information reflected by the number of social media text information, and it is difficult to judge the authenticity and accuracy of flood events.

Method used

Using the MACD histogram-based method, the heavy rain flood text sequence data set of each city is constructed by identifying and analyzing the heavy rain flood related information in social media text, and the EMA, MACD histogram and Signal index values ​​are calculated to determine the outbreak of potential flood events. and flood event detection.

Benefits of technology

It has achieved rapid and accurate identification of flood events, can accurately judge the possibility of flood events in various cities, provide timely and accurate flood event warnings, and help government departments respond to flood disasters in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493916A_ABST
    Figure CN119493916A_ABST
Patent Text Reader

Abstract

The invention provides a social media flood event real-time detection method and system based on an MACD histogram, and relates to the technical field of emergency management, and the method comprises the steps: constructing a rainstorm flood text sequence data set of each city through recognizing the text of a rainstorm flood related social media in a network social media text and corresponding address information, determining a recent histogram mean value, a long-term histogram mean value and an EMA mean value; defining a section of section of a fast moving average line EMA, which is greater than an EMA mean value, of each city as a potential flood event outbreak section, and taking the section as a time window; flood event detection is carried out in the time window, the recent histogram mean value and the long-term histogram mean value of the MACD histogram in the period of time are obtained, and when the ratio of the recent histogram mean value and the long-term histogram mean value is larger than a preset trigger factor, flood outbreak occurs in the period of time. According to the method, social media data are fully utilized, flood disaster events of different cities are detected in real time based on MACD histogram analysis, and beneficial help is provided for emergency management and emergency rescue of flood disasters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flood disaster emergency management, and in particular to a real-time detection method and system for social media flood events based on a MACD histogram. Background Art

[0002] As a common natural disaster, floods are characterized by suddenness, destructiveness, and uncertainty. Accurate and timely acquisition of flood event information helps strengthen disaster management and reduce disaster losses. Current flood disaster monitoring methods mainly include river water level and flow monitoring, remote sensing monitoring, and installing sensors at urban flood-prone areas for monitoring. These methods have their own shortcomings. For example, the installation and maintenance costs of water level and flow sensors used for river flood monitoring are high; the video probes and water level sensors installed at urban flood-prone areas have limited coverage and blind spots; although remote sensing technology can achieve large-scale flood monitoring, the long satellite revisit cycle leads to insufficient timeliness.

[0003] With the rapid development of Internet technology, social media platforms such as Weibo have become an important way for people to obtain information and exchange views. On these platforms, users can publish and disseminate various types of information in real time, including emergency situations regarding natural disasters such as floods. Flood events are sudden natural disasters, and their outbreaks are often accompanied by the dissemination of a large amount of related information. How to timely discover flood event information in massive Weibo texts is of great significance for disaster warning, emergency response, and public safety.

[0004] The current means of flood information extraction are relatively mature, and machine learning methods are usually used to identify and process flood events on social media. However, the authenticity of a single text message about a flood event on social media is difficult to judge, and the change in the amount of social media text information over time can reflect the authenticity and accuracy of the current flood event outbreak. How to effectively extract the characteristic information and judgment method of the flood event outbreak reflected by the amount of social media text information is an urgent problem to be solved. Summary of the invention

[0005] To solve the above problems, the present invention provides a real-time detection method for flood events in social media based on MACD histogram. The method makes full use of social media data and detects flood disaster events in different cities in real time based on MACD histogram analysis, which will provide useful assistance to emergency management and emergency rescue of flood disasters.

[0006] To achieve the above object, the present invention provides the following technical solutions.

[0007] The present invention provides a real-time detection method for social media flood events based on a MACD histogram, comprising the following steps:

[0008] By identifying the texts of social media related to rainstorms and floods and the corresponding address information in online social media texts, a rainstorm and flood text sequence dataset for each city is constructed;

[0009] According to the rainstorm and flood text sequence data set, the number of rainstorm and flood texts in each city hourly is determined, and the fast moving average EMA, MACD histogram and Signal indicator value of the number of rainstorm and flood texts are constructed; according to the MACD histogram and Signal indicator value, the recent histogram mean of the first time period before the current moment and the long-term histogram mean of the second time period before the current moment are obtained; according to the fast moving average EMA, the EMA mean is determined; wherein, the second time period is greater than the first time period;

[0010] For each city, a section of the fast moving average EMA that is greater than the annual EMA mean is defined as the potential flood event outbreak section and used as the time window;

[0011] Flood event detection is performed within the time window, and the recent histogram mean and the long-term histogram mean of the MACD histogram during the period are obtained. When the ratio of the two is greater than the preset trigger factor, a flood outbreak occurs during the period.

[0012] Preferably, it also includes constructing a city-scale rainstorm and flood disaster event dataset based on flood event detection results for each city during a certain period of time, including the following steps:

[0013] Flood events are detected in sequence according to the time window and the time axis. The city where the flood event occurs, the start time and technical time of the flood event are determined. Based on the rainstorm and flood text sequence dataset of each city, all Weibo text data related to each flood event are obtained and stored to construct a rainstorm and flood disaster event dataset at the city scale.

[0014] Preferably, the construction of the rainstorm and flood text sequence dataset comprises the following steps:

[0015] Identify and extract social media texts related to rainstorms and floods from online social media texts, and parse out the address information of flooded POIs;

[0016] The flooded POI address information is converted into longitude and latitude and mapped to the corresponding city, the number of rainstorm and flood texts in each city is determined hourly, and a rainstorm and flood text sequence dataset is constructed;

[0017] Preferably, the step of identifying and extracting social media texts related to rainstorms and floods from online social media texts comprises the following steps:

[0018] Through social media API interfaces and web crawlers, search for relevant data of a flood event on social media platforms and build a social media text sample library of a flood event;

[0019] The social media text sample library is input into the trained BERT natural language processing deep learning model to identify whether each text in the social media text sample library is related to the flood event, and filter out the text in the social media text sample library that is not related to the flood event.

[0020] Preferably, the parsing of the flood-inundated POI address information comprises the following steps:

[0021] Through the trained ChatGLM3-6B large language model, the POI address information of each text in the social media text sample library is extracted in a conversational chat mode;

[0022] Through the coordinate picking system, the POI address information is converted into longitude and latitude and mapped to the corresponding city, the number of social media texts in each city per hour is determined, and a rainstorm flood text sequence dataset is constructed for each city.

[0023] Preferably, the method of obtaining the annual positive histogram mean and the annual negative histogram mean according to the MACD histogram and the Signal indicator value comprises the following steps:

[0024] According to the number of microblog texts x = x(t), and the corresponding discrete time series x = {x t |t=0,1,…}, the fast moving average EMA formula with smoothing factor a is:

[0025]

[0026] Among them, x(t) is the number of microblog texts based on time t; n is the statistical window size, representing the number of microblog texts within n hours, and a is the smoothing factor, which is 2 / (n+1);

[0027] Using EMA 12 and EMA 26 The difference line DIF is obtained by the difference of

[0028]

[0029] DIF(t)=EMA 12 (t)-EMA 26 (t)

[0030] Perform an exponentially weighted moving average on DIF and calculate the signal line DEA, which is the 9-day exponential moving average of DIF:

[0031]

[0032] Solve the MACD based on the moving average according to the difference line DIF and the signal line DEA:

[0033] MACD(t)=(DIF(t)-DEA(t))×2

[0034] Calculate the Signal indicator value based on the 9-day moving average of MACD:

[0035]

[0036] Construct MACD histogram Histogram(t) based on MACD and Signal indicator values:

[0037] Histogram(t)=MACD(t)-Signal(t)

[0038] Obtained from EMA and Histogram(t) Recent histogram mean and the forward histogram mean

[0039] Preferably, the acquisition of the time window comprises the following steps:

[0040] Will The calculation period is 180 days forward from the current time. In order to filter out a large number of invalid windows, Set it to 2 times the average of 180-day EMA(12);

[0041] EMA(12) greater than the mean An interval is defined as a potential flood event outbreak interval as the time window Window, and the duration is greater than 24 hours. The conditions for the time window used for flood event detection are:

[0042]

[0043] Among them, t1 is the starting time of the time window, and t2 is the ending time of the time window.

[0044] Preferably, performing flood event detection in the time window of each city respectively comprises the following steps:

[0045] Calculate the recent Histogram mean in a time window from t1 to t2 and forward histogram mean The calculation takes 24 hours before the current time. The calculation takes 30 days before the current time:

[0046]

[0047] The ratio of the two is used to describe the outbreak of flood events. K is used to judge the outbreak of flood events. K>2 is used as the trigger factor for judging the outbreak of flood events, and K<1 is used as the trigger factor for judging the end of flood events:

[0048]

[0049] The present invention also provides a real-time detection system for social media flood events based on MACD histogram, the system comprising:

[0050] processor;

[0051] a memory having stored thereon a computer program executable on the processor;

[0052] Wherein, when the computer program is executed by the processor, the steps of the real-time detection method of social media flood events based on MACD histogram are implemented.

[0053] The present invention also provides a computer-readable storage medium, on which a data processing program is stored. When the data processing program is executed by a processor, the steps of the real-time detection method of social media flood events based on MACD histogram are implemented.

[0054] Beneficial effects of the present invention:

[0055] The present invention proposes a real-time detection method and system for flood events in social media based on MACD histogram. The method identifies information related to flood events from massive microblog texts, simultaneously extracts the location of flood events, and then uses MACD histogram method to detect the outbreak and duration of flood events in real time, effectively obtains characteristic information of the time-varying quantity of social media text information related to flood events in various cities, and proposes a judgment method based on MACD histogram statistical data to determine the possibility of flood events in various cities with relatively accurate judgment, thereby realizing rapid and accurate recognition of flood event outbreak information and providing timely and accurate flood event warnings for government departments. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flow chart of a real-time detection method for social media flood events based on a MACD histogram according to an embodiment of the present invention;

[0057] Figure 2 This is an example of text data of a rainstorm and flood microblog in an embodiment of the present invention;

[0058] Figure 3 This is a graph showing hourly changes in the number of microblog texts for a flood event in a certain city according to an embodiment of the present invention;

[0059] Figure 4 is a schematic diagram of time window setting for flood event detection according to an embodiment of the present invention;

[0060] Figure 5 Schematic diagram of a MACD histogram method for flood event detection according to an embodiment of the present invention;

[0061] Figure 6 This is a real flood event outbreak EMA change trend diagram of an embodiment of the present invention;

[0062] Figure 7 It is a MACD histogram change trend diagram of a real flood event outbreak in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0064] Example 1

[0065] It is difficult to judge the authenticity of text information about flood events on a single social media, but the change in the amount of social media text information over time can reflect the authenticity and accuracy of the current flood event. Therefore, a real-time detection method for flood events on social media based on MACD histogram is provided in the present invention. The specific process is as follows: Figure 1 As shown, the following steps are included:

[0066] S1: The microblog text samples used in this embodiment. A certain flood event is extracted to build a microblog text sample library, and the BERT natural language processing deep learning model is used for training to identify real rainstorm and flood microblogs from the microblog text library, and the trained model parameters are saved.

[0067] The Weibo platform generates a large amount of text, image and video data every day. Under such a large amount of data, it is very important to accurately find Weibo posts related to heavy rain and floods, and accurately identify whether the Weibo text is related to real flood events, rather than just the words "flood" appearing in the Weibo text. Therefore, it is necessary to establish a set of technical methods to identify whether any text is describing a heavy rain and flood event.

[0068] like Figure 1As shown, the present invention uses the BERT natural language processing deep learning model to train and learn microblog texts, thereby realizing text classification and identifying texts that are truly related to rainstorms and floods. To conduct deep learning, a set of microblog text sample libraries must first be constructed. A large-scale flood event that has occurred in history can be selected as a case to construct a microblog text sample library.

[0069] Using crawler tools and Weibo interface, we took the specific flood event as the keyword and downloaded the Weibo text data of the flood event from the Weibo platform. Figure 2 The following is an example of a Weibo text about a flood event. It can be seen that not all Weibo texts are related to the flood event.

[0070] We can use manual methods to label each microblog text to mark whether each microblog text is describing a real rainstorm and flood event. Among the following four microblog texts, the first two microblog texts are real rainstorm and flood event microblogs, and the last one is a microblog text unrelated to rainstorm and flood:

[0071] (1) Wow, let me tell you a sad story. I am trapped in a subway station. I have been here for almost an hour. The road is full of water and is about to become a river. I want to go home.

[0072] (2) Today, I passed by three large puddles, and my Audi was damaged by the water.

[0073] (3) City-specific forecast: [Guangcai Market] There will be precipitation on the 3rd, with a precipitation of 12.3 mm, northerly wind of 3 to 5 levels, gusts of 6 to 8 levels, and a temperature of 10 to 15 degrees. O Web link;

[0074] According to the 10-fold cross-validation method, the microblog texts are randomly divided into ten parts, and eight parts are randomly selected as training sets and two parts are randomly selected as test sets each time, and input into the BERT model for training. This operation is performed ten times in total. Finally, the accuracy of the classification results is evaluated using the Precision, Recall, and F1-score indicators to ensure the classification accuracy of the BERT model.

[0075] The three indicators of Precision, Recall and F1-score are shown in the following formula. TP (true positive) in the formula represents the number of microblog texts that are marked as rainstorm and flood related by both machine and manual, FP (false positive) represents the microblog texts that are marked as rainstorm and flood related by machine but not marked as rainstorm and flood related by manual, and FN (false negative) represents the microblog texts that are manually marked as rainstorm and flood related but not detected by machine.

[0076]

[0077] S2: Download rainstorm and flood related microblog texts from Weibo in real time according to specific keywords, and use the trained classification model to extract real rainstorm and flood microblog texts;

[0078] Here, the specific keywords refer to keywords related to "rainstorm" and "flood", such as rainstorm-related keywords can be "rainstorm", "heavy rain", "extremely heavy rain", etc., and flood-related keywords can be "waterlogging", "flood disaster", etc. By setting a set of keyword sets, a single keyword is used each time to download Weibo text data from the Weibo platform in real time.

[0079] Whenever a piece of Weibo text data is downloaded from the Weibo platform, the BERT model trained by S1 is used to automatically predict whether the Weibo text is related to a real flood event. This is mainly used to filter out adjectives and idioms related to heavy rain and floods that often appear in people's daily communication, such as "flood beast".

[0080] S3: Use the ChatGLM3-6B large language model to parse the flood-inundated POI address information from real-time rainstorm and flood microblog texts;

[0081] ChatGLM3 is a Chinese-English bilingual dialogue pre-training model jointly released by Zhipu AI and Tsinghua University KEG Laboratory. ChatGLM3-6B is an open source model in the ChatGLM3 series. On the basis of retaining many excellent features of the previous two generations of models, such as smooth dialogue and low deployment threshold, it also provides more diverse training data sets, more comprehensive training steps and more reasonable training strategies. The model performs well in semantics, mathematics, reasoning, code and knowledge. The model provides two different deployment methods. The first is a conversation-only chat mode, and the second is to combine the conversation mode with the working model and the code interpreter model. The present invention uses the first chat dialogue mode for deployment and training, and extracts POI address information from Weibo text by constructing appropriate input and task instructions.

[0082] Since microblog texts usually contain colloquial and trivial information, the initially extracted POI addresses are screened to ensure that the extracted POI addresses accurately reflect the flooded situation. For example, from a microblog "The nutrition restaurant of the First Affiliated Hospital of XX Medical College is out of food", the POI location "First Affiliated Hospital of XX City" can be extracted, while the "road near the intersection of Xinwu Street" extracted from the text cannot actually clearly indicate a specific POI location, that is, it is impossible to obtain accurate latitude and longitude coordinates, but the province, city, and district location can be obtained.

[0083] S4: Use Baidu coordinate picking system to convert POI address information into longitude and latitude and map it to the corresponding city, and build an hourly rainstorm and flood microblog text sequence dataset for each city in China;

[0084] The address information parsed from the Weibo text in S3 needs to be further converted into standardized place name information and longitude and latitude coordinate information with the help of the API provided by the Baidu coordinate picking system. There are two main steps. First, the address information is converted into longitude and latitude coordinate information through the API function provided by the Baidu coordinate picking system, and then the place name information with province, city, county, district, street, etc. is generated from the longitude and latitude coordinate information.

[0085] Once Baidu coordinate picking system is used to parse the province, city, county and other place name information from the Weibo text, each rainstorm and flood Weibo text can be divided into different cities, so that it is possible to detect whether a flood event has occurred in each city at the city scale. Therefore, the download, classification and division of Weibo text data into different cities are carried out in real time. Each city has a rainstorm and flood Weibo text data set based on a time series. On an hourly scale, the number of Weibo texts in each city is counted every hour. For example Figure 3 As shown in the figure, the number of heavy rain and flood microblog texts changes when a flood event occurs in a certain city.

[0086] S5: Calculate the indicator values ​​of the city hourly EMA, MACD, Signal and Histogram, as well as the EMA average Recent histogram mean and the forward histogram mean

[0087] The basic formula and principle are as follows:

[0088] (1) Fast Moving Average EMA

[0089] EMA is applied to the number of microblog texts about rainstorms and floods in cities hourly to capture the trend changes of flood event information. For the number of microblog texts x = x(t), its corresponding discrete time series x = {x t |t=0,1,…}, the fast moving average formula with smoothing factor a is:

[0090]

[0091] The variable x(t) is the number of microblog texts based on time t. n is the statistical window size, which represents the number of microblog texts within n hours. a is the smoothing factor, which is usually 2 / (n+1).

[0092] (2) Difference line DIF

[0093] DIF is applied to the number of microblog texts about rainstorms and floods in time series to measure the speed of change of the number of microblog texts. The most commonly used EMA statistical windows are 12 (hours) and 26 (hours). 12 and EMA 26 The DIF value is calculated by the difference:

[0094]

[0095]

[0096] DIF(t)=EMA 12 (t)-EMA 26 (t)

[0097] (3) Signal line DEA

[0098] Perform an exponentially weighted moving average on DIF and calculate DEA (signal line) to smooth DIF, usually a 9-day exponential moving average of DIF:

[0099]

[0100] (4) MACD

[0101] MACD is built based on moving averages to indicate momentum changes in flood event information. It is calculated by the difference between the long-term moving average and the short-term moving average:

[0102] MACD(t)=(DIF(t)-DEA(t)×2

[0103] (5)Signal

[0104] Signal is usually calculated using the 9-day moving average of MACD. The role of Signal is to provide an intuitive reference point to help identify the mutation signal of the MACD indicator. When the MACD line crosses the Signal line, it is usually regarded as an important mutation.

[0105]

[0106] (6) MACD Histogram

[0107] The MACD histogram is the MACD Line, which shows how the difference between the fast EMA and the slow EMA changes over time. The larger the histogram value, the greater the difference between the fast EMA and the slow EMA; the smaller the histogram value, the smaller the difference.

[0108] Histogram(t)=MACD(t)-Signal(t)

[0109] S6: Based on Indicators, set the flood event detection time window; based on the MACD histogram analysis method, real-time detection of whether a flood event occurs in each city;

[0110] Figure 4 This is a schematic diagram of the time window setting for flood event outbreak detection. In the figure, t1 and t2 mark the time when the EMA (12) indicator crosses above and below the EMA annual average. It can be seen that a time window represents EMA (12) greater than a period of time.

[0111] Figure 5 This is a schematic diagram of the MACD histogram method for flood event detection. When calculating the Histogram mean, the absolute value of the negative numbers that appear is taken to ensure that the histogram is on the upper part of the horizontal axis. The rectangles with dotted lines in the figure are all processed by taking the absolute value. The present invention sets two Histogram mean indicators: recent Histogram mean The calculation interval is 1 day (24 hours) before the current time, and the long-term Histogram mean The calculation period is 30 days before the current time.

[0112] Calculate the recent Histogram mean in a time window from t1 to t2 and forward histogram mean The calculation takes 24 hours before the current time. The calculation takes 30 days before the current time:

[0113]

[0114] The ratio of the two is used to describe the outbreak of flood events. K is used to judge the outbreak of flood events. K>2 is used as the trigger factor for judging the outbreak of flood events, and K<1 is used as the trigger factor for judging the end of flood events:

[0115]

[0116] Figure 6 and Figure 7 This is a chart showing the changing trends of different MACD indicators when a large flood event occurs in a certain city. Figure 6 This is the EMA trend chart of the real flood event. Figure 7 This is the MACD histogram change trend chart of a real flood event.

[0117] S7: Establish a city-scale rainstorm and flood disaster event data set. The real-time detection results of flood events detected by the present invention are saved in the database. For each flood event, the city where the flood event occurred, the start and end time of the flood event, and all microblog text data related to the specific flood event are stored. Figure 5 As shown in the figure, the time distribution of five rainstorm and flood events in a certain city and the changes in the number of rainstorm and flood microblog texts over many years are detected. It can be seen that the number of rainstorm and flood microblog texts will suddenly change during the outbreak of flood events.

[0118] The above is a real-time detection method for social media flood events based on MACD histogram provided by one embodiment of this embodiment. Based on the same idea, this embodiment also provides a corresponding real-time detection system for social media flood events based on MACD histogram. For the specific definition of the real-time detection system for social media flood events based on MACD histogram, please refer to the definition of the real-time detection method for social media flood events based on MACD histogram in the above text, which will not be repeated here. Each module in the above-mentioned real-time detection system for social media flood events based on MACD histogram can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0119] This embodiment also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The proposed method for real-time detection of social media flood events based on MACD histogram.

[0120] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0121] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. 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 present invention.

Claims

1. A real-time detection method for social media flood events based on MACD histogram, characterized in that: The following steps are involved: By identifying the texts of social media related to rainstorms and floods and the corresponding address information in online social media texts, a rainstorm and flood text sequence dataset for each city is constructed; According to the rainstorm and flood text sequence data set, the number of rainstorm and flood texts in each city hourly is determined, and the fast moving average EMA, MACD histogram and Signal indicator value of the number of rainstorm and flood texts are constructed; according to the MACD histogram and Signal indicator value, the recent histogram mean of the first time period before the current moment and the long-term histogram mean of the second time period before the current moment are obtained; according to the fast moving average EMA, the EMA mean is determined; wherein, the second time period is greater than the first time period; For each city, a section of the fast moving average EMA that is greater than the EMA mean is defined as the potential flood event outbreak section and used as the time window; Flood event detection is performed within the time window, and the recent histogram mean and the long-term histogram mean of the MACD histogram during the period are obtained. When the ratio of the two is greater than the preset trigger factor, a flood outbreak occurs during the period.

2. The real-time detection method for social media flood events based on MACD histogram according to claim 1 is characterized in that: It also includes constructing a city-scale rainstorm and flood disaster event dataset based on the flood event detection results of each city during a certain period of time, including the following steps: Flood events are detected in sequence according to the time window and the time axis. The city where the flood event occurs, the start time and technical time of the flood event are determined. Based on the rainstorm and flood text sequence dataset of each city, all Weibo text data related to each flood event are obtained and stored to construct a rainstorm and flood disaster event dataset at the city scale.

3. The real-time detection method for social media flood events based on MACD histogram according to claim 1 is characterized in that: The construction of the rainstorm flood text sequence dataset includes the following steps: Identify and extract social media texts related to rainstorms and floods from online social media texts, and parse out the address information of flooded POIs; The address information of flooded POIs is converted into longitude and latitude and mapped to the corresponding cities. The number of hourly rainstorm and flood texts in each city is determined, and a rainstorm and flood text sequence dataset is constructed.

4. The real-time detection method for social media flood events based on MACD histogram according to claim 3 is characterized in that: The method of identifying and extracting social media texts related to rainstorms and floods from online social media texts includes the following steps: Through social media API interfaces and web crawlers, search for relevant data of a flood event on social media platforms and build a social media text sample library of a flood event; The social media text sample library is input into the trained BERT natural language processing deep learning model to identify whether each text in the social media text sample library is related to the flood event, and filter out the text in the social media text sample library that is not related to the flood event.

5. The real-time detection method for social media flood events based on MACD histogram according to claim 4 is characterized in that: The analysis of the flood-inundated POI address information comprises the following steps: Through the trained ChatGLM3-6B large language model, the POI address information of each text in the social media text sample library is extracted in a conversational chat mode; Through the coordinate picking system, the POI address information is converted into longitude and latitude and mapped to the corresponding city, the number of social media texts in each city per hour is determined, and a rainstorm flood text sequence dataset for each city is constructed.

6. The real-time detection method for social media flood events based on MACD histogram according to claim 1 is characterized in that: The method of obtaining the annual positive histogram mean and the annual negative histogram mean according to the MACD histogram and the Signal indicator value comprises the following steps: According to the number of microblog texts x = x(t), and the corresponding discrete time series x = {x t |t=0,1,…}, the fast moving average EMA formula with smoothing factor a is: Among them, x(t) is the number of microblog texts based on time t; n is the statistical window size, representing the number of microblog texts within n hours, and a is the smoothing factor, which is 2 / (n+1); Using EMA 12 and EMA 26 The difference line DIF is obtained by the difference of DIF(t)=EMA 12 (t)-EMA 26 (t) Perform an exponentially weighted moving average on DIF and calculate the signal line DEA, which is the 9-day exponential moving average of DIF: Solve the MACD based on the moving average according to the difference line DIF and the signal line DEA: MACD(t)=(DIF(t)-DEA(t))×2 Calculate the Signal indicator value based on the 9-day moving average of MACD: Construct MACD histogram Histogram(t) based on MACD and Signal indicator values: Histogram(t)=MACD(t)-Signal(t) Obtained from EMA and Histogram(t) Recent Histogram Average and forward histogram mean 7. The real-time detection method for social media flood events based on MACD histogram according to claim 6 is characterized in that: The acquisition of the time window comprises the following steps: Will The calculation interval is set to 180 days forward from the current time. In order to filter out a large number of invalid windows, Set it to 2 times the average of 180-day EMA(12); EMA(12) greater than the mean An interval is defined as a potential flood event outbreak interval as the time window Window, and the duration is greater than 24 hours. The conditions for the time window used for flood event detection are: Among them, t1 is the starting time of the time window, and t2 is the ending time of the time window.

8. The real-time detection method for social media flood events based on MACD histogram according to claim 7 is characterized in that: Flood event detection is performed within the time window of each city, including the following steps: Calculate the recent Histogram mean in a time window from t1 to t2 and forward histogram mean The calculation takes 24 hours before the current time. The calculation takes 30 days before the current time: The ratio of the two is used to describe the outbreak of flood events. K is used to judge the outbreak of flood events. K>2 is used as the trigger factor for judging the outbreak of flood events, and K<1 is used as the trigger factor for judging the end of flood events:

9. A real-time detection system for social media flood events based on MACD histogram, characterized in that: The system comprises: processor; a memory having stored thereon a computer program executable on the processor; Wherein, when the computer program is executed by the processor, the steps of the real-time detection method of social media flood events based on MACD histogram as described in any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data processing program, and when the data processing program is executed by the processor, the steps of the real-time detection method of social media flood events based on MACD histogram as described in any one of claims 1 to 8 are implemented.