Urban rainstorm flood risk assessment method, system, equipment and medium
By constructing a real-time social media data set and using deep learning models to extract and detect flood-related information, and generating heat maps, the problem of inaccurate assessment of urban rainstorms and flood risks in the existing technology is solved, and accurate assessment and dynamic monitoring of risk areas are achieved.
Patent Information
- Application Number
- CN202411914854.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing technology is difficult to accurately assess the risk of urban rainstorms and floods, lacks accurate spatial positioning and scene descriptions, and cannot effectively characterize the real-time dynamic changes of floods.
By obtaining the social media real-time data of heavy rain and flood events in the target city, a positive sample real-time data set and negative sample real-time data set containing flood scene pictures were constructed. The address information, water objects and human-vehicle targets of heavy rain and flood images were screened and extracted using pre-trained ViT, DeepLab V3+ and YOLO V8 models, the address information, water objects and human-vehicle targets were detected to detect whether the water objects overlapped with the human-vehicle targets, and a heat map was generated for risk assessment.
It realizes an accurate assessment of urban heavy rain and flood risks, provides more intuitive and objective disaster information, can accurately obtain the location of floods, accurately determine the risk location, and evaluate the risk area through heat maps.
Smart Images

Figure CN119831339A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of flood disaster emergency management, and specifically relates to a method, system, equipment and medium for urban rainstorm flood risk assessment. Background Art
[0002] As a natural disaster, floods have caused serious losses to human life, agricultural production and the ecological environment. In recent years, with the increase of global climate change and extreme weather events, urban waterlogging has occurred frequently and its destructive power has continued to increase. Therefore, timely and accurate monitoring of urban waterlogging areas and accurate assessment of urban rainstorm and flood risks are of great significance for flood prevention and disaster reduction, disaster emergency response and post-disaster reconstruction.
[0003] At present, the assessment method of urban rainstorm flood risk mainly uses natural language processing technology to analyze the acquired disaster information, mine flood-related events, and assess the urban rainstorm flood risk based on the mined information. However, when using this method to analyze disaster information, due to the lack of accurate spatial positioning and scene description, it is impossible to effectively characterize the real-time dynamic changes of floods. Therefore, it is impossible to accurately assess the urban rainstorm flood risk. Summary of the invention
[0004] In order to overcome the deficiency of the above-mentioned prior art that the urban rainstorm flood risk cannot be accurately assessed, the present invention provides an urban rainstorm flood risk assessment method, comprising the following steps:
[0005] Obtain real-time social media data on rainstorm and flood events in the target city, and use the real-time social media data to build a positive sample real-time dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a negative sample real-time dataset containing non-flood scene images;
[0006] Input the data from the real-time positive sample dataset containing flood scene images and the real-time negative sample dataset containing non-flood scene images into the pre-trained ViT to filter out the real-time data of rainstorm and flood images, and then extract the address information of the real-time data of rainstorm and flood images; input the data from the real-time water body dataset of flood images and the real-time negative sample dataset containing non-flood scene images into the pre-trained DeepLab V3+ to extract water body objects; input the real-time target dataset of flood images containing people and vehicles and the real-time negative sample dataset containing non-flood scene images into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water body objects overlap with the people and vehicle targets, and if so, mark them as dangerous images;
[0007] Combined with the address information of real-time data of rainstorm and flood pictures, the risky locations corresponding to all risky pictures are synchronized to the map, and a heat map is generated; the urban rainstorm and flood risk areas are evaluated through the heat map.
[0008] Preferably, the step of extracting the address information of the real-time data of the rainstorm and flood pictures comprises the following steps:
[0009] Use the large language model ChatGLM3-6B to extract the place name and address information of the real-time data of rainstorm and flood pictures, and retain the data with only the place name and address information;
[0010] Use Baidu coordinate picking system to convert place name address information into longitude and latitude coordinate data.
[0011] Preferably, the detection of whether the water object overlaps with the human and vehicle targets, and if so, it is marked as a dangerous picture, specifically: whether there are water pixels in the outer frame where the human and vehicle targets are located, if the water pixels extracted by DeepLab V3+ do not appear inside the rectangular outer frame, the human and vehicle targets are located on the roadside, not in a submerged state, and the picture containing the human and vehicle is not a dangerous photo, if the water pixels extracted by DeepLab V3+ appear inside the rectangular outer frame, the rectangular outer frame is expanded by 1 / 2 and 1 times respectively, and the proportion of water pixels in the three different sizes of rectangular outer frames to the entire rectangular outer frame pixels is counted. When the proportion reaches more than 10%, it is marked as a dangerous picture.
[0012] Preferably, the pre-training process of ViT, DeepLab V3+ and YOLO V8 includes the following steps:
[0013] Obtain historical social media data related to urban rainstorms and floods, and use the historical social media data related to urban rainstorms and floods to construct a positive sample historical dataset containing flood scene images, a historical water body dataset of flood images, a historical target dataset of flood images containing people and vehicles, and a negative sample historical dataset containing non-flood scene images;
[0014] The deep learning model ViT is trained using a positive historical dataset of flood scene images and a negative dataset of non-flood scene images; DeepLab V3+ is trained using a historical water dataset of flood images and a negative dataset of non-flood scene images; and YOLO V8 is trained using a historical target dataset of flood images containing people and vehicles and a negative historical dataset of non-flood scene images.
[0015] Preferably, the use of a historical water body dataset of flood images and a negative sample historical dataset containing images of non-flood scenes to train DeepLab V3+; before using a historical target dataset of flood images containing people and vehicles and a negative sample historical dataset containing images of non-flood scenes to train YOLO V8, it also includes: using the Labelme tool to check the water body areas in the historical water body dataset of flood images and save the water body sample data, using the Labelme tool to check the rivers, lakes and ponds in the non-flood images and save them as water body negative sample data; using the Labelme tool to check the human targets and vehicle targets in the historical target dataset of flood images containing people and vehicles, and save the human target and vehicle target sample data, and using the Labelme tool to check the non-human and non-vehicle targets in the non-flood images and save them as negative sample data.
[0016] Preferably, the use of a positive sample historical data set containing flood scene images and a negative sample historical data set containing non-flood scene images to train the deep learning model ViT comprises the following steps:
[0017] The positive sample historical dataset of flood scene images and the negative sample historical dataset containing non-flood scene images are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set;
[0018] Input the data in the training set into the ViT model, use the ViT model to divide the input image into image blocks, capture the relationship between the image blocks through the self-attention operation, extract the global features of the image blocks, and classify the image according to the global features;
[0019] At the end of each training cycle, the ViT model is evaluated using the validation set, the classification effect is evaluated using the cross entropy loss and classification accuracy evaluation model, the trained model parameters are saved, and the trained ViT is obtained.
[0020] Preferably, the method of training DeepLab V3+ using a historical water body dataset of flood images and a negative sample historical dataset containing non-flood scene images comprises the following steps:
[0021] The historical water body dataset of flood images selected by the Labelme tool and the negative sample historical dataset containing non-flood scene images are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set;
[0022] Input the data in the training set into DeepLab V3+ for training and learning;
[0023] At the end of each training cycle, DeepLab V3+ is evaluated using the validation set, and the model classification effect is evaluated using the cross entropy loss and pixel accuracy indicators. The trained model parameters are saved to obtain the trained DeepLab V3+;
[0024] The method of training YOLO V8 using a historical target dataset of flood images containing people and vehicles and a negative sample historical dataset containing non-flood scene images includes the following steps:
[0025] The historical target dataset of flood images containing people and vehicles and the negative sample historical dataset containing non-flood scene images selected by the Labelme tool are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set;
[0026] Input the data in the training set into YOLO V8 for training and learning;
[0027] At the end of each training cycle, the validation set is used to evaluate the YOLO V8, the cross entropy loss and classification accuracy evaluation model are used to evaluate the model, and the trained model parameters are saved to obtain the trained YOLO V8 model.
[0028] The present invention also provides an urban rainstorm flood risk assessment system, comprising:
[0029] The dataset construction module is used to obtain real-time social media data on rainstorm and flood events in the target city, and to construct a real-time positive sample dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a real-time negative sample dataset containing non-flood scene images through real-time social media data.
[0030] The target extraction module is used to input the data in the positive sample real-time data set containing flood scene pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained ViT, screen out the real-time data of rainstorm flood pictures, and then extract the address information of the real-time data of rainstorm flood pictures; input the data in the real-time water body data set of flood pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained DeepLab V3+ to extract water body objects; input the data in the real-time target data set of flood pictures containing people and vehicles and the negative sample real-time data set containing non-flood scene pictures into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water body objects overlap with the people and vehicle targets, and if so, mark them as dangerous pictures;
[0031] The risk assessment module is used to combine the address information of the real-time data of rainstorm and flood pictures, synchronize the risky locations corresponding to all risky pictures to the map, and generate a heat map; the urban rainstorm and flood risk areas are assessed through the heat map.
[0032] The present invention also provides a computer device, characterized in that it includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the urban rainstorm flood risk assessment method.
[0033] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the urban rainstorm flood risk assessment method.
[0034] The urban rainstorm flood risk assessment method, system, device and medium provided by the present invention have the following beneficial effects:
[0035] The present invention can obtain more intuitive and objective disaster information for accurate assessment of flood risks by acquiring real-time social media data of rainstorm and flood events in the target city; construct a positive sample real-time data set including flood scene pictures, a real-time water body data set of flood pictures, a real-time target data set of flood pictures including people and vehicles, and a negative sample real-time data set including non-flood scene pictures through real-time social media data; this process can distinguish disaster information into different types of data, which is conducive to the accurate assessment of urban rainstorm and flood risks in the later stage; by using pre-trained ViT to process the input data, it is possible to screen out real-time data of rainstorm and flood pictures, and extract address information of real-time data of rainstorm and flood pictures, which is conducive to more accurate acquisition of the location of flood occurrence; by using pre-trained DeepLabV3+ to extract water objects, it is possible to accurately segment water objects; by using pre-trained YOLO V8 extracts human and vehicle targets and can effectively detect human and vehicle targets; by detecting whether water objects overlap with human and vehicle targets, it can realize multi-target recognition and correlation analysis of water objects, human and vehicle targets, and can more accurately determine the dangerous locations; the dangerous locations corresponding to all dangerous pictures are synchronized to the map, and a heat map is generated, which can accurately assess the urban rainstorm and flood risk areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 A flow chart of a method for assessing urban rainstorm and flood risk according to an embodiment of the present invention;
[0038] Figure 2It is a positive sample of images related to urban rainstorm and flooding;
[0039] Figure 3 It is a negative sample of images related to urban rainstorm and flooding;
[0040] Figure 4 These are samples of human target images in rainstorm and flood scenes;
[0041] Figure 5 It is a sample of vehicle target images in a rainstorm and flood scene;
[0042] Figure 6 It is a schematic diagram of annotating water samples in rainstorm and flood pictures;
[0043] Figure 7 This is a schematic diagram of target samples for annotating rainstorm and flood pictures;
[0044] Figure 8 This is a schematic diagram of marking vehicle target samples in rainstorm and flood pictures;
[0045] Fig. 9 It is a framework of three deep learning models for classification, segmentation, and object detection of social media images;
[0046] Fig.10 is a schematic diagram of vehicle target danger detection;
[0047] Fig.11 This is a schematic diagram of urban rainstorm flood risk assessment. DETAILED DESCRIPTION
[0048] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.
[0049] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the technical solutions of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0050] In addition, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In the description of the present invention, it should be noted that, unless otherwise clearly specified or limited, the terms "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. In the description of the present invention, unless otherwise specified, "plurality" means two or more, which will not be described in detail here.
[0051] Example
[0052] The present invention provides a method for assessing urban rainstorm and flood risk, specifically: Figure 1 As shown, the following steps are included:
[0053] Step 1: Obtain historical social media data related to urban rainstorms and floods, and use the historical social media data related to urban rainstorms and floods to pre-train the deep learning models ViT (Vision Transformer), DeepLab V3+, and YOLO V8. The specific steps include the following:
[0054] (1) Download historical social media data related to urban rainstorms and floods from social media platforms, and use the historical social media data related to urban rainstorms and floods to construct a positive sample historical dataset containing flood scene images, a historical water body dataset of flood images, a historical target dataset of flood images containing people and vehicles, and a negative sample historical dataset containing non-flood scene images.
[0055] The social media platforms used are mainly from a certain website. The main method for downloading social media historical data related to urban rainstorms and floods is to enter the keywords "rainstorm" and "waterlogging" on a certain website, and then download the social media historical data related to urban rainstorms and floods in the published microblogs. According to the ratio of the number of pictures of 1:1:1:1, the positive sample historical data set containing flood scene pictures, the historical water body data set of flood pictures, the historical target data set of flood pictures containing people and vehicles, and the negative sample historical data set containing natural rivers and lakes or other irrelevant information are saved respectively. In this embodiment, Figure 2 It is a historical water body dataset of flood images; Figure 3 It is a negative sample historical dataset containing non-flood scene pictures, mainly natural water body pictures under various non-rainstorm flood scenes; Figure 4 and Figure 5 It is a historical target dataset of flood images containing people and vehicles.
[0056] (2) Pre-train the deep learning model ViT.
[0057] The positive sample historical data set of flood scene images and the negative sample historical data set containing non-flood scene images were randomly shuffled in a 1:1 ratio, and divided into training set, validation set and test set in a 6:2:2 ratio.
[0058] The data in the training set is input into the ViT model, and the input image is divided into image blocks using the ViT model. The relationship between the image blocks is captured through the self-attention operation, and the global features of the image blocks are extracted. The images are classified according to the global features, and the historical data of rainstorm and flood images are screened out.
[0059] At the end of each training cycle, the ViT model is evaluated using the validation set, the classification effect is evaluated using the cross entropy loss and classification accuracy evaluation model, the trained model parameters are saved, and the trained ViT is obtained.
[0060] (3) Use the image annotation tool Labelme to annotate data.
[0061] Use the Labelme tool to check the water body areas in the historical water body dataset of flood images and save the water body sample data. Use the Labelme tool to check the river, lake and pond water body areas in the non-flood images and save them as water body negative sample data. Use the Labelme tool to check the human targets and vehicle targets in the historical target dataset of flood images containing people and vehicles, and save the human target and vehicle target sample data. Use the Labelme tool to check the non-human and non-vehicle targets in the non-flood images and save them as negative sample data.
[0062] like Figure 6 , 7 As shown in Figure 8, samples are made using the Labelme tool for water bodies, people, and vehicles, and then these samples can be input into DeepLab V3+ and YOLO V8 for learning and training.
[0063] (4) Pre-train DeepLab V3+.
[0064] The historical water body dataset of flood images selected by the Labelme tool and the negative sample historical dataset containing non-flood scene images are randomly shuffled in a 1:1 ratio, and divided into training set, validation set and test set in a 6:2:2 ratio;
[0065] Input the data in the training set into DeepLab V3+ for training and learning;
[0066] At the end of each training cycle, DeepLab V3+ is evaluated using the validation set, and the model classification effect is evaluated using the cross entropy loss and pixel accuracy indicators. The trained model parameters are saved to obtain the trained DeepLab V3+.
[0067] (5) Pre-train YOLO V8.
[0068] The historical target dataset of flood images containing people and vehicles and the negative sample historical dataset containing non-flood scene images selected by the Labelme tool are randomly shuffled in a 1:1 ratio, and divided into training set, validation set and test set in a 6:2:2 ratio;
[0069] Input the data in the training set into YOLO V8 for training and learning;
[0070] At the end of each training cycle, the validation set is used to evaluate the YOLO V8, the cross entropy loss and classification accuracy evaluation model are used to evaluate the model, and the trained model parameters are saved to obtain the trained YOLO V8 model.
[0071] Step 2: Obtain real-time social media data on rainstorm and flood events in the target city, and use the real-time social media data to build a positive sample real-time dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a negative sample real-time dataset containing non-flood scene images. Input the data in the positive sample real-time dataset containing flood scene images and the negative sample real-time dataset containing non-flood scene images into the pre-trained ViT to filter out the real-time data of rainstorm and flood images; then extract the address information of the real-time data of rainstorm and flood images; input the data in the real-time water body dataset of flood images and the negative sample real-time dataset containing non-flood scene images into the pre-trained DeepLab V3+ to extract water body objects; input the data in the real-time target dataset of flood images containing people and vehicles and the negative sample real-time dataset containing non-flood scene images into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water body objects overlap with the people and vehicle targets, and if so, mark them as dangerous images. Specific examples are as follows: Fig. 9 As shown, the following steps are included:
[0072] (1) Use ViT to filter out real-time data of rainstorm and flood images.
[0073] Download real-time social media data on rainstorm and flood events in the target city according to keywords, and use the trained ViT to filter pictures related to rainstorm and flood.
[0074] First, the keywords used are related to the city. For example, once a rainstorm and flood event occurs in a city, the text and pictures of the city's microblogs are downloaded in real time through Weibo. The keywords are searched and downloaded according to "XX rainstorm", where "XX" is the city name. Based on the web crawler and Weibo API, only the Weibo messages with both text and pictures are downloaded.
[0075] Secondly, the real-time social media data of rainstorm and flood events in the target city is input into the trained ViT. For a piece of social media data with pictures, once a picture is detected as a picture related to rainstorm and flooding, these pictures and Weibo texts will be retained, otherwise the Weibo text and the corresponding pictures will be discarded.
[0076] (2) Use the large language model ChatGLM3-6B to extract place name and address information from real-time data of rainstorm and flood images.
[0077] The large language model ChatGLM3-6B is used to detect address information from real-time data of rainstorm and flood pictures, and only those pictures with corresponding text containing address information are retained. Then, the Baidu coordinate picking system is used to convert the place name and address information into latitude and longitude coordinates.
[0078] The address of the Weibo text corresponding to the retained flood-related pictures is parsed, and the task instruction submitted to ChatGLM3-6B is "Please identify and extract all specific place name and address information from the following Weibo text." The large language model ChatGLM3-6B will return the specific place name and address information in the text in JSON format. Once the place name and address information cannot be detected from the text, the Weibo text and the corresponding picture will be discarded.
[0079] The Baidu coordinate picking system is used to convert the place name address information into longitude and latitude coordinates. The Baidu coordinate picking system provides two functions: converting the address into longitude and latitude coordinates and converting the longitude and latitude coordinates into the address. The present invention inputs the parsed place name address information into the Baidu coordinate picking system and automatically extracts the converted longitude and latitude coordinate data.
[0080] (2) Use the trained DeepLab V3+ to extract water objects in the real-time data of heavy rain and flood images; use the trained YOLO V8 to extract human and vehicle targets in the real-time data of heavy rain and flood images.
[0081] Input the real-time data of rainstorm and flood pictures into the trained DeepLab V3+, and DeepLab V3+ will automatically mark the pixels where the water parts are located in the real-time data of rainstorm and flood pictures;
[0082] The real-time data of rainstorm and flood pictures are input into the trained YOLO V8, and YOLO V8 can use rectangular frames to identify people and vehicles.
[0083] (3) Detect whether the water object overlaps with the human and vehicle targets. If so, mark the image as a dangerous image.
[0084] Detect whether the outer frames of people and vehicles overlap with water objects. If they overlap, mark them as dangerous pictures. Confirm the dangerous location through the address information stored in the corresponding text. This process mainly detects whether people and vehicles are in the water. If people and vehicles are not in the water, it is considered that this is not a dangerous photo. The main basis for detection is whether there are water pixels in the outer frame where people and vehicle targets are located. If the water pixels extracted by DeepLab V3+ do not appear inside the outer frame, it indicates that people and vehicle targets may be located on the roadside instead of being submerged, and this photo is not a dangerous photo. Similarly, once this Weibo text and all corresponding pictures are not marked as dangerous pictures, this Weibo text will be discarded.
[0085] Fig.10 It is a schematic diagram of vehicle target danger detection. YOLO V8 will mark the vehicle target detection result with a rectangular frame. The present invention further expands the rectangular frame by 1 / 2 and 1 times, respectively. For three rectangular frames of different sizes, the proportion of water pixels in the rectangular frame to the entire rectangular frame pixels is counted, and the proportion of more than 10% is marked as a vehicle in danger.
[0086] Step 3: Synchronize the risky locations corresponding to all risky images to the map and generate a heat map; use the heat map to assess the urban rainstorm and flood risk areas.
[0087] Detect all the dangerous images of urban rainstorm and flooding and spread them on the map, use heat map to evaluate the hot spots of urban rainstorm and flooding, and assess the risk of urban rainstorm and flooding.
[0088] The latitude and longitude location information of the place names and addresses mined from the Weibo texts corresponding to all the dangerous pictures are spread on the map, and then the heat map is automatically generated through the heat map analysis of ARCGIS. Fig.11 This is a schematic diagram of urban rainstorm flood risk assessment. The hot spots in the heat map are marked as areas with serious flood risks and are the focus of emergency rescue. This heat map is a dynamic process. Over time, some cold spots will become hot spots, and some hot spots will become cold spots, thus forming a dynamic process of flood risk migration.
[0089] The present invention also provides an urban rainstorm flood risk assessment system, comprising:
[0090] The dataset construction module is used to obtain real-time social media data on rainstorm and flood events in the target city, and to construct a real-time positive sample dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a real-time negative sample dataset containing non-flood scene images through real-time social media data.
[0091] The target extraction module is used to input the data in the positive sample real-time data set containing flood scene pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained ViT, screen out the real-time data of rainstorm flood pictures, and then extract the address information of the real-time data of rainstorm flood pictures; input the data in the real-time water body data set of flood pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained DeepLab V3+ to extract water body objects; input the data in the real-time target data set of flood pictures containing people and vehicles and the negative sample real-time data set containing non-flood scene pictures into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water body objects overlap with the people and vehicle targets, and if so, mark them as dangerous pictures;
[0092] The risk assessment module is used to combine the address information of the real-time data of rainstorm and flood pictures, synchronize the risky locations corresponding to all risky pictures to the map, and generate a heat map; the urban rainstorm and flood risk areas are assessed through the heat map.
[0093] The present invention also provides a computer device, characterized in that it includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the urban rainstorm flood risk assessment method.
[0094] The present invention also provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute the urban rainstorm flood risk assessment method.
[0095] The above embodiments are only preferred specific implementation methods of the present invention, and the protection scope of the present invention is not limited thereto. Any simple changes or equivalent replacements of the technical solutions that can be obviously obtained by any technician familiar with the field within the technical scope disclosed in the present invention belong to the protection scope of the present invention.
Claims
1. A method for assessing urban rainstorm flood risk, characterized in that: The steps include: Obtain real-time social media data on rainstorm and flood events in the target city, and use the real-time social media data to build a positive sample real-time dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a negative sample real-time dataset containing non-flood scene images; Input the data from the positive sample real-time data set containing flood scene pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained ViT, filter out the real-time data of heavy rain and flood pictures, and then extract the address information of the real-time data of heavy rain and flood pictures; The data in the real-time water dataset of flood images and the real-time negative sample dataset containing non-flood scene images are input into the pre-trained DeepLab V3+ to extract water objects; the data in the real-time target dataset of flood images containing people and vehicles and the real-time negative sample dataset containing non-flood scene images are input into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water objects overlap with the people and vehicle targets, and if so, mark them as dangerous images; Combined with the address information of the real-time data of rainstorm and flood pictures, the dangerous locations corresponding to all dangerous pictures are synchronized to the map and a heat map is generated; Assess urban rainstorm flood risk areas through heat maps.
2. The urban rainstorm flood risk assessment method according to claim 1 is characterized in that: The step of extracting the address information of the real-time data of the rainstorm and flood pictures comprises the following steps: Use the large language model ChatGLM3-6B to extract the place name and address information of the real-time data of rainstorm and flood pictures, and retain the data with only the place name and address information; Use Baidu coordinate picking system to convert place name address information into longitude and latitude coordinate data.
3. The urban rainstorm flood risk assessment method according to claim 1 is characterized in that: The detection of whether the water object overlaps with the human and vehicle targets, if so, marks it as a dangerous picture, specifically: detect whether there are water pixels in the outer frame where the human and vehicle targets are located. If the water pixels extracted by DeepLab V3+ do not appear inside the rectangular outer frame, the human and vehicle targets are located on the roadside, not in a submerged state, and the picture containing the human and vehicle is not a dangerous photo. If the water pixels extracted by DeepLab V3+ appear inside the rectangular outer frame, the rectangular outer frame is expanded by 1 / 2 and 1 times respectively, and the proportion of water pixels in the three different sizes of rectangular outer frames to the entire rectangular outer frame pixels is counted. When the proportion reaches more than 10%, it is marked as a dangerous picture.
4. The urban rainstorm flood risk assessment method according to claim 1 is characterized in that: The pre-training process of ViT, DeepLabV3+ and YOLO V8 includes the following steps: Obtain historical social media data related to urban rainstorms and floods, and use the historical social media data related to urban rainstorms and floods to construct a positive sample historical dataset containing flood scene images, a historical water body dataset of flood images, a historical target dataset of flood images containing people and vehicles, and a negative sample historical dataset containing non-flood scene images; The deep learning model ViT is trained using a positive historical dataset of flood scene images and a negative dataset of non-flood scene images; DeepLab V3+ is trained using a historical water dataset of flood images and a negative dataset of non-flood scene images; and YOLO V8 is trained using a historical target dataset of flood images containing people and vehicles and a negative historical dataset of non-flood scene images.
5. The urban rainstorm flood risk assessment method according to claim 4 is characterized in that: The method further includes: using the historical water body dataset of flood images and the negative sample historical dataset containing non-flood scene images to train DeepLab V3+; and using the historical target dataset of flood images containing people and vehicles and the negative sample historical dataset containing non-flood scene images to train YOLO V8. The method further includes: using the Labelme tool to check the water body areas in the historical water body dataset of flood images and save the water body sample data; using the Labelme tool to check the river, lake and pond water body areas in the non-flood images and save them as water body negative sample data; using the Labelme tool to check the human targets and vehicle targets in the historical target dataset of flood images containing people and vehicles, and save the human target and vehicle target sample data; using the Labelme tool to check the non-human and non-vehicle targets in the non-flood images and save them as negative sample data.
6. The urban rainstorm flood risk assessment method according to claim 4 is characterized in that: The method of training the deep learning model ViT using a positive sample historical data set containing flood scene images and a negative sample historical data set containing non-flood scene images includes the following steps: The positive sample historical dataset of flood scene images and the negative sample historical dataset containing non-flood scene images are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set; Input the data in the training set into the ViT model, use the ViT model to divide the input image into image blocks, capture the relationship between the image blocks through the self-attention operation, extract the global features of the image blocks, and classify the image according to the global features; At the end of each training cycle, the ViT model is evaluated using the validation set, the classification effect is evaluated using the cross entropy loss and classification accuracy evaluation model, the trained model parameters are saved, and the trained ViT is obtained.
7. The urban rainstorm flood risk assessment method according to claim 5 is characterized in that: The method of training DeepLab V3+ using a historical water body dataset of flood images and a negative sample historical dataset containing non-flood scene images includes the following steps: The historical water body dataset of flood images selected by the Labelme tool and the negative sample historical dataset containing non-flood scene images are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set; Input the data in the training set into DeepLab V3+ for training and learning; At the end of each training cycle, DeepLab V3+ is evaluated using the validation set, and the model classification effect is evaluated using the cross entropy loss and pixel accuracy indicators. The trained model parameters are saved to obtain the trained DeepLab V3+; The method of training YOLO V8 using a historical target dataset of flood images containing people and vehicles and a negative sample historical dataset containing non-flood scene images includes the following steps: The historical target dataset of flood images containing people and vehicles and the negative sample historical dataset containing non-flood scene images selected by the Labelme tool are randomly shuffled in a 1:1 ratio and divided into a training set and a validation set; Input the data in the training set into YOLO V8 for training and learning; At the end of each training cycle, the validation set is used to evaluate the YOLO V8, the cross entropy loss and classification accuracy evaluation model are used to evaluate the model, and the trained model parameters are saved to obtain the trained YOLO V8 model.
8. An urban rainstorm flood risk assessment system, characterized in that: include: The dataset construction module is used to obtain real-time social media data on rainstorm and flood events in the target city, and to construct a real-time positive sample dataset containing flood scene images, a real-time water body dataset of flood images, a real-time target dataset of flood images containing people and vehicles, and a real-time negative sample dataset containing non-flood scene images through real-time social media data. The target extraction module is used to input the data in the positive sample real-time data set containing flood scene pictures and the negative sample real-time data set containing non-flood scene pictures into the pre-trained ViT, screen out the real-time data of heavy rain and flood pictures, and then extract the address information of the real-time data of heavy rain and flood pictures; The data in the real-time water dataset of flood images and the real-time negative sample dataset containing non-flood scene images are input into the pre-trained DeepLab V3+ to extract water objects; the data in the real-time target dataset of flood images containing people and vehicles and the real-time negative sample dataset containing non-flood scene images are input into the pre-trained YOLO V8 to extract people and vehicle targets; detect whether the water objects overlap with the people and vehicle targets, and if so, mark them as dangerous images; The risk assessment module is used to combine the address information of the real-time data of rainstorm and flood pictures, synchronize the risky locations corresponding to all risky pictures to the map, and generate a heat map; Assess urban rainstorm flood risk areas through heat maps.
9. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the urban rainstorm flood risk assessment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the urban rainstorm flood risk assessment method according to any one of claims 1-7.
Citation Information
Patent Citations
Unmanned aerial vehicle image information extraction system for flood disasters
CN113610009A
Urban inland inundation risk assessment algorithm based on satellite remote sensing image target recognition
CN115240076A
Image generation method and device, electronic equipment, storage medium and program product
CN117315070A
Urban flood rapid mapping method based on multi-modal data
CN118015220A
Determining flood depth of an area object
GB202216056D0
Cited By
Flood type prediction method based on graph convolution Transform
CN120257061A
A flood type prediction method based on graph convolutional Transformer
CN120257061B