Water and rain condition prediction model training method

By collecting multidimensional feature data, performing data cleaning and feature extraction, and using linear regression, sliding average and exponential smoothing methods to construct a multidimensional feature set, combined with a dynamic iterative optimization strategy, the problems of data instability and insufficient accuracy in water and rainfall forecasting in complex environments are solved, and efficient and stable water and rainfall forecasting is achieved.

CN120632461APending Publication Date: 2025-09-12HUADIAN JINSHAJIANG UPSTREAM HYDROPOWER DEV CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510773372.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing water and rainfall forecasting methods have unstable data collection in complex environments, difficulty in processing high-dimensional and large-capacity data, insufficient algorithm optimization, strong network dependence, limited prediction accuracy and generalization performance, and cannot meet the needs of accurate early warning and decision support.

Method used

By collecting multidimensional feature data, performing data cleaning and feature extraction, and using linear regression, sliding average and exponential smoothing methods to construct a multidimensional feature set, combined with dynamic iterative optimization strategies, model training and verification are carried out to ensure the stability and generalization performance of the model.

Benefits of technology

It improves the accuracy and stability of water and rainfall forecasts, adapts to the water forecast needs of different regions and scenarios, and provides more reliable technical support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632461A_ABST
    Figure CN120632461A_ABST
Patent Text Reader

Abstract

The invention provides a water and rain condition prediction model training method. The method comprises the following steps: determining a water and rain condition multi-dimensional feature set for a preprocessed water and rain condition data sample set; randomly distributing a plurality of water and rain condition multi-dimensional feature sets corresponding to the plurality of water and rain condition data sample sets to a plurality of subsets; based on the initial water and rain condition prediction model, performing model iteration training according to a sequence from the first subset to the nth subset; determining a performance index value of the intermediate model obtained by each iteration training; determining a performance index mean value of the plurality of subsets based on the performance index value of the intermediate model obtained by each iteration training; and if the average value of the performance indexes is greater than or equal to a preset index threshold value, setting the model obtained by the current last iteration training as a target water and rain condition prediction model, otherwise, randomly dividing a plurality of subsets again until the average value of the obtained performance indexes is greater than or equal to the preset index threshold value. According to the technical scheme, the accuracy and the automation degree of water and rain condition prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present application relates to the field of data analysis technology, and in particular to a water and rainfall prediction model training method. [Background Technology]

[0002] Water and rainfall forecasting is of great significance in water conservancy projects, disaster prevention and control, and other fields. Traditional methods mainly rely on sensor networks and meteorological satellites to collect water level, rainfall and other data in real time, and analyze and process them through cloud computing and big data technologies.

[0003] However, existing technologies have significant shortcomings. Data quality is easily affected by complex environments such as severe weather and electromagnetic interference, resulting in unstable data collection. Furthermore, traditional data processing methods struggle to cope with the real-time analysis needs of high-dimensional, large-volume data. Algorithms are insufficiently optimized and rely heavily on networks, making it difficult to ensure reliable data transmission in remote areas. Furthermore, the diverse factors that influence water and rainfall patterns make existing models lack the ability to comprehensively extract multidimensional features, resulting in limited prediction accuracy and generalization performance, making it difficult to meet the needs of precise early warning and decision support.

[0004] Therefore, how to build an efficient, stable and adaptable water and rainfall prediction model for complex environments has become a technical problem that needs to be solved urgently. [Summary of the invention]

[0005] The embodiment of the present application provides a water and rainfall prediction model training method, which aims to solve the technical problem that the water and rainfall prediction methods in related technologies are difficult to meet the high-standard water and rainfall prediction needs in complex scenarios.

[0006] In a first aspect, an embodiment of the present application provides a water and rainfall prediction model training method, comprising:

[0007] Collect multiple water and rainfall data sample sets in the target area;

[0008] For each of the water and rainfall data sample sets, preprocessing the water and rainfall data sample set according to a predetermined data cleaning method, and determining a water and rainfall multidimensional feature set for the preprocessed water and rainfall data sample set based on a predetermined feature extraction method;

[0009] Randomly assigning the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n];

[0010] Based on the initial water and rainfall forecast model, performing iterative model training in the order of the 1st subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set;

[0011] Determining the performance index value of the intermediate model obtained from each iterative training based on the water and rainfall prediction value of each iterative training, the actual water and rainfall value, and the number of the water and rainfall multidimensional feature sets in the used subset;

[0012] Determining the mean values ​​of the performance indicators of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained from each iterative training;

[0013] If the performance index mean is greater than or equal to a predetermined index threshold, the model obtained by the current last iterative training is set as the target water and rainfall prediction model;

[0014] If the mean value of the performance index is less than the predetermined index threshold, return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets, and randomly divide the multiple subsets again until the obtained performance index mean value is greater than or equal to the predetermined index threshold.

[0015] In one embodiment of the present application, optionally, preprocessing the water and rainfall data sample set according to a predetermined data cleaning method includes:

[0016] Deleting outliers in the water and rainfall data sample set;

[0017] Fill in the missing values ​​in the water and rainfall data sample set; and

[0018] The water and rainfall data sample set is normalized.

[0019] In one embodiment of the present application, optionally, determining a multidimensional feature set of water and rainfall conditions for the preprocessed water and rainfall condition data sample set based on a predetermined feature extraction method includes:

[0020] Determine the linear trend characteristic value of each data in the pre-processed water and rainfall data sample set based on a linear regression analysis method;

[0021] Determine the long-term trend characteristic value of each data in the preprocessed water and rainfall data sample set based on the sliding average method;

[0022] Based on the exponential smoothing method, determining the time smoothing characteristic value of each data in the preprocessed water and rainfall data sample set at the time of its occurrence;

[0023] For each item of data in the preprocessed water and rainfall data sample set, combining the linear trend characteristic value, the long-term trend characteristic value, and the time smoothing characteristic value of the data with the data into a four-tuple;

[0024] The quadruple corresponding to each data in the preprocessed water-rainfall data sample set is used as the water-rainfall multidimensional feature set corresponding to the preprocessed water-rainfall data sample set.

[0025] In one embodiment of the present application, optionally, determining the linear trend characteristic value of each data item in the pre-processed water and rainfall data sample set based on a linear regression analysis method includes:

[0026] Based on all the data in the pre-processed water and rainfall data sample set as independent variables and the true value of the water and rainfall as the dependent variable, a linear regression line is fitted, wherein,

[0027] y=b0+b1x1+b2x2+...+b n x n ,

[0028] y represents the true value of water and rainfall conditions as the dependent variable, x1, x2, ..., x n Represents the data of the pre-processed water and rainfall data sample set as independent variables, b0, b1, b2, ..., b n is the learning coefficient obtained by fitting;

[0029] The learning coefficient corresponding to each item of the data is used as the linear trend characteristic value of each item of the data.

[0030] In one embodiment of the present application, optionally, determining the long-term trend characteristic value of each data item in the pre-processed water and rainfall data sample set based on a sliding average method includes:

[0031] For each item of data in the preprocessed water and rainfall data sample set, obtaining a data mean of a plurality of water and rainfall data sample sets covered by the data in a specified time window;

[0032] The difference between the data mean and the characteristic value of the data itself is set as the long-term trend characteristic value of the data.

[0033] In one embodiment of the present application, optionally, determining the time smoothing characteristic value of each data item in the preprocessed water and rainfall data sample set at the time of its occurrence based on the exponential smoothing method includes:

[0034] For each item of data in the preprocessed water and rainfall data sample set, determining the weight of the data based on the difference between the collection time of the data and the current time;

[0035] Based on the data and the weight of the data, a time smoothing characteristic value of the data is determined, wherein,

[0036] S t =α×yt +(1-α)×S t -1,

[0037] S t is the time smoothing characteristic value of the data, y t is the eigenvalue of the data itself, and α is the weight of the data.

[0038] In one embodiment of the present application, optionally, determining the performance index value of the intermediate model obtained from each iterative training based on the water and rainfall conditions of each iterative training, the true value of the water and rainfall conditions, and the number of the water and rainfall multidimensional feature sets in the used subset includes:

[0039]

[0040] Among them, MSE i Represents the performance index value of the intermediate model obtained from the i-th iteration training, N i represents the number of multidimensional feature sets of water and rainfall conditions in the subset used for the i-th iteration training, y i is the true value of water and rainfall conditions in the i-th iteration, is the water and rainfall forecast value of the i-th iteration.

[0041] In one embodiment of the present application, optionally, the method further includes:

[0042] Collect the water and rainfall data of the target area in real time during the current period;

[0043] Preprocessing the water-rainfall data representation set according to the predetermined data cleaning method, and determining a real-time multidimensional feature set for the preprocessed water-rainfall data representation set based on a predetermined feature extraction method;

[0044] The real-time multidimensional feature set is used as input information of the target water and rainfall prediction model, and the water and rainfall prediction result corresponding to the real-time multidimensional feature set is determined by the target water and rainfall prediction model.

[0045] In a second aspect, an embodiment of the present application provides a water and rainfall prediction model training device, comprising:

[0046] A sample collection unit, used to collect multiple water and rainfall data sample sets in the target area;

[0047] A sample preprocessing unit, configured to preprocess each of the water and rainfall data sample sets according to a predetermined data cleaning method;

[0048] A sample multidimensional expansion unit is used to determine a water-rainfall multidimensional feature set for the preprocessed water-rainfall data sample set based on a predetermined feature extraction method;

[0049] A subset division unit is used to randomly distribute the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n];

[0050] an iterative training unit, configured to perform iterative model training based on the initial water and rainfall forecast model in the order of the first subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set;

[0051] A performance index value calculation unit is used to determine the performance index value of the intermediate model obtained in each iterative training based on the water and rainfall prediction value of each iterative training, the actual water and rainfall value, and the number of the water and rainfall multidimensional feature sets in the used subset;

[0052] a performance indicator mean calculation unit, configured to determine the performance indicator means of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained in each iterative training;

[0053] A first execution unit is configured to set the model obtained by the last iterative training as the target water and rainfall prediction model if the mean value of the performance index is greater than or equal to a predetermined index threshold;

[0054] The second execution unit is used to return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets if the mean value of the performance index is less than the predetermined index threshold, and re-randomly divide the multiple subsets until the obtained mean value of the performance index is greater than or equal to the predetermined index threshold.

[0055] In one embodiment of the present application, optionally, the sample preprocessing unit is used to: delete outliers in the water-rainfall data sample set; supplement missing values ​​in the water-rainfall data sample set; and normalize the water-rainfall data sample set.

[0056] In one embodiment of the present application, optionally, the sample multi-dimensional expansion unit includes:

[0057] A first eigenvalue expansion unit is used to determine the linear trend eigenvalue of each data in the pre-processed water and rainfall data sample set based on a linear regression analysis method;

[0058] A second eigenvalue expansion unit is used to determine the long-term trend eigenvalue of each data item in the preprocessed water and rainfall data sample set based on a sliding average method;

[0059] A third eigenvalue expansion unit is used to determine the time smoothing eigenvalue of each data item in the pre-processed water and rainfall data sample set at the time of its occurrence based on the exponential smoothing method;

[0060] A quadruple combination unit is used to combine the linear trend characteristic value, the long-term trend characteristic value and the time smoothing characteristic value of each data in the preprocessed water and rainfall data sample set with the data into a quadruple, and use the quadruple corresponding to each data in the preprocessed water and rainfall data sample set as the water and rainfall multidimensional feature set corresponding to the preprocessed water and rainfall data sample set.

[0061] In one embodiment of the present application, optionally, the first eigenvalue expansion unit is used to fit a linear regression line based on all the data as independent variables and the true value of the water and rainfall conditions as the dependent variable in the preprocessed water and rainfall data sample set, wherein,

[0062] y=b0+b1x1+b2x2+...+b n x n ,

[0063] y represents the true value of water and rainfall conditions as the dependent variable, x1, x2, ..., x n Represents the data of the pre-processed water and rainfall data sample set as independent variables, b0, b1, b2, ..., b n is the learning coefficient obtained by fitting; the learning coefficient corresponding to each item of the data is used as the linear trend characteristic value of each item of the data.

[0064] In one embodiment of the present application, optionally, the second eigenvalue expansion unit is used to: for each data in the preprocessed water and rainfall data sample set, obtain the data mean of multiple water and rainfall data sample sets covered by the data in a specified time window; and set the difference between the data mean and the eigenvalue of the data itself as the long-term trend eigenvalue of the data.

[0065] In one embodiment of the present application, optionally, the third eigenvalue expansion unit is configured to: determine, for each item of data in the preprocessed water and rainfall data sample set, a weight of the data based on a difference between the data collection time and the current time; and determine a time smoothing eigenvalue of the data based on the data and the data weight, wherein:

[0066] S t =α×y t +(1-α)×S t -1,

[0067] S t is the time smoothing characteristic value of the data, yt is the eigenvalue of the data itself, and α is the weight of the data.

[0068] In one embodiment of the present application, optionally, the performance indicator value calculation unit includes:

[0069]

[0070] Among them, MSE i Represents the performance index value of the intermediate model obtained from the i-th iteration training, N i represents the number of multidimensional feature sets of water and rainfall conditions in the subset used for the i-th iteration training, y i is the true value of water and rainfall conditions in the i-th iteration, is the water and rainfall forecast value of the i-th iteration.

[0071] In one embodiment of the present application, optionally, the device further includes:

[0072] A real-time data collection unit is used to collect the water and rainfall data of the target area in real time during the current period;

[0073] A real-time data feature expansion unit is used to pre-process the water-rainfall data representation set according to the predetermined data cleaning method, and determine a real-time multi-dimensional feature set for the pre-processed water-rainfall data representation set based on a predetermined feature extraction method;

[0074] The model prediction execution unit is used to use the real-time multidimensional feature set as input information of the target water and rainfall prediction model, and determine the water and rainfall prediction result corresponding to the real-time multidimensional feature set through the target water and rainfall prediction model.

[0075] In a third aspect, an embodiment of the present application provides a computer device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the first aspect above.

[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method described in the first aspect above.

[0077] The above technical solutions address the technical problem that water and rainfall prediction methods in related technologies are difficult to meet the high-standard water and rainfall prediction needs in complex scenarios. During the water and rainfall prediction model training process, a complete prediction model construction system is formed through key links such as data collection, preprocessing, feature extraction, model training and verification. First, by incorporating two categories of characteristic data of natural factors and human factors, a comprehensive data collection system is constructed, including rainfall characteristics, meteorological characteristics, topographic and geomorphological characteristics, hydrogeological characteristics, as well as the impact of human activities, pollution emissions, reservoir scheduling, disaster prevention measures, etc. This fundamentally solves the problem of incomplete data coverage of traditional methods and provides a data foundation for the water and rainfall prediction model to comprehensively reflect water situation changes. Then, technical means such as outlier removal, missing value filling and normalization processing are adopted to effectively improve data quality. By eliminating noise interference and unifying dimensions, the data of each dimension reaches the standardization standard, providing reliable data input for subsequent analysis. Furthermore, the three methods of linear regression analysis, sliding average method and exponential smoothing method are integrated to expand the single-dimensional data into a four-tuple feature set containing linear trend, long-term trend and time smoothing features. Finally, in the model training stage, a dynamic iterative optimization strategy is adopted to ensure the generalization performance of the model through random subset division and cross-validation. When the model performance does not meet the standards, it supports automatic re-division of data and continues training until the predetermined accuracy requirements are met. This closed-loop optimization mechanism effectively improves the stability and reliability of the model. The technical solution of the present application can enable the model to fully capture the complex laws of water situation changes through multi-dimensional feature acquisition and deep feature extraction, and adopts dynamic iterative training and strict verification mechanisms to ensure the prediction accuracy of the model in practical applications. The whole process has a high degree of automation and can adapt to the water situation prediction needs of different regions and scenarios. Compared with traditional methods, the technical solution of the present application has significant improvements in prediction accuracy, model stability and application flexibility, providing more reliable technical support for application scenarios such as hydropower station operation, flood prevention and disaster reduction.

Brief Description of the Drawings

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

[0079] Figure 1 A flow chart of a water and rainfall prediction model training method according to an embodiment of the present application is shown;

[0080] Figure 2 A flow chart of a method for predicting water and rainfall conditions according to an embodiment of the present application is shown;

[0081] Figure 3 A block diagram of a computer device according to an embodiment of the present application is shown;

[0082] Figure 4 A block diagram of a computer device according to another embodiment of the present application is shown. [Specific implementation method]

[0083] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0084] Figure 1 A flow chart of a water and rainfall prediction model training method according to an embodiment of the present application is shown.

[0085] like Figure 1 As shown, the water and rainfall forecast model training method according to one embodiment of the present application includes:

[0086] Step 102: Collect multiple water and rainfall data sample sets in the target area.

[0087] The target area is the geographic area for which water and rainfall forecasts are required. The forecast can be based on any data reflecting the actual water conditions in the target area, such as precipitation or water level. Each water and rainfall data sample set includes water and rainfall data from multiple dimensions, including both natural and human factors.

[0088] Natural factors include rainfall characteristics, meteorological characteristics, topographic and geomorphological characteristics, and hydrogeological characteristics. Precipitation characteristics are primarily reflected in indicators such as rainfall amount, intensity, duration, and frequency, which directly reflect the basic characteristics of precipitation. Meteorological characteristics include factors such as temperature, humidity, wind speed, and direction. These factors not only influence the formation of precipitation but also determine its distribution. Topographic and geomorphological characteristics involve parameters such as altitude, slope, and drainage area. These geographical factors significantly influence the direction and velocity of water flow, thereby altering regional water and rainfall conditions. Hydrogeological characteristics include soil moisture, groundwater levels, and geological structure. These factors play a crucial role in regulating the circulation of surface and groundwater. For example, in the operation of hydropower stations, the amount and temporal and spatial distribution of rainfall directly affect the reservoir's water storage capacity and power generation capacity. Changes in temperature and humidity regulate reservoir water levels by affecting evaporation. Topographic and geomorphological characteristics determine the dynamic characteristics of water flow, ultimately affecting the power generation efficiency of hydropower stations.

[0089] Human factors primarily encompass four aspects: human impact, pollution source emissions, reservoir operation, and disaster prevention and mitigation measures. Human impacts manifest themselves in urbanization, land use change, and water conservancy project construction, all of which significantly alter land cover and the hydrological cycle. Pollution source emissions primarily refer to the discharge of industrial and domestic wastewater, pollutants that directly impact water quality and the balance of aquatic ecosystems. Reservoir operation, including artificial control measures such as water storage and release, can directly alter downstream water and rainfall patterns. Disaster prevention and mitigation measures involve projects such as flood control embankment construction and drainage system optimization. The quality and operational status of these facilities determine the ability to respond to water and rainfall disasters. During hydropower station operation, changes in land cover caused by urbanization can alter the flow characteristics of the watershed, thereby affecting inflows. Reservoir operation decisions can alter downstream water flow conditions in real time, impacting power generation plans. The comprehensiveness of disaster prevention and mitigation facilities directly impacts the safe operation of power stations in extreme weather conditions.

[0090] By comprehensively collecting a multi-dimensional sample set of water and rainfall data within the target area, a solid data foundation was laid for the subsequent construction of the prediction model. First, by simultaneously collecting characteristic data from two categories of natural and human factors, the input information of the prediction model was ensured to fully cover the key factors affecting changes in water and rainfall conditions. Second, by collecting data from four dimensions of rainfall, meteorology, topography, and hydrogeology based on the characteristics of natural factors, the model was able to accurately capture the dynamic changes in natural hydrological processes such as precipitation formation and runoff generation. Finally, by incorporating characteristic data from human factors such as human activities, pollution emissions, reservoir scheduling, and disaster prevention measures, the model was equipped with the ability to assess the impact of human activities on hydrological processes, thereby improving the accuracy and practicality of the prediction results. This comprehensive, multi-dimensional data collection method effectively solves the prediction bias caused by incomplete data coverage in traditional methods.

[0091] Step 104 : For each of the water-rainfall data sample sets, preprocess the water-rainfall data sample set according to a predetermined data cleaning method, and determine a water-rainfall multidimensional feature set for the preprocessed water-rainfall data sample set based on a predetermined feature extraction method.

[0092] The preprocessing process includes steps such as deleting outliers in the water-rainfall data sample set, filling in missing values ​​in the water-rainfall data sample set, and normalizing the water-rainfall data sample set. The purpose is to denoise and normalize the water-rainfall data sample set so that the data in the water-rainfall data sample set are at the same level, which is convenient for subsequent calculations.

[0093] The predetermined feature extraction method includes but is not limited to linear regression analysis, sliding average method and exponential smoothing method. Among them, based on the linear regression analysis method, the linear trend characteristic value of each data in the pre-processed water and rainfall data sample set is determined; based on the sliding average method, the long-term trend characteristic value of each data in the pre-processed water and rainfall data sample set is determined; based on the exponential smoothing method, the time smoothing characteristic value of each data in the pre-processed water and rainfall data sample set at the time of its own occurrence is determined. Furthermore, for each data in the pre-processed water and rainfall data sample set, the linear trend characteristic value, the long-term trend characteristic value and the time smoothing characteristic value of the data are combined with the data into a four-tuple, that is, the single-dimensional performance value of the original single data is expanded to the performance value of four dimensions. At this point, the four-tuple corresponding to each data in the pre-processed water and rainfall data sample set is used as the water and rainfall multidimensional feature set corresponding to the pre-processed water and rainfall data sample set.

[0094] Through data preprocessing, feature extraction and expansion, the quality of water and rainfall data and the accuracy of the prediction model have been significantly improved. In the data preprocessing stage, through outlier removal, missing value filling and normalization processing, the noise interference and dimensional differences in the original data are effectively eliminated, so that the data of each dimension reaches a unified standard, providing a standardized data foundation for subsequent analysis. In the feature extraction link, the linear regression analysis method is used to accurately capture the linear relationship between the data, the sliding average method is used to smooth short-term fluctuations to highlight the long-term trend, and the exponential smoothing method is used to give recent data a higher weight to reflect the characteristics of time series changes. This multi-method fusion feature extraction strategy not only retains the key information of the original data, but also deeply explores the inherent laws and dynamic characteristics of water and rainfall data, laying a solid foundation for building a high-precision prediction model. The entire processing flow has significantly improved the data quality, while enhancing the expressive ability of features and the generalization performance of the model.

[0095] Furthermore, the linear regression analysis method specifically includes: fitting a linear regression line based on all the data as independent variables in the preprocessed water and rainfall data sample set and the true value of the water and rainfall as the dependent variable, wherein y=b0+b1x1+b2x2+...+b n x n , y represents the true value of water and rainfall conditions as the dependent variable, x1, x2, ..., x n Represents the data of the pre-processed water and rainfall data sample set as independent variables, b0, b1, b2, ..., b n is the learning coefficient obtained by fitting; the learning coefficient corresponding to each item of the data is used as the linear trend characteristic value of each item of the data.

[0096] By establishing a linear relationship model between water and rainfall data and influencing factors, the contribution of various environmental factors to water regime changes can be accurately quantified. The regression coefficients b0, b1, ..., bn obtained through fitting not only reveal the quantitative relationship between each variable and the target water regime but also provide a quantitative indicator of feature importance. This statistically based feature extraction method provides a clear physically meaningful feature representation for subsequent model training, helping to improve model interpretability. Furthermore, linear regression is highly efficient and suitable for rapid feature extraction from large-scale water and rainfall data.

[0097] The sliding average method specifically includes: for each data in the preprocessed water and rainfall data sample set, obtaining the data mean of multiple water and rainfall data sample sets covered by the data in a specified time window; and setting the difference between the data mean and the characteristic value of the data itself as the long-term trend characteristic value of the data.

[0098] Thus, by smoothing data within the time window, random fluctuations and short-term interference in water and rainfall data are effectively eliminated. Characterizing long-term trends by calculating the difference between the data mean and the current value can highlight the key variations in hydrological processes. This feature extraction method is particularly suitable for water and rainfall data with periodic or trending characteristics, filtering out noise interference while retaining the key variation characteristics of the data. The flexible setting of the sliding window allows the method to adapt to feature extraction requirements at different time scales, providing stable long-term trend characteristics for the model.

[0099] The exponential smoothing method specifically includes: for each data in the pre-processed water and rainfall data sample set, determining the weight of the data based on the difference between the data collection time and the current time; determining the time smoothing characteristic value of the data based on the data and the data weight, wherein S t =α×y t +(1-α)×S t -1, S t is the time smoothing characteristic value of the data, y t is the eigenvalue of the data itself, and α is the weight of the data.

[0100] The closer the data collection time is to the current time, the higher the weight of the data. Therefore, by introducing a time-decay weighting mechanism, the dynamic characteristics of water and rainfall data can be accurately captured. By adjusting the smoothing coefficient α, the degree of influence of historical data on current features can be flexibly controlled, allowing the feature extraction process to adapt to the changing rhythm of the data. This time series feature extraction method places particular emphasis on the importance of recent data, can quickly respond to sudden changes in water conditions, and provide highly timely feature inputs for the prediction model. The recursive calculation characteristics of exponential smoothing make it computationally efficient and suitable for the feature extraction needs of real-time water and rainfall monitoring systems.

[0101] Step 106 : randomly assigning the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n].

[0102] The preprocessed multidimensional feature set is randomly divided into several subsets, each containing a different number of feature sets. This division method provides data support for subsequent cross-validation, ensuring randomness and diversity in model training and validation.

[0103] Step 108: Based on the initial water and rainfall prediction model, perform iterative model training in the order of the 1st subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set.

[0104] Based on the initial prediction model, different subsets are used as validation sets in sequence, and the remaining subsets are used as training sets for iterative training. By dynamically adjusting the training data, the model can adapt to different data distributions and improve its generalization ability.

[0105] Step 110 , based on the water-rainfall prediction value of each iterative training, the actual water-rainfall value and the number of the water-rainfall multidimensional feature sets in the used subset, determines the performance index value of the intermediate model obtained in each iterative training.

[0106] Based on the predicted and true values ​​for each iteration, and the number of features in the validation set, we calculate performance metrics such as mean squared error. This step quantitatively evaluates the model's performance at each iteration and provides a basis for model optimization.

[0107]

[0108] Among them, MSE i Represents the performance index value of the intermediate model obtained from the i-th iteration training, N i represents the number of multidimensional feature sets of water and rainfall conditions in the subset used for the i-th iteration training, y i is the true value of water and rainfall conditions in the i-th iteration, is the water and rainfall forecast value of the i-th iteration.

[0109] Step 112: Determine the mean values ​​of the performance indicators of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained in each iterative training.

[0110] The performance index values ​​of all iterations are summarized and the mean is calculated. This performance index mean can reflect the overall prediction accuracy of the model. Therefore, through the comprehensive evaluation of multiple performance index values ​​of multiple models, the randomness of a single verification can be avoided, ensuring that the evaluation results of the model performance and even the subsequent water and rainfall forecast results are stable and reliable.

[0111] Step 114: If the performance index mean is greater than or equal to the predetermined index threshold, the model obtained by the current last iterative training is set as the target water and rainfall prediction model.

[0112] The predetermined indicator threshold is the minimum value when the prediction accuracy of the water and rainfall prediction model meets the actual prediction requirements. If the mean value of the performance indicator reaches the predetermined indicator threshold, it means that the prediction accuracy of the water and rainfall prediction model of the last iteration is relatively high, so it can be used as the final prediction model to ensure that the final prediction model is put into use after meeting the water and rainfall prediction accuracy requirements, thereby ensuring the accuracy of the prediction results.

[0113] Step 116: If the mean value of the performance index is less than the predetermined index threshold, return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets, and randomly divide the multiple subsets again until the obtained performance index mean value is greater than or equal to the predetermined index threshold.

[0114] If the mean performance index does not meet the requirements, the data set is randomly re-divided and the training process is repeated. The initial water and rainfall prediction model of the repeated training process is the water and rainfall prediction model obtained in the last iteration of the previous training. In this way, through multiple optimizations of data partitioning and model training, the model performance is gradually improved until it meets the requirements.

[0115] The above technical solutions, during the training process of the water and rainfall prediction model, have formed a complete prediction model construction system through key links such as data collection, preprocessing, feature extraction, model training and verification.

[0116] During the data collection stage, characteristic data of two categories, natural factors and human factors, were included at the same time, and a comprehensive data collection system was constructed, including rainfall characteristics, meteorological characteristics, topographic and geomorphological characteristics, hydrogeological characteristics, as well as the impact of human activities, pollution emissions, reservoir scheduling, and disaster prevention measures. This fundamentally solves the problem of incomplete data coverage of traditional methods and provides a data basis for the water and rainfall prediction model to comprehensively reflect water situation changes.

[0117] During the data preprocessing phase, we employed techniques such as outlier removal, missing value filling, and normalization to effectively improve data quality. By eliminating noise and unifying dimensions, we standardized the data across all dimensions, providing reliable data input for subsequent analysis. The feature extraction phase innovatively combined linear regression analysis, sliding average, and exponential smoothing to expand single-dimensional data into a four-tuple feature set encompassing linear trends, long-term trends, and time-smoothing features. This multidimensional feature representation deeply explores the inherent patterns of the data and significantly enhances the expressive power of features.

[0118] During the model training phase, a dynamic iterative optimization strategy is employed, using random subset partitioning and cross-validation to ensure model generalization performance. The mean squared error (MSE) metric is introduced for quantitative performance evaluation, and a threshold determination mechanism is used to ensure the final model's prediction accuracy. If model performance falls short of expectations, the system automatically repartitions the data and continues training until the target accuracy is achieved. This closed-loop optimization mechanism effectively improves model stability and reliability.

[0119] In summary, the technical solution of this application enables the model to fully capture the complex patterns of water regime changes through multi-dimensional feature acquisition and deep feature extraction. Dynamic iterative training and rigorous verification mechanisms are employed to ensure the model's predictive accuracy in practical applications. The entire process is highly automated and adaptable to the water regime prediction needs of different regions and scenarios. Compared to traditional methods, the technical solution of this application significantly improves prediction accuracy, model stability, and application flexibility, providing more reliable technical support for application scenarios such as hydropower station operation and flood prevention and disaster reduction.

[0120] Figure 2 A flow chart of a water and rainfall condition prediction method according to an embodiment of the present application is shown.

[0121] like Figure 2 As shown, a water and rainfall forecasting method according to an embodiment of the present application includes:

[0122] Step 202: Collect the water and rainfall data representation set of the target area in real time during the current period.

[0123] Real-time collection of water and rainfall data sets in the target area can dynamically monitor the current water status. Specifically, distributed sensor networks and automated collection technologies can be used to ensure the timeliness and integrity of data acquisition, providing the latest and most realistic environmental status input for the prediction model. The scope of real-time data collection is as follows: Figure 1 The embodiments shown will not be repeated here. They cover key indicators such as rainfall, water level, meteorological elements, and incorporate human intervention data such as reservoir scheduling and drainage facility operation to form a data base reflecting the current comprehensive water conditions, laying the foundation for subsequent real-time predictions.

[0124] Step 204 : pre-processing the water-rainfall data representation set according to a predetermined data cleaning method, and determining a real-time multi-dimensional feature set for the pre-processed water-rainfall data representation set based on a predetermined feature extraction method.

[0125] Through standardized preprocessing processes and intelligent feature extraction algorithms, raw real-time data is converted into high-quality feature inputs. In the data cleaning phase, an adaptive threshold algorithm can be used to identify and correct outliers, combined with spatiotemporal interpolation technology to fill data gaps, and then normalization processing is used to eliminate dimensional differences to ensure that data quality meets prediction requirements. The feature extraction process follows the fusion strategy of linear regression, sliding average, and exponential smoothing to generate a multidimensional feature set containing trend features and time features in real time, deeply exploring the multidimensional feature representation of water and rainfall data. This processing method not only retains the real-time characteristics of the data, but also improves the predictability of the data through feature enhancement, making the input of the water and rainfall prediction model both timely and informative.

[0126] Step 206 : Using the real-time multi-dimensional feature set as input information of a target water and rainfall prediction model, the target water and rainfall prediction model is used to determine a water and rainfall prediction result corresponding to the real-time multi-dimensional feature set.

[0127] The processed multidimensional features are input into the optimized and trained target water and rainfall prediction model to achieve high-precision dynamic water and rainfall forecasts. Leveraging the target water and rainfall prediction model's ability to map complex features, the model comprehensively considers the multiple influences of natural and human factors and outputs water and rainfall forecasts for future periods. The forecast results not only include conventional values ​​such as water level and rainfall, but also output risk level assessments and early warning recommendations, providing immediate decision-making support for flood control operations and hydropower station operations. The entire forecast process is responsive, completing the entire process from data input to result output in seconds, meeting the business needs of real-time monitoring and early warning.

[0128] exist Figure 1 and Figure 2 Based on the illustrated embodiment, the water and rainfall prediction model can adopt a recurrent neural network (RNN) and its variants as the basic model architecture, which has significant advantages in processing time series data.

[0129] In the water and rainfall prediction model, the historical water and rainfall data (i.e., the water and rainfall data sample set) can be used as an input sequence and converted into numerical form through feature extraction technology to form the input layer data. In the hidden layer processing process of RNN, the model processes the input data step by step according to the time series. Among them, each time step receives the current input vector x t and the hidden state h at the previous time step t-1 , through the weight matrix W hh 、W xh and the bias term b h Linear transformation, then apply tan h The activation function calculates the current hidden state h t The calculation formula is: h t =tan h (Whh *h t -1+W xh *x t +b h ), where * represents matrix multiplication operation, and the hidden state h generated by this calculation process t ∈[-1,1], which constitutes the short-term memory mechanism of the model and provides temporal dependencies for subsequent prediction decisions. At the output layer, the water and rainfall prediction model generates prediction results based on the hidden state of the final time step. In order to solve the gradient problem that may arise in traditional RNNs when processing long sequences, improved variants such as LSTM or GRU can be used in this application to effectively control the flow of information through a gating mechanism. During the model training phase, the complex associations between water and rainfall characteristics are automatically learned, and a mapping relationship from input features to prediction results is established. During actual deployment, the model performance can be continuously evaluated and optimized by comparing the differences between the predicted values ​​and the actual observed data to ensure the accuracy and stability of the prediction results.

[0130] Furthermore, based on the predicted water and rainfall information input into the target water and rainfall forecast model, multiple risk assessment indicators can be introduced, such as water level rise rate, rainfall intensity trend, and duration. These indicators can more comprehensively reflect the changes in water and rainfall conditions. These indicators, along with the predicted water and rainfall information, are then used as risk assessment indicators to calculate the comprehensive water and rainfall risk level for the target area through methods such as weighted averaging and fuzzy comprehensive evaluation.

[0131] Among them, in the weighted average method, indicators such as water level rise rate, rainfall intensity change trend, duration and water and rainfall information forecast values ​​can be normalized and then weighted averaged to obtain the comprehensive water and rainfall risk level of the target area.

[0132] In the fuzzy comprehensive evaluation method, various risk level evaluation methods can be performed based on indicators such as water level rise rate, rainfall intensity change trend, duration, and water and rainfall information prediction values. Based on the evaluation of this risk level and the weights of each indicator and water and rainfall information prediction value, a fuzzy evaluation matrix R is established. The element r in the i-th row and j-th column of the fuzzy evaluation matrix R is ij represents the score of the i-th risk assessment indicator under the j-th risk level evaluation method among multiple risk assessment indicators, including each indicator and the water and rainfall information prediction value. At this point, the fuzzy evaluation matrix R and the weight set W of multiple risk assessment indicators are operated through fuzzy operation methods to obtain the comprehensive evaluation vector B.

[0133] For example, for three data types, rainfall, water level, and wind speed, the weights of rainfall, water level, and wind speed are W1, W2, and W3 respectively, then:

[0134] B=W×R=(W1,W2,W3)×[r 11 r12 r 13 ; r 21 r 22 r 23 ; r 31 r 32 r 33 ]

[0135] The weighted average method and fuzzy comprehensive evaluation method can be used separately or in combination. For example, the weighted average method can be used to quantitatively evaluate the main risk indicators to obtain a preliminary comprehensive risk value; then the fuzzy comprehensive evaluation method can be used to revise and improve the preliminary results.

[0136] In addition, multiple warning levels, such as blue, yellow, orange, and red, can be set based on the comprehensive risk level derived from weighted average and / or fuzzy comprehensive evaluation methods. Each warning level corresponds to a different risk range and response measures. When the comprehensive risk level reaches or exceeds the threshold of a specific warning level, the corresponding warning mechanism is triggered. Warning information should include the warning level, risk level, possible impact range, and recommended response measures. It can be promptly sent to relevant personnel via text message, email, app push, and other means. This allows relevant personnel to quickly respond and conduct a quantitative assessment of the prediction results.

[0137] The present invention provides a water and rainfall forecast model training device, comprising:

[0138] A sample collection unit, used to collect multiple water and rainfall data sample sets in the target area;

[0139] A sample preprocessing unit, configured to preprocess each of the water and rainfall data sample sets according to a predetermined data cleaning method;

[0140] A sample multidimensional expansion unit is used to determine a water-rainfall multidimensional feature set for the preprocessed water-rainfall data sample set based on a predetermined feature extraction method;

[0141] A subset division unit is used to randomly distribute the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n];

[0142] an iterative training unit, configured to perform iterative model training based on the initial water and rainfall forecast model in the order of the first subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set;

[0143] A performance index value calculation unit is used to determine the performance index value of the intermediate model obtained in each iterative training based on the water and rainfall prediction value of each iterative training, the actual water and rainfall value, and the number of the water and rainfall multidimensional feature sets in the used subset;

[0144] a performance indicator mean calculation unit, configured to determine the performance indicator means of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained in each iterative training;

[0145] A first execution unit is configured to set the model obtained by the last iterative training as the target water and rainfall prediction model if the mean value of the performance index is greater than or equal to a predetermined index threshold;

[0146] The second execution unit is used to return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets if the mean value of the performance index is less than the predetermined index threshold, and re-randomly divide the multiple subsets until the obtained mean value of the performance index is greater than or equal to the predetermined index threshold.

[0147] In one embodiment of the present application, optionally, the sample preprocessing unit is used to: delete outliers in the water-rainfall data sample set; supplement missing values ​​in the water-rainfall data sample set; and normalize the water-rainfall data sample set.

[0148] In one embodiment of the present application, optionally, the sample multi-dimensional expansion unit includes:

[0149] A first eigenvalue expansion unit is used to determine the linear trend eigenvalue of each data in the pre-processed water and rainfall data sample set based on a linear regression analysis method;

[0150] A second eigenvalue expansion unit is used to determine the long-term trend eigenvalue of each data item in the pre-processed water and rainfall data sample set based on a sliding average method;

[0151] A third eigenvalue expansion unit is used to determine the time smoothing eigenvalue of each data item in the pre-processed water and rainfall data sample set at the time of its occurrence based on the exponential smoothing method;

[0152] A quadruple combination unit is used to combine the linear trend characteristic value, the long-term trend characteristic value and the time smoothing characteristic value of each data in the preprocessed water and rainfall data sample set with the data into a quadruple, and use the quadruple corresponding to each data in the preprocessed water and rainfall data sample set as the water and rainfall multidimensional feature set corresponding to the preprocessed water and rainfall data sample set.

[0153] In one embodiment of the present application, optionally, the first eigenvalue expansion unit is used to fit a linear regression line based on all the data as independent variables and the true value of the water and rainfall conditions as the dependent variable in the preprocessed water and rainfall data sample set, wherein,

[0154] y=b0+b1x1+b2x2+...+b n x n ,

[0155] y represents the true value of water and rainfall conditions as the dependent variable, x1, x2, ..., x n Represents the data of the pre-processed water and rainfall data sample set as independent variables, b0, b1, b2, ..., b n is the learning coefficient obtained by fitting; the learning coefficient corresponding to each item of the data is used as the linear trend characteristic value of each item of the data.

[0156] In one embodiment of the present application, optionally, the second eigenvalue expansion unit is used to: for each data in the preprocessed water and rainfall data sample set, obtain the data mean of multiple water and rainfall data sample sets covered by the data in a specified time window; and set the difference between the data mean and the eigenvalue of the data itself as the long-term trend eigenvalue of the data.

[0157] In one embodiment of the present application, optionally, the third eigenvalue expansion unit is configured to: determine, for each item of data in the preprocessed water and rainfall data sample set, a weight of the data based on a difference between the data collection time and the current time; and determine a time smoothing eigenvalue of the data based on the data and the data weight, wherein:

[0158] S t =α×y t +(1-α)×S t -1,

[0159] S t is the time smoothing characteristic value of the data, y t is the eigenvalue of the data itself, and α is the weight of the data.

[0160] In one embodiment of the present application, optionally, the performance indicator value calculation unit includes:

[0161]

[0162] Among them, MSE i Represents the performance index value of the intermediate model obtained from the i-th iteration training, N i represents the number of multidimensional feature sets of water and rainfall conditions in the subset used for the i-th iteration training, y iis the true value of water and rainfall conditions in the i-th iteration, is the water and rainfall forecast value of the i-th iteration.

[0163] In one embodiment of the present application, optionally, the device further includes:

[0164] A real-time data collection unit is used to collect the water and rainfall data of the target area in real time during the current period;

[0165] A real-time data feature expansion unit is used to pre-process the water-rainfall data representation set according to the predetermined data cleaning method, and determine a real-time multi-dimensional feature set for the pre-processed water-rainfall data representation set based on a predetermined feature extraction method;

[0166] The model prediction execution unit is used to use the real-time multidimensional feature set as input information of the target water and rainfall prediction model, and determine the water and rainfall prediction result corresponding to the real-time multidimensional feature set through the target water and rainfall prediction model.

[0167] The device uses any one of the solutions in the above embodiments, and therefore has all the above technical effects, which will not be described in detail here.

[0168] In addition, in one embodiment, the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, memory, network interface and database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it can implement the method described in any of the above embodiments.

[0169] In one embodiment, the present application further provides a computer device, which may be a client, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When executed by the processor, the computer program can implement the method described in any of the above embodiments.

[0170] Any of the aforementioned computer devices in the embodiments of the present application may exist in various forms, including but not limited to:

[0171] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.

[0172] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0173] (3) Portable entertainment devices: These devices can display and play multimedia content. These devices include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys, wearable devices, and portable car navigation devices.

[0174] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0175] (5) Other electronic devices with data interaction functions.

[0176] In addition, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to perform the following steps:

[0177] Collect multiple water and rainfall data sample sets in the target area;

[0178] For each of the water and rainfall data sample sets, preprocessing the water and rainfall data sample set according to a predetermined data cleaning method, and determining a water and rainfall multidimensional feature set for the preprocessed water and rainfall data sample set based on a predetermined feature extraction method;

[0179] Randomly assigning the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n];

[0180] Based on the initial water and rainfall forecast model, performing iterative model training in the order of the 1st subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set;

[0181] Determining the performance index value of the intermediate model obtained from each iterative training based on the water and rainfall prediction value of each iterative training, the actual water and rainfall value, and the number of the water and rainfall multidimensional feature sets in the used subset;

[0182] Determining the mean values ​​of the performance indicators of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained from each iterative training;

[0183] If the performance index mean is greater than or equal to a predetermined index threshold, the model obtained by the current last iterative training is set as the target water and rainfall prediction model;

[0184] If the mean value of the performance index is less than the predetermined index threshold, return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets, and randomly divide the multiple subsets again until the obtained performance index mean value is greater than or equal to the predetermined index threshold.

[0185] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant description in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0186] The above, combined with the accompanying drawings, describes in detail the technical solution of this application. The technical solution of this application, through multi-dimensional feature acquisition and deep feature extraction, enables the model to fully capture the complex laws of water regime changes, and adopts dynamic iterative training and strict verification mechanisms to ensure the prediction accuracy of the model in practical applications. The entire process has a high degree of automation and can adapt to the water regime prediction needs of different regions and scenarios. Compared with traditional methods, the technical solution of this application has significantly improved prediction accuracy, model stability, and application flexibility, providing more reliable technical support for application scenarios such as hydropower station operation, flood prevention and disaster reduction.

[0187] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0188] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0189] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface, indirect coupling or communication connection of the device or unit, which may be electrical, mechanical or other forms.

[0190] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0191] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0192] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention 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 make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A water and rainfall forecast model training method, characterized in that: include: Collect multiple water and rainfall data sample sets in the target area; For each of the water and rainfall data sample sets, preprocessing the water and rainfall data sample set according to a predetermined data cleaning method, and determining a water and rainfall multidimensional feature set for the preprocessed water and rainfall data sample set based on a predetermined feature extraction method; Randomly assigning the plurality of water-rainfall multidimensional feature sets corresponding to the plurality of water-rainfall data sample sets to a plurality of subsets, wherein the i-th subset includes i water-rainfall multidimensional feature sets, i∈[1,n]; Based on the initial water and rainfall forecast model, performing iterative model training in the order of the 1st subset to the nth subset, wherein, in the i-th iterative training, the subsets other than the i-th subset among the multiple subsets are used as training sets, and the i-th subset is used as a validation set; Determining the performance index value of the intermediate model obtained from each iterative training based on the water and rainfall prediction value of each iterative training, the actual water and rainfall value, and the number of the water and rainfall multidimensional feature sets in the used subset; Determining the mean values ​​of the performance indicators of the plurality of subsets based on the performance indicator values ​​of the intermediate models obtained from each iterative training; If the performance index mean is greater than or equal to a predetermined index threshold, the model obtained by the current last iterative training is set as the target water and rainfall prediction model; If the mean value of the performance index is less than the predetermined index threshold, return to the step of randomly allocating the multiple water-rainfall multidimensional feature sets corresponding to the multiple water-rainfall data sample sets to multiple subsets, and randomly divide the multiple subsets again until the obtained performance index mean value is greater than or equal to the predetermined index threshold.

2. The method according to claim 1, characterized in that The pre-processing of the water and rainfall data sample set according to a predetermined data cleaning method includes: Deleting outliers in the water and rainfall data sample set; Fill in the missing values ​​in the water and rainfall data sample set; and The water and rainfall data sample set is normalized.

3. The method according to claim 1, characterized in that The method of determining a multi-dimensional feature set of water and rainfall conditions for the pre-processed water and rainfall condition data sample set based on a predetermined feature extraction method includes: Determine the linear trend characteristic value of each data in the pre-processed water and rainfall data sample set based on a linear regression analysis method; Determine the long-term trend characteristic value of each data in the preprocessed water and rainfall data sample set based on the sliding average method; Based on the exponential smoothing method, determining the time smoothing characteristic value of each data in the preprocessed water and rainfall data sample set at the time of its occurrence; For each item of data in the preprocessed water and rainfall data sample set, combining the linear trend characteristic value, the long-term trend characteristic value, and the time smoothing characteristic value of the data with the data into a four-tuple; The quadruple corresponding to each data in the preprocessed water-rainfall data sample set is used as the water-rainfall multidimensional feature set corresponding to the preprocessed water-rainfall data sample set.

4. The method according to claim 3, characterized in that The method of determining the linear trend characteristic value of each data item in the pre-processed water and rainfall data sample set based on the linear regression analysis method includes: Based on all the data in the pre-processed water and rainfall data sample set as independent variables and the true value of the water and rainfall as the dependent variable, a linear regression line is fitted, wherein, y=b0+b1x1+b2x2+...+b n x n , y represents the true value of water and rainfall conditions as the dependent variable, x1, x2, ..., x n Represents the data of the pre-processed water and rainfall data sample set as independent variables, b0, b1, b2, ..., b n is the learning coefficient obtained by fitting; The learning coefficient corresponding to each item of the data is used as the linear trend characteristic value of each item of the data.

5. The method according to claim 3, characterized in that The method of determining the long-term trend characteristic value of each data item in the pre-processed water and rainfall data sample set based on the sliding average method includes: For each item of data in the preprocessed water and rainfall data sample set, obtaining a data mean of a plurality of water and rainfall data sample sets covered by the data in a specified time window; The difference between the data mean and the characteristic value of the data itself is set as the long-term trend characteristic value of the data.

6. The method according to claim 3, characterized in that The exponential smoothing method is used to determine the time smoothing characteristic value of each data item in the pre-processed water and rainfall data sample set at the time of its occurrence, including: For each item of data in the preprocessed water and rainfall data sample set, determining the weight of the data based on the difference between the collection time of the data and the current time; Based on the data and the weight of the data, a time smoothing characteristic value of the data is determined, wherein, S t =α×y t +(1-a)×S t -1, S t is the time smoothing characteristic value of the data, y t is the eigenvalue of the data itself, and α is the weight of the data.

7. The method according to any one of claims 1 to 6, characterized in that Determining the performance index value of the intermediate model obtained from each iterative training based on the water and rainfall conditions of each iterative training, the true value of the water and rainfall conditions, and the number of the water and rainfall multidimensional feature sets in the used subset includes: Among them, MSE i Represents the performance index value of the intermediate model obtained from the i-th iteration training, N i represents the number of multidimensional feature sets of water and rainfall conditions in the subset used for the i-th iteration training, y i is the true value of water and rainfall conditions in the i-th iteration, is the water and rainfall forecast value of the i-th iteration.

8. The method according to claim 7, characterized in that Also includes: Collect the water and rainfall data of the target area in real time during the current period; Preprocessing the water-rainfall data representation set according to the predetermined data cleaning method, and determining a real-time multidimensional feature set for the preprocessed water-rainfall data representation set based on a predetermined feature extraction method; The real-time multidimensional feature set is used as input information of the target water and rainfall prediction model, and the water and rainfall prediction result corresponding to the real-time multidimensional feature set is determined by the target water and rainfall prediction model.

9. A computer device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are configured to enable the processor to execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and the computer-executable instructions are configured to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Port exception identification method, device and equipment and medium

    CN109960626A

  • Training method of image processing model, image processing method and related equipment

    CN115761754A

  • Surgical navigation system for prediction based on historical data analysis

    CN116935009A

  • IDC machine room operation and maintenance method and system, electronic equipment and storage medium

    CN118229648A

  • Meteorological live prediction method based on machine learning and related equipment

    CN119224881A