Water disaster prediction method and system

By combining the two-dimensional hydrodynamic model and convolutional neural network, the final evaluation model is constructed and real-time prediction is carried out, which solves the problems of high computational complexity and low model accuracy in water conservancy disaster prediction, and achieves fast and high-precision prediction result output.

CN118821629BActive Publication Date: 2024-11-22CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411306086.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-11-22
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The existing water conservancy disaster prediction methods have high computational complexity, which results in a long time output. The deep learning algorithm has a reduced model accuracy due to insufficient training samples, so it is impossible to output accurate prediction results.

Method used

Combining the two-dimensional hydrodynamic model and convolutional neural network, the final evaluation model is constructed through historical water conservancy data, and real-time prediction is used to improve the output speed and accuracy of the prediction results.

Benefits of technology

While quickly outputting prediction results, it improves prediction accuracy, avoids the problem of low prediction efficiency of a single two-dimensional hydrodynamic model, and solves the problem of degradation of model accuracy due to insufficient training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821629B_ABST
    Figure CN118821629B_ABST
Patent Text Reader

Abstract

The present application discloses a method and system for predicting water disasters. The method and system obtain historical water data of a set area, and then use a preset two-dimensional hydrodynamic model to predict the historical water data and then construct a convolutional neural network based on the prediction results output to generate a final evaluation model. Finally, real-time prediction is performed based on the currently acquired water data to achieve the combination of the two-dimensional hydrodynamic model and the convolutional neural network to generate the final evaluation model, thereby avoiding the problem of low prediction efficiency when using a single two-dimensional hydrodynamic model for prediction. At the same time, the final evaluation model is constructed by using historical water data to solve the problem that the evaluation model is prone to a decrease in model accuracy due to insufficient training samples, thereby achieving the effect of improving the prediction efficiency of the prediction results while improving the prediction accuracy of the prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of water conservancy projects, and in particular to a method and system for predicting water conservancy disasters. Background Art

[0002] Flash floods are a sudden and destructive natural disaster that poses a serious threat to people's lives and property. Accurately predicting the flooded areas is of great significance for taking preventive measures in advance and reducing disaster losses. However, the flash flood inundation area prediction method currently used is mainly based on hydrodynamic models for prediction, but the existing water disaster prediction models generally have high computational complexity, resulting in a long time to output results. In order to solve the above problems, technicians have also begun to use deep learning algorithms to predict water disasters. Deep learning algorithms can improve the output speed of prediction results, but deep learning algorithms also have the problem of being easy to reduce model accuracy due to insufficient training samples, resulting in the inability to output accurate prediction results. Therefore, how to implement a water disaster prediction method that can quickly output prediction results while improving the prediction accuracy of prediction results has become an urgent problem to be solved. Summary of the invention

[0003] Based on this, it is necessary to propose a water disaster prediction method and system that can simultaneously improve the output speed and prediction accuracy of prediction results in response to the above problems.

[0004] The present invention provides a water disaster prediction method for predicting water disasters in a set area, comprising:

[0005] S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0006] S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0007] S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model;

[0008] S4. Acquire current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area.

[0009] Furthermore, the step S1 specifically includes:

[0010] S1a, obtaining the historical water conservancy data of the set area, and determining whether there are missing values ​​in each data field of the historical water conservancy data;

[0011] S1b, if yes, then when the missing value is less than the preset threshold, obtain the relevant data variable corresponding to the data field from the historical water conservancy data ;

[0012] S1c, get the preset regression coefficient and the error term , and the relevant data variables , the regression coefficient And the error term Input into the preset missing value compensation formula for calculation, the missing value compensation formula is specifically embodied as:

[0013] ;

[0014] S1d, replacing the missing value with the compensation value output by the missing value compensation formula , thereby supplementing the missing values ​​in the data field;

[0015] S1e, generating the two-dimensional hydrodynamic model according to the historical hydraulic data.

[0016] The method for predicting water disasters according to claim 2, characterized in that after step S1d, it further comprises:

[0017] S1f, after sorting each of the data fields, calculate the hash value corresponding to each segment of the data field;

[0018] S1g, recording the data fields with the same hash value as data to be merged;

[0019] S1h, after retaining the first data to be merged that appears after sorting, delete the rest of the data to be merged.

[0020] Furthermore, after step S1h, the method further includes:

[0021] S1i, obtain the mean value of each of the data fields and standard deviation ;

[0022] S1j, according to the mean and the standard deviation Calculate the upper and lower thresholds that match the data field, and the upper and lower thresholds are specifically embodied as follows: ;

[0023] S1k, when a data point of the data field exceeds the set range of the upper and lower thresholds, the data point is recorded as an abnormal value data point, and it is determined whether the abnormal value data point forms a continuous abnormal value segment in the data field;

[0024] S11, if yes, then obtain a preset cubic spline interpolation formula, which is specifically embodied as:

[0025] ;

[0026] Among them, the is the data point known to have no outliers, is the preset spline basis function, is the correction factor of the output;

[0027] S1m, performing outlier correction on the outlier segment according to the correction coefficient.

[0028] Furthermore, the step S2 specifically includes:

[0029] S2a, setting the output interval of the two-dimensional hydrodynamic model;

[0030] S2b, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, and outputting the water conservancy prediction data once after each output interval;

[0031] S2c, recording each of the output water conservancy prediction data and the time nodes matched therewith as the water conservancy prediction data of the set area at each of the time nodes.

[0032] Furthermore, the step S3 specifically includes:

[0033] S3a, converting the water conservancy prediction data into a format The input data matrix is is the preset number of grids in the horizontal direction of the matrix. is the preset number of grids in the vertical direction of the matrix. is a first preset channel number of the input data matrix;

[0034] S3b, inputting the input data matrix into a set polynomial fitting formula for training, wherein the polynomial fitting formula is specifically embodied as:

[0035] ;

[0036] Among them, the is the preset activation function, and the are respectively the first weight value and the second weight value to be adjusted, and the are respectively a first bias coefficient and a second bias coefficient to be adjusted;

[0037] S3c, adjusting the first weight value, the second weight value, the first bias coefficient and the second bias coefficient to fit the input With output The relationship between the output For Format The output data matrix is A second preset number of channels for the output data matrix;

[0038] S3d, obtaining a preset convolution operation formula, wherein the convolution operation formula is specifically embodied as follows:

[0039] ;

[0040] Among them, the For input data, the is the preset convolution kernel, and the Set the horizontal size and the vertical size of the convolution kernel respectively;

[0041] S3e, using the convolution operation formula as an encoder, obtaining a preset upsampling convolution module as a decoder, and forming the final evaluation model according to the encoder and the decoder.

[0042] Furthermore, after step S3, the method further includes:

[0043] S3f, calculating the data gradient of each output data matrix at the corresponding time node, wherein the data gradient is specifically embodied as:

[0044] ;

[0045] Among them, the For the The gradient value of the output data matrix at each time node, For the The gradient value of the output data matrix at each time node, is the preset loss function;

[0046] S3g, the first-order moment estimation value and the second-order moment estimation value of the output data matrix are calculated based on the gradient value, and the preset first-order moment estimation value calculation formula and the second-order moment estimation value calculation formula are respectively embodied as:

[0047] ;

[0048] Among them, the and the are respectively a preset first attenuation rate and a preset second attenuation rate, and the are the first-order moment estimate and the second-order moment estimate outputted respectively;

[0049] S3h, updating the input parameters of the final evaluation model used in model training after performing deviation correction on the first attenuation rate and the second attenuation rate;

[0050] S3i, calculating the loss function of the final evaluation model, and adding the loss function to the training process of the final evaluation model to perform output correction;

[0051] S3j, determine whether the difference between the output data matrix output by the final evaluation model after the output correction is completed and the water conservancy prediction data is less than a preset value, if so, execute step S4.

[0052] Furthermore, the step S3h specifically includes:

[0053] S3K, inputting the first attenuation rate into a first deviation correction formula for calculation, wherein the first deviation correction formula is specifically embodied as:

[0054] ;

[0055] S31, inputting the second attenuation rate into a second deviation correction formula for calculation, wherein the second deviation correction formula is specifically embodied as:

[0056] ;

[0057] S3m, the first corrected attenuation rate after deviation correction and the second corrected decay rate The input is input into a preset update parameter calculation formula for calculation, thereby updating the input parameters used by the final evaluation model during model training. The update parameter calculation formula is specifically embodied as follows:

[0058] ;

[0059] Among them, the is the preset learning rate coefficient, is a preset constant, That is the input parameter.

[0060] Furthermore, the step S3i specifically includes:

[0061] S3n, obtaining a preset mean square error calculation formula, and inputting the input parameters into the mean square error calculation formula for calculation, wherein the mean square error calculation formula is specifically embodied as:

[0062] ;

[0063] Among them, the Refers to the number of samples input, Refers to the water conservancy prediction data output by the two-dimensional hydrodynamic model, is the data gradient output by the final evaluation model, and the MSE is the mean square error of the output;

[0064] S3o, minimizing the mean square error (MSE) when the final evaluation model is iteratively trained, thereby updating and optimizing the final evaluation model.

[0065] The present invention also provides a water disaster prediction system for predicting water disasters in a set area, which is characterized by comprising:

[0066] An information acquisition unit, used to acquire historical water conservancy data of a set area, wherein the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0067] A historical prediction unit, used for inputting the historical water conservancy data into the two-dimensional hydrodynamic model to perform data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0068] A model building unit, used to build a convolutional neural network according to each of the water conservancy prediction data, so as to generate a final evaluation model;

[0069] The real-time prediction unit is used to obtain the current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, so as to obtain the prediction result of the set area.

[0070] The present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0071] S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0072] S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0073] S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model;

[0074] S4. Acquire current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area.

[0075] The present invention also provides a computer-readable medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:

[0076] S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0077] S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0078] S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model;

[0079] S4. Acquire current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area.

[0080] The above-mentioned water conservancy disaster prediction method and system obtains historical water conservancy data of a set area, and then uses a preset two-dimensional hydrodynamic model to predict the historical water conservancy data and then constructs a convolutional neural network based on the prediction results to generate a final evaluation model. Finally, real-time prediction is performed based on the currently acquired water conservancy data to achieve the combination of the two-dimensional hydrodynamic model and the convolutional neural network to generate the final evaluation model, thereby avoiding the problem of low prediction efficiency when using a single two-dimensional hydrodynamic model for prediction. At the same time, the final evaluation model is constructed by historical water conservancy data, which solves the problem that the evaluation model is prone to a decrease in model accuracy due to insufficient training samples, thereby achieving the effect of improving the prediction efficiency of the prediction results while improving the prediction accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0082] Figure 1 A method flow chart of a water disaster prediction method in one embodiment;

[0083] Figure 2 A system structure diagram of a water disaster prediction system in one embodiment;

[0084] Figure 3 1 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0085] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0086] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0087] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0088] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0089] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by ordinary technicians in the field to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0090] refer to Figure 1 The present invention provides a water disaster prediction method for predicting water disasters in a set area, comprising:

[0091] S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0092] As described in the above step S1, the background system obtains the historical water conservancy data of the set area. It can be understood that, in this embodiment, the set area is a mountainous area set by the user and needs to be predicted for the flash flood inundation area, and the historical water conservancy data is actually the hydrological data and terrain data of the set area in the historical flash flood events. At the same time, the format of the hydrological data and the terrain data is a digital elevation model format (i.e., the data matrix), which is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0093] In addition, in this embodiment, the hydrodynamic model includes: SynxFlow, Triton and Telemac. It can be understood that SynxFlow, Triton and Telemac are all hydrodynamic bionic software, which can be used to simulate the hydrodynamic model according to the hydrological data and the terrain data.

[0094] S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0095] As described in the above step S2, the background system inputs the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction. It can be understood that, in this embodiment, the historical water conservancy data includes the data matrix (i.e., the hydrological data and the terrain data), and the data matrix contains rainfall, soil friction coefficient, initial water level and initial flow velocity. At the same time, the background system sets the interval between each time node to 10 minutes. At this time, the two-dimensional hydrodynamic model can output the water conservancy prediction data once every 10 minutes, thereby obtaining the water conservancy prediction data of the set area at each time node.

[0096] S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model;

[0097] As described in the above step S3, the background system constructs a convolutional neural network based on the data matrix obtained in each time node. It can be understood that the convolutional neural network can process high-dimensional data input, automatically learn features and patterns from a large amount of historical hydrodynamic data (i.e., the water conservancy prediction data), and capture the nonlinear relationship between various factors such as rainfall, topography, soil type, and the formation of flash floods, so as to achieve the final prediction effect. At the same time, after the background system completes the construction of the convolutional neural network, it trains the convolutional neural network to generate the final evaluation model for prediction.

[0098] In addition, after the final evaluation model is generated, the user can use the deep learning framework to deploy the trained final evaluation model on a server with GPU / NPU, and use Docker+graphics card+fastapi to encapsulate the final evaluation model into a service item, thereby facilitating migration and deployment.

[0099] S4. Acquire current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area.

[0100] As described in step S4 above, the background system obtains the current water conservancy data of the set area, and inputs the current water conservancy data into the final evaluation model for prediction, thereby obtaining the prediction result of the set area, which is convenient for monitoring personnel to make personnel evacuation plans in advance.

[0101] It can be understood that, in this embodiment, the prediction result is actually the predicted flooded area of ​​the set area.

[0102] It can be understood that, compared with the existing prediction methods using the hydrodynamic model for prediction, the technical solution of the present invention constructs a specific scheme for applying convolutional neural networks to flood inundation, while determining the input and output formats of the prediction data, and provides a specific implementation technical solution, thereby overcoming the shortcomings of the existing hydrodynamic model.

[0103] This embodiment uses the above method to obtain historical water conservancy data of a set area, and then uses a preset two-dimensional hydrodynamic model to predict the historical water conservancy data and then construct a convolutional neural network based on the prediction results output to generate a final evaluation model. Finally, real-time prediction is performed based on the currently acquired water conservancy data to achieve the combination of the two-dimensional hydrodynamic model and the convolutional neural network to generate the final evaluation model, thereby avoiding the problem of low prediction efficiency when using a single two-dimensional hydrodynamic model for prediction. At the same time, the final evaluation model is constructed by using historical water conservancy data, which solves the problem that the evaluation model is prone to a decrease in model accuracy due to insufficient training samples, thereby achieving the effect of improving the prediction efficiency of the prediction results while improving the prediction accuracy of the prediction results.

[0104] In one embodiment, the step S1 specifically includes:

[0105] S1a, obtaining the historical water conservancy data of the set area, and determining whether there are missing values ​​in each data field of the historical water conservancy data;

[0106] S1b, if yes, then when the missing value is less than the preset threshold, obtain the relevant data variable corresponding to the data field from the historical water conservancy data ;

[0107] S1c, get the preset regression coefficient and the error term , and the relevant data variables , the regression coefficient And the error term Input into the preset missing value compensation formula for calculation, the missing value compensation formula is specifically embodied as:

[0108] ;

[0109] S1d, replacing the missing value with the compensation value output by the missing value compensation formula , thereby supplementing the missing values ​​in the data field;

[0110] S1e, generating the two-dimensional hydrodynamic model according to the historical hydraulic data.

[0111] As described in the above embodiment, the background system performs data cleaning on the acquired historical water conservancy data, which is specifically embodied in that the background system determines whether there are missing values ​​in each of the data fields in the historical water conservancy data. If not, the historical water conservancy data is processed normally. If so, it is determined whether the missing value is greater than a set threshold. In this embodiment, the set threshold is 30%. When the background system determines that the missing value is greater than the set threshold, the data field is deleted. When the missing value is less than the set threshold, the background system obtains the relevant data variables corresponding to the data field from the historical water conservancy data. , then the background system obtains the preset regression coefficient and the error term , and the relevant data variables , the regression coefficient And the error term Input into the preset missing value compensation formula for calculation, the missing value compensation formula is specifically embodied as:

[0112] ;

[0113] The background system replaces the missing value with the compensation value output by the missing value compensation formula , thereby completing the missing values ​​in the data field and generating the two-dimensional hydrodynamic model according to the historical water conservancy data.

[0114] In one embodiment, after step S1d, the following further steps are included:

[0115] S1f, after sorting each of the data fields, calculate the hash value corresponding to each segment of the data field;

[0116] S1g, recording the data fields with the same hash value as data to be merged;

[0117] S1h, after retaining the first data to be merged that appears after sorting, delete the rest of the data to be merged.

[0118] As described in the above embodiment, the background system sorts the data fields according to key fields such as time and monitoring points contained in the data fields, and then the background system calculates the hash values ​​corresponding to the data fields in each segment, and records the data fields with the same hash values ​​as data to be merged. After that, the background system retains the first data to be merged that appears after sorting, and deletes the remaining data to be merged, thereby completing the duplicate data processing for the data to be merged.

[0119] In one embodiment, after step S1h, the following steps are further included:

[0120] S1i, obtain the mean value of each of the data fields and standard deviation ;

[0121] S1j, according to the mean and the standard deviation Calculate the upper and lower thresholds that match the data field, and the upper and lower thresholds are specifically embodied as follows: ;

[0122] S1k, when a data point of the data field exceeds the set range of the upper and lower thresholds, the data point is recorded as an abnormal value data point, and it is determined whether the abnormal value data point forms a continuous abnormal value segment in the data field;

[0123] S11, if yes, then obtain a preset cubic spline interpolation formula, which is specifically embodied as:

[0124] ;

[0125] Among them, the is the data point known to have no outliers, is the preset spline basis function, is the correction factor of the output;

[0126] S1m, performing outlier correction on the outlier segment according to the correction coefficient.

[0127] As described in the above embodiment, the background system obtains the mean value of each data field and standard deviation , and according to the mean and the standard deviation Calculate the upper and lower thresholds that match the data field, and the upper and lower thresholds are specifically embodied as follows: , then the background system determines whether the data point of the data field exceeds the set range of the upper and lower thresholds. If so, the data point is recorded as an abnormal value data point, and it is determined whether the abnormal value data point forms a continuous abnormal value segment in the data field. If not, the abnormal value data point is determined to be an isolated abnormal point, and the average value of the adjacent data is used for correction. If so, the background system obtains a preset cubic spline interpolation formula, and the cubic spline interpolation formula is specifically embodied as:

[0128] ;

[0129] Among them, the is the data point known to have no outliers, is the preset spline basis function, is the correction factor of the output;

[0130] The background system can then use the correction coefficient The abnormal value segment is subjected to abnormal value correction, thereby completing the abnormal value processing of each of the data fields.

[0131] In one embodiment, the step S2 specifically includes:

[0132] S2a, setting the output interval of the two-dimensional hydrodynamic model;

[0133] S2b, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, and outputting the water conservancy prediction data once after each output interval;

[0134] S2c, recording each of the output water conservancy prediction data and the time nodes matched therewith as the water conservancy prediction data of the set area at each of the time nodes.

[0135] As described in the above embodiment, the background system sets the output interval of the two-dimensional hydrodynamic model. In this embodiment, the output interval is 10 minutes. At this time, the background system inputs the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, and outputs the water conservancy prediction data once every 10 minutes. After that, the background system records each of the output water conservancy prediction data and the time nodes matching them as the water conservancy prediction data of the set area at each time node.

[0136] In one embodiment, the step S3 specifically includes:

[0137] S3a, converting the water conservancy prediction data into a format The input data matrix is is the preset number of grids in the horizontal direction of the matrix. is the preset number of grids in the vertical direction of the matrix. is a first preset channel number of the input data matrix;

[0138] S3b, inputting the input data matrix into a set polynomial fitting formula for training, wherein the polynomial fitting formula is specifically embodied as:

[0139] ;

[0140] Among them, the is the preset activation function, and the are respectively the first weight value and the second weight value to be adjusted, and the are respectively a first bias coefficient and a second bias coefficient to be adjusted;

[0141] S3c, adjusting the first weight value, the second weight value, the first bias coefficient and the second bias coefficient to fit the input With output The relationship between the output For Format The output data matrix is A second preset number of channels for the output data matrix;

[0142] S3d, obtaining a preset convolution operation formula, wherein the convolution operation formula is specifically embodied as follows:

[0143] ;

[0144] Among them, the For input data, the is the preset convolution kernel, and the Set the horizontal size and the vertical size of the convolution kernel respectively;

[0145] S3e, using the convolution operation formula as an encoder, obtaining a preset upsampling convolution module as a decoder, and forming the final evaluation model according to the encoder and the decoder.

[0146] As described in the above embodiment, the background system converts the water conservancy forecast data into the format The input data matrix is is the preset number of grids in the horizontal direction of the matrix. is the preset number of grids in the vertical direction of the matrix. is the first preset number of channels of the input data matrix. It can be understood that, in this embodiment, the first preset number of channels is 5. Therefore, in this embodiment, the input data matrix middle, , They represent the number of grids in the horizontal direction and the number of grids in the vertical direction respectively. The six channels represent different data types contained in the water conservancy prediction data (such as the input data matrix, soil friction coefficient, rainfall, initial water level, x-direction velocity component, y-direction velocity component, etc.). Then, the background system inputs the input data matrix into the set polynomial fitting formula for training. The polynomial fitting formula is specifically embodied as follows:

[0147] ;

[0148] It can be understood that in this embodiment, the is the preset activation function, and the are respectively the first weight value and the second weight value to be adjusted, and the are the first bias coefficient and the second bias coefficient to be adjusted respectively, and then the background system adjusts the first weight value, the second weight value, the first bias coefficient and the second bias coefficient to fit the input With output The relationship between the output For Format The output data matrix is is the second preset channel number of the output data matrix. It can be understood that, in this embodiment, the second preset channel number is 3, and in this embodiment, the 3 channels of the output data matrix represent the predicted water level, the x-direction flow velocity component and the y-direction flow velocity component respectively;

[0149] Afterwards, the background system obtains a preset convolution operation formula, which is specifically embodied as follows:

[0150] ;

[0151] Among them, the For input data, the is the preset convolution kernel, and the The horizontal size and the vertical size of the convolution kernel are set respectively. Finally, the background system uses the convolution operation formula as an encoder and the preset upsampling convolution module as a decoder, and finally forms the final evaluation model according to the encoder and the decoder.

[0152] It can be understood that in order to improve the water level and flow prediction ability of the final assessment model based on different terrain data, the background system can randomly adjust the terrain (water level, flow) data contained in the input data matrix, thereby performing data augmentation on the input data matrix, thereby achieving the effect of improving the flood inundation prediction ability of the final assessment model.

[0153] In one embodiment, after step S3, the following steps are further included:

[0154] S3f, calculating the data gradient of each output data matrix at the corresponding time node, wherein the data gradient is specifically embodied as:

[0155] ;

[0156] Among them, the For the The gradient value of the output data matrix at each time node, For the The gradient value of the output data matrix at each time node, is the preset loss function;

[0157] S3g, the first-order moment estimation value and the second-order moment estimation value of the output data matrix are calculated based on the gradient value, and the preset first-order moment estimation value calculation formula and the second-order moment estimation value calculation formula are respectively embodied as:

[0158] ;

[0159] Among them, the and the are respectively a preset first attenuation rate and a preset second attenuation rate, and the are the first-order moment estimate and the second-order moment estimate outputted respectively;

[0160] S3h, updating the input parameters of the final evaluation model used in model training after performing deviation correction on the first attenuation rate and the second attenuation rate;

[0161] S3i, calculating the loss function of the final evaluation model, and adding the loss function to the training process of the final evaluation model to perform output correction;

[0162] S3j, determine whether the difference between the output data matrix output by the final evaluation model after the output correction is completed and the water conservancy prediction data is less than a preset value, if so, execute step S4.

[0163] As described in the above embodiment, the background system uses each of the output data matrices to train the final evaluation model. The specific method is: by adjusting the model parameters of the final evaluation model, the prediction results output by the final evaluation model are as close as possible to the simulation results output by the hydrodynamic model. During the training process, Stochastic Gradient Descent (SGD) and its variant algorithms are used to adjust the parameters of the final evaluation model. A commonly used variant is the Adam optimization algorithm, which combines the ideas of momentum and adaptive learning rate. It dynamically adjusts the learning rate of each parameter by calculating the first-order moment estimate (i.e., momentum) and the second-order moment estimate (i.e., the exponentially weighted average of the square of the gradient) of the gradient. Specifically, the update rules of the Adam algorithm are as follows:

[0164] The backend system calculates the data gradient of each output data matrix at the corresponding time node, and the data gradient is specifically embodied as follows:

[0165] ;

[0166] It can be understood that in this embodiment, the For the The gradient value of the output data matrix at each time node, For the The gradient value of the output data matrix at each time node, is a preset loss function, and then the background system calculates the first-order moment estimate and the second-order moment estimate of the output data matrix according to the gradient value. The preset first-order moment estimate calculation formula and the second-order moment estimate calculation formula are respectively embodied as follows:

[0167] ;

[0168] It can be understood that in this embodiment, the and the are respectively a preset first attenuation rate and a preset second attenuation rate, and the They are the first-order moment estimate and the second-order moment estimate outputted respectively. After that, the background system corrects the deviation of the first attenuation rate and the second attenuation rate, updates the input parameters used by the final evaluation model in model training, and finally infers the loss function of the final evaluation model. In the training process of the final evaluation model, the loss function is added to perform output correction. Finally, the background system determines whether the difference between the output data matrix outputted by the final evaluation model after the output correction and the water conservancy prediction data is less than a preset value. If so, execute step S4 to complete the step of adjusting the parameters in the final evaluation model through the Adam algorithm.

[0169] In one embodiment, the step S3h specifically includes:

[0170] S3K, inputting the first attenuation rate into a first deviation correction formula for calculation, wherein the first deviation correction formula is specifically embodied as:

[0171] ;

[0172] S31, inputting the second attenuation rate into a second deviation correction formula for calculation, wherein the second deviation correction formula is specifically embodied as:

[0173] ;

[0174] S3m, the first corrected attenuation rate after deviation correction and the second corrected decay rate The input is input into a preset update parameter calculation formula for calculation, thereby updating the input parameters used by the final evaluation model during model training. The update parameter calculation formula is specifically embodied as follows:

[0175] ;

[0176] Among them, the is the preset learning rate coefficient, is a preset constant, That is the input parameter.

[0177] As described in the above embodiment, the background system inputs the first attenuation rate into the first deviation correction formula for calculation, and the first deviation correction formula is specifically embodied as follows:

[0178] ;

[0179] At the same time, the background system also inputs the second attenuation rate into the second deviation correction formula for calculation. The second deviation correction formula is specifically embodied as follows:

[0180] ;

[0181] Then, the background system will use the first corrected attenuation rate after deviation correction And the second corrected attenuation rate The input is input into a preset update parameter calculation formula for calculation, thereby updating the input parameters used by the final evaluation model during model training. The update parameter calculation formula is specifically embodied as follows:

[0182] ;

[0183] It can be understood that in this embodiment, the is the preset learning rate coefficient, is a preset constant, That is, it is the input parameter. At this time, the background system can achieve the technical effect of updating the input parameters used by the final evaluation model during model training.

[0184] In one embodiment, the step S3i specifically includes:

[0185] S3n, obtaining a preset mean square error calculation formula, and inputting the input parameters into the mean square error calculation formula for calculation, wherein the mean square error calculation formula is specifically embodied as:

[0186] ;

[0187] Among them, the Refers to the number of samples input, Refers to the water conservancy prediction data output by the two-dimensional hydrodynamic model, is the data gradient output by the final evaluation model, and the MSE is the mean square error of the output;

[0188] S3o, minimizing the mean square error (MSE) when the final evaluation model is iteratively trained, thereby updating and optimizing the final evaluation model.

[0189] As described in the above embodiment, the background system obtains a preset mean square error calculation formula, and inputs the input parameters into the mean square error calculation formula for calculation. The mean square error calculation formula is specifically embodied as follows:

[0190] ;

[0191] It can be understood that in this embodiment, the Refers to the number of samples input, Refers to the water conservancy prediction data output by the two-dimensional hydrodynamic model, The data gradient output by the final evaluation model, the MSE is the mean square error of the output, and then the background system minimizes the mean square error MSE when iteratively training the final evaluation model, thereby updating and optimizing the final evaluation model;

[0192] It can be understood that in this embodiment, during the training of the final evaluation model, the parameters of the encoder-decoder model (i.e., the final evaluation model) are adjusted by minimizing the MSE loss function. At each iteration, the input data (including the input data matrix, soil friction coefficient, rainfall, initial water level, x-direction velocity component, y-direction velocity component) are fed into the model to obtain the predicted water level, x-direction velocity component, and y-direction velocity component (i.e., the output data matrix). Then, the difference between the prediction result of the final evaluation model and the hydrodynamic simulation result is used.

[0193] It is understandable that the back propagation algorithm actually used in this embodiment will propagate the error from the output layer back to each layer of the network according to the gradient of the loss function to update the weights and biases in the network. Through continuous iterative training, the model gradually learns the relationship between the input features and the output results, so that the prediction results of the final evaluation model are as close as possible to the simulation results output by the hydrodynamic model.

[0194] In addition, when the background system model evaluates and optimizes the final evaluation model, the test data (i.e., the historical water conservancy data) is used to evaluate the final evaluation model, and the MAE, MSE, RMSE and IOU indicators of the flooded area of ​​the prediction results are calculated. The final evaluation model is optimized according to the evaluation results, such as adjusting the model results, adding training data, etc. It can be understood that in this embodiment, the mean square error (MSE) is the average of the squares of the difference between the predicted value output by the final evaluation model and the predicted value output by the hydrodynamic model, the root mean square error (RMSE) is the square root of the MSE, the mean absolute error (MAE) is the average of the absolute values ​​of the difference between the predicted value output by the final evaluation model and the predicted value output by the hydrodynamic model, and the IOU (Intersection over Union) difference is the degree of overlap between the predicted value output by the final evaluation model and the predicted value output by the hydrodynamic model.

[0195] refer to Figure 2 The present invention also provides a water disaster prediction system for predicting water disasters in a set area, comprising:

[0196] An information acquisition unit 10 is used to acquire historical water conservancy data of a set area, wherein the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0197] A historical prediction unit 20, used for inputting the historical water conservancy data into the two-dimensional hydrodynamic model to perform data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0198] A model building unit 30, used to build a convolutional neural network according to each of the water conservancy prediction data, so as to generate a final evaluation model;

[0199] The real-time prediction unit 40 is used to obtain the current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, so as to obtain the prediction result of the set area.

[0200] The above-mentioned units are used to implement the above-mentioned water disaster prediction system, and will not be introduced one by one here.

[0201] FIG. 3 shows an internal structure diagram of a computer device in one embodiment. The computer device may be a server, including but not limited to a high-performance computer and a high-performance computer cluster. Figure 3 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the water disaster prediction method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may execute the water disaster prediction method.

[0202] In one embodiment, the water disaster prediction method provided by the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 3 The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the water disaster prediction system. For example: 10 - information acquisition unit, 20 - historical prediction unit, 30 - model building unit, 40 - real-time prediction unit.

[0203] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0204] S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model;

[0205] S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node;

[0206] S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model;

[0207] S4. Acquire current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area.

[0208] From the above embodiments, it can be seen that the greatest beneficial effect of the present invention is that by acquiring historical water conservancy data of a set area, and then using a preset two-dimensional hydrodynamic model to predict the historical water conservancy data and then outputting a convolutional neural network to construct a final evaluation model, and finally realizing real-time prediction based on the currently acquired water conservancy data, the final evaluation model is generated by combining the two-dimensional hydrodynamic model and the convolutional neural network, thereby avoiding the problem of low prediction efficiency when using a single two-dimensional hydrodynamic model for prediction. At the same time, the final evaluation model is constructed by using historical water conservancy data, which solves the problem that the evaluation model is prone to a decrease in model accuracy due to insufficient training samples, thereby achieving the effect of improving the prediction efficiency of the prediction results while improving the prediction accuracy of the prediction results.

[0209] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for predicting water disasters, used to predict water disasters in a set area, characterized in that: include: S1. Acquire historical water conservancy data of a set area, where the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model; S2, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, thereby outputting water conservancy prediction data for the set area at each time node; S3, constructing a convolutional neural network according to each of the water conservancy prediction data, thereby generating a final evaluation model; S4, obtaining current water conservancy data of the set area, and inputting the current water conservancy data into the final evaluation model for prediction, thereby obtaining a prediction result of the set area; After step S3, the method further includes: S3f, calculating the data gradient of each output data matrix at the corresponding time node, wherein the data gradient is specifically embodied as: ; Among them, the For the The gradient value of the output data matrix at each time node, For the The gradient value of the output data matrix at each time node, is the preset loss function; S3g, the first-order moment estimation value and the second-order moment estimation value of the output data matrix are calculated based on the gradient value, and the preset first-order moment estimation value calculation formula and the second-order moment estimation value calculation formula are respectively embodied as: ; Among them, the and the are respectively a preset first attenuation rate and a preset second attenuation rate, and the are the first-order moment estimate and the second-order moment estimate outputted respectively; S3h, updating the input parameters of the final evaluation model used in model training after performing deviation correction on the first attenuation rate and the second attenuation rate; S3i, calculating the loss function of the final evaluation model, and adding the loss function to the training process of the final evaluation model to perform output correction; S3j, determining whether the difference between the output data matrix output by the final evaluation model after the output correction and the water conservancy prediction data is less than a preset value, if so, executing step S4; and The step S3h specifically includes: S3K, inputting the first attenuation rate into a first deviation correction formula for calculation, wherein the first deviation correction formula is specifically embodied as: ; S31, inputting the second attenuation rate into a second deviation correction formula for calculation, wherein the second deviation correction formula is specifically embodied as: ; S3m, the first corrected attenuation rate after deviation correction and the second corrected decay rate The input is input into a preset update parameter calculation formula for calculation, thereby updating the input parameters used by the final evaluation model during model training. The update parameter calculation formula is specifically embodied as follows: ; Among them, the is the preset learning rate coefficient, is a preset constant, That is the input parameter.

2. The water disaster prediction method according to claim 1, characterized in that: The step S1 specifically includes: S1a, obtaining the historical water conservancy data of the set area, and determining whether there are missing values ​​in each data field of the historical water conservancy data; S1b, if yes, then when the missing value is less than the preset threshold, obtain the relevant data variable corresponding to the data field from the historical water conservancy data ; S1c, get the preset regression coefficient and the error term , and the relevant data variables , the regression coefficient And the error term Input into the preset missing value compensation formula for calculation, the missing value compensation formula is specifically embodied as: ; S1d, replacing the missing value with the compensation value output by the missing value compensation formula , thereby supplementing the missing values ​​in the data field; S1e, generating the two-dimensional hydrodynamic model according to the historical hydraulic data.

3. The water disaster prediction method according to claim 2, characterized in that: After step S1d, the method further includes: S1f, after sorting each of the data fields, calculate the hash value corresponding to each segment of the data field; S1g, recording the data fields with the same hash value as data to be merged; S1h, after retaining the first data to be merged that appears after sorting, delete the rest of the data to be merged.

4. The water disaster prediction method according to claim 3, characterized in that: After step S1h, the method further includes: S1i, obtain the mean value of each of the data fields and standard deviation ; S1j, according to the mean and the standard deviation Calculate the upper and lower thresholds that match the data field, and the upper and lower thresholds are specifically embodied as follows: ; S1k, when a data point of the data field exceeds the set range of the upper and lower thresholds, the data point is recorded as an abnormal value data point, and it is determined whether the abnormal value data point forms a continuous abnormal value segment in the data field; S11, if yes, then obtain a preset cubic spline interpolation formula, which is specifically embodied as: ; Among them, the is the data point known to have no outliers, is the preset spline basis function, is the correction factor of the output; S1m, performing outlier correction on the outlier segment according to the correction coefficient.

5. The water disaster prediction method according to claim 1, characterized in that: The step S2 specifically includes: S2a, setting the output interval of the two-dimensional hydrodynamic model; S2b, inputting the historical water conservancy data into the two-dimensional hydrodynamic model for data prediction, and outputting the water conservancy prediction data once after each output interval; S2c, recording each of the output water conservancy prediction data and the time nodes matched therewith as the water conservancy prediction data of the set area at each of the time nodes.

6. The water disaster prediction method according to claim 1, characterized in that: The step S3 specifically includes: S3a, converting the water conservancy prediction data into a format The input data matrix is is the preset number of grids in the horizontal direction of the matrix. is the preset number of grids in the vertical direction of the matrix. is a first preset channel number of the input data matrix; S3b, inputting the input data matrix into a set polynomial fitting formula for training, wherein the polynomial fitting formula is specifically embodied as: ; Among them, the is the preset activation function, and the are respectively the first weight value and the second weight value to be adjusted, and the are respectively a first bias coefficient and a second bias coefficient to be adjusted; S3c, adjusting the first weight value, the second weight value, the first bias coefficient and the second bias coefficient to fit the input With output The relationship between the output For Format The output data matrix is A second preset number of channels for the output data matrix; S3d, obtaining a preset convolution operation formula, wherein the convolution operation formula is specifically embodied as follows: ; Among them, the For input data, the is the preset convolution kernel, and the Set the horizontal size and the vertical size of the convolution kernel respectively; S3e, using the convolution operation formula as an encoder, obtaining a preset upsampling convolution module as a decoder, and forming the final evaluation model according to the encoder and the decoder.

7. The water disaster prediction method according to claim 1, characterized in that: The step S3i specifically includes: S3n, obtaining a preset mean square error calculation formula, and inputting the input parameters into the mean square error calculation formula for calculation, wherein the mean square error calculation formula is specifically embodied as: ; Among them, the Refers to the number of samples input, Refers to the water conservancy prediction data output by the two-dimensional hydrodynamic model, is the data gradient output by the final evaluation model, and the MSE is the mean square error of the output; S3o, minimizing the mean square error (MSE) when the final evaluation model is iteratively trained, thereby updating and optimizing the final evaluation model.

8. A water disaster prediction system for predicting water disasters in a set area, characterized in that: include: An information acquisition unit, used to acquire historical water conservancy data of a set area, wherein the historical water conservancy data is used to construct prediction data through a preset two-dimensional hydrodynamic model; A historical prediction unit, used for inputting the historical water conservancy data into the two-dimensional hydrodynamic model to perform data prediction, thereby outputting water conservancy prediction data for the set area at each time node; A model building unit, used to build a convolutional neural network according to each of the water conservancy prediction data, so as to generate a final evaluation model; A real-time prediction unit is used to obtain current water conservancy data of the set area, and input the current water conservancy data into the final evaluation model for prediction, so as to obtain the prediction result of the set area; wherein the model building unit is also used to: S3f, calculating the data gradient of each output data matrix at the corresponding time node, wherein the data gradient is specifically embodied as: ; Among them, the For the The gradient value of the output data matrix at each time node, For the The gradient value of the output data matrix at each time node, is the preset loss function; S3g, the first-order moment estimation value and the second-order moment estimation value of the output data matrix are calculated based on the gradient value, and the preset first-order moment estimation value calculation formula and the second-order moment estimation value calculation formula are respectively embodied as: ; Among them, the and the are respectively a preset first attenuation rate and a preset second attenuation rate, and the are the first-order moment estimate and the second-order moment estimate outputted respectively; S3h, updating the input parameters of the final evaluation model used in model training after performing deviation correction on the first attenuation rate and the second attenuation rate; S3i, calculating the loss function of the final evaluation model, and adding the loss function to the training process of the final evaluation model to perform output correction; S3j, determining whether the difference between the output data matrix output by the final evaluation model after the output correction and the water conservancy prediction data is less than a preset value, if so, executing step S4; and The step S3h specifically includes: S3K, inputting the first attenuation rate into a first deviation correction formula for calculation, wherein the first deviation correction formula is specifically embodied as: ; S31, inputting the second attenuation rate into a second deviation correction formula for calculation, wherein the second deviation correction formula is specifically embodied as: ; S3m, the first corrected attenuation rate after deviation correction and the second corrected decay rate The input is input into a preset update parameter calculation formula for calculation, thereby updating the input parameters used by the final evaluation model during model training. The update parameter calculation formula is specifically embodied as follows: ; Among them, the is the preset learning rate coefficient, is a preset constant, That is the input parameter.