A method and system for predicting urban waterlogging based on historical data
By extracting the characteristics of rainfall forecast data, matching similar data in the historical rainfall database, and combining it with the neural network model to predict water accumulation, it solves the data acquisition and accuracy problems in the existing technology and achieves efficient and accurate prediction of urban water logging.
Patent Information
- Application Number
- CN202111081933.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-15
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-09-15
AI Technical Summary
Existing urban waterlogging prediction methods have difficulties in data acquisition and accuracy. Hydraulic models have high data requirements and large errors, while models based on historical data have large prediction errors and low applicability.
By obtaining rainfall forecast data, extracting its features, and matching similar data from the historical rainfall database, we use similarity judgment and neural network models to predict water accumulation, and combine similarity calculations and repair factors to predict directly or through neural networks.
It achieves efficient use of historical data for water accumulation prediction, simplifies the calculation process, improves prediction accuracy and applicability, and avoids the problem of difficult data acquisition. The designed neural network structure is simple and easy to implement.
Smart Images

Figure CN113780668B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban waterlogging prediction, and in particular to an urban waterlogging prediction method and system based on historical data. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In urban flood prevention work, if it is possible to predict urban waterlogging information based on rainfall forecast information, it will be of great help to urban flood prevention work. Especially when weather forecasts are becoming more and more accurate, making predictions about waterlogging based on weather forecasts can make the forecast more valuable.
[0004] At present, there are two main methods for pre-rainfall prediction of urban waterlogging:
[0005] One method is to process the data of the pipeline network and surface elevation of the area to be predicted, establish a drainage model (such as SWMM), and simulate the calculation based on the hydraulic principle. However, this method has high requirements on the integrity of the pipeline network data in the predicted area and the accuracy of the surface elevation data. On the one hand, such data is difficult to obtain. On the other hand, the high-precision elevation data has confidentiality requirements. Therefore, there will be great obstacles in the practical application of predicting the waterlogging caused by rainfall through hydraulic calculation.
[0006] Another method is to use historical rainfall and waterlogging data for regression, such as training a neural network model, and then input rainfall forecasts into the neural network model to predict waterlogging. This method solves the problem of difficulty in obtaining data, but the model trained by blindly using historical data often has large errors in actual application and is not very applicable. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a method and system for predicting urban waterlogging based on historical data. First, historical data (rainfall data and waterlogging point data) that are the same or similar to the forecast data are sought for use, and a model is trained based on similar historical data. This method can predict waterlogging under future rainfall based on historical data.
[0008] In order to achieve the above purpose, in some embodiments, the following technical solutions are adopted:
[0009] A method for predicting urban waterlogging based on historical data, comprising:
[0010] Obtain rainfall forecast data and extract features of the rainfall forecast data;
[0011] Through similarity judgment, historical rainfall that meets the set similarity requirements is matched from a historical rainfall database as the target rainfall; the historical rainfall database stores historical rainfall data and corresponding water accumulation point data;
[0012] If the match is successful, the water accumulation data corresponding to the target rainfall is output as water accumulation prediction data;
[0013] If the match is unsuccessful, a set number of historical rainfall data and corresponding waterlogging point data are selected according to the similarity from large to small as the training data set of the neural network prediction model; the rainfall forecast data is input into the trained neural network prediction model, and the waterlogging prediction data is output.
[0014] Furthermore, the historical rainfall database stores historical rainfall data and corresponding waterlogging point data;
[0015] The historical rainfall data includes rainfall intensity values at various moments in history;
[0016] The waterlogging point data includes the waterlogging number, the location of the waterlogging point, the time of occurrence of each waterlogging, and the maximum depth of the waterlogging;
[0017] For each waterlogging point, rainfall data associated with the waterlogging point is matched according to the location of the waterlogging point and the time when the waterlogging occurs.
[0018] Furthermore, for each waterlogging point, according to the location of the waterlogging point and the time when the waterlogging occurred, the rainfall data associated with the waterlogging point is matched, specifically including:
[0019] Divide the radar rainfall data into several cells in space, locate the cells where the water accumulation points are located, and use the radar rainfall data of the cells where the water accumulation points are located as target data;
[0020] The data from the time when water accumulation occurred to the beginning of rainfall was selected as the starting data, and the data at the end of rainfall was selected as the ending data.
[0021] Furthermore, the characteristics of the extracted rainfall forecast data specifically include: rainfall amount, rainfall duration, peak intensity and rain peak coefficient.
[0022] Furthermore, similar historical rainfall is matched from the historical rainfall database through similarity judgment, including:
[0023] Considering the restoration factor of water accumulation points, the similarity between the rainfall forecast data and each historical rainfall data in the historical rainfall database is calculated based on rainfall amount, rainfall duration, peak intensity and rain peak coefficient;
[0024] The historical rainfall data with the highest similarity and greater than the set threshold is selected as the target rainfall.
[0025] Furthermore, the similarity calculation is specifically as follows:
[0026]
[0027] Among them, f rep is the repair factor of the water point, H1 and H2 are the rainfall amounts of the two rainfall data respectively, T1 and T2 are the rainfall durations of the two rainfall data respectively, P1 and P2 are the peak intensities of the two rainfall data respectively, and r1 and r2 are the rain peak coefficients of the two rainfall data respectively.
[0028] Furthermore, the training process of the neural network prediction model is specifically as follows:
[0029] Based on rainfall forecast data, a neural network prediction model is constructed for each waterlogging point;
[0030] Select historical rainfall data with similarity greater than a set threshold and the corresponding waterlogging point data as the training data set for the neural network prediction model;
[0031] The neural network prediction model is trained using the training data set to obtain a trained neural network prediction model.
[0032] In other embodiments, the following technical solutions are adopted:
[0033] An urban waterlogging prediction system based on historical data, comprising:
[0034] A data acquisition module is used to acquire rainfall forecast data and extract features of the rainfall forecast data;
[0035] A historical data matching module is used to match historical rainfall that meets the set similarity requirements from a historical rainfall database as target rainfall through similarity judgment; the historical rainfall database stores historical rainfall data and corresponding water accumulation point data;
[0036] The waterlogging prediction module is used to output the waterlogging data corresponding to the target rainfall as the waterlogging prediction data when the match is successful; when the match is unsuccessful, a set number of historical rainfall data and corresponding waterlogging point data are selected according to the similarity from large to small as the training data set of the neural network prediction model; the rainfall forecast data is input into the trained neural network prediction model, and the waterlogging prediction data is output.
[0037] In other embodiments, the following technical solutions are adopted:
[0038] A terminal device includes a processor and a memory, wherein the processor is used to implement various instructions; the memory is used to store multiple instructions, and the instructions are suitable for the processor to load and execute the above-mentioned urban waterlogging prediction method based on historical data.
[0039] In other embodiments, the following technical solutions are adopted:
[0040] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the above-mentioned urban waterlogging prediction method based on historical data.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] (1) The present invention is based on historical rainfall data and waterlogging point data, combined with similarity calculation and neural network prediction. When the corresponding waterlogging point has rainfall forecast data, the historical data of the waterlogging point is used as efficiently as possible, and the historical data is mined to predict the waterlogging data generated by the rainfall data. The use of historical data avoids the practical application difficulties caused by the difficulty in obtaining high-demand data, and the combination of similarity and regression makes the practical application effect better.
[0043] The invention is based on a large number of summaries, and the designed neural network structure is simple and easy to implement, with good prediction effect, and does not require the use of a large amount of data for training, so it is easy to use.
[0044] (2) When the similarity meets the set requirements, the present invention directly predicts the waterlogging data based on the historical data; when the similarity does not meet the set requirements, the present invention combines the neural network to predict the waterlogging data; while simplifying the calculation process, the accuracy of data prediction can be guaranteed.
[0045] (3) The present invention quantifies the judgment of similarity, and the value range of similarity is between 0 and 1, which is helpful for summarizing and setting the threshold. At the same time, the similarity calculation takes into account the repair factor, that is, the impact on the transformation of the waterlogging point, which is more in line with reality.
[0046] Other features and advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 1(a)-(b) are schematic diagrams of association between water accumulation data and rainfall data in an embodiment of the present invention;
[0048] Figure 2 is a flow chart of a method for predicting urban waterlogging based on historical data in an embodiment of the present invention;
[0049] Figure 3Schematic diagram of a neural network model in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0052] Embodiment 1
[0053] In one or more embodiments, a method for predicting urban flooding based on historical data is disclosed, referring to Figure 2 , specifically including the following steps:
[0054] (1) Construct a rainfall history database;
[0055] Data preparation is the process of collecting and storing historical data. Historical data is divided into two categories: one is historical waterlogging data, and the other is historical rainfall data. The rainfall data uses the radar rainfall data which is more commonly used at this stage. The historical data stores the historical radar rainfall data and records the rainfall intensity values at various times in history. The waterlogging data includes the waterlogging number, the location of the waterlogging point, the time of occurrence of each waterlogging, and the maximum depth of the waterlogging.
[0056] For each waterlogging point, find the rainfall data associated with the waterlogging according to the location of the waterlogging point and the time when the waterlogging occurred.
[0057] In terms of space, combined with Figure 1(a)-(b), the radar rainfall data is first divided into 1km*1km cells in space, and then the cell where the water accumulation point is located is located. The radar rainfall data of the target cell is used as the target data. When the water accumulation point crosses multiple cell boundaries, the target data can use the average value of these cells; in terms of time, the data from the time of water accumulation to the beginning of rainfall is selected as the starting data, and the data at the end of rainfall is selected as the ending data. For a water accumulation point, all rainfall data at the water accumulation point are recorded.
[0058] For waterlogging data, its attributes include the start time of waterlogging relative to the start of rainfall, the duration of waterlogging, the maximum waterlogging depth, and the time of maximum waterlogging relative to the start of rainfall;
[0059] For rainfall data, its characteristics that affect waterlogging are selected, including: rainfall amount (mm), rainfall duration (min), peak intensity (mm / h) and rain peak coefficient (referring to the position of the peak in the rainfall interval, with a value range of (0,1)).
[0060] Through the above data processing, for each waterlogging point, there is a set of data corresponding to it, such as the historical data of waterlogging points given in Tables 1 and 2.
[0061] Table 1 Historical data of waterlogging point 01
[0062] Serial number Time of occurrence Water depth (cm) … Rainfall (mm) … 001 201907061524 31 78 002 201908111031 18 57 … … … … …
[0063] Table 2 Historical data of waterlogging point 02
[0064] Serial number Time of occurrence Water depth (cm) … Rainfall (mm) … 001 201907061521 21 78 002 201908111025 13 57 … … … … …
[0065] (2) Obtain rainfall forecast data and extract the characteristics of rainfall forecast data;
[0066] In this embodiment, the rainfall forecast data is obtained through radar rainfall forecast data of the meteorological department. The meteorological department infers radar data in the future (for example, 1 hour) based on radar data from the current to the past (for example, 2 hours) (called radar extrapolated data).
[0067] For rainfall forecast data, the extracted features include: rainfall amount, rainfall duration, peak intensity and rain peak coefficient.
[0068] For a rainfall forecast, if there is a historical rainfall with the same or similar process as the forecast rainfall, the predicted water accumulation can use the corresponding water accumulation when the same or similar rainfall as the forecast rainfall occurs.
[0069] (3) Through similarity judgment, historical rainfall that meets the set similarity requirements is matched from the historical rainfall database as the target rainfall;
[0070] The historical rainfall that meets the set similarity requirement is specifically: historical rainfall data with the highest similarity and a similarity greater than a set threshold.
[0071] In this embodiment, the rainfall similarity is obtained using the following method:
[0072] For rainfall rain1 and rain2 represented by eigenvalues, the similarity is defined as follows:
[0073]
[0074] Among them: R is the similarity, f rep is the repair factor, H is the rainfall, T is the rainfall duration, P is the peak intensity, r is the rain peak coefficient, R∈[0,1], the closer R is to 1, the more similar the rainfall is considered.
[0075] Description: rep Represents the impact factor of the transformation or repair of the waterlogging point. Due to the transformation and repair of the waterlogging point, the reference value of the original historical data has been reduced. Therefore, each repair since the historical rainfall should be accumulated once as a correction factor, that is:
[0076]
[0077] Among them, R i is the multiplier of the ith patch, R i The value of refers to Table 3:
[0078] Table 3
[0079] Processing Type Minor repair Intermediate revision Overhaul Multiplier 0.9 0.7 0.5
[0080] The above method is used to calculate the similarity between the rainfall forecast data and each historical rainfall data in the historical rainfall database;
[0081] Given a set threshold, search the historical database for rainfall whose characteristics are similar to the rainfall forecast data greater than the set threshold.
[0082] If there are multiple historical rainfall data that are greater than the set threshold, the one with the highest similarity is selected as the most similar; if the similarities are the same, the rainfall with the most recent date is the most similar.
[0083] (3) If the match is successful, the water accumulation data corresponding to the target rainfall is output as water accumulation prediction data;
[0084] (4) If the match is unsuccessful, that is, no historical rainfall data with a similarity greater than a set threshold is matched, a set number of historical rainfall data and corresponding waterlogging point data are selected from the highest to the lowest similarity as the training data set for the neural network prediction model; the rainfall forecast data is input into the trained neural network prediction model, and the waterlogging prediction data is output.
[0085] In this embodiment, the historical rainfall data are sorted from large to small according to the similarity, and a set number (for example, 16 pieces) of historical rainfall data with high similarity ranking are selected as a training data set for training the neural network model.
[0086] The training data set is selected based on the principle of similarity as the first order and date as the second order (i.e. the latest data is selected when the similarity is the same).
[0087] For each precipitation forecast data, a neural network is constructed for each water accumulation point.
[0088] Rainfall data considers the amount of rainfall, rainfall duration, peak rainfall intensity and peak coefficient that affect waterlogging. Waterlogging only considers the (maximum) depth of waterlogging. The present invention adopts the structure of artificial neural network Figure 3 shown.
[0089] The neural network uses 1 input layer, 1 output layer, and 2 hidden layers. Each hidden layer contains 6 nodes. Full connections are used between layers. ReLU is selected as the activation function. The mean square error is used as the loss function.
[0090] After the neural network is established, the weight and bias of each node are randomly initialized using the uniform distribution on (-1,1), and then the historical data and rainfall data are used as input, and the corresponding water depth is used as output. The neural network is trained using the back propagation algorithm. The historical data used should not be less than 16 groups. The gradient descent rate during training is set to 0.001, and the termination convergence condition is set to 0.0001.
[0091] The rainfall characteristic data obtained based on the rainfall forecast data is used as input and input into the neural network to calculate the output, which is the predicted water depth value.
[0092] On the one hand, the method of this embodiment uses historical data and rainfall forecast data to achieve the prediction ability of waterlogging, avoiding the problems of high data requirements and difficulty in obtaining data in previous methods. On the other hand, combined with the method of similarity judgment of historical data, first find historical data that is the same or similar to the forecast data for use, and train the model based on similar historical data. Based on a large number of summaries, the designed neural network structure is simple and easy to implement, with good prediction effect, and does not require the use of a large amount of data for training, and is easy to use.
[0093] Embodiment 2
[0094] In one or more embodiments, a system for predicting urban flooding based on historical data is disclosed, comprising:
[0095] A data acquisition module is used to acquire rainfall forecast data and extract features of the rainfall forecast data;
[0096] A historical data matching module is used to match similar historical rainfall from a historical rainfall database as target rainfall through similarity judgment; the historical rainfall database stores historical rainfall data and corresponding water accumulation point data;
[0097] The waterlogging prediction module is used to output the waterlogging data corresponding to the target rainfall as the waterlogging prediction data when the match is successful; when the match is unsuccessful, a set number of historical rainfall data and corresponding waterlogging point data are selected according to the similarity from large to small as the training data set of the neural network prediction model; the rainfall forecast data is input into the trained neural network prediction model, and the waterlogging prediction data is output.
[0098] It should be noted that the specific implementation methods of the above modules have been described in detail in Example 1 and will not be described in detail here.
[0099] Embodiment 3
[0100] In one or more embodiments, a terminal device is disclosed, including a server, the server including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the urban waterlogging prediction method based on historical data in Example 1 when executing the program. For the sake of brevity, it will not be described in detail here.
[0101] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0102] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0103] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
[0104] Embodiment 4
[0105] In one or more embodiments, a computer-readable storage medium is disclosed, in which a plurality of instructions are stored, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the urban waterlogging prediction method based on historical data described in Example 1.
[0106] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for predicting urban waterlogging based on historical data, characterized in that: include: Obtain rainfall forecast data and extract features of the rainfall forecast data; Through similarity judgment, historical rainfall that meets the set similarity requirements is matched from a historical rainfall database as the target rainfall; the historical rainfall database stores historical rainfall data and corresponding water accumulation point data; If the match is successful, the water accumulation data corresponding to the target rainfall is output as water accumulation prediction data; If the match is unsuccessful, select a set number of historical rainfall data and corresponding waterlogging point data according to the similarity from large to small as the training data set of the neural network prediction model; input the rainfall forecast data into the trained neural network prediction model, and output the waterlogging prediction data; for each waterlogging point, match the rainfall data associated with the waterlogging point according to the location of the waterlogging point and the time when the waterlogging occurred; For each waterlogging point, according to the location of the waterlogging point and the time when the waterlogging occurred, the rainfall data associated with the waterlogging point is matched, specifically including: The radar rainfall data is divided into several cells in space, the cells where the water accumulation points are located are located, and the radar rainfall data of the cells where the water accumulation points are located are used as the target data. When the water accumulation points cross the boundaries of multiple cells, the target data uses the average value of these cells; The data from the time when water accumulation occurred to the beginning of rainfall was selected as the starting data, and the data at the end of rainfall was selected as the ending data.
2. The method for predicting urban waterlogging based on historical data as claimed in claim 1, characterized in that: The historical rainfall database stores historical rainfall data and corresponding water accumulation point data; The historical rainfall data includes rainfall intensity values at various moments in history; The water accumulation point data includes the water accumulation number, the location of the water accumulation point, the time of occurrence of each water accumulation and the maximum depth of the water accumulation.
3. The method for predicting urban waterlogging based on historical data as claimed in claim 1, characterized in that: The characteristics of the extracted rainfall forecast data specifically include: rainfall amount, rainfall duration, peak intensity and rain peak coefficient.
4. The method for predicting urban waterlogging based on historical data as claimed in claim 1, characterized in that: Through similarity judgment, similar historical rainfall is matched from the historical rainfall database, including: Considering the restoration factor of water accumulation points, the similarity between the rainfall forecast data and each historical rainfall data in the historical rainfall database is calculated based on rainfall amount, rainfall duration, peak intensity and rain peak coefficient; The historical rainfall data with the highest similarity and greater than the set threshold is selected as the target rainfall.
5. The method for predicting urban waterlogging based on historical data as claimed in claim 4, characterized in that: The similarity calculation is specifically as follows: Among them, f rep is the repair factor of the water point, H1 and H2 are the rainfall amounts of the two rainfall data respectively, T1 and T2 are the rainfall durations of the two rainfall data respectively, P1 and P2 are the peak intensities of the two rainfall data respectively, and r1 and r2 are the rain peak coefficients of the two rainfall data respectively.
6. The method for predicting urban waterlogging based on historical data as claimed in claim 1, characterized in that: The training process of the neural network prediction model is specifically as follows: Based on rainfall forecast data, a neural network prediction model is constructed for each waterlogging point; Select historical rainfall data with similarity greater than a set threshold and the corresponding waterlogging point data as the training data set for the neural network prediction model; The neural network prediction model is trained using the training data set to obtain a trained neural network prediction model.
7. A system for predicting urban waterlogging based on historical data, characterized in that: include: A data acquisition module is used to acquire rainfall forecast data and extract features of the rainfall forecast data; A historical data matching module is used to match historical rainfall that meets the set similarity requirements from a historical rainfall database as target rainfall through similarity judgment; the historical rainfall database stores historical rainfall data and corresponding water accumulation point data; The waterlogging prediction module is used to output the waterlogging data corresponding to the target rainfall as the waterlogging prediction data when the match is successful; when the match is unsuccessful, select a set number of historical rainfall data and the corresponding waterlogging point data according to the similarity from large to small as the training data set of the neural network prediction model; input the rainfall forecast data into the trained neural network prediction model, and output the waterlogging prediction data; for each waterlogging point, match the rainfall data associated with the waterlogging point according to the location of the waterlogging point and the time when the waterlogging occurred; For each waterlogging point, according to the location of the waterlogging point and the time when the waterlogging occurred, the rainfall data associated with the waterlogging point is matched, specifically including: Divide the radar rainfall data into several cells in space, locate the cells where the water accumulation points are located, and use the radar rainfall data of the cells where the water accumulation points are located as the target data. When the water accumulation points cross the boundaries of multiple cells, the target data can use the average value of these cells. The data from the time when water accumulation occurred to the beginning of rainfall was selected as the starting data, and the data at the end of rainfall was selected as the ending data.
8. A terminal device, comprising a processor and a memory, wherein the processor is used to implement each instruction; and the memory is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executing the urban waterlogging prediction method based on historical data as described in any one of claims 1-6.
9. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executing the urban waterlogging prediction method based on historical data as described in any one of claims 1-6.
