Rainfall runoff prediction model training method, device, equipment, medium and product
By combining the mutual information method and the Pearson correlation coefficient method, the comprehensive impact index of runoff-related factors is determined and the training data is screened, which solves the problem that redundant data cannot be removed in traditional methods, and improves the prediction accuracy of the rainfall runoff prediction model.
Patent Information
- Application Number
- CN202411288033.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In the traditional deep learning-based rainfall runoff prediction method, the Pearson correlation coefficient method cannot effectively remove the redundant data in runoff-related factors, resulting in low prediction accuracy and the non-contact between runoff-related factors and actual rainfall runoff cannot be fully captured. Linear correlation.
By calculating the mutual information value between runoff-related factors and actual rainfall runoff, combined with the Pearson correlation coefficient method, the comprehensive impact index of each runoff-related factor is determined, so as to screen out the training data for the prediction model and fully learn the runoff-related factors and the actual Linear and nonlinear relationships between rainfall runoff.
The redundant data in the data is effectively removed, which improves the learning efficiency and prediction accuracy of the rainfall runoff prediction model, and can more accurately capture the relationship between runoff-related factors and actual rainfall runoff.
Smart Images

Figure CN118797355B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of runoff prediction, and in particular to a rainfall runoff prediction model training method, device, equipment, medium and product. Background Art
[0002] Accurate rainfall runoff forecasts can provide early warning of potential flood risks and provide strong support for agricultural irrigation, urban water supply, water environment protection, etc.
[0003] In traditional rainfall-runoff prediction methods based on deep learning, the Pearson correlation coefficient method is usually used to remove redundant data in the runoff-related factors of the input model to improve the reliability of the data.
[0004] However, there is both a linear correlation and a nonlinear correlation between the runoff correlation factors and the actual rainfall runoff. The Pearson correlation coefficient method can only obtain the linear correlation between the runoff correlation factors and the actual rainfall runoff. Therefore, it cannot effectively remove the redundant data in the data input to the model, resulting in low prediction accuracy of the model. Summary of the invention
[0005] The present application provides a rainfall runoff prediction model training method, device, equipment, medium and product to improve the prediction accuracy of the rainfall runoff prediction model.
[0006] In a first aspect, the present application provides a rainfall runoff prediction model training method, the method comprising:
[0007] Obtaining rainfall runoff related data, including: multiple time periods, values of multiple runoff related factors corresponding to multiple time periods, and actual rainfall runoff in multiple time periods;
[0008] According to the data, the mutual information value between each runoff correlation factor and the actual rainfall runoff is determined as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0009] According to the data, determine the linear correlation coefficient between each runoff-related factor and the actual rainfall runoff;
[0010] For each runoff correlation factor, the comprehensive impact index of the runoff correlation factor is determined according to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0011] Filter out the data corresponding to the runoff-related factors whose comprehensive impact index meets the preset conditions from the data to obtain training data;
[0012] The rainfall-runoff prediction model is trained using training data.
[0013] In a possible design, data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions are screened out from the data to obtain training data, including:
[0014] Determine the first sum of the comprehensive impact index of all runoff-related factors;
[0015] For each runoff-related factor, determining the remaining runoff-related factors whose comprehensive impact index is less than or equal to the comprehensive impact index of the runoff-related factor, and calculating a second sum of the comprehensive impact indexes of the remaining runoff-related factors;
[0016] According to the ratio of the second sum to the first sum of each runoff related factor, the cumulative contribution rate of each runoff related factor is obtained;
[0017] The data corresponding to the runoff related factors whose cumulative contribution rate is greater than or equal to the first threshold are screened out from the data to obtain training data.
[0018] In one possible design, the mutual information value between each runoff-related factor and the actual rainfall runoff is determined based on the data, including:
[0019] For each runoff correlation factor, the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of multiple time periods are input into the kernel density estimation formula to calculate the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period;
[0020] For each runoff correlation factor, the values of the runoff correlation factor in multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, and the number of multiple time periods are input into the kernel density estimation formula to calculate the first marginal probability distribution of the runoff correlation factor in each time period;
[0021] The actual rainfall runoff in multiple time periods, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of the multiple time periods are input into the kernel density estimation formula to calculate the second marginal probability distribution of the actual rainfall runoff in each time period;
[0022] For each runoff correlation factor, the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period, the first marginal probability distribution of the runoff correlation factor in each time period, and the second marginal probability distribution of the actual rainfall runoff in each time period are input into the mutual information formula to calculate the mutual information value of the runoff correlation factor and the actual rainfall runoff.
[0023] In one possible design, the linear correlation coefficient between each runoff-related factor and the actual rainfall runoff is determined based on the data, including:
[0024] Determine an average value of the values of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0025] Determine an average value of actual rainfall runoff in multiple time periods as a second average value of actual rainfall runoff;
[0026] For each runoff correlation factor, the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first average value of the runoff correlation factor, and the second average value of the actual rainfall runoff are input into the Pearson correlation coefficient function to calculate the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff.
[0027] In one possible design, before determining the mutual information value between each runoff correlation factor and the actual rainfall runoff as a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the method further includes:
[0028] Determine an average value of the values of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0029] For any two runoff correlation factors, the values of the two runoff correlation factors in multiple time periods and the first average values corresponding to the two runoff correlation factors are input into the Pearson correlation coefficient function to calculate the correlation coefficient of the two runoff correlation factors;
[0030] From the data, the value of one of the two runoff correlation factors whose correlation coefficient is greater than or equal to the second threshold is deleted.
[0031] In one possible design, the rainfall-runoff prediction model is trained using training data including:
[0032] Divide the training data into training set and test set;
[0033] The rainfall-runoff prediction model is trained using the training set;
[0034] Input the values of runoff-related factors in the test set into the trained rainfall-runoff prediction model to obtain the predicted rainfall-runoff;
[0035] Based on the predicted rainfall runoff and the actual rainfall runoff, the mean absolute error and determination coefficient of the rainfall runoff prediction model were calculated.
[0036] In one possible design, for each runoff related factor, the method further includes:
[0037] The mutual information value between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple mutual information values, and the minimum value among multiple mutual information values are input into the extreme value normalization formula to calculate the normalized mutual information value between the runoff correlation factor and the actual rainfall runoff, and the normalized mutual information value is used as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0038] Inputting the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple linear correlation coefficients, and the minimum value among multiple linear correlation coefficients into the extreme value standardization formula, the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff is calculated;
[0039] The weight of the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff is assigned as a first weight, and the weight of the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff is assigned as a second weight;
[0040] The comprehensive influence index of the runoff correlation factor is determined according to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the first weight and the second weight.
[0041] In a second aspect, the present application provides a rainfall runoff prediction model training device, comprising:
[0042] An acquisition module is used to acquire data related to rainfall runoff, including: multiple time periods, values of multiple runoff related factors corresponding to multiple time periods, and actual rainfall runoff in multiple time periods;
[0043] A nonlinear correlation module is used to determine the mutual information value between each runoff correlation factor and the actual rainfall runoff according to the data, as a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0044] The linear correlation module is used to determine the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff according to the data;
[0045] A comprehensive impact index module is used to determine the comprehensive impact index of the runoff-related factor for each runoff-related factor according to the nonlinear correlation coefficient between the runoff-related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff-related factor and the actual rainfall runoff;
[0046] An updating module is used to filter out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data;
[0047] The training module is used to train the rainfall-runoff prediction model using training data.
[0048] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0049] Memory stores computer-executable instructions;
[0050] The processor executes the computer-executable instructions stored in the memory to implement a rainfall-runoff prediction model training method according to the first aspect of the invention.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, a rainfall runoff prediction model training method is used to implement the invention content of the first aspect.
[0052] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a rainfall runoff prediction model training method according to the invention content of the first aspect.
[0053] The present application provides a rainfall runoff prediction model training method, device, equipment, medium and product, which obtains data related to rainfall runoff, and the data includes: multiple time periods, values corresponding to multiple runoff related factors in multiple time periods, and actual rainfall runoff in multiple time periods; and according to the data, determines the mutual information value between each runoff related factor and the actual rainfall runoff, as the nonlinear correlation coefficient between the runoff related factor and the actual rainfall runoff; thereby, according to the data, determines the linear correlation coefficient between each runoff related factor and the actual rainfall runoff; for each runoff related factor, according to the nonlinear correlation coefficient between the runoff related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff related factor and the actual rainfall runoff, determines the comprehensive influence index of the runoff related factor; then screens out the data corresponding to the runoff related factor whose comprehensive influence index meets the preset conditions from the data to obtain training data; and finally trains the rainfall runoff prediction model through the training data. The following technical effects are achieved: the mutual information value between each runoff correlation factor and the actual rainfall runoff is calculated by the mutual information method, and the nonlinear correlation relationship between each runoff correlation factor and the actual rainfall runoff is obtained, and at the same time, the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff is calculated according to the Pearson correlation coefficient method, and the linear correlation relationship between each runoff correlation factor and the actual rainfall runoff is obtained, so that according to the linear correlation relationship and the nonlinear correlation relationship between the runoff correlation factor and the actual rainfall runoff, the comprehensive influence index between each runoff correlation factor and the actual rainfall runoff is obtained, and then according to the comprehensive influence index, the data corresponding to the runoff correlation factor with a higher comprehensive influence index is screened out from the acquired data as training data, which can fully According to the linear correlation and nonlinear correlation between the runoff correlation factors and the actual rainfall runoff, the redundant data in the data of the input model can be effectively removed, thereby improving the learning efficiency of the rainfall runoff prediction model; by training the rainfall runoff prediction model with training data, the model can fully learn the nonlinear correlation and linear correlation between the runoff correlation factors corresponding to these training data and the actual rainfall runoff, thereby improving the prediction accuracy of the rainfall runoff prediction model; according to the data, the mutual information value between each runoff correlation factor and the actual rainfall runoff is determined as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, which solves the problem of how to determine the nonlinear correlation coefficient between each runoff correlation factor and the actual rainfall runoff. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0056] Figure 1 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 1 ;
[0057] Figure 2 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 2 ;
[0058] Figure 3 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 3 ;
[0059] Figure 4 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 4 ;
[0060] Figure 5 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 5 ;
[0061] Figure 6 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 6 ;
[0062] Figure 7 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 7 ;
[0063] Figure 8 A schematic diagram of the structure of a rainfall runoff prediction model training device provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0065] Reference numerals:
[0066] 810-acquisition module; 820-non-linear correlation module; 830-linear correlation module; 840-comprehensive impact index module; 850-update module; 860-training module;
[0067] 910 - processor; 920 - memory; 930 - communication component; 940 - bus. DETAILED DESCRIPTION
[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0069] In the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will appreciate that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference. It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more.
[0070] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or can be a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the rainfall runoff prediction model training method provided in the embodiment of the present application is only used as an example, and the rainfall runoff prediction model training method can also include more or less content.
[0071] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0072] Runoff-related factors: refers to various natural and human factors in hydrology that affect the process of rainfall being converted into surface runoff and groundwater runoff. These factors act directly or indirectly on different links of the hydrological cycle system, and together determine how much water is converted into flowing water after rainfall in a basin, as well as the dynamic characteristics of the water flow, including the amount, velocity, duration and peak value of runoff. Specifically, runoff-related factors mainly include: climate factors (such as precipitation, rainfall intensity, evaporation, temperature, air pressure, humidity, wind speed, etc.), topographic factors (such as terrain slope, terrain undulation, surface roughness, basin area, river characteristics, etc.), soil factors (such as soil type, soil moisture, soil permeability, soil structure, etc.), vegetation factors (such as vegetation type and coverage, etc.), land use methods (such as forests, grasslands, urbanized areas, etc.), and human factors (such as urbanization construction, water conservancy projects, agricultural irrigation and land management measures, etc.).
[0073] Prediction of rainfall and runoff is an important research field in hydrology, and its accuracy is of great significance for flood prevention and disaster reduction, water resources management, etc. Through accurate rainfall and runoff prediction, people can take measures in advance to reduce the threat of flood disasters to human life and property. In addition, accurate prediction helps to optimize the allocation and management of water resources, improve the utilization efficiency of water resources, and meet the needs of agricultural irrigation, industrial water use, urban water supply, etc.
[0074] In traditional rainfall-runoff prediction methods based on deep learning, the Pearson correlation coefficient method is usually used to remove redundant data in the runoff-related factors of the input model to improve the reliability of the data.
[0075] However, the runoff correlation factor has both linear correlation and nonlinear correlation with the actual rainfall runoff. The Pearson correlation coefficient method can only obtain the linear correlation between the runoff correlation factor and the actual rainfall runoff, but cannot obtain the nonlinear correlation between the runoff correlation factor and the actual rainfall runoff. Therefore, relying solely on the Pearson correlation coefficient method cannot effectively remove the redundant data in the data input to the model, which leads to low prediction accuracy of the model.
[0076] Mutual Information Method (MI) is a calculation method for measuring the degree of mutual dependence between two random variables. The nonlinear correlation relationship between them can be obtained by calculating the mutual information value between the two random variables. Therefore, the embodiment of the present application calculates the mutual information value between each runoff correlation factor and the actual rainfall runoff by the mutual information method, and obtains the nonlinear correlation relationship between each runoff correlation factor and the actual rainfall runoff. At the same time, the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff is calculated according to the Pearson correlation coefficient method, and the linear correlation relationship between each runoff correlation factor and the actual rainfall runoff is obtained. Therefore, according to the linear correlation relationship and nonlinear correlation relationship between the runoff correlation factor and the actual rainfall runoff, the comprehensive impact index (CRII) between each runoff correlation factor and the actual rainfall runoff is obtained. Then, according to the comprehensive impact index, the data input into the rainfall runoff prediction model is screened, and the prediction model is trained by the screened data to improve the prediction accuracy of the rainfall runoff prediction model.
[0077] Based on this, the embodiments of the present application provide a rainfall runoff prediction model training method, device, equipment, medium and product, which can be used in the field of runoff prediction technology, aiming to improve the prediction accuracy of the rainfall runoff prediction model.
[0078] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0079] Figure 1 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 1 .like Figure 1 As shown, the method includes:
[0080] S101, obtaining data related to rainfall runoff, the data including: multiple time periods, values of multiple runoff related factors corresponding to the multiple time periods, and actual rainfall runoff in the multiple time periods;
[0081] Specifically, the rainfall runoff prediction model training method provided in the embodiment of the present application can be applied to a data processing server, which can obtain data related to rainfall runoff through various public meteorological data centers, data platforms, data websites, academic databases, satellite remote sensing technology, etc. These data related to rainfall runoff include: multiple different time periods, and the values of multiple runoff-related factors and actual rainfall runoff in each time period.
[0082] In this embodiment, the runoff-related factors may include various natural and human factors such as various climate factors, topographic factors, soil factors, vegetation factors, land use patterns and human factors. The data processing server may also clean and preprocess the acquired data related to rainfall runoff, eliminate abnormal values and fill in missing values, etc., to ensure the accuracy of the predicted data. In addition, in order to avoid differences caused by different dimensions of different runoff-related factors, the values of each factor may be standardized, and an initial runoff-related factor library may be further constructed.
[0083] S102, determining the mutual information value between each runoff correlation factor and the actual rainfall runoff according to the data, as a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0084] Specifically, in order to further remove redundant data in the acquired data, the data processing server can calculate the mutual information value between each runoff correlation factor and the actual rainfall runoff by the mutual information method, and use the mutual information value as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, so as to screen the acquired data according to the nonlinear correlation coefficient.
[0085] S103, determining the linear correlation coefficient between each runoff-related factor and the actual rainfall runoff according to the data;
[0086] Specifically, the data processing server can also calculate the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff through the correlation coefficient method, that is, the Pearson correlation coefficient function, and thus filter the acquired data according to the linear correlation coefficient to obtain training data for training the rainfall runoff prediction model.
[0087] S104. For each runoff correlation factor, determine a comprehensive impact index of the runoff correlation factor according to a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and a linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0088] Specifically, for each runoff-related factor, the data processing server can determine the comprehensive impact index of the runoff-related factor based on the nonlinear correlation coefficient between the runoff-related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff-related factor and the actual rainfall runoff. In this embodiment, the comprehensive impact index of each runoff-related factor can be the sum of the nonlinear correlation coefficient and the linear correlation coefficient; it can also be the value obtained by summing up the weights assigned to the nonlinear correlation coefficient and the linear correlation coefficient according to different situations; it can also be the product of the nonlinear correlation coefficient and the linear correlation coefficient; or it can be the value of the comprehensive impact index determined by other easily conceivable calculation methods based on the nonlinear correlation coefficient and the linear correlation coefficient, and no specific restrictions are made here.
[0089] S105, filtering out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data;
[0090] Specifically, the data processing server can filter out the data corresponding to the runoff-related factors whose comprehensive impact index meets the preset conditions from the acquired data as training data. Here, satisfying the preset conditions refers to satisfying the conditions of a high comprehensive impact index, that is, the data processing server can filter out the data corresponding to the runoff-related factors whose comprehensive impact index is high from the acquired data as training data. The specific implementation method can be to use the runoff-related factors whose comprehensive impact index is greater than the preset comprehensive impact threshold as training factors for the training model, and use the data corresponding to these training factors as training data; it can also be by sorting the comprehensive impact indexes corresponding to all runoff-related factors, for example, in ascending order from small to large according to the numerical value, and selecting the runoff-related factors corresponding to the preset number of comprehensive impact indexes at the back as training factors, so as to use the data corresponding to these training factors as training data; it can also be respectively calculated the percentile of the comprehensive impact index corresponding to each runoff-related factor in all runoff-related factors, and use the runoff-related factors whose percentile is greater than the preset percentile as training factors, so as to use the data corresponding to these training factors as training data to train the rainfall runoff prediction model. The training factors may also be determined according to the comprehensive impact index in other ways to obtain the training data, and no specific limitation is made here.
[0091] S106, training the rainfall runoff prediction model using training data;
[0092] Specifically, after determining the training data, the data processing server can train the rainfall runoff prediction model through the training data. Since the comprehensive impact indexes corresponding to these training data are all high, that is, the nonlinear correlation coefficients and linear correlation coefficients between the runoff related factors corresponding to these training data and the actual rainfall runoff are both high, therefore, by training the rainfall runoff prediction model through these training data, the model can fully learn the nonlinear correlation relationship and linear correlation relationship between the runoff related factors corresponding to these training data and the actual rainfall runoff, thereby improving the prediction accuracy of the rainfall runoff prediction model.
[0093] The present embodiment provides a rainfall runoff prediction model training method, which obtains rainfall runoff related data, the data including: multiple time periods, values corresponding to multiple runoff related factors in multiple time periods, and actual rainfall runoff in multiple time periods; and according to the data, determines the mutual information value between each runoff related factor and the actual rainfall runoff as the nonlinear correlation coefficient between the runoff related factor and the actual rainfall runoff; thereby, according to the data, determines the linear correlation coefficient between each runoff related factor and the actual rainfall runoff; for each runoff related factor, determines the comprehensive influence index of the runoff related factor according to the nonlinear correlation coefficient between the runoff related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff related factor and the actual rainfall runoff; then selects the data corresponding to the runoff related factor whose comprehensive influence index meets the preset conditions from the data to obtain the training data; and finally trains the rainfall runoff prediction model through the training data. The following technical effects are achieved: the mutual information value between each runoff correlation factor and the actual rainfall runoff is calculated by the mutual information method, and the nonlinear correlation relationship between each runoff correlation factor and the actual rainfall runoff is obtained, and at the same time, the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff is calculated according to the Pearson correlation coefficient method, and the linear correlation relationship between each runoff correlation factor and the actual rainfall runoff is obtained, so that according to the linear correlation relationship and the nonlinear correlation relationship between the runoff correlation factor and the actual rainfall runoff, the comprehensive influence index between each runoff correlation factor and the actual rainfall runoff is obtained, and then according to the comprehensive influence index, the data corresponding to the runoff correlation factor with a higher comprehensive influence index is screened out from the acquired data as training data, which can fully According to the linear correlation and nonlinear correlation between the runoff correlation factors and the actual rainfall runoff, the redundant data in the data of the input model can be effectively removed, thereby improving the learning efficiency of the rainfall runoff prediction model; by training the rainfall runoff prediction model with training data, the model can fully learn the nonlinear correlation and linear correlation between the runoff correlation factors corresponding to these training data and the actual rainfall runoff, thereby improving the prediction accuracy of the rainfall runoff prediction model; according to the data, the mutual information value between each runoff correlation factor and the actual rainfall runoff is determined as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, which solves the problem of how to determine the nonlinear correlation coefficient between each runoff correlation factor and the actual rainfall runoff.
[0094] Figure 2 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 2 In one possible example, Figure 2 As shown, in this embodiment Figure 1Based on the embodiment, how the data processing server selects training data from the acquired data is described in detail. S105: Filter out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data, including:
[0095] S201, determining a first sum of comprehensive impact indexes of all runoff related factors;
[0096] Specifically, after obtaining the comprehensive impact index between each runoff-related factor and the actual rainfall runoff, the data processing server can sum the comprehensive impact indexes of all runoff-related factors to obtain a first sum. The specific calculation method of the first sum is as follows:
[0097]
[0098] Among them, S refers to the first sum of the comprehensive impact index of all runoff related factors, It refers to the comprehensive impact index between the i-th runoff-related factor and the actual rainfall runoff, and n refers to the number of all runoff-related factors, indicating that there are n runoff-related factors.
[0099] S202, for each runoff-related factor, determining other runoff-related factors whose comprehensive impact index is less than or equal to the comprehensive impact index of the runoff-related factor, and calculating a second sum of the comprehensive impact indexes of the other runoff-related factors;
[0100] Specifically, for each runoff-related factor, the data processing server can further determine the remaining runoff-related factors whose comprehensive impact index is less than or equal to the comprehensive impact index of the runoff-related factor, and calculate the second sum of the comprehensive impact indexes of the remaining runoff-related factors. The specific calculation method of the second sum is as follows:
[0101]
[0102] in, It refers to the second sum of the comprehensive impact indexes of the remaining runoff-related factors corresponding to the i-th runoff-related factor. It refers to the comprehensive impact index of the jth type of other runoff-related factors. Here, the comprehensive impact index of the jth type of other runoff-related factors is less than or equal to the comprehensive impact index of the ith type of runoff-related factors.
[0103] S203, obtaining a cumulative contribution rate of each runoff-related factor according to a ratio of the second sum to the first sum of each runoff-related factor;
[0104] Specifically, after determining the second sum corresponding to each runoff-related factor and the first sum of the comprehensive impact index of all runoff-related factors, the data processing server can obtain the cumulative contribution rate of each runoff-related factor according to the ratio of the second sum of each runoff-related factor to the first sum. The specific calculation method of the cumulative contribution rate of each runoff-related factor is as follows:
[0105]
[0106] in, It refers to the cumulative contribution rate of the i-th runoff related factor, It refers to the second sum of the comprehensive impact indexes of the remaining runoff-related factors corresponding to the i-th runoff-related factor, and S refers to the first sum of the comprehensive impact indexes of all runoff-related factors.
[0107] S204, filtering out data corresponding to runoff-related factors whose cumulative contribution rates are greater than or equal to a first threshold from the data to obtain training data;
[0108] Specifically, after determining the cumulative contribution rate of each runoff-related factor, the data processing server can select the runoff-related factors whose cumulative contribution rate is greater than or equal to the first threshold as training factors, and use the data corresponding to these training factors as training data. The first threshold here can be set according to the actual situation of model training, for example, it can be specifically set to a value such as 0.7, 0.8 or 0.9, or it can be set to other specific values, which are not specifically limited here.
[0109] The embodiment of the present application provides a method for training a rainfall runoff prediction model, which obtains a first sum by summing the comprehensive influence indexes of all runoff-related factors, and for each runoff-related factor, determines the remaining runoff-related factors whose comprehensive influence index is less than or equal to the comprehensive influence index of the runoff-related factor, thereby calculating the second sum of the comprehensive influence indexes of the remaining runoff-related factors, and then obtains the cumulative contribution rate of each runoff-related factor according to the ratio of the second sum corresponding to each runoff-related factor to the first sum, and finally obtains the training data by screening out the data corresponding to the runoff-related factors whose cumulative contribution rate is greater than or equal to the first threshold. By calculating the cumulative contribution rate of each runoff-related factor, and then screening out the training factors from a plurality of runoff-related factors according to the cumulative contribution rate, and using the data corresponding to these training factors as the training data, the redundant data in the acquired data can be effectively removed, and the problem of incomplete deletion of redundant data or mistaken deletion of important runoff-related factors caused by screening the data only according to the relationship between a single runoff-related factor and the actual rainfall runoff can be effectively avoided.
[0110] Figure 3Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 3 In one possible example, Figure 3 As shown, in this embodiment Figure 1 Based on the embodiment, how the data processing server determines the mutual information value between each runoff correlation factor and the actual rainfall runoff is described in detail. S102: Determine the mutual information value between each runoff correlation factor and the actual rainfall runoff according to the data, including:
[0111] S301, for each runoff correlation factor, input the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in the multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of the multiple time periods into a kernel density estimation formula, and calculate the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period;
[0112] Specifically, for each runoff-related factor, the data processing server can input the values of the runoff-related factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first smoothing parameter corresponding to the runoff-related factor, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of multiple time periods into the kernel density estimation formula, thereby calculating the joint probability distribution of the runoff-related factor and the actual rainfall runoff in each time period. The specific calculation method of the joint probability distribution is as follows:
[0113]
[0114] in, It refers to the joint probability distribution of the ith runoff-related factor and the actual rainfall runoff in any time period. refers to the value of the i-th runoff-related factor in any time period, k refers to any time period, It refers to the value of the i-th runoff related factor in the t-th time period, It refers to the value of actual rainfall runoff in any time period. It refers to the value of actual rainfall runoff in the tth time period, where the length of the time period can be a year, a quarter, or other time lengths. T refers to the number of all time periods, It refers to the first smoothing parameter (also called the first bandwidth parameter) of the preset i-th runoff correlation factor. It refers to the second smoothing parameter (also called the second bandwidth parameter) corresponding to the preset actual rainfall runoff. Here, the first smoothing parameters corresponding to all runoff related factors can be the same. K is the kernel function, which can be a Gaussian kernel function, as shown in the following formula:
[0115]
[0116] Substituting the kernel function K into the kernel density estimation formula can obtain the joint probability distribution of runoff related factors and actual rainfall runoff.
[0117] S302, for each runoff correlation factor, input the values of the runoff correlation factor in multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, and the number of multiple time periods into a kernel density estimation formula, and calculate the first marginal probability distribution of the runoff correlation factor in each time period;
[0118] Specifically, for each runoff-related factor, the data processing server can further input the values of the runoff-related factor in multiple time periods, the first smoothing parameter corresponding to the runoff-related factor, and the number of multiple time periods into the kernel density estimation formula, so as to calculate the first marginal probability distribution of the runoff-related factor in each time period. The specific calculation method of the first marginal probability distribution is as follows:
[0119]
[0120] in, It refers to the first marginal probability distribution of the i-th runoff-related factor in any time period, where the first smoothing parameters corresponding to all runoff-related factors can be the same.
[0121] S303, inputting the actual rainfall runoff in multiple time periods, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of the multiple time periods into a kernel density estimation formula, and calculating a second marginal probability distribution of the actual rainfall runoff in each time period;
[0122] Specifically, the data processing server can further input the actual rainfall runoff in multiple time periods, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of multiple time periods into the kernel density estimation formula, so as to calculate the second marginal probability distribution of the actual rainfall runoff in each time period. The specific calculation method of the second marginal probability distribution is as follows:
[0123]
[0124] in, It refers to the second marginal probability distribution of actual rainfall runoff in any time period.
[0125] S304, for each runoff correlation factor, input the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period, the first marginal probability distribution of the runoff correlation factor in each time period, and the second marginal probability distribution of the actual rainfall runoff in each time period into the mutual information formula, and calculate the mutual information value of the runoff correlation factor and the actual rainfall runoff;
[0126] Specifically, for each runoff correlation factor, the data processing server can input the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period, the first marginal probability distribution of the runoff correlation factor in each time period, and the second marginal probability distribution of the actual rainfall runoff in each time period into the mutual information formula, thereby calculating the mutual information value of the runoff correlation factor and the actual rainfall runoff. The specific calculation method of the mutual information value of the runoff correlation factor and the actual rainfall runoff is as follows:
[0127]
[0128] in, It refers to the mutual information value between the i-th runoff correlation factor and the actual rainfall runoff.
[0129] Figure 4 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 4 In one possible example, Figure 4 As shown, in this embodiment Figure 1 Based on the embodiment, how the data processing server determines the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff is described in detail. S103, according to the data, determining the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff, including:
[0130] S401, determining an average value of the values of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0131] Specifically, the data processing server may respectively calculate the average value of each runoff-related factor in multiple time periods, and use the average value as the first average value of the runoff-related factor.
[0132] S302, determining an average value of actual rainfall runoff in multiple time periods as a second average value of actual rainfall runoff;
[0133] Specifically, the data processing server may calculate an average value of actual rainfall runoff in multiple time periods and use it as the second average value of the actual rainfall runoff.
[0134] S303, for each runoff correlation factor, input the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in the multiple time periods, the first average value of the runoff correlation factor, and the second average value of the actual rainfall runoff into a Pearson correlation coefficient function, and calculate the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0135] Specifically, for each runoff correlation factor, the data processing server can further input the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first average value of the runoff correlation factor, and the second average value of the actual rainfall runoff into the Pearson correlation coefficient function, thereby calculating the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff. The specific calculation method is as follows:
[0136]
[0137] in, It refers to the first average value of the i-th runoff-related factor in T time periods. It refers to the average rainfall runoff in T time periods. It refers to the linear correlation coefficient between the i-th runoff correlation factor and the actual rainfall runoff.
[0138] Figure 5 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 5 In one possible example, Figure 5 As shown, in this embodiment Figure 1 Based on the embodiment, a detailed description is given on how the data processing server performs preliminary screening on the acquired data before calculating the mutual information value between each runoff correlation factor and the actual rainfall runoff. Figure 5 As shown, the method includes:
[0139] S501, determining an average value of the values of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0140] Specifically, the data processing server may respectively calculate the average value of each runoff-related factor in multiple time periods, and use the average value as the first average value of the runoff-related factor.
[0141] S502: for any two runoff correlation factors, input the values of the two runoff correlation factors in multiple time periods and the first average values corresponding to the two runoff correlation factors into a Pearson correlation coefficient function to calculate the correlation coefficient of the two runoff correlation factors;
[0142] Specifically, for any two runoff correlation factors, the data processing server can further input the values of the two runoff correlation factors in multiple time periods and the first average values corresponding to the two runoff correlation factors into the Pearson correlation coefficient function, thereby calculating the correlation coefficient of the two runoff correlation factors. The specific calculation method is as follows:
[0143]
[0144] in, It refers to the value of the j-th runoff-related factor in any time period. It refers to the first average value of the j-th runoff-related factor in T time periods. It refers to the correlation coefficient between the i-th runoff correlation factor and the j-th runoff correlation factor.
[0145] S503, deleting from the data the value of one of the two runoff correlation factors whose correlation coefficient is greater than or equal to the second threshold;
[0146] Specifically, the data processing server may delete, from the acquired data, the value of one of the two runoff correlation factors whose correlation coefficient is greater than or equal to the preset second threshold. , and the second threshold is 0.6, then the value of the runoff-related factor of the jth type can be deleted from the acquired data, or the value of the runoff-related factor of the jth type can be deleted. It should be noted that the second threshold of 0.6 here is only an example, and can also be set to other specific values, such as 0.65, 0.7 or 0.8, etc., according to the actual situation of model training, and no specific limitation is made here.
[0147] The embodiment of the present application provides a rainfall runoff prediction model training method, by determining the average value of each runoff correlation factor in multiple time periods as the first average value of the runoff correlation factor; and for any two runoff correlation factors, the values of the two runoff correlation factors in multiple time periods and the first average values corresponding to the two runoff correlation factors are input into the Pearson correlation coefficient function to calculate the correlation coefficient of the two runoff correlation factors; and then from the data, delete the value of one of the two runoff correlation factors whose correlation coefficient of the two runoff correlation factors is greater than or equal to the second threshold. Not only does it remove the redundant data between the runoff correlation factors, but it also reduces noise interference for the subsequent calculation of the mutual information value of each runoff correlation factor and the actual rainfall runoff. Since the calculation process of the mutual information value is sensitive to noise and redundant data, reducing the noise interference in the data helps to improve the calculation accuracy of the mutual information value, and thus helps to improve the prediction accuracy of the rainfall runoff prediction model.
[0148] Figure 6 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 6 In one possible example, Figure 6 As shown, in this embodiment Figure 5 Based on the embodiment, how the data processing server determines the comprehensive impact index of each runoff-related factor is described in detail. Figure 6 As shown, the method includes:
[0149] S601, inputting the mutual information value between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple mutual information values, and the minimum value among multiple mutual information values into the extreme value normalization formula, calculating the normalized mutual information value between the runoff correlation factor and the actual rainfall runoff, and using the normalized mutual information value as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0150] Specifically, the data processing server can input the mutual information value between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple mutual information values, and the minimum value among multiple mutual information values into the extreme value normalization formula, thereby calculating the normalized mutual information value between the runoff correlation factor and the actual rainfall runoff, and using the normalized mutual information value as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff. The specific calculation method is as follows:
[0151]
[0152] in, refers to the normalized mutual information value between the i-th runoff correlation factor and the actual rainfall runoff, n refers to the number of all runoff correlation factors, refers to the minimum value among n mutual information values, It refers to the maximum value among the n mutual information values.
[0153] S602, inputting the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the maximum value among the multiple linear correlation coefficients, and the minimum value among the multiple linear correlation coefficients into the extreme value normalization formula to calculate the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0154] Specifically, the data processing server can input the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple linear correlation coefficients, and the minimum value among multiple linear correlation coefficients into the extreme value normalization formula, thereby calculating the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff. The specific calculation method is as follows:
[0155]
[0156] in, It refers to the normalized linear correlation coefficient between the ith runoff correlation factor and the actual rainfall runoff. It refers to the minimum value among n linear correlation coefficients. It refers to the maximum value among n linear correlation coefficients.
[0157] S603, assigning a weight of a nonlinear correlation coefficient between a runoff correlation factor and actual rainfall runoff to a first weight, and assigning a weight of a normalized linear correlation coefficient between a runoff correlation factor and actual rainfall runoff to a second weight;
[0158] Specifically, the data processing server assigns weights to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff. That is, the weight of the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff is assigned to the first weight, and the weight of the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff is assigned to the second weight. The sum of the first weight and the second weight can be 1, and the first weight and the second weight can be 0.5 respectively.
[0159] S604, determining a comprehensive impact index of the runoff correlation factor according to a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, a normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and a first weight and a second weight;
[0160] Specifically, the data processing server can determine the comprehensive impact index of the runoff correlation factor based on the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the first weight and the second weight. The specific calculation method is as follows:
[0161]
[0162] in, is the first weight, Refers to the second weight.
[0163] Figure 7 Schematic diagram of the process of the rainfall runoff prediction model training method provided in the embodiment of the present application Figure 7 In one possible example, Figure 7 As shown, in this embodiment Figure 6 Based on the embodiment, how the data processing server trains the rainfall runoff prediction model through training data is described in detail. S106, training the rainfall runoff prediction model through training data, including:
[0164] S701, dividing the training data into a training set and a test set;
[0165] Specifically, the data processing server can divide the training data into a training set and a test set. The training set can be used to train the rainfall runoff prediction model, and the training set can include 80% to 90% of the data in the training data that is farther away from the current time; the test set is used to analyze the trained rainfall runoff prediction model, and the test set can include 10% to 20% of the data in the training data that is closest to the current time.
[0166] S702, training the rainfall runoff prediction model using the training set;
[0167] Specifically, the data processing server can train the rainfall runoff prediction model through training data. The rainfall runoff prediction model can be a deep learning neural network model in the prior art, including but not limited to models such as Long Short-Term Memory (LSTM), Bidirectional Long Short-Term Memory (BiLSTM) and Convolutional Neural Networks (CNN). In addition, the attention mechanism can be introduced into the rainfall runoff prediction model to construct a CNN-BILSTM-Attention model. During the model training process, the training data is first input into the CNN layer of the CNN-BILSTM-Attention model in chronological order, and the local features in the training data are extracted through the convolution operation. Then, the feature dimension is reduced through the pooling layer to retain the main features. Then, the pooled feature map is input into the BiLSTM layer, and the long-term dependency in the time series is captured through the bidirectional long short-term memory network. After that, the hidden state of the BiLSTM output is weighted and summed through the introduced Attention mechanism to capture the feature information of important time steps. Finally, the output of the Attention mechanism is passed to the fully connected layer to generate the final prediction result. The model is trained and verified by defining appropriate loss functions and optimization algorithms, such as mean square error and Adaptive Moment Estimation (Adam) algorithm, and the model parameters are adjusted to optimize performance. Finally, the prediction ability of the model is analyzed on the test set to ensure the accuracy and reliability of the model in practical applications.
[0168] S703, inputting the values of the runoff related factors in the test set into the trained rainfall runoff prediction model to obtain predicted rainfall runoff;
[0169] Specifically, after the training is completed, the data processing server can analyze the rainfall runoff prediction model according to the test set, that is, by inputting the training data in the test set into the trained rainfall runoff prediction model, thereby outputting rainfall runoff prediction data.
[0170] S704, calculating the mean absolute error and determination coefficient of the rainfall runoff prediction model according to the predicted rainfall runoff and the actual rainfall runoff;
[0171] Specifically, the data processing server can calculate the mean absolute error (MAE) and coefficient of determination (R²) of the rainfall runoff prediction model based on the rainfall runoff prediction data and the actual rainfall runoff, so as to analyze the prediction accuracy of the rainfall runoff prediction model. The calculation formula of the mean absolute error is:
[0172]
[0173] Among them, MAE refers to the mean absolute error of the rainfall runoff prediction model, N refers to the number of time periods in the test set, Refers to the actual rainfall runoff, Refers to the prediction of rainfall runoff.
[0174] The formula for calculating the coefficient of determination is:
[0175]
[0176] in, It refers to the determination coefficient of the rainfall-runoff prediction model. Refers to the actual rainfall runoff mean. The data processing server can also calculate indicators such as the root mean square error and the mean absolute error percentage based on the rainfall runoff prediction data and the actual rainfall runoff, and analyze the rainfall runoff prediction model based on these indicators to further adjust the model.
[0177] The embodiment of the present invention can divide the electronic device or the main control device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0178] Figure 8 This is a schematic diagram of the structure of the rainfall runoff prediction model training device provided in the embodiment of the present application. Figure 8As shown, the rainfall runoff prediction model training device includes: an acquisition module 810, a nonlinear correlation module 820, a linear correlation module 830, a comprehensive influence index module 840, an update module 850, and a training module 860.
[0179] The acquisition module 810 is used to acquire data related to rainfall runoff, the data including: multiple time periods, values of multiple runoff related factors corresponding to the multiple time periods, and actual rainfall runoff in the multiple time periods;
[0180] The nonlinear correlation module 820 is used to determine the mutual information value between each runoff correlation factor and the actual rainfall runoff according to the data as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0181] A linear correlation module 830 is used to determine the linear correlation coefficient between each runoff correlation factor and the actual rainfall runoff according to the data;
[0182] The comprehensive impact index module 840 is used to determine the comprehensive impact index of the runoff correlation factor for each runoff correlation factor according to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0183] An updating module 850 is used to filter out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data;
[0184] The training module 860 is used to train the rainfall runoff prediction model through training data.
[0185] In one possible design, the updating module 850 includes: a first summing module, a second summing module, a cumulative contribution rate module and a first screening module;
[0186] A first summation module, used to determine a first summation of the comprehensive impact index of all runoff-related factors;
[0187] A second summation module is used to determine, for each runoff-related factor, other runoff-related factors whose comprehensive impact index is less than or equal to the comprehensive impact index of the runoff-related factor, and calculate a second summation of the comprehensive impact indexes of the other runoff-related factors;
[0188] A cumulative contribution rate module, used for obtaining the cumulative contribution rate of each runoff related factor according to the ratio of the second sum to the first sum of each runoff related factor;
[0189] The first screening module is used to screen out data corresponding to runoff related factors whose cumulative contribution rate is greater than or equal to a first threshold from the data to obtain training data.
[0190] In one possible design, the nonlinear correlation module 820 further includes: a joint probability distribution module, a first edge probability distribution module, a second edge probability distribution module, and a mutual information module;
[0191] A joint probability distribution module is used to input the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of multiple time periods into a kernel density estimation formula for each runoff correlation factor, and calculate the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period;
[0192] A first marginal probability distribution module is used for inputting the values of the runoff correlation factor in multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, and the number of multiple time periods into a kernel density estimation formula for each runoff correlation factor, and calculating a first marginal probability distribution of the runoff correlation factor in each time period;
[0193] The second marginal probability distribution module is used to input the actual rainfall runoff in multiple time periods, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of multiple time periods into the kernel density estimation formula to calculate the second marginal probability distribution of the actual rainfall runoff in each time period;
[0194] The mutual information module is used to input the joint probability distribution of the runoff correlation factor and the actual rainfall runoff in each time period, the first marginal probability distribution of the runoff correlation factor in each time period, and the second marginal probability distribution of the actual rainfall runoff in each time period into the mutual information formula for each runoff correlation factor, and calculate the mutual information value of the runoff correlation factor and the actual rainfall runoff.
[0195] In a possible design, the linear correlation module 830 further includes: a first average value module, a second average value module and a first correlation coefficient function module;
[0196] A first average value module is used to determine an average value of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0197] A second average value module is used to determine an average value of actual rainfall runoff in multiple time periods as a second average value of actual rainfall runoff;
[0198] The first correlation coefficient function module is used to input the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first average value of the runoff correlation factor, and the second average value of the actual rainfall runoff into the Pearson correlation coefficient function for each runoff correlation factor, and calculate the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff.
[0199] In a possible design, the rainfall runoff prediction model training device further includes: an autocorrelation mean module, a second correlation coefficient function module, and a second screening module;
[0200] An autocorrelation mean module is used to determine the average value of each runoff-related factor in multiple time periods as a first average value of the runoff-related factor;
[0201] The second correlation coefficient function module is used for inputting the values of the two runoff correlation factors in multiple time periods and the first average values respectively corresponding to the two runoff correlation factors into the Pearson correlation coefficient function for any two runoff correlation factors, and calculating the correlation coefficient of the two runoff correlation factors;
[0202] The second screening module is used to delete, from the data, the value of one of the two runoff correlation factors whose correlation coefficient is greater than or equal to a second threshold.
[0203] In one possible design, the training module 860 includes: a data partitioning module, a training set module, a prediction set module, and an analysis module;
[0204] A data partitioning module is used to divide the training data into a training set and a test set;
[0205] The training set module is used to train the rainfall runoff prediction model through the training set;
[0206] The prediction set module is used to input the values of the runoff related factors in the test set into the trained rainfall runoff prediction model to obtain the predicted rainfall runoff;
[0207] The analysis module is used to calculate the mean absolute error and determination coefficient of the rainfall runoff prediction model based on the predicted rainfall runoff and the actual rainfall runoff.
[0208] In a possible design, the rainfall runoff prediction model training device further includes: a normalized mutual information value module, a normalized linear correlation coefficient module, a weight assignment module and a comprehensive calculation module;
[0209] A normalized mutual information value module is used to input the mutual information value between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple mutual information values, and the minimum value among multiple mutual information values into the extreme value standardization formula, calculate the normalized mutual information value between the runoff correlation factor and the actual rainfall runoff, and use the normalized mutual information value as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0210] A normalized linear correlation coefficient module is used to input the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the maximum value among multiple linear correlation coefficients, and the minimum value among multiple linear correlation coefficients into an extreme value standardization formula to calculate the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff;
[0211] A weight assignment module, used for assigning a weight of a nonlinear correlation coefficient between a runoff correlation factor and actual rainfall runoff to a first weight, and assigning a weight of a normalized linear correlation coefficient between a runoff correlation factor and actual rainfall runoff to a second weight;
[0212] The comprehensive calculation module is used to determine the comprehensive influence index of the runoff correlation factor according to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the first weight and the second weight.
[0213] The present embodiment provides a rainfall runoff prediction model training device, which can execute a rainfall runoff prediction model training method of the above-mentioned embodiment. Its implementation principle and technical effects are similar, and will not be described in detail in this embodiment.
[0214] In the specific implementation of the aforementioned rainfall runoff prediction model training device, each module can be implemented as a processor, and the processor can execute computer execution instructions stored in the memory, so that the processor executes the aforementioned rainfall runoff prediction model training method.
[0215] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device includes: at least one processor 910 and a memory 920. The electronic device also includes a communication component 930. The processor 910, the memory 920 and the communication component 930 are connected via a bus 940.
[0216] In the specific implementation process, at least one processor 910 executes the computer execution instructions stored in the memory 920, so that at least one processor 910 executes the rainfall runoff prediction model training method executed by the electronic device side as above.
[0217] The specific implementation process of the processor 910 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0218] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0219] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0220] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0221] The above-mentioned functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present invention, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present invention.
[0222] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, it is used to implement the above rainfall runoff prediction model training method.
[0223] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0224] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.
[0225] The present application also provides a computer program product, which includes a computer program. The computer program is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium. At least one processor executes the computer program so that the electronic device executes the solution provided in any of the above embodiments.
[0226] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by hardware related to program instructions. The above program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above method embodiments are executed; and the above storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0227] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit.
[0228] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A rainfall runoff prediction model training method, characterized in that: The method comprises: Acquire data related to rainfall runoff, the data including: multiple time periods, values of multiple runoff related factors corresponding to the multiple time periods, and actual rainfall runoff in the multiple time periods; According to the data, determining the mutual information value between each of the runoff correlation factors and the actual rainfall runoff as a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff; Determine the linear correlation coefficient between each of the runoff-related factors and the actual rainfall runoff according to the data; For each of the runoff related factors, determining a comprehensive influence index of the runoff related factor according to the nonlinear correlation coefficient between the runoff related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff related factor and the actual rainfall runoff; Filter out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data; The rainfall runoff prediction model is trained using the training data.
2. The method according to claim 1, characterized in that The step of selecting data corresponding to the runoff-related factors whose comprehensive impact index satisfies preset conditions from the data to obtain training data includes: Determining a first sum of the comprehensive impact indexes of all the runoff-related factors; For each of the runoff-related factors, determining the remaining runoff-related factors whose comprehensive impact index is less than or equal to the comprehensive impact index of the runoff-related factor, and calculating a second sum of the comprehensive impact indexes of the remaining runoff-related factors; Obtaining a cumulative contribution rate of each of the runoff-related factors according to a ratio of the second sum to the first sum of each of the runoff-related factors; The data corresponding to the runoff related factors whose cumulative contribution rate is greater than or equal to the first threshold are screened out from the data to obtain training data.
3. The method according to claim 1, characterized in that: Determining the mutual information value between each of the runoff related factors and the actual rainfall runoff according to the data includes: For each of the runoff-related factors, the values of the runoff-related factors in the multiple time periods, the actual rainfall runoff in the multiple time periods, the first smoothing parameter corresponding to the runoff-related factors, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of the multiple time periods are input into a kernel density estimation formula to calculate the joint probability distribution of the runoff-related factors and the actual rainfall runoff in each time period; For each of the runoff correlation factors, the values of the runoff correlation factor in the multiple time periods, the first smoothing parameter corresponding to the runoff correlation factor, and the number of the multiple time periods are input into a kernel density estimation formula to calculate the first marginal probability distribution of the runoff correlation factor in each time period; Input the actual rainfall runoff of the multiple time periods, the second smoothing parameter corresponding to the actual rainfall runoff, and the number of the multiple time periods into a kernel density estimation formula to calculate a second marginal probability distribution of the actual rainfall runoff in each time period; For each of the runoff-related factors, the joint probability distribution of the runoff-related factor and the actual rainfall runoff in each time period, the first marginal probability distribution of the runoff-related factor in each time period, and the second marginal probability distribution of the actual rainfall runoff in each time period are input into the mutual information formula to calculate the mutual information value of the runoff-related factor and the actual rainfall runoff.
4. The method according to claim 1, characterized in that: Determining the linear correlation coefficient between each of the runoff related factors and the actual rainfall runoff based on the data includes: Determine an average value of the values of each of the runoff related factors in the multiple time periods as a first average value of the runoff related factors; Determine an average value of the actual rainfall runoff in a plurality of the time periods as a second average value of the actual rainfall runoff; For each of the runoff correlation factors, the values of the runoff correlation factor in multiple time periods, the actual rainfall runoff in multiple time periods, the first average value of the runoff correlation factor, and the second average value of the actual rainfall runoff are input into the Pearson correlation coefficient function to calculate the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff.
5. The method according to any one of claims 1 to 4, characterized in that: Before determining the mutual information value between each of the runoff correlation factors and the actual rainfall runoff according to the data as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the method further comprises: Determine an average value of the values of each of the runoff related factors in the multiple time periods as a first average value of the runoff related factors; For any two of the runoff correlation factors, the values of the two runoff correlation factors in the multiple time periods and the first average values respectively corresponding to the two runoff correlation factors are input into the Pearson correlation coefficient function to calculate the correlation coefficient of the two runoff correlation factors; From the data, a value of one of the two runoff correlation factors whose correlation coefficient is greater than or equal to a second threshold is deleted.
6. The method according to claim 5, characterized in that The step of training the rainfall runoff prediction model by using the training data comprises: Dividing the training data into a training set and a test set; Training the rainfall runoff prediction model using the training set; Inputting the values of the runoff related factors in the test set into the trained rainfall runoff prediction model to obtain predicted rainfall runoff; According to the predicted rainfall runoff and the actual rainfall runoff, the mean absolute error and the coefficient of determination of the rainfall runoff prediction model are calculated.
7. The method according to claim 6, characterized in that For each of the runoff related factors, the method further comprises: Input the mutual information value between the runoff correlation factor and the actual rainfall runoff, the maximum value among the multiple mutual information values, and the minimum value among the multiple mutual information values into the extreme value normalization formula, calculate the normalized mutual information value between the runoff correlation factor and the actual rainfall runoff, and use the normalized mutual information value as the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff; Input the linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the maximum value among the multiple linear correlation coefficients, and the minimum value among the multiple linear correlation coefficients into the extreme value normalization formula to calculate the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff; Assigning a weight of the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff as a first weight, and assigning a weight of the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff as a second weight; A comprehensive influence index of the runoff correlation factor is determined according to the nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, the normalized linear correlation coefficient between the runoff correlation factor and the actual rainfall runoff, and the first weight and the second weight.
8. A rainfall runoff prediction model training device, characterized in that: include: An acquisition module, used to acquire data related to rainfall runoff, the data including: multiple time periods, values of multiple runoff related factors corresponding to the multiple time periods, and actual rainfall runoff in the multiple time periods; A nonlinear correlation module, used for determining, based on the data, a mutual information value between each of the runoff correlation factors and the actual rainfall runoff as a nonlinear correlation coefficient between the runoff correlation factor and the actual rainfall runoff; A linear correlation module, used for determining a linear correlation coefficient between each of the runoff-related factors and the actual rainfall runoff according to the data; A comprehensive impact index module, for determining, for each of the runoff-related factors, a comprehensive impact index of the runoff-related factor according to the nonlinear correlation coefficient between the runoff-related factor and the actual rainfall runoff, and the linear correlation coefficient between the runoff-related factor and the actual rainfall runoff; An updating module, used to filter out data corresponding to runoff-related factors whose comprehensive impact index meets preset conditions from the data to obtain training data; The training module is used to train the rainfall runoff prediction model using the training data.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the rainfall-runoff prediction model training method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the rainfall runoff prediction model training method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the rainfall runoff prediction model training method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Representative power station based basin rainfall runoff power macro-forecasting method
CN105354416A
Rainfall runoff prediction method, device and equipment and storage medium
CN118070249A
KR20210044092A
