Urban flood prediction method, electronic equipment and storage medium

By acquiring and preprocessing multi-dimensional historical spatiotemporal distribution data, urban flood prediction is carried out using a pre-set flood prediction model, and the accuracy of the prediction results is ensured through evaluation indicators. This solves the shortcomings of existing two-dimensional simulation of urban floods and achieves high-precision flood prediction.

CN122045809APending Publication Date: 2026-05-15BEIJING CITY UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512027247.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-05-15

Smart Images

  • Figure CN122045809A_ABST
    Figure CN122045809A_ABST
Patent Text Reader

Abstract

The invention provides an urban flood prediction method, and the method comprises the steps: obtaining the multi-dimensional historical spatial-temporal distribution data and target prediction time of a to-be-tested region, carrying out the preprocessing of the data, obtaining the target multi-dimensional historical spatial-temporal distribution data, and enabling the target multi-dimensional historical spatial-temporal distribution data to be the data which can be recognized by a preset flood prediction model, therefore, the flood data can be predicted based on the multi-dimensional historical spatial and temporal distribution data through the preset flood prediction model, the predicted flood data of the target prediction time is predicted through the preset flood prediction model, the predicted flood data is evaluated to obtain an evaluation result, and when the evaluation result meets a preset evaluation threshold, the flood data is predicted to be predicted. And the flood data prediction is qualified. Therefore, through the preset flood prediction model, the flood condition of the target prediction time is predicted based on the multi-dimensional historical space-time distribution data, and two-dimensional water depth space simulation of urban flood can be realized; and meanwhile, by evaluating the predicted flood data, the flood prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of flood forecasting technology, and in particular to an urban flood forecasting method, electronic device and storage medium. Background Technology

[0002] In recent years, influenced by human activities and global climate change, extreme precipitation events have occurred frequently, leading to frequent urban flooding. Currently, artificial intelligence algorithms are widely used in the field of urban flooding to build data-driven models that can predict impending flooding in a timely manner. Deep learning algorithms, due to their ability to better describe nonlinear relationships, are increasingly being used in urban flood simulation. However, these deep learning algorithms are currently only used for simulating and predicting single-point (one-dimensional) flood depth and flow. In the two-dimensional simulation of urban flood distribution, the focus is mainly on identifying the inundation area; research on the spatial distribution and temporal variation of urban flood depth remains insufficient. Summary of the Invention

[0003] In view of this, the purpose of this application is to propose an urban flood forecasting method, electronic device and storage medium to solve some or all of the technical problems in the background art.

[0004] To achieve the above objectives, this application provides a method for predicting urban flooding, comprising: Acquire multi-dimensional historical spatiotemporal distribution data of the area to be tested and the target prediction time; The multi-dimensional historical spatiotemporal distribution data is preprocessed to obtain the target multi-dimensional historical spatiotemporal distribution data; Based on a preset flood prediction model, the predicted flood data is determined according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time. The predicted flood data is evaluated to obtain evaluation results; If the evaluation result of the predicted flood data meets the preset evaluation threshold, the predicted flood data is determined to be qualified.

[0005] Optionally, acquiring multi-dimensional historical spatiotemporal distribution data of the area to be tested includes: Obtain the spatiotemporal distribution data of the region to be tested for a preset date; Determine whether the duration of rainfall in the spatiotemporal distribution data for the preset date meets a preset threshold; If the rainfall duration of the spatiotemporal distribution data for the preset date does not meet the preset threshold, the multi-dimensional historical spatiotemporal distribution data of the area to be tested is determined based on the preset flood prediction model and the spatiotemporal distribution data for the preset date.

[0006] Optionally, the multi-dimensional historical spatiotemporal distribution data includes: rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data; The preprocessing of the multi-dimensional historical spatiotemporal distribution data to obtain the target multi-dimensional historical spatiotemporal distribution data includes: The rainfall data is divided according to a preset rainfall time interval to obtain target rainfall data; The terrain data is divided according to a preset spatial resolution threshold to obtain target terrain data; The pipeline data is converted according to a preset conversion method to obtain the target pipeline data; Each land type in the land cover type data is labeled to obtain the target land cover type data; The water accumulation data is divided according to a preset division time to obtain the target water accumulation data; The target rainfall data, target terrain data, target pipeline network data, target land cover type data, and target water accumulation data are used as the target's multi-dimensional historical spatiotemporal distribution data.

[0007] Optionally, based on a preset flood prediction model, and according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time, the predicted flood data is determined, including: The preset flood prediction model predicts water depth based on the target's multi-dimensional historical spatiotemporal distribution data according to the target prediction time, and outputs the predicted flood data.

[0008] Optionally, the evaluation of the predicted flood data to obtain evaluation results includes: The accuracy rate is calculated by using the following accuracy formula to assess the accuracy of the predicted flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, For the predicted flood data, For the target, multi-dimensional historical spatiotemporal distribution data; The Nash coefficient is calculated based on the multi-dimensional historical spatiotemporal distribution data of the target using the following Nash coefficient formula. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the predicted water depth at time i, The average water depth simulated over the entire simulation time n is based on multi-dimensional historical spatiotemporal distribution data. The average percentage error is calculated by using the following formula to calculate the average percentage error of the flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the water depth at time i in the flood data.

[0009] Optionally, the evaluation results of the flood data include: accuracy, Nash coefficient and average percentage error, and the preset evaluation threshold includes a preset accuracy threshold, a preset Nash coefficient threshold and an average percentage error threshold; In response to the evaluation result of the flood data meeting a preset evaluation threshold, the flood data prediction is determined to be qualified, including: In response to the accuracy being greater than the preset accuracy threshold, the Nash coefficient being greater than the preset Nash coefficient threshold, and the average percentage error being less than or equal to the preset average percentage error threshold, the flood forecast data is determined to be qualified.

[0010] Optionally, the training process of the preset flood prediction model includes: Obtain the spatiotemporal distribution dataset for target training; The spatiotemporal distribution dataset for training the target is divided into a training sample set and a validation sample set; Based on the loss function, the flood prediction model is iteratively trained using the training sample set until the number of iterations reaches the iteration threshold or the value of the loss function reaches the preset threshold. The flood prediction model trained iteratively was validated using the validation sample set, and the validation results were obtained. If the verification result is greater than a preset threshold, the preset flood prediction model that has been trained is obtained.

[0011] Optionally, obtaining the spatiotemporal distribution dataset for target training includes: Obtain the spatiotemporal distribution data to be trained; The spatiotemporal distribution data to be trained is preprocessed; Based on the preset flood prediction model, the sample is expanded according to the preprocessed spatiotemporal distribution data to be trained, and the target training spatiotemporal distribution dataset is determined.

[0012] Based on the same inventive concept, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.

[0013] Based on the same inventive concept, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the method described above.

[0014] As described above, the urban flood prediction method provided in this application acquires multi-dimensional historical spatiotemporal distribution data of the test area and the target prediction time. Since the historical spatiotemporal distribution data is multi-dimensional, preprocessing is required to obtain the target multi-dimensional historical spatiotemporal distribution data in order for the preset flood prediction model to identify it. This target multi-dimensional historical spatiotemporal distribution data is recognizable by the preset flood prediction model. Thus, the preset flood prediction model can predict flood data based on the multi-dimensional historical spatiotemporal distribution data, and simultaneously predict the flood data at the target prediction time. To ensure the accuracy of the prediction, the predicted flood data needs to be evaluated, and the evaluation results are obtained. When the evaluation results meet the preset evaluation threshold, the predicted flood data is considered qualified. Therefore, by using the preset flood prediction model to predict the flood situation at the target prediction time based on multi-dimensional historical spatiotemporal distribution data, two-dimensional water depth spatial simulation of urban floods can be achieved; furthermore, the accuracy of flood prediction is improved by evaluating the predicted flood data. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a method for predicting urban flooding according to an embodiment of this application; Figure 2 This is a schematic diagram of the urban flood prediction model structure framework according to an embodiment of this application; Figure 3 This is a schematic diagram of the network structure concept of the urban flood prediction model according to an embodiment of this application; Figure 4 This is a schematic diagram of the convolutional layer calculation process in an embodiment of this application; Figure 5This is a schematic diagram illustrating a maximum pooling example from an embodiment of this application; Figure 6 This is a schematic diagram showing the comparison of loss functions between the training set and the validation set in an embodiment of this application; Figure 7 This is a schematic diagram of the architecture corresponding to the urban flood forecasting method in the embodiments of this application; Figure 8 This is a schematic diagram of a flood forecasting device according to an embodiment of this application; Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0019] As described in the background, deep learning algorithms, as a new direction in artificial intelligence algorithms, are increasingly being used in urban flood simulation due to their ability to better describe nonlinear relationships. For example, convolutional neural networks (CNNs) are used to identify flood-prone areas in urban areas and predict flood sensitivity. The input to a CNN is typically flood image data, and the output is a flood inundation extent map (a binary classification map of flood and non-flood). CNNs are also used to predict flood sensitivity. These studies take multiple flood influencing factors as input and output a flood sensitivity map. However, due to limited training data and unsatisfactory results, few studies utilize CNN algorithms to directly generate flood depth distribution maps. Recurrent neural networks (RNNs) are mainly used for simulating the temporal variation of floods at a single point, such as rainfall-runoff or hydrological processes, and are rarely used for flood spatial analysis. However, there are still many challenges in the two-dimensional simulation of urban flood distribution. For example, due to the limited amount of observed flood data in urban areas, obtaining sufficient training sample data and model validation data has become a major challenge. Deep learning-based flood simulation models are mostly focused on predicting the occurrence of floods and the maximum water depth of floods, and are rarely used to simulate the spatiotemporal dynamics of floods, especially the two-dimensional water depth spatial simulation of floods. There are also significant differences in training samples and an unbalanced data distribution, with far more records of low water depths than high water depths, which can lead to the underestimation of high water depths.

[0020] To address the aforementioned technical issues, this application provides an urban flood prediction method. This method acquires multi-dimensional historical spatiotemporal distribution data of the test area and the target prediction time. Since the historical spatiotemporal distribution data is multi-dimensional, preprocessing is required to obtain the target multi-dimensional historical spatiotemporal distribution data. This target multi-dimensional historical spatiotemporal distribution data is recognizable by the pre-defined flood prediction model. Thus, the pre-defined flood prediction model can predict flood data based on the multi-dimensional historical spatiotemporal distribution data, and simultaneously predict the flood data at the target prediction time. To ensure prediction accuracy, the predicted flood data needs to be evaluated, and the evaluation results are obtained. When the evaluation results meet a pre-defined evaluation threshold, the predicted flood data is considered qualified. In this way, by using the pre-defined flood prediction model to predict the flood situation at the target prediction time based on multi-dimensional historical spatiotemporal distribution data, two-dimensional water depth spatial simulation of urban floods can be achieved; furthermore, the evaluation of the predicted flood data improves the accuracy of flood prediction.

[0021] The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0022] like Figure 1 and Figure 7 As shown, this application provides a method for predicting urban flooding, including: Step 102: Obtain multi-dimensional historical spatiotemporal distribution data of the area to be tested and the target prediction time.

[0023] In this step, the multi-dimensional historical spatiotemporal distribution data includes multi-dimensional data, such as rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. The target prediction time is a time set by the researchers, for example, predicting flooding conditions within 30 minutes after the current time, or a specific time, such as predicting flooding conditions between 13:00 and 13:30.

[0024] Step 104: Preprocess the multi-dimensional historical spatiotemporal distribution data to obtain the target multi-dimensional historical spatiotemporal distribution data.

[0025] In this step, predictions need to be made based on multi-dimensional historical spatiotemporal distribution data, and the data needs to be input into a preset flood prediction model. However, since the historical spatiotemporal distribution data includes multiple dimensions, it is necessary to process the multi-dimensional historical spatiotemporal distribution data into a format that the preset flood prediction model can recognize. The multi-dimensional historical spatiotemporal distribution data can be preprocessed by the preset flood prediction model to obtain the target multi-dimensional historical spatiotemporal distribution data.

[0026] Step 106: Based on the preset flood prediction model, determine the predicted flood data according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time.

[0027] In this step, such as Figure 2 As shown, the preset flood prediction model is a pre-trained flood prediction model, which includes the UFPM (Urban Flood Prediction Model) and a preset coupled model (IUFM, Integrated Urban Flood Model). It should be noted that the flood prediction model in this application is a combination of the UFPM and IUFM models. The preset coupled model is used to expand the sample data of multi-dimensional historical spatiotemporal distribution data, and the urban flood prediction model is used to predict flood data based on the expanded multi-dimensional historical spatiotemporal distribution data. Figure 3As shown, the architecture of the urban flood prediction model includes 7 hidden layers, comprising 2 convolutional layers, 2 pooling layers, 2 fully connected layers, and 1 single-layer LSTM layer (with multiple memory units). LSTM (long short-term memory) can be a long short-term neural network. Based on the above steps, multi-dimensional historical spatiotemporal distribution data is preprocessed using a pre-coupled model of the pre-defined flood prediction model to obtain target multi-dimensional historical spatiotemporal distribution data. Both the target multi-dimensional historical spatiotemporal distribution data and the target prediction time are input into the urban flood prediction model of the pre-defined flood prediction model. The urban flood prediction model then predicts flood data within the target prediction time based on the target multi-dimensional historical spatiotemporal distribution data, thus obtaining the predicted flood data.

[0028] Step 108: Evaluate the predicted flood data and obtain the evaluation results.

[0029] In this step, in order to prevent the flood data predicted by the preset flood prediction model from being inaccurate, it is necessary to evaluate the predicted flood data and obtain the evaluation results. In this embodiment of the application, the accuracy, Nash coefficient and average percentage error of the predicted flood data are evaluated to obtain the evaluation results. Based on these evaluation results, it can be determined whether the predicted flood data is qualified, thereby determining the accuracy of the preset flood prediction model and improving the accuracy of flood prediction.

[0030] Step 110: In response to the evaluation result of the predicted flood data meeting the preset evaluation threshold, the predicted flood data is determined to be qualified.

[0031] In this step, when the evaluation result of the predicted flood data meets the preset evaluation threshold, it indicates that the prediction accuracy of the predicted flood data is high. The evaluation of the preset flood data is based on accuracy, Nash coefficient, and mean percentage error. The preset evaluation threshold includes a preset accuracy threshold, a preset Nash coefficient threshold, and a preset mean percentage error threshold. If the accuracy is greater than the preset accuracy threshold, the Nash coefficient is greater than the preset Nash coefficient threshold, and the mean percentage error is less than or equal to the preset mean percentage error threshold, the predicted flood data is deemed qualified. Thus, by evaluating the predicted flood data, the output accuracy of the preset flood prediction model can be improved, thereby increasing the prediction precision of the flood data.

[0032] In steps 102-110, multi-dimensional historical spatiotemporal distribution data of the test area and the target prediction time are acquired. Since the historical spatiotemporal distribution data is multi-dimensional, it needs to be preprocessed to obtain the target multi-dimensional historical spatiotemporal distribution data in order for the preset flood prediction model to identify it. This target multi-dimensional historical spatiotemporal distribution data is the data that the preset flood prediction model can identify. Thus, the preset flood prediction model can predict flood data based on the multi-dimensional historical spatiotemporal distribution data, and simultaneously predict the flood data for the target prediction time. To ensure the accuracy of the prediction, the predicted flood data needs to be evaluated, and the evaluation results are obtained. When the evaluation results meet the preset evaluation threshold, it indicates that the predicted flood data is qualified. In this way, by using the preset flood prediction model to predict the flood situation at the target prediction time based on multi-dimensional historical spatiotemporal distribution data, two-dimensional water depth spatial simulation of urban flooding can be achieved; at the same time, by evaluating the predicted flood data, the accuracy of flood prediction is improved.

[0033] In some embodiments, acquiring multi-dimensional historical spatiotemporal distribution data of the area to be tested includes: Obtain the spatiotemporal distribution data of the region to be tested for a preset date; Determine whether the duration of rainfall in the spatiotemporal distribution data for the preset date meets a preset threshold; If the rainfall duration of the spatiotemporal distribution data for the preset date does not meet the preset threshold, the multi-dimensional historical spatiotemporal distribution data of the area to be tested is determined based on the preset flood prediction model and the spatiotemporal distribution data for the preset date.

[0034] For example, the spatiotemporal distribution data of the area to be tested for a preset date can be obtained by searching a database. This database stores spatiotemporal distribution data for multiple areas, and each area stores multiple dates, which facilitates data analysis of the area to be tested. The area to be tested is the North Moat study area, which is the area north and south of the North Moat of Beijing as the east-west axis (39.93°). 39.97°N, 116.36° (116.43°E), with an area of ​​approximately 20 km². 2The preset date can be July 21, 2012. Queries can be performed in the database using SQL statements. By entering the corresponding region and the desired date, spatiotemporal distribution data for the North Moat study area can be retrieved. The spatiotemporal distribution data includes rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. For example, the rainfall data includes nine designed rainfall scenarios and actual rainfall data from July 21, 2012. Topographic data, pipeline network data, and land cover type data can be categorized as spatial data. The topographic data includes elevation data. The pipeline network data originates from data managed by the drainage group. The land cover type data includes bare land, asphalt pavement, grassland, woodland, masonry pavement, concrete pavement, concrete roofs, and water bodies. The water accumulation data includes water depth.

[0035] After obtaining the spatiotemporal distribution data of the area to be tested for a preset date, it is determined whether the rainfall duration of this spatiotemporal distribution data meets a preset threshold (for example, the preset threshold can be 30 minutes). If the rainfall duration of the spatiotemporal distribution data is 10 minutes, then it is determined that the rainfall duration does not meet the preset threshold, and the rainfall duration needs to be expanded, that is, the rainfall duration needs to be increased. This is done by simulating rainfall using a preset flood prediction model to meet the requirement of increasing the rainfall duration. After increasing the rainfall duration, there will be enough samples of water accumulation data, which will be sufficient to accurately predict flood conditions based on the water accumulation data. In other words, the sample expansion of the obtained spatiotemporal distribution data is based on the preset flood prediction model, so that there is enough multi-dimensional historical spatiotemporal distribution data, which can be used to accurately predict flood conditions. When expanding the sample of multi-dimensional spatiotemporal distribution data based on the preset flood prediction model, multiple dimensions are considered, such as rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. That is, the sample expansion is based on these dimensions.

[0036] In some embodiments, the multi-dimensional historical spatiotemporal distribution data includes: rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data; The preprocessing of the multi-dimensional historical spatiotemporal distribution data to obtain the target multi-dimensional historical spatiotemporal distribution data includes: The rainfall data is divided according to a preset rainfall time interval to obtain target rainfall data; The terrain data is divided according to a preset spatial resolution threshold to obtain target terrain data; The pipeline data is converted according to a preset conversion method to obtain the target pipeline data; Each land type in the land cover type data is labeled to obtain the target land cover type data; The water accumulation data is divided according to a preset division time to obtain the target water accumulation data; The target rainfall data, target terrain data, target pipeline network data, target land cover type data, and target water accumulation data are used as the target's multi-dimensional historical spatiotemporal distribution data.

[0037] Specifically, based on the above embodiments, the multi-dimensional historical spatiotemporal distribution data includes rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. This can be understood as each rainfall data point corresponding to topographic data, pipeline network data (which can be understood as information related to the drainage pipes of the drainage system, such as the size and capacity of the drainage pipes), land cover type data, and water accumulation data. For example, taking short-duration heavy rainfall as an example, the corresponding water accumulation data is larger in low-lying areas, which can be understood as the elevation of the terrain affecting the amount of water accumulation. Pipeline network data refers to the drainage network, which can be used to calculate its drainage volume, thus affecting the amount of water accumulation. Different land cover types can affect the amount of water accumulation (for example, asphalt pavements are not easily permeable, increasing the amount of water accumulation, while grass pavements are permeable, reducing the amount of water accumulation). Therefore, it is evident that rainfall data, topographic data, pipeline network data, and land cover type data all influence water accumulation data. Consequently, this application comprehensively considers rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data when predicting flood conditions, and inputs all these data into a preset flood prediction model for flood prediction. To ensure the accuracy of the preset flood prediction model and to guarantee its data processing capacity, multi-dimensional historical spatiotemporal distribution data is preprocessed, with each dimension's historical spatiotemporal distribution data being divided or transformed. For rainfall data, the rainfall data is divided into multiple segments according to a preset rainfall time interval to obtain the target rainfall data. For example, the rainfall data time interval is set to 1 minute, and a sliding window method is used to extract rainfall data with a 30-minute time step, i.e., the rainfall data is divided. The extracted rainfall data is then input into the preset flood prediction model. The terrain data is divided according to a preset spatial resolution threshold to obtain target terrain data. For example, the terrain data (DEM data) is divided at a resolution of 1m, and the 1m resolution terrain data is input into the preset flood prediction model. The pipeline network data is converted according to a preset conversion method to obtain target pipeline network data. For example, the pipeline network data is converted to raster format data (the raster containing the pipeline network is assigned the pipeline diameter, and others are assigned NULL), and the raster format data is input into the preset flood prediction model. Each land type within the land cover type is labeled to obtain target land cover type data. Exemplary land types include: bare land, asphalt pavement, grassland, woodland, masonry pavement, concrete pavement, concrete roof, and water bodies, labeled as 0, 1, 21, 23, 3, 41, 42, and 5 respectively. Thus, the land type can be clearly identified by viewing the label values. The water accumulation data is divided according to a preset division time period to obtain target water accumulation data. For example, the long-term water accumulation data is divided according to a preset division time (interval of 30 minutes), and the divided technical data is input into the preset flood prediction model.This means that multi-dimensional historical spatiotemporal distribution data are input into a preset flood prediction model, and predictions are made based on this data, so that flood data at the target prediction time can be predicted more accurately.

[0038] In some embodiments, based on a preset flood prediction model, the predicted flood data is determined according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time, including: The preset flood prediction model predicts water depth based on the target's multi-dimensional historical spatiotemporal distribution data according to the target prediction time, and outputs the predicted flood data.

[0039] Specifically, based on the above embodiments, the multi-dimensional historical spatiotemporal distribution data includes rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. After preprocessing, this data is input into a preset flood prediction model. The preset flood prediction model then predicts water accumulation depth according to the target prediction time (the time the user wants to predict) and outputs predicted flood data. The preset flood prediction model in this application accurately predicts future flood conditions based on multi-dimensional historical spatiotemporal data, thus making the flood situation predicted based on multi-dimensional comprehensive data more accurate.

[0040] In some embodiments, evaluating the predicted flood data to obtain evaluation results includes: The accuracy rate is calculated by using the following accuracy formula to assess the accuracy of the predicted flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, For the predicted flood data, For the target, multi-dimensional historical spatiotemporal distribution data; The Nash coefficient is calculated based on the multi-dimensional historical spatiotemporal distribution data of the target using the following Nash coefficient formula. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the predicted water depth at time i, The average water depth simulated over the entire simulation time n is based on multi-dimensional historical spatiotemporal distribution data. The average percentage error is calculated by using the following formula to calculate the average percentage error of the flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the water depth at time i in the flood data.

[0041] Specifically, when evaluating flood forecast data, different evaluation indicators need to be set to ensure the accuracy of the data. These indicators include accuracy (P), Nash coefficient (NSE), and mean percentage error (MPE). Accuracy and the Nash coefficient have values ​​ranging from 0 to 1. 1. The closer to 1, the better the model simulation. The mean percentage error (MPI) reveals whether the predicted value is too high or too low relative to the actual value; a positive value indicates the predicted value is too high, and a negative value indicates the predicted value is too low. Its accuracy formula is: In the formula, To predict flood data (i.e., the number of inundated graticules that are correctly simulated), both the pre-defined coupled model (IUFM) and the urban flood prediction model (UFPM) are simulated as the number of inundated graticules. The target is multi-dimensional historical spatiotemporal distribution data (i.e., the total number of actual submerged graticules), which is the number of submerged graticules simulated by the pre-defined Integrated Unified Model (IUFM). Nash coefficient formula: In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data (i.e., the actual water depth (m) simulated by the pre-defined coupled model (IUFM) at time i). To predict the predicted water depth at time i (i.e., the simulated water depth (m) of the Urban Flood Prediction Model (UFPM) at time i), This represents the average water depth simulated over the entire simulation time n using multi-dimensional historical spatiotemporal distribution data (i.e., the average water depth (m) simulated by the pre-defined integrated uninterrupted model (IUFM) over the entire simulation time n). The formula for calculating the average percentage error is: In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data (i.e., the actual water depth (m) simulated by the pre-defined coupled model (IUFM) at time i). To predict the predicted water depth at time i (i.e., the simulated water depth (m) of the Urban Flood Prediction Model (UFPM) at time i), The average water depth simulated by the multi-dimensional historical spatiotemporal distribution data over the entire simulation time n (that is, the average water depth (m) simulated by the pre-defined coupled model (IUFM) over the entire simulation time n).

[0042] In some embodiments, the evaluation results of the flood data include: accuracy, Nash coefficient, and average percentage error, and the preset evaluation threshold includes a preset accuracy threshold, a preset Nash coefficient threshold, and an average percentage error threshold. In response to the evaluation result of the flood data meeting a preset evaluation threshold, the flood data prediction is determined to be qualified, including: In response to the accuracy being greater than the preset accuracy threshold, the Nash coefficient being greater than the preset Nash coefficient threshold, and the average percentage error being less than or equal to the preset average percentage error threshold, the flood forecast data is determined to be qualified.

[0043] Specifically, when evaluating flood forecast data, different evaluation indicators need to be set to ensure the accuracy of the data. The evaluation results include accuracy (P), Nash coefficient (NSE), and mean percentage error (MPE). Among these, accuracy and the Nash coefficient have values ​​ranging from 0 to 1. 1. The closer to 1, the better the model simulation effect. The mean percentage error (MPI) reveals whether the predicted value is too high or too low relative to the actual value. A positive value indicates that the predicted value is too high, and a negative value indicates that the predicted value is too low. When the accuracy is greater than 0.8, the Nash coefficient is greater than 0.8, and the MPI is less than or equal to 0.2, the flood prediction data is considered qualified. Based on this, it means that the predicted flood data is very close to the actual data, which can guarantee the accuracy of the prediction results of the preset flood prediction model.

[0044] In some embodiments, the training process of the preset flood prediction model includes: Obtain the spatiotemporal distribution dataset for target training; The spatiotemporal distribution dataset for training the target is divided into a training sample set and a validation sample set; Based on the loss function, the flood prediction model is iteratively trained using the training sample set until the number of iterations reaches the iteration threshold or the value of the loss function reaches the preset threshold. The flood prediction model trained iteratively was validated using the validation sample set, and the validation results were obtained. If the verification result is greater than a preset threshold, the preset flood prediction model that has been trained is obtained.

[0045] Furthermore, obtaining the spatiotemporal distribution dataset for target training includes: Obtain the spatiotemporal distribution data to be trained; The spatiotemporal distribution data to be trained is preprocessed; Based on the preset flood prediction model, the sample is expanded according to the preprocessed spatiotemporal distribution data to be trained, and the target training spatiotemporal distribution dataset is determined.

[0046] For example, the spatiotemporal distribution data to be trained is multi-dimensional data, which may include rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data. Preprocessing of the rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data involves removing unqualified data and dividing or assigning values ​​to each data point according to preset rules, as described above for the preprocessing of multi-dimensional historical spatiotemporal distribution data, which will not be detailed here. The flood prediction model includes the UFPM (Urban Flood Prediction Model) and a preset coupled model (IUFM, Integrated Urban Flood Model). The preset coupled model is a simple single-dimensional prediction model. For example, the architecture of the preset coupled model can be the MIKE FLOOD / MIKE URBAN model architecture, the InfoWorks ICM model architecture, and the LISFLOOD-FP and FloodMap series architectures, which are not specifically limited in this application. Figure 3 As shown, the urban flood prediction model architecture in this application includes seven hidden layers: two convolutional layers, two pooling layers, two fully connected layers, and one single-layer LSTM layer (with multiple memory units). It also includes key components such as Flatten layers, activation functions, concatenation functions, and Dropout layers. Based on this prediction model network structure, more complex and accurate network structures can be further constructed by continuously adjusting the number of convolutional layers, pooling layers, and fully connected layers, and by adding various optimization measures. Figure 3 In the diagram, D(T), P(T), L(T), and F(T) represent the elevation, pipe network, land cover type, and water depth at time T, respectively; R(T) represents the rainfall sequence for a period preceding time T; h(t) and h(t+1) represent the output values ​​of the long short-term memory (LSTM) neural network at times t and t+1, respectively; and F(t+1) represents the water depth at time T+1. (Convolutional layer) Convolutional layers, as the foundational layers, are primarily used to process and extract high-order feature factors from input spatial data such as elevation, pipe network, land cover type, and water depth. A P×Q matrix is ​​used as the convolution kernel, which slides across the entire input data with a certain stride. Each movement of the kernel repeats the dot product operation, thus obtaining the corresponding local matrix (feature map). This convolution process preserves the original order of the input factors, discards some minor features, and reduces network complexity by sharing weights within the convolution kernel.

[0047] (1) In the formula, Let f(·) represent the value at position (x, y) in the j-th feature map of the i-th layer, and let f(·) represent the activation function. and These are the length and width of the two-dimensional convolution kernel, respectively. This represents the weight connecting the m-th feature map in the i-th layer to the j-th feature map at position (p, q). This represents the value at position (x+p, y+q) in the m-th feature map of layer (i-1). This represents the bias on the j-th feature map of the i-th layer.

[0048] Figure 4 This paper describes a 3×3 convolutional kernel sliding across a 6×6 input feature map with a stride of 1 and zero padding, performing a dot product operation to produce a corresponding 4×4 output feature map. Pooling layers sample the output of the previous convolution, reducing the feature dimension of the convolutional layer output while maintaining the network depth, thereby reducing overfitting and computational complexity. This paper employs max pooling, using a filter to scan the matrix data with a certain stride to obtain the maximum value in the region, which corresponds to the most representative feature value at the current location. Figure 5 This describes using a 2×2 filter to perform max pooling on a 4×4 input feature map with a stride of 2, resulting in the corresponding output feature map. The pooling layer finds the maximum value within each 2×2 region, reducing the spatial dimension to half that of the original input. Flattening layer: The Flattening layer flattens the feature data output from the previous layer, essentially reducing multidimensional feature data to one dimension. It is generally used as a transition between convolutional and fully connected layers. Fully connected layer: The core operation of the fully connected layer is matrix-vector multiplication, essentially transforming feature vectors from one feature space to another. Therefore, the purpose of the fully connected layer is to extract the correlation between the previously extracted features through nonlinear transformation and finally map them onto the output space. Activation function: The activation function performs a nonlinear mapping on the output of the neural network. When the output of each neuron passes through a nonlinear activation function, the entire neural network is no longer a simple linear model, and its expressive power is greatly enhanced. Commonly used activation functions include Sigmoid, Tanh, and ReLU. This paper chooses the ReLU activation function. The ReLU activation function can solve the gradient vanishing problem during neural network training, and it converges and is computationally very fast. Its formula is as follows: (2) The Concatenate function fuses features extracted from multiple convolutional layers or information from the output layer. In this paper, it fuses high-order feature factors from spatial data such as rainfall, elevation, pipe network, land cover type, and water depth. (LSTM layer) LSTM layers are primarily used to extract features from water accumulation-related time-series data. They can retain water accumulation information from earlier time points, making them suitable for predicting water accumulation in future timeframes. Additionally, LSTM layers can address issues like vanishing and exploding gradients during long sequence training. This layer mainly consists of one or more memory units responsible for remembering arbitrary time intervals, and each memory unit has three "gate" structures: a forget gate, an input gate, and an output gate. A "gate" is essentially a sigmoid activation function applied to each matrix element and a calculation method for element-wise multiplication. Assume the input sequence is ( … The output sequence is () … Then, at time t, the input-output structure of the memory unit can be expressed by the following formula: (3) (4) (5) (6) (7) In the formula, For input gate input, Input for the forget gate, To update the state of the memory cell, For output gate output, For output of the hidden layer, It is the Sigmoid activation function. This represents element-wise multiplication of a vector. , , , These are the weight parameters corresponding to the output of the LSTM memory cells at the previous time step. , , , The weight parameters are the input quantities. , , , These are the bias values ​​for each part.

[0049] Dropout layer: During the training of each min-batch of a neural network, the dropout layer temporarily removes some neurons with a certain probability until the next training iteration. This method can avoid overfitting and improve the model's generalization ability.

[0050] For example, the training process involves constructing a rainfall-flood dataset, including an input dataset (FI) and an output dataset (FO). The input dataset includes data such as rainfall, DEM, pipe network, land cover type, and historical water depth. The output dataset is a water depth dataset.

[0051] (8) (9) (10) (11) (12) (13) (14) In the formula, E represents the elevation dataset of all rasters within the study area. Let be the value of the i-th raster in E; DR is the pipeline dataset of all rasters in the study area. Let be the value of the i-th raster in DR; LC is the land cover type dataset of all rasters in the study area. Let be the value of the i-th cell in LC; For the T-th water depth data in the water depth dataset, For the T-th 30-minute rainfall sequence in the rainfall dataset, Let T be the rainfall intensity at time t-1 within a specific rainfall scenario for the T-th rainfall sequence data. For the T-th model, input the data set. The T-th model outputs a dataset where m and n are the row and column numbers of the entire study area, taking values ​​of 932 and 926 respectively, and N is the total number of samples, taking a value of 1028. The training and validation sets are then divided according to a certain ratio.

[0052] (15) (16) (17) (18) In the formula, The input vector set is the training set. The output vector set is used to train the training set. To verify the input vector set, To verify the output vector set, L is the Lth sample set out of N total sample data.

[0053] The training and validation sets are input into the Urban Flood Prediction Model (UFPM), and the Adaptive Moment Estimation (Adam) optimization algorithm is used to continuously adjust the weights and bias parameters of the model network so that the loss function reaches the ideal threshold, that is, the mean square error between the water depth output by the prediction model (UFPM) and the water depth calculated by the coupled model (IUFM) is as small as possible.

[0054] Its update formula is as follows: (19) (20) (twenty one) (twenty two) (twenty three) In the formula, m is the first moment estimate of the gradient. For the second moment estimation of the gradient, Let ξ be the gradient, t be the number of iterations, η be the learning rate, and ξ be the hyperparameter. The exponential decay rate is estimated by the first moment. Let θ be the exponential decay rate estimated by the second moment, and θ be the model parameters. This represents the first-order moment estimation bias. This represents the second-order moment estimation bias.

[0055] The training formula is as follows: (twenty four) (25) (26) (27) In the formula, for Input Prediction Model (UFPM) The resulting vector set, for Input Prediction Model (UFPM) The resulting vector set The loss function for the training data, The loss function is used to verify the data.

[0056] When the model's loss function curves satisfy the following characteristics: after 20 iterations, both loss function curves begin to converge, and there is no visually noticeable difference between them (e.g., ...). Figure 6 (As shown in the figure). This indicates that the model has a good fit and a certain generalization ability.

[0057] Based on the above embodiments, this application uses geospatial data (topographic data DEM, pipeline network data, and land cover type data) and rainfall process data, employing CNN and LSTM algorithms to predict the spatial distribution of two-dimensional water accumulation depth. Simultaneously, the simulation results of the Urban Flood Prediction Model (UFPM) were validated and evaluated using a rainstorm scenario from July 21, 2012. The results show that the model can effectively simulate the spatiotemporal dynamics of water accumulation in the northern moat area, and the model has good generalization ability. In the Urban Flood Prediction Model (UFPM), the convolutional layer can extract local trends and features from the input data, such as water accumulation-related DEM, pipeline network, and historical water accumulation data, effectively reducing the dimensionality of spatial data; the LSTM layer overcomes the gradient vanishing problem in recurrent neural networks, effectively learning the dependencies of time-series data using memory units. Furthermore, in the design of the Urban Flood Prediction Model (UFPM) network structure, the physically meaningful water accumulation information calculated by the Integrated Unified Unified Model (IUFM) was used to set the model boundary conditions. Convolutional kernel operators that conform to the spatial distribution characteristics of urban water accumulation were selected to construct convolutional layers, which to a certain extent ensured the correctness of the UFPM structure. The accuracy of urban flood prediction model results largely depends on the sample data. Reasonable selection of input data is crucial when constructing an urban flood prediction model. Based on relevant research on the pre-defined IUFM model, we identified rainfall, DEM, pipe network, land cover type, and historical water accumulation data as key factors significantly influencing the water accumulation process. These data types collectively provide the model with comprehensive information from meteorological conditions to topography, from urban infrastructure to surface features, helping the model to more accurately capture the dynamic process of water accumulation formation. The Urban Flood Prediction Model (UFPM) is highly dependent on training samples. However, in urban areas, flood data sampling is difficult, historical data is scarce and mostly consists of water accumulation point data, lacking spatial information. This greatly limits the production of flood sample data. In this application, the validated pre-coupled model (IUFM) is used to simulate multiple rainfall scenarios to obtain the corresponding spatiotemporal distribution data of water accumulation in the study area. This data is used to construct a rainfall-water accumulation dataset, which provides a physically meaningful training dataset for the Urban Flood Forecasting Model (UFPM), ensuring both the quantity and quality of the samples.

[0058] The Urban Flood Prediction Model (UFPM) can learn the spatial characteristics influencing water accumulation formation using spatial data of the entire study area or catchment area, achieving two-dimensional prediction of the spatiotemporal distribution of water accumulation. Compared with the pre-coupled model (IUFM), the UFPM does not face the problem of exponential growth of model parameters. Simultaneously, the time consumed in simulating water accumulation at a single moment is reduced by two orders of magnitude, solving the problem of long simulation times in traditional urban flood models and enabling rapid simulation and timely forecasting of urban floods. The high-precision water accumulation results simulated by the pre-coupled model (IUFM) are used as driving data, comprehensively considering rainfall, pipe network, and land cover type data to train and validate the UFPM. Results show that in the northern moat area, the UFPM can simulate the potential inundation range of the study area well, with an accuracy of 67.9%. The UFPM also demonstrates good simulation of the spatial distribution of water accumulation across the entire region, with a Nash coefficient (NSE) of 0.87 for the inundated area. Particularly in key areas (water depth ≥ 0.27 m), the Urban Flood Prediction Model (UFPM) achieved an accuracy of 97.2% in simulating potential inundation areas. It also demonstrated high accuracy in simulating the spatiotemporal variations of water accumulation, with a Nash coefficient (NSE) of 0.90 for average water depth and 0.99 for inundated area. Furthermore, the UFPM model showed a mean absolute error of 0.08 m and a mean relative error of 4.2% for simulating the maximum water depth at water accumulation points (water depth ≥ 0.35 m). The mean Nash coefficient (NSE) for water depth simulation was 0.89, and the mean percentage error (MPE) was 19.7%, indicating good accuracy. However, the UFPM model's simulation performance was less than ideal for areas with shallower water depths, primarily because the temporal and spatial variations at shallower water accumulation points were not significant, making it difficult for the model to effectively learn their characteristics.

[0059] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0060] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0061] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a flood forecasting device.

[0062] refer to Figure 8 The flood forecasting device includes: The acquisition module 202 is configured to acquire multi-dimensional historical spatiotemporal distribution data of the area to be tested and the target prediction time; Processing module 204 is configured to preprocess the multi-dimensional historical spatiotemporal distribution data to obtain target multi-dimensional historical spatiotemporal distribution data; The first determining module 206 is configured to determine the predicted flood data based on a preset flood prediction model, according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time. Evaluation module 208 is configured to evaluate the predicted flood data and obtain evaluation results; The second determining module 210 is configured to determine that the predicted flood data is qualified in response to the evaluation result of the predicted flood data meeting a preset evaluation threshold.

[0063] In some embodiments, the acquisition module 202 is further configured to acquire multi-dimensional historical spatiotemporal distribution data of the region to be tested, including: Obtain the spatiotemporal distribution data of the region to be tested for a preset date; Determine whether the duration of rainfall in the spatiotemporal distribution data for the preset date meets a preset threshold; If the rainfall duration of the spatiotemporal distribution data for the preset date does not meet the preset threshold, the multi-dimensional historical spatiotemporal distribution data of the area to be tested is determined based on the preset flood prediction model and the spatiotemporal distribution data for the preset date.

[0064] In some embodiments, the processing module 204 is further configured such that the multi-dimensional historical spatiotemporal distribution data includes: rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data; The preprocessing of the multi-dimensional historical spatiotemporal distribution data to obtain the target multi-dimensional historical spatiotemporal distribution data includes: The rainfall data is divided according to a preset rainfall time interval to obtain target rainfall data; The terrain data is divided according to a preset spatial resolution threshold to obtain target terrain data; The pipeline data is converted according to a preset conversion method to obtain the target pipeline data; Each land type in the land cover type data is labeled to obtain the target land cover type data; The water accumulation data is divided according to a preset division time to obtain the target water accumulation data; The target rainfall data, target terrain data, target pipeline network data, target land cover type data, and target water accumulation data are used as the target's multi-dimensional historical spatiotemporal distribution data.

[0065] In some embodiments, the first determining module 206 is further configured to determine predicted flood data based on a preset flood prediction model, according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time, including: The preset flood prediction model predicts water depth based on the target's multi-dimensional historical spatiotemporal distribution data according to the target prediction time, and outputs the predicted flood data.

[0066] In some embodiments, the evaluation module 208 is further configured to evaluate the predicted flood data and obtain an evaluation result, including: The accuracy rate is calculated by using the following accuracy formula to assess the accuracy of the predicted flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, For the predicted flood data, For the target, multi-dimensional historical spatiotemporal distribution data; The Nash coefficient is calculated based on the multi-dimensional historical spatiotemporal distribution data of the target using the following Nash coefficient formula. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the predicted water depth at time i, The average water depth simulated over the entire simulation time n is based on multi-dimensional historical spatiotemporal distribution data. The average percentage error is calculated by using the following formula to calculate the average percentage error of the flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the water depth at time i in the flood data.

[0067] In some embodiments, the second determining module 210 is further configured such that the evaluation results of the flood data include: accuracy, Nash coefficient and average percentage error, and the preset evaluation threshold includes a preset accuracy threshold, a preset Nash coefficient threshold and an average percentage error threshold. In response to the evaluation result of the flood data meeting a preset evaluation threshold, the flood data prediction is determined to be qualified, including: In response to the accuracy being greater than the preset accuracy threshold, the Nash coefficient being greater than the preset Nash coefficient threshold, and the average percentage error being less than or equal to the preset average percentage error threshold, the flood forecast data is determined to be qualified.

[0068] In some embodiments, the system further includes a training module configured for the training process of the preset flood prediction model, comprising: Obtain the spatiotemporal distribution dataset for target training; The spatiotemporal distribution dataset for training the target is divided into a training sample set and a validation sample set; Based on the loss function, the flood prediction model is iteratively trained using the training sample set until the number of iterations reaches the iteration threshold or the value of the loss function reaches the preset threshold. The flood prediction model trained iteratively was validated using the validation sample set, and the validation results were obtained. If the verification result is greater than a preset threshold, the preset flood prediction model that has been trained is obtained.

[0069] In some embodiments, the training module is further configured to acquire the spatiotemporal distribution dataset for the target training, including: Obtain the spatiotemporal distribution data to be trained; The spatiotemporal distribution data to be trained is preprocessed; Based on the preset flood prediction model, the spatiotemporal distribution data to be trained is sampled and expanded to determine the target spatiotemporal distribution dataset for training.

[0070] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0071] The apparatus described above is used to implement a corresponding urban flood forecasting method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0072] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an urban flood prediction method as described in any of the above embodiments.

[0073] Figure 9 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0074] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0075] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0076] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0077] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0078] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0079] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0080] The electronic devices described above are used to implement a corresponding urban flood forecasting method in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0081] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an urban flood prediction method as described in any of the above embodiments.

[0082] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0083] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute an urban flood forecasting method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0084] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.

[0085] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.

[0086] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0087] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0088] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0089] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0090] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0091] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A method for predicting urban flooding, characterized in that, include: Acquire multi-dimensional historical spatiotemporal distribution data of the area to be tested and the target prediction time; The multi-dimensional historical spatiotemporal distribution data is preprocessed to obtain the target multi-dimensional historical spatiotemporal distribution data; Based on a preset flood prediction model, the predicted flood data is determined according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time. The predicted flood data is evaluated to obtain evaluation results; If the evaluation result of the predicted flood data meets the preset evaluation threshold, the predicted flood data is determined to be qualified.

2. The method according to claim 1, characterized in that, The acquisition of multi-dimensional historical spatiotemporal distribution data of the area to be tested includes: Obtain the spatiotemporal distribution data of the region to be tested for a preset date; Determine whether the duration of rainfall in the spatiotemporal distribution data for the preset date meets a preset threshold; If the rainfall duration of the spatiotemporal distribution data for the preset date does not meet the preset threshold, the multi-dimensional historical spatiotemporal distribution data of the area to be tested is determined based on the preset flood prediction model and the spatiotemporal distribution data for the preset date.

3. The method according to claim 1, characterized in that, The multi-dimensional historical spatiotemporal distribution data includes: rainfall data, topographic data, pipeline network data, land cover type data, and water accumulation data; The preprocessing of the multi-dimensional historical spatiotemporal distribution data to obtain the target multi-dimensional historical spatiotemporal distribution data includes: The rainfall data is divided according to a preset rainfall time interval to obtain target rainfall data; The terrain data is divided according to a preset spatial resolution threshold to obtain target terrain data; The pipeline data is converted according to a preset conversion method to obtain the target pipeline data; Each land type in the land cover type data is labeled to obtain the target land cover type data; The water accumulation data is divided according to a preset division time to obtain the target water accumulation data; The target rainfall data, target terrain data, target pipeline network data, target land cover type data, and target water accumulation data are used as the target's multi-dimensional historical spatiotemporal distribution data.

4. The method according to claim 1, characterized in that, Based on a pre-defined flood prediction model, and according to the multi-dimensional historical spatiotemporal distribution data of the target and the target prediction time, the predicted flood data is determined, including: The preset flood prediction model predicts water depth based on the target's multi-dimensional historical spatiotemporal distribution data according to the target prediction time, and outputs the predicted flood data.

5. The method according to claim 1, characterized in that, The evaluation of the predicted flood data, to obtain the evaluation results, includes: The accuracy rate is calculated by using the following accuracy formula to assess the accuracy of the predicted flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, For the predicted flood data, For the target, multi-dimensional historical spatiotemporal distribution data; The Nash coefficient is calculated based on the multi-dimensional historical spatiotemporal distribution data of the target using the following Nash coefficient formula. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the predicted water depth at time i, The average water depth simulated over the entire simulation time n is based on multi-dimensional historical spatiotemporal distribution data. The average percentage error is calculated by using the following formula to calculate the average percentage error of the flood data based on the multi-dimensional historical spatiotemporal distribution data of the target. ; In the formula, The actual water depth at time i is the result of multi-dimensional historical spatiotemporal distribution data. To predict the water depth at time i in the flood data.

6. The method according to claim 5, characterized in that, The evaluation results of the flood data include: accuracy, Nash coefficient and average percentage error, and the preset evaluation thresholds include preset accuracy threshold, preset Nash coefficient threshold and average percentage error threshold. In response to the evaluation result of the flood data meeting a preset evaluation threshold, the flood data prediction is determined to be qualified, including: In response to the accuracy being greater than the preset accuracy threshold, the Nash coefficient being greater than the preset Nash coefficient threshold, and the average percentage error being less than or equal to the preset average percentage error threshold, the flood forecast data is determined to be qualified.

7. The method according to claim 1, characterized in that, The training process of the preset flood prediction model includes: Obtain the spatiotemporal distribution dataset for target training; The spatiotemporal distribution dataset for training the target is divided into a training sample set and a validation sample set; Based on the loss function, the flood prediction model is iteratively trained using the training sample set until the number of iterations reaches the iteration threshold or the value of the loss function reaches the preset threshold. The flood prediction model trained iteratively was validated using the validation sample set, and the validation results were obtained. If the verification result is greater than a preset threshold, the preset flood prediction model that has been trained is obtained.

8. The method according to claim 7, characterized in that, The acquisition of the spatiotemporal distribution dataset for target training includes: Obtain the spatiotemporal distribution data to be trained; The spatiotemporal distribution data to be trained is preprocessed; Based on the preset flood prediction model, the sample is expanded according to the preprocessed spatiotemporal distribution data to be trained, and the target training spatiotemporal distribution dataset is determined.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method described in any one of claims 1 to 8.