Basin flood disaster early prediction method based on machine learning

By introducing dynamic smoothing coefficient adaptive adjustment and multi-objective optimization algorithms in flood disaster prediction in basin, traditional prediction accuracy and adaptability problems are solved, and more accurate and stable flood disaster prediction is achieved.

CN120409822AActive Publication Date: 2025-08-01ZHONGKE XINGTU YISHUI (SICHUAN) TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510580265.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-01
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

When traditional flood disaster prediction faces complex and changing meteorological and geographical environments, it is difficult to accurately capture the trend of precipitation, the prediction accuracy is limited, and the hyperparameter settings of the flood disaster warning model are unreasonable and have poor adaptability, resulting in unstable prediction effect.

Method used

The Holt-Winters three-parameter model is used to introduce a dynamic smoothing coefficient adaptive adjustment mechanism and a two-way long and short-term memory network to build a precipitation prediction model, and a multi-objective optimization fruit fly optimization algorithm is introduced into the decision tree model, optimize the hyperparameter combination, design a composite objective function, and combine Pareto optimization to avoid local optimal solutions, improving the model's adaptability and generalization ability.

Benefits of technology

It improves the accuracy of precipitation prediction and the adaptability of flood disaster warning, and can predict flood disasters stably and accurately in different river basins and time periods, improving the adaptability and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409822A_ABST
    Figure CN120409822A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of flood disaster prediction, and particularly discloses a watershed flood disaster early-stage prediction method based on machine learning, and the method comprises the steps: data collection, data structuring, construction of a precipitation prediction model, construction of a flood disaster grading model, and flood disaster early warning. According to the scheme, a dynamic smoothing coefficient self-adaptive adjustment mechanism is introduced into the Holt-Winters three-parameter model, the smoothing coefficient is automatically adjusted according to the real-time change of the data, the precipitation prediction model is constructed in combination with the bidirectional long-short-term memory network, the change characteristics of the recent data are captured in time, and the precipitation prediction precision is further improved; a multi-objective optimization fruit fly optimization algorithm is introduced into a decision tree model, a composite objective function is designed, the precision of the decision tree, the model complexity and the training time are comprehensively considered, Pareto optimization is introduced to prevent an optimization result from falling into a local optimal solution, and the adaptability and generalization ability of the model are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of flood disaster prediction, and specifically refers to an early prediction method for basin flood disasters based on machine learning. Background Art

[0002] Flood disaster prediction is a technical means to estimate the possibility, scale, time, etc. of floods by analyzing, monitoring and simulating various factors such as historical flood data, meteorological data, topography, river hydrological characteristics, soil types and vegetation cover. In traditional basin flood disaster prediction, when predicting rainfall, it is often difficult to accurately capture the changing trend of precipitation in the face of complex and changeable meteorological and geographical environments, and it is impossible to fully consider the seasonality, trend and the impact of emergencies on precipitation in time series data. Although some physical models consider physical processes, due to errors in parameter estimation and simplified processing of complex environments, the prediction accuracy is also limited; in flood disaster early warning, some simple classification models only make judgments based on a single index, ignoring the comprehensive influence of other relevant factors, while some complex models, although considering multiple factors, often have unreasonable hyperparameter settings, resulting in poor model adaptability and unstable prediction effects in different basins or at different times. Summary of the Invention

[0003] In view of the above situation, to overcome the defects of the prior art, the present invention provides a method for early prediction of basin flood disasters based on machine learning. In the traditional prediction of basin flood disasters, when predicting rainfall, it is often difficult to accurately capture the changing trend of precipitation in the face of complex and variable meteorological and geographical environments, and it is impossible to fully consider the seasonality, trend, and the impact of emergencies on precipitation in time series data. Although some physical models consider physical processes, due to errors in parameter estimation and simplified processing of complex environments, the prediction accuracy is also limited. In this solution, a dynamic smoothing coefficient adaptive adjustment mechanism is introduced into the Holt-Winters three-parameter model, and the smoothing level, trend change rate, and seasonal component of the current time series data are calculated respectively. The smoothing coefficient is automatically adjusted according to the real-time changes of the data, and a precipitation prediction model is constructed by combining a bidirectional long short-term memory network to timely capture the change characteristics of recent data and further improve the accuracy of precipitation prediction. In the flood disaster warning, some simple classification models only make judgments based on a single index, ignoring the comprehensive impact of other relevant factors. Although some complex models consider multiple factors, the hyperparameter settings of the models are often not reasonable enough, resulting in poor model adaptability and unstable prediction effects in different basins or at different times. In this solution, a multi-objective optimized fruit fly optimization algorithm is introduced into the decision tree model to select the optimal parameter combination to update the global optimal solution, design a composite objective function, comprehensively consider the accuracy, model complexity, and training time of the decision tree, and at the same time introduce Pareto optimization to avoid the optimization result falling into a local optimal solution, ensuring that while finding a balance among multiple objectives, parameter combinations with different characteristics can be obtained, further improving the adaptability and generalization ability of the model.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for early prediction of basin flood disasters based on machine learning. The method for early prediction of basin flood disasters based on machine learning specifically includes the following steps:

[0005] Step S1: Data collection. Meteorological data, hydrological data, precipitation, and historical flood disaster data sorted in chronological order within the basin are collected to form a source data set. The missing values of numerical data in the source data set are processed by mean filling, and the missing values of categorical data in the source data set are processed by one-hot encoding. The interquartile range method is used to detect and process the outliers in the source data set.

[0006] Step S2: Data structuring. The data in the source dataset is time series data. The sliding window technique is used to divide the source data into input windows and target values. The window length is set to a preset time period, and the target value is the water level of the next day. Training samples are generated, and data associations are constructed for the same period with an annual cycle. The meteorological data and hydrological data in the source dataset are used as features, and historical flood disaster data are used as labels. Min-Max normalization is performed on the numerical features.

[0007] Step S3: Construct a precipitation prediction model, introduce a dynamic smoothing coefficient adaptive adjustment mechanism into the Holt-Winters three-parameter model, and use a bidirectional long short-term memory network to predict precipitation;

[0008] Step S4: constructing a flood disaster classification model, introducing a multi-objective optimization fruit fly optimization algorithm into the decision tree model, optimizing the hyperparameters in the decision tree, and enabling the flood disaster classification model to predict flood disasters and classify them;

[0009] Step S5: Flood disaster warning, collect real-time meteorological data and hydrological data, input them into the precipitation prediction model to predict precipitation, and again input the real-time meteorological data, hydrological data and predicted precipitation into the flood disaster classification model to predict flood disasters and classify them.

[0010] Furthermore, step S3: constructing a precipitation prediction model specifically includes the following steps:

[0011] Step S31: Use the Holt-Winters three-parameter model to deseasonalize and extract trends from the time series data. The Holt-Winters three-parameter model includes three smoothing functions: a level function, a trend function, and a season function. The level function is used to calculate the smoothing level of the current time series data, the trend function is used to calculate the trend change rate of the current time series data, and the season function is used to extract the seasonal component of the current time series data. The formula used is as follows: ; ; ;

[0012] Where, The time step is The smoothing level when The time step is The trend rate of change, The time step is The seasonal component of is the time step, 、 and is an adaptively adjusted dynamic smoothing coefficient with an interval of [0, 1]. When the dynamic smoothing coefficient is 1, it means analyzing the current time series data. When the dynamic smoothing coefficient is 0, it means predicting the current time series data. is the time step of the historical flood disaster data at is the seasonal cycle length;

[0013] Step S32: Construct and initialize a long short-term memory network, input the source dataset into the long short-term memory network for training, and set the forget gate, input gate, and output gate for each layer of the long short-term memory network. The forget gate determines the proportion of historical information to be discarded, the input gate generates a new candidate state, and the output gate outputs the current hidden layer state. The formulas used are as follows: ;

[0014] In the formula, is the output function of the forget gate, input gate, and output gate at time step ; is the Sigmoid function, is the weight matrix of the forget gate, input gate, and output gate at time step ; is the hidden state at time step ; is the input of the long short-term memory network at time step ; is the bias term at time step ;

[0015] Step S33: Introduce the exponential smoothing seasonal factor and trend term in the output layer of the long short-term memory network to predict the rainfall. The formula used is as follows: ;

[0016] In the formula, is the rainfall predicted by the output layer of the long short-term memory network.

[0017] Furthermore, Step S4: Construct a flood disaster grading model, which specifically includes the following steps:

[0018] Step S41: Initialization, establish and initialize a decision tree model as the flood disaster grading model, input the source dataset into the flood disaster grading model for training, and use the fruit fly optimization algorithm to optimize the hyperparameters of the decision tree. Define the parameter space of the decision tree, where each fruit fly individual corresponds to a set of candidate parameter combinations, and preset the fruit fly population size and the maximum number of iterations;

[0019] Step S42: Olfactory search generates a new position. The Drosophila individual generates a new parameter combination through random perturbation, adding a random offset to the current candidate parameter. The formula used is as follows: ; ;

[0020] In the formula, and are the new coordinates of the Drosophila, is the index of the Drosophila, and are the coordinates of the initial position of the Drosophila, is the random perturbation factor, and its value range is [-1, 1], is the random flight range of the Drosophila, that is, the search step size;

[0021] Step S43: Visual search. Evaluate each group of parameter combinations through cross-validation accuracy, select the optimal parameter combination to update the global optimal solution, and adjust the search direction of the Drosophila;

[0022] Step S44: Dynamically adjust the search range. Dynamically narrow the search range according to the number of iterations and the quality of the current optimal solution. Set the optimization iteration threshold. If the global optimal solution has not been improved after continuously exceeding the optimization iteration threshold for a certain number of iterations, reduce the search step size. If the improvement is significant, increase the search step size. Retain the best 10% of the Drosophila in each iteration for the next iteration;

[0023] Step S45: Multi-objective optimization fusion. Design a composite objective function. The formula used is as follows:[[ID=3s3]] ;

[0024] In the formula, is the composite objective function, , and are the weight coefficients, is the accuracy of the decision tree, is the model complexity of the decision tree, is the training time of the decision tree;

[0025] Step S46: Pareto optimization. Calculate the crowding degree of each parameter combination in the preset target space. The crowding degree is the sum of the normalized distances of each parameter combination from other adjacent parameter combinations in the target space. Select the most diverse parameter combination through crowding degree sorting.

[0026] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0027] (1)In traditional watershed flood disaster prediction, when predicting rainfall, it is often difficult to accurately capture the changing trend of precipitation in the face of complex and variable meteorological and geographical environments, and it is impossible to fully consider the seasonality, trend, and impact of emergencies on precipitation in time series data. Although some physical models consider physical processes, due to errors in parameter estimation and simplified processing of complex environments, the prediction accuracy is also limited. In this solution, a dynamic smoothing coefficient adaptive adjustment mechanism is introduced into the Holt-Winters three-parameter model. The smoothing level, trend change rate, and seasonal component of the current time series data are calculated respectively, the smoothing coefficient is automatically adjusted according to the real-time changes of the data, and a precipitation prediction model is constructed by combining a bidirectional long short-term memory network to timely capture the change characteristics of recent data and further improve the accuracy of precipitation prediction;

[0028] (2)In flood disaster warning, some simple classification models only make judgments based on a single indicator, ignoring the comprehensive impact of other relevant factors. Although some complex models consider multiple factors, the hyperparameter settings of the models are often not reasonable enough, resulting in poor model adaptability and unstable prediction effects in different basins or at different times. In this solution, a multi-objective optimized fruit fly optimization algorithm is introduced into the decision tree model to select the optimal parameter combination to update the global optimal solution, design a composite objective function, comprehensively consider the accuracy, model complexity, and training time of the decision tree, and at the same time introduce Pareto optimization to avoid the optimization result falling into a local optimal solution, ensuring that while finding a balance among multiple objectives, parameter combinations with different characteristics can be obtained, further improving the adaptability and generalization ability of the model Description of the Drawings

[0029] Figure 1 It is a schematic flow chart of a method for early prediction of watershed flood disasters based on machine learning provided by the present invention;

[0030] Figure 2 It is a schematic flow chart of constructing a flood disaster classification model provided by the present invention.

[0031] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. Detailed Embodiments

[0032] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present invention.

[0033] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention.

[0034] Example 1: Refer to Figure 1 , a method for early prediction of basin flood disasters based on machine learning provided in this embodiment. The method for early prediction of basin flood disasters based on machine learning specifically includes the following steps:

[0035] Step S1: Data collection. Collect meteorological data, hydrological data, precipitation, and historical flood disaster data sorted in chronological order within the basin to form a source data set. For the missing values of numerical data in the source data set, mean filling is used for processing. For the missing values of categorical data in the source data set, one-hot encoding is used for processing. The interquartile range method is used to detect and process the outliers in the source data set;

[0036] Step S2: Data structuring. The data in the source data set is time series data. The sliding window technique is used to cut the source data into input windows and target values. The window length is set to a preset time period, and the target value is the water level for the next day. Training samples are generated. A synchronous data association is constructed with an annual cycle. The meteorological data and hydrological data in the source data set are used as features, and the historical flood disaster data is used as labels. Min-Max normalization is performed on the numerical features;

[0037] Step S3: Construct a precipitation prediction model. Introduce a dynamic smoothing coefficient adaptive adjustment mechanism into the Holt-Winters three-parameter model, and use a bidirectional long short-term memory network to predict precipitation;

[0038] Step S4: Construct a flood disaster grading model. Introduce a multi-objective optimized fruit fly optimization algorithm into the decision tree model to optimize the hyperparameters in the decision tree, so that the flood disaster grading model predicts and grades flood disasters;

[0039] Step S5: Flood disaster warning. Collect real-time meteorological data and hydrological data, input them into the precipitation prediction model to predict precipitation, and then input the real-time meteorological data, hydrological data, and predicted precipitation into the flood disaster grading model to predict and grade flood disasters.

[0040] Example 2: Refer to Figure 1, this embodiment is based on the above embodiment. Step S3: Construct a precipitation prediction model, which specifically includes the following steps:

[0041] Step S31: Use the Holt-Winters three-parameter model to deseasonalize and extract trends from time series data. The Holt-Winters three-parameter model includes three smoothing functions, namely the level function, the trend function, and the seasonal function. Use the level function to calculate the smoothed level of the current time series data, use the trend function to calculate the trend change rate of the current time series data, and use the seasonal function to extract the seasonal component of the current time series data. The formulas used are as follows: ; ; ;

[0042] In the formula, is the smoothed level at time step , is the trend change rate at time step , is the seasonal component at time step , is the time step, , and are adaptively adjusted dynamic smoothing coefficients in the interval [0, 1]. When the dynamic smoothing coefficient is 1, it means analyzing the current time series data. When the dynamic smoothing coefficient is 0, it means predicting the current time series data. is the historical flood disaster data at time step , is the seasonal cycle length;

[0043] Step S32: Construct and initialize a long short-term memory network. Input the source data set into the long short-term memory network for training. Set the forget gate, input gate, and output gate for each layer of the long short-term memory network. The forget gate determines the proportion of historical information to be discarded, the input gate generates a new candidate state, and the output gate outputs the current hidden layer state. The formulas used are as follows: ;

[0044] In the formula, is the output function of the forget gate, input gate, and output gate at time step , is the Sigmoid function, is the weight matrix of the forget gate, input gate, and output gate at time step , is the forget gate, input gate, and output gate at time step The hidden state at is the input of the long short-term memory network at time step and is the bias term at time step .

[0045] Step S33: Introduce the exponentially smoothed seasonal factor and trend term in the output layer of the long short-term memory network to predict the rainfall. The formula used is as follows: ;

[0046] In the formula, is the rainfall predicted by the output layer of the long short-term memory network.

[0047] Example 3: Refer to Figure 1 and Figure 2 . Based on the above example, step S4: Construct a flood disaster grading model, which specifically includes the following steps:

[0048] Step S41: Initialize. Establish and initialize a decision tree model as the flood disaster grading model. Input the source dataset into the flood disaster grading model for training, and use the fruit fly optimization algorithm to optimize the hyperparameters of the decision tree. Define the parameter space of the decision tree. Each fruit fly individual corresponds to a set of candidate parameter combinations. Preset the fruit fly population size and the maximum number of iterations;

[0049] Step S42: Olfactory search to generate new positions. The fruit fly individuals generate new parameter combinations through random perturbations and add random offsets to the current candidate parameters. The formula used is as follows: ; ;

[0050] In the formula, and are the new coordinates of the fruit fly, is the index of the fruit fly, and are the coordinates of the initial position of the fruit fly, is the random perturbation factor, and its value range is [-1, 1], is the random flight range of the fruit fly, that is, the search step size;

[0051] Step S43: Visual search. Evaluate each set of parameter combinations through the cross-validation accuracy rate, select the optimal parameter combination to update the global optimal solution, and adjust the fruit fly search direction;

[0052] Step S44: Dynamically adjust the search range, dynamically narrow the search range according to the number of iterations and the quality of the current optimal solution, set an optimization iteration threshold. If the global optimal solution has not been improved after continuously exceeding the optimization iteration threshold for a certain number of times, reduce the search step size. If the improvement is significant, increase the search step size. Retain the top 10% of the best fruit flies in each iteration for the next iteration;

[0053] Step S45: Multi-objective optimization fusion, design a composite objective function, and the formula used is as follows: ;

[0054] In the formula, is the composite objective function, , and are weight coefficients, is the accuracy of the decision tree, is the model complexity of the decision tree, is the training time of the decision tree;

[0055] Step S46: Pareto optimization, calculate the crowding degree of each parameter combination in the preset objective space. The crowding degree is the sum of the normalized distances of each parameter combination from other adjacent parameter combinations in the objective space. Select the most diverse parameter combinations through crowding degree sorting.

[0056] Example 4: This example is based on the above example. In Example 1, the synchronous data association is constructed with a one-year cycle, and each month is seasonally matched. Therefore, the seasonal cycle length in step S1 is set to 12.

[0057] Example 5: This example is based on the above example. In Example 2, the number of neurons in the hidden layers of the long short-term memory network are 128, 64, and 32 respectively.

[0058] Example 6: This example is based on the above example. In Example 3, the optimization iteration threshold is set to 5. If the global optimal solution has not been improved after continuously exceeding 5 iterations, reduce the search step size to 90% of the original. If the improvement is significant, increase the search step size to 130% of the original.

[0059] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device.

[0060] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

[0061] The above description of the present invention and its embodiments is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and, without departing from the gist of the present invention, design similar structural modes and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.

Claims

1. A method for early prediction of basin flood disasters based on machine learning, characterized in that, The specific steps include: Step S1: Data collection: meteorological data, hydrological data, precipitation data, and historical flood disaster data in the basin are collected in chronological order to form a source data set. Missing values of numerical data in the source data set are processed by mean filling, and missing values of categorical data in the source data set are processed by one-hot encoding. The interquartile range method is used to detect and process outliers in the source data set. Step S2: Data structuring. The data in the source dataset is time series data. The sliding window technique is used to divide the source data into input windows and target values. The window length is set to a preset time period, and the target value is the water level of the next day. Training samples are generated, and data associations are constructed for the same period with an annual cycle. The meteorological data and hydrological data in the source dataset are used as features, and historical flood disaster data are used as labels. Min-Max normalization is performed on the numerical features. Step S3: Construct a precipitation prediction model, introduce a dynamic smoothing coefficient adaptive adjustment mechanism into the Holt-Winters three-parameter model, and use a bidirectional long short-term memory network to predict precipitation; Step S4: constructing a flood disaster classification model, introducing a multi-objective optimization fruit fly optimization algorithm into the decision tree model, optimizing the hyperparameters in the decision tree, and enabling the flood disaster classification model to predict flood disasters and classify them; Step S5: Flood disaster warning, collect real-time meteorological data and hydrological data, input them into the precipitation prediction model to predict precipitation, and again input the real-time meteorological data, hydrological data and predicted precipitation into the flood disaster classification model to predict flood disasters and classify them.

2. The early flood disaster prediction method based on machine learning according to claim 1, characterized in that Step S3: Constructing a precipitation prediction model, specifically including the following steps: Step S31: using the Holt-Winters three-parameter model to deseasonalize and extract trends from time series data; Step S32: construct and initialize a long short-term memory network, and input the source data set into the long short-term memory network for training; Step S33: Introduce the exponential smoothing seasonal factor and trend term into the output layer of the long short-term memory network to predict rainfall.

3. The method for early prediction of basin flood disasters based on machine learning according to claim 2, wherein Step S4: Constructing a flood disaster classification model, specifically including the following steps: Step S41: Initialization: Establish and initialize a decision tree model as a flood hazard classification model, input the source data set into the flood hazard classification model for training, and use the fruit fly optimization algorithm to optimize the hyperparameters of the decision tree. Define the parameter space of the decision tree, each fruit fly individual corresponds to a set of candidate parameter combinations, and preset the fruit fly group size and maximum number of iterations; Step S42: The olfactory search generates a new location, and the fruit fly individual generates a new parameter combination through random perturbation, adding a random offset to the current candidate parameters; Step S43: Visual search, evaluate each parameter combination through cross-validation accuracy, select the optimal parameter combination to update the global optimal solution, and adjust the fruit fly search direction; Step S44: Dynamically adjust the search range, dynamically narrow the search range according to the number of iterations and the quality of the current optimal solution, set the optimization iteration threshold, and retain the best 10% of fruit flies in each iteration to enter the next iteration; Step S45: Multi-objective optimization and fusion, design a composite objective function, and the formula used is as follows: ; Wherein, is the composite objective function, , and are the weight coefficients, is the accuracy of the decision tree, is the model complexity of the decision tree, is the training time of the decision tree; Step S46: Pareto optimization, calculate the crowding degree of each parameter combination in the preset objective space, where the crowding degree is the sum of the normalized distances of each parameter combination from other adjacent parameter combinations in the objective space, and select the most diverse parameter combination by sorting according to the crowding degree.

Citation Information

Patent Citations

  • Flood forecasting model parameter multi-objective optimization method based on long short-term memory network and NSGA-II

    CN113887787A

  • Energy consumption equipment operation adjusting method and device, equipment and storage medium

    CN118941045A

  • Multi-scale feature mixed production business process remaining execution time prediction method

    CN118982094A

  • Natural-fission-based multi-disaster fusion early warning method and system for coal mine

    WO2024222460A1