BP neural network-based rainfall runoff small sample data expansion method
Through the BP neural network-based method, Box-Cox transformation and BP neural network simulation are used to solve the problem that traditional interpolation methods and small sample data are difficult to meet the data-driven model for runoff simulation, and more accurate and reliable runoff data expansion is achieved.
Patent Information
- Application Number
- CN202510176884.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional interpolation methods and small sample data are difficult to meet the research needs of data-driven models for runoff simulation, especially when rainfall data is missing or not ideally interpolated.
The small sample data expansion method of rainfall runoff based on BP neural network is used to convert non-normal rainfall data into normal distribution data through Box-Cox transformation, and runoff simulation is used to expand runoff data.
This method can effectively expand small sample data and improve the accuracy and reliability of runoff simulation, especially in the case of missing or unsatisfactory data, with good generalization and fault tolerance.
Smart Images

Figure CN120145815A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rainfall runoff simulation, and particularly relates to a method for augmenting small-sample data of rainfall runoff based on a BP neural network. Background Art
[0002] Currently, hydrological models are widely used in various researches in the field of hydrology. However, hydrological models cannot fully reflect the complex formation mechanism and variation law of rainfall runoff. Data-driven models have good non-linear mapping capabilities. Relying on a large amount of observational data, the more rainfall runoff information is mastered, the more likely the future situation can be found in historical data. The data-driven models using machine learning have gradually become a research hotspot for runoff simulation. Rainfall data is an important basis for hydrological analysis and calculation and is one of the important input data. However, affected by natural conditions and human factors, there is a situation of missing rainfall data, and the interpolation method using reference stations and design stations for correlation analysis usually has unsatisfactory effects. In addition, data-driven models have high requirements for the number of input samples, and small-sample data will limit the simulation research of rainfall runoff in some areas.
[0003] In summary, runoff data is the basic data in the field of hydrology. Traditional interpolation methods and small-sample data are difficult to meet the research needs of runoff simulation using data-driven models. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for augmenting small-sample data of rainfall runoff based on a BP neural network, so as to solve the problem that traditional interpolation methods and small-sample data are difficult to meet the research needs of runoff simulation using data-driven models.
[0005] To achieve the above purpose, the present invention provides a method for augmenting small-sample data of rainfall runoff based on a BP neural network. The method for augmenting small-sample data of rainfall runoff based on a BP neural network includes the following steps:
[0006] Obtain the original sub-rainfall data P n and the corresponding runoff data R n , and divide the training samples and validation samples;
[0007] Check whether the rainfall data follows a normal distribution. If it does not follow a normal distribution, use the Box-Cox transformation to make the rainfall data follow the normal distribution N(μ,δ 2 );
[0008] Generate a set of random numbers that follow the normal distribution N(μ,δ 2 ), perform the inverse Box-Cox transformation, and use this as the augmented rainfall samples;
[0009] Build a BP neural network model, conduct model training and verification, use the augmented rainfall samples as the model input for simulation, and finally obtain the augmented runoff data;
[0010] Conduct a rationality test on the augmented data.
[0011] Among them, in the step of "obtaining the original single rainfall data P n and the corresponding runoff data R n , and dividing the training samples and verification samples", the training samples are divided by random sampling, and random sampling is carried out according to a preset ratio to randomize the training samples, and the remaining data forms the verification samples.
[0012] Among them, the specific method of the step of "testing whether the rainfall data follows a normal distribution. If it does not follow a normal distribution, use the Box-Cox transformation to make the rainfall data follow the normal distribution N(μ,δ 2 )" includes:
[0013] (1) Conduct a Shapiro-Wilk test on the original single rainfall data P n , sort it in ascending order to obtain the order statistics:
[0014] x 1 ≤x 2 ≤…≤x n ;
[0015] (2) Construct the statistic W and compare it with the judgment critical value W α :
[0016]
[0017] (3) Conduct a Box-Cox transformation on the non-normal rainfall data P n :
[0018]
[0019] In the formula: x i represents the i-th order statistic, represents the sample mean, m=(m 1 ,…,m n ) represents the expected value of the ordered independent statistics sampled from a standard normal distribution random variable, V represents the covariance of the ordered statistics, W α represents the critical value at the significance level of α, λ represents the transformation parameter, represents the rainfall data that follows a normal distribution after transformation.
[0020] Among them, the step of "generating a group of data that follows the normal distribution N(μ,δ 2) The specific method for generating random numbers and performing the Box-Cox inverse transformation to obtain the augmented rainfall samples includes:
[0021] (1) Determine the mathematical expectation μ and variance δ of P λ ; 2 ;
[0022] (2) Determine the length m of the augmented samples, and generate a set of random numbers of length m that follow the normal distribution N(μ, δ 2 ); Perform the Box-Cox inverse transformation:
[0023]
[0024] where P new = (P new1 , …, P newm )′ represents the augmented rainfall samples.
[0025] The specific method for the step of "constructing a BP neural network model, training and validating the model, using the augmented rainfall samples as the model input for simulation, and finally obtaining the augmented runoff data" is as follows:
[0026] First, perform normalization preprocessing on the training samples and validation samples, and initialize the network;
[0027] Second, specify the number of neurons in the input layer, hidden layer, and output layer of the BP neural network, as well as the number of hidden layers;
[0028] Input the training samples into the BP neural network for training to find the optimal parameters;
[0029] Then, input the validation samples into the trained BP neural network, select the optimal network structure, and evaluate the generalization ability of the model;
[0030] Finally, input the augmented rainfall data into the established network, and after simulation, output the augmented runoff data.
[0031] Among them, in the step of "inputting the training samples into the BP neural network for training", the training process of the BP neural network is as follows: Input the training samples into a BP neural network composed of 1 input neuron, q hidden layer neurons, and 1 output neuron, initialize the connection weights between neurons and the thresholds between each functional neuron, then layer by layer forward-propagate the signals for forward propagation calculation, calculate the error of the output layer, and then back-propagate the error to the hidden layer neurons, and adjust the connection weights and thresholds according to the errors of the hidden layer neurons. Repeat the above process until the stop condition is met.
[0032] Among them, in the step of "then input the verification sample into the trained BP neural network", the verification process of the BP neural network is as follows: input the verification sample into the trained BP neural network, output the corresponding simulated value, select the evaluation index, and calculate the model error.
[0033] Among them, the specific method of the step of "conducting rationality test on the augmented data" is: calculate the runoff coefficient of the augmented rainfall-runoff data. If the runoff coefficient is greater than 1, it is considered that this group of data is unreasonable.
[0034] A method for augmenting small-sample rainfall-runoff data based on BP neural network of the present invention uses Box-Cox transformation to convert non-normal distributed rainfall data into data that follows normal distribution. Based on this, the rainfall data of each event is augmented, and the BP neural network is used for runoff simulation to augment the runoff data. And a BP neural network is established for training and verification. Input the augmented rainfall data, and after simulation, output the augmented runoff data. Compared with the traditional data augmentation method at the monthly and annual scales, it focuses on the scale of rainfall-runoff of each event, and the effect of interpolation using the method of correlation analysis is often not ideal, and it is difficult to carry out in the case of missing rainfall and hydrological stations. The BP neural network model can search for the non-linear relationship between rainfall and runoff, has the ability of high self-learning and self-adaptation, has good generalization ability and fault tolerance ability, and the effect of simulating and studying the regional rainfall-runoff is more ideal. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0036] Figure 1 is the flowchart of the steps of the method for augmenting small-sample rainfall-runoff data based on BP neural network provided by the present invention.
[0037] Figure 2 is the schematic diagram of the training process of the BP neural network provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] The following will describe in detail the embodiments of the present invention. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present invention, but should not be construed as limiting the present invention.
[0039] Please refer to Figure 1 andFigure 2 , the present invention provides a method for augmenting small-sample rainfall-runoff data based on a BP neural network. The method for augmenting small-sample rainfall-runoff data based on a BP neural network includes the following steps:
[0040] Obtain the original sub-rainfall data P n and the corresponding runoff data R n , and divide the training samples and validation samples;
[0041] Check whether the rainfall data follows a normal distribution. If it does not follow a normal distribution, use the Box-Cox transformation to make the rainfall data follow a normal distribution N(μ,δ 2 );
[0042] Generate a set of random numbers that follow a normal distribution N(μ,δ 2 ), perform the inverse Box-Cox transformation, and use this as the augmented rainfall samples;
[0043] Construct a BP neural network model, perform model training and validation, use the augmented rainfall samples as the model input for simulation, and finally obtain the augmented runoff data;
[0044] Conduct a rationality test on the augmented data.
[0045] In this embodiment, the Box-Cox transformation is used to convert non-normal distributed rainfall data into data that follows a normal distribution. Based on this, the sub-rainfall data is augmented, and the BP neural network is used for runoff simulation to augment the runoff data. A BP neural network is established, trained and validated. The augmented rainfall data is input, and after simulation, the augmented runoff data is output. Compared with the traditional data augmentation method at the monthly and yearly scales, focusing on the scale of rainfall-runoff events, and the effect of interpolation using the correlation analysis method is often not ideal, and it is difficult to perform in the case of missing rainfall and hydrological stations. The BP neural network model can search for the non-linear relationship between rainfall and runoff, has a high degree of self-learning and self-adaptive capabilities, has good generalization and fault tolerance capabilities, and the effect of simulating and studying the regional rainfall-runoff is more ideal.
[0046] Furthermore, in the step "Obtain the original sub-rainfall data P n and the corresponding runoff data R n , and divide the training samples and validation samples", the training samples are divided by random sampling, and random sampling is performed according to a preset ratio to randomize the training samples, and the remaining data forms the validation samples.
[0047] Furthermore, in the step "Check whether the rainfall data follows a normal distribution. If it does not follow a normal distribution, use the Box-Cox transformation to make the rainfall data follow a normal distribution N(μ,δ 2) The specific methods include:
[0048] (1) Conduct the Shapiro-Wilk test on the original secondary rainfall data P n and sort it in ascending order to obtain the order statistics:
[0049] x 1 ≤ x 2 ≤ … ≤ x n ;
[0050] (2) Construct the statistic W and compare it with the critical value of judgment W α :
[0051]
[0052] (3) Conduct the Box-Cox transformation on the non-normal rainfall data P n :
[0053]
[0054] In the formula: x i represents the i-th order statistic, x represents the sample mean, m = (m 1 , …, m n ) represents the expected value of the ordered independent statistics sampled from a standard normal distribution random variable, V represents the covariance of the ordered statistics, W α represents the critical value at the significance level of α, λ represents the transformation parameter, represents the rainfall data that follows a normal distribution after transformation.
[0055] Furthermore, the specific methods of the step "generate a set of random numbers that follow the normal distribution N(μ, δ 2 ), perform the Box-Cox inverse transformation, and use this as the extended rainfall sample" include:
[0056] (1) Determine the mathematical expectation μ and variance δ λ of P 2 ;
[0057] (2) Determine the length m of the extended sample, generate a set of random numbers of length m that follow the normal distribution N(μ, δ 2 ) and perform the Box-Cox inverse transformation:
[0058]
[0059] In the formula, P new = (P new1 , … P newm )′ represents the extended rainfall sample.
[0060] Further, the specific method for the step of "constructing a BP neural network model, training and validating the model, using the augmented rainfall samples as the model input for simulation, and finally obtaining the augmented runoff data" is as follows:
[0061] First, perform normalization preprocessing on the training samples and validation samples, and initialize the network;
[0062] Secondly, specify the number of neurons in the input layer, hidden layer, and output layer of the BP neural network, as well as the number of hidden layers;
[0063] Input the training samples into the BP neural network for training to find the optimal parameters;
[0064] Then, input the validation samples into the trained BP neural network, select the optimal network structure, and evaluate the generalization ability of the model;
[0065] Finally, input the augmented rainfall data into the established network, and after simulation, output the augmented runoff data.
[0066] In this embodiment, the sample normalization preprocessing process is as follows:
[0067]
[0068] where k represents the sample length, y max 、y min represent parameters, defaulting to 1 and -1, P max represents the maximum value of the rainfall samples, P min represents the minimum value of the rainfall samples, R max represents the maximum value of the runoff samples, R min represents the minimum value of the runoff samples, p k represents the normalized rainfall samples, r k represents the normalized runoff samples.
[0069] The training process of the BP neural network is as follows:
[0070] (1) Initialize the connection weights of the neurons and the thresholds of each functional neuron, and initialize the connection weights and thresholds as random values close to 0 to ensure that the network is not saturated by large weighted inputs;
[0071] (2) Perform forward propagation calculation: Input the training samples into a BP neural network composed of 1 input neuron, q hidden layer neurons, and 1 output neuron. The input layer neurons receive the input information, the hidden layer neurons receive the signals transmitted from the input layer, and after linear transformation by the connection weights and thresholds, the output of the hidden layer is generated through the Sigmoid activation function, which is the input of the next layer. The hidden layer and the output layer process the transmitted signals, and the final result is output by the output layer neurons;
[0072] (3) Perform error backpropagation calculation: If the desired output is not obtained at the output layer, enter the error backpropagation calculation stage. Calculate the error of the output layer, and backpropagate the output error to the hidden layer. Based on the gradient descent strategy, the BP neural network adjusts the parameters in the negative gradient direction of the target, calculates the gradient terms of the output layer neurons and the hidden layer neurons, and updates the connection weights and thresholds between the hidden layer and the output layer.
[0073] (4) Repeat the above iterative loop process and stop the iterative calculation when the cumulative error is minimized.
[0074] Among them, in the step of "performing error backpropagation calculation", based on the gradient descent strategy, the process of updating the connection weights and thresholds between the hidden layer and the output layer is as follows:
[0075] 1) For any training sample (p j , r j ), its cost function is:
[0076]
[0077] 2) Given the learning rate η, the connection weight between the input layer and the h-th neuron in the hidden layer is ν h , the connection weight between the h-th neuron in the hidden layer and the output layer neuron is ω h , the threshold of the h-th neuron in the hidden layer is γ h , and the threshold of the output layer neuron is θ. Then the update formula for ω h is:
[0078]
[0079] Similarly, the update formulas for ν h , γ h and θ are:
[0080] Δν h = ηe h p j
[0081] Δγ h = -ηe h
[0082] Δθ = -ηg
[0083] In the formula, o j represents the output value of the neural network, b h represents the output of the h-th neuron in the hidden layer, g represents the gradient term of the output layer neuron, and e h represents the gradient term of the hidden layer neuron.
[0084] Further, in the step of "then input the verification sample into the trained BP neural network", the verification process of the BP neural network is as follows: input the verification sample into the trained BP neural network, output the corresponding simulated value, select an evaluation index, and calculate the model error.
[0085] Further, the specific method for the step of "conducting a rationality test on the augmented data" is as follows: calculate the runoff coefficient of the augmented rainfall-runoff data. If the runoff coefficient is greater than 1, it is considered that this set of data is unreasonable.
[0086] The above-disclosed is only a preferred embodiment of the present invention. Of course, it cannot be used to limit the scope of the rights of the present invention. Those of ordinary skill in the art can understand all or part of the processes of implementing the above embodiments, and the equivalent changes made according to the claims of the present invention still fall within the scope covered by the invention.
Claims
1. A method for expanding small sample data of rainfall runoff based on BP neural network, characterized in that: The steps include: Get the original rainfall data P n and the corresponding runoff data R n , and divide the training samples and validation samples; Check whether the rainfall data obeys the normal distribution. If not, use Box-Cox transformation to make the rainfall data obey the normal distribution N(μ,δ 2 ); Generate a set of normal distribution N(μ,δ 2 ) random numbers, perform inverse Box-Cox transformation, and use them as the expanded rainfall samples; Construct a BP neural network model, conduct model training and verification, use the expanded rainfall samples as model input, perform simulation, and finally obtain the expanded runoff data; Perform rationality check on the expanded data.
2. The rainfall runoff small sample data expansion method based on BP neural network as claimed in claim 1 is characterized in that: In step "get the original rainfall data P n and the corresponding runoff data R n , and divide the training samples and the verification samples”, the training samples are divided by random sampling, random sampling is performed according to a preset ratio to achieve randomization of the training samples, and the remaining data constitute the verification samples.
3. The rainfall runoff small sample data expansion method based on BP neural network as claimed in claim 2 is characterized in that: Step 1: Check whether the rainfall data obeys the normal distribution. If not, use Box-Cox transformation to make the rainfall data obey the normal distribution N(μ,δ 2 )” include: (1) For the original rainfall data P n Perform the Shapiro-Wilk test and sort in ascending order to obtain the order statistic: x1≤x2≤…≤x n ; (2) Construct the statistic W and compare it with the critical value W α contrast: (3) For non-normal rainfall data P n Perform a Box-Cox transformation: Where: x i represents the i-th order statistic, represents the sample mean, m=(m1,…,m n ) represents the expected value of an ordered independent statistic sampled from a standard normal distribution random variable, V represents the covariance of the ordered statistic, and W α represents the critical value when the significance level is α, λ represents the transformation parameter, Represents rainfall data that follows a normal distribution after transformation.
4. The method for expanding rainfall runoff small sample data based on BP neural network as claimed in claim 3, characterized in that: Step "Generate a set of normal distribution N(μ,δ 2 ) random numbers, perform inverse Box-Cox transformation, and use this as the expanded rainfall sample. The specific method includes: (1) Determine P λ The mathematical expectation μ and variance δ 2 ; (2) Determine the extended sample length m and generate a set of N(μ,δ) with a length of m and a normal distribution. 2 ) Perform an inverse Box-Cox transform: Where P new =(P new1 ,…P newm )′ represents the expanded rainfall sample.
5. The method for expanding rainfall runoff small sample data based on BP neural network as claimed in claim 4, characterized in that: The specific method of step "constructing a BP neural network model, training and verifying the model, using the expanded rainfall samples as model input, simulating, and finally obtaining the expanded runoff data" is: First, normalize and preprocess the training and validation samples, and initialize the network; Secondly, the number of neurons in the input layer, hidden layer and output layer of the BP neural network and the number of hidden layers are given; Input the training samples into the BP neural network for training and find the optimal parameters; Then the verification samples are input into the trained BP neural network, the optimal network structure is selected, and the generalization ability of the model is evaluated; Finally, the expanded rainfall data is input into the established network, and after simulation, the expanded runoff data is output.
6. The method for expanding rainfall runoff small sample data based on BP neural network as claimed in claim 5, characterized in that: In the step of "inputting the training samples into the BP neural network for training", the training process of the BP neural network is: inputting the training samples into the BP neural network consisting of 1 input neuron, q hidden layer neurons, and 1 output neuron, initializing the connection weights between the neurons and the thresholds between each functional neuron, and then transmitting the signal forward layer by layer, performing forward propagation calculation, calculating the error of the output layer, and then back-propagating the error to the hidden layer neurons, adjusting the connection weights and thresholds according to the hidden layer neuron errors, and repeating the above process until the stop condition is met.
7. The method for expanding rainfall runoff small sample data based on BP neural network according to claim 6, characterized in that: In the step "then input the verification sample into the trained BP neural network", the verification process of the BP neural network is: input the verification sample into the trained BP neural network, output the corresponding simulation value, select the evaluation index, and calculate the model error.
8. The method for expanding rainfall runoff small sample data based on BP neural network according to claim 7, characterized in that: The specific method of the step "performing a rationality check on the expanded data" is: calculating the runoff coefficient of the expanded rainfall runoff data; if the runoff coefficient is greater than 1, the data set is considered to be unreasonable.