Water conservancy model training method based on adaptive batch size and dynamic parameter adjustment optimization

Through adaptive batch size and dynamic parameter adjustment mechanism, hyperparameters such as learning rate and momentum are adjusted in real time, which solves the problems of low training efficiency and slow convergence of deep learning models in the water conservancy field and realizes efficient and accurate water conservancy data processing.

CN120745701APending Publication Date: 2025-10-03THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510829706.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing deep learning models in the water conservancy field are sensitive to hyperparameter settings, resulting in low training efficiency and slow convergence. They are difficult to cope with large-scale and heterogeneous real-time water conservancy data and are prone to falling into local optimal solutions.

Method used

Adaptive batch size and dynamic parameter adjustment mechanism are adopted to monitor batch size in real time through neural network and adjust hyperparameters such as learning rate and momentum. The model training process is optimized by combining forward and multiple backpropagation strategies.

Benefits of technology

It significantly improves the training efficiency and accuracy of water conservancy models in tasks such as flood warning and reservoir scheduling, enhances the adaptability and robustness of the model in dynamic environments, and avoids local optimal problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745701A_ABST
    Figure CN120745701A_ABST
Patent Text Reader

Abstract

The invention discloses a water conservancy model training method based on adaptive batch size and dynamic parameter adjustment optimization, and relates to the field of artificial intelligence and water conservancy projects. According to the method, the batch size in the training process is monitored in real time, hyper-parameters such as the learning rate, momentum and learning rate attenuation are automatically predicted and adjusted in combination with the neural network, the training efficiency and precision of the deep learning model can be dynamically optimized, and the model performance is remarkably improved especially in scenes such as flood early warning and equipment fault detection. According to the method, through a gradient updating strategy of forward propagation and multiple back propagation, the local optimum problem is effectively avoided during large-scale data processing, and rapid convergence of the model is ensured. The method is suitable for various real-time prediction and scheduling tasks in the water conservancy and hydropower industry, and the intelligent management level of the system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence and water conservancy engineering, and in particular to a water conservancy model training method based on adaptive batch size and dynamic parameter optimization. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.

[0003] In recent years, with the development of artificial intelligence and deep learning technologies, the water conservancy industry has become a key area for the application of these technologies. While traditional physical hydraulic models simulate hydrological behavior through physical properties, they often exhibit limitations when faced with the complexity and variability of data. These models often struggle to achieve ideal accuracy when handling tasks such as flood warnings, flow forecasting, and equipment fault detection. This is especially true when faced with large-scale, multi-dimensional, and heterogeneous real-time data, which can lead to high computational costs and slow response times. In contrast, deep learning models, due to their adaptability to big data and ability to capture nonlinear relationships, can better understand the complex relationships between hydrological time series and environmental factors.

[0004] Although deep learning models have achieved some success in the field of water conservancy, such as flood prediction and reservoir operation optimization based on long short-term memory networks (LSTM) and convolutional neural networks (CNN), existing methods have several significant shortcomings. First, deep learning models are highly sensitive to the setting of hyperparameters (such as learning rate, momentum, etc.), and different batch sizes have a significant impact on the training efficiency and convergence effect of the model. However, current parameter adjustment methods are mostly manual settings or fixed schemes, which cannot cope with the dynamic changes of complex data in real time. Secondly, when faced with big data environments, the model is prone to falling into local optimal solutions, resulting in increased prediction errors. Due to the heterogeneity and volatility of water conservancy data, there is an urgent need for an adaptive parameter adjustment mechanism to address these problems and improve the accuracy and computational efficiency of the model. Summary of the Invention

[0005] The purpose of the present invention is to provide a water conservancy model training method based on adaptive batch size and dynamic parameter optimization to address the training bottleneck of current deep learning models in the application of water conservancy and hydropower fields. By real-time monitoring of batch size and combining neural network prediction hyperparameters, this method can significantly improve the training efficiency and accuracy of water conservancy models in tasks such as flood warning, reservoir scheduling, and equipment fault detection. It not only reduces the complexity of manual parameter adjustment, but also improves the adaptability and robustness of the model in a dynamic environment.

[0006] The focus of the present invention is its unique design for data processing and model training optimization for the water conservancy industry. First, the batch size adjustment based on water conservancy data can monitor and adaptively adjust the batch size in real time to ensure that the model can handle changes in different time scales and data volumes. Secondly, the core of the present invention lies in its dynamic parameter adjustment decision-making method based on neural networks, which can automatically adjust hyperparameters such as learning rate and momentum according to the complexity of water conservancy tasks, which is crucial for real-time processing of large-scale dynamic data in flood warning and water resources management. In addition, the convergence monitoring and feedback mechanism ensures that the model can continuously optimize hyperparameters under complex hydrological conditions, avoids instability during the training process, and improves the practicality and operability of the water conservancy model. These unique module designs give the present invention significant technical advantages in the intelligent application of the water conservancy industry.

[0007] Specifically, the technical solution of the present invention is as follows:

[0008] The present invention significantly improves the training efficiency of deep learning models by using adaptive batch size and dynamic parameter adjustment mechanisms, targeting the real-time data fluctuation characteristics in the water conservancy industry. Data in the water conservancy industry, such as flood warning and reservoir scheduling management, usually exhibits sudden and complex time series characteristics, which are difficult to cope with by traditional fixed parameter adjustment methods. The present invention uses a neural network parameter adjustment module to automatically predict and adjust hyperparameters such as learning rate and momentum according to different batch sizes, achieve rapid adaptive training, reduce manual intervention, and improve the system's adaptability to complex and changing data environments. In addition, the present invention adopts forward and multiple backpropagation strategies to effectively avoid local optimal problems in large-scale hydrological data processing, significantly accelerate the model convergence speed, and ensure the timeliness and accuracy of flood warning and reservoir scheduling tasks.

[0009] The present invention proposes a water conservancy model training method based on adaptive batch size and dynamic parameter optimization, which specifically includes:

[0010] Step S1: Obtain hydrological data, meteorological data and water conservancy equipment monitoring data in real time through the Batch Size monitoring module, and calculate the dynamic batch size b t ;

[0011] Step S2: Set the dynamic batch size b t Input the parameter adjustment module and perform water conservancy model training based on the hyperparameters and training strategy output by the parameter adjustment module;

[0012] The parameter adjustment module performs the following operations: t Dynamically adjust the learning rate η and momentum parameter μ, and selectively enable the learning rate warm-up strategy and learning rate decay strategy;

[0013] Step S4: Determine whether the convergence of the loss function of the hydraulic model is blocked through the convergence monitoring module; if so, proceed to step S5; otherwise, jump to step S6;

[0014] Step S5: Set the current batch size b of the water conservancy model training t , gradient norm change, loss function change rate and hyperparameter input pre-trained parameter adjustment neural network model, output optimized learning rate η new and momentum parameter μ new , conduct the next round of water conservancy model training;

[0015] Step S6: Record the hyperparameter configuration and water conservancy model performance indicators of each round of training through the performance feedback module, and update the training data set of the parameter adjustment neural network model to achieve continuous optimization of the model.

[0016] Furthermore, the dynamic batch size b is calculated t ,include:

[0017]

[0018] in:

[0019] T is the set time window;

[0020] N t The amount of input data at the current moment.

[0021] Furthermore, according to the dynamic batch size b t Dynamically adjust the learning rate η, including:

[0022]

[0023] in:

[0024] η t According to the dynamic batch size b t Dynamically adjusted learning rate;

[0025] η0 is the initial learning rate;

[0026] b min is the minimum batch size;

[0027] b max The maximum batch size.

[0028] Furthermore, according to the dynamic batch size b t Dynamically adjust the momentum parameter μ, including:

[0029]

[0030] in:

[0031] μt According to the dynamic batch size b t Dynamically adjusted momentum parameters;

[0032] μ0 is the initial momentum parameter.

[0033] Furthermore, the learning rate warm-up strategy and learning rate decay strategy are selectively enabled, including:

[0034] When the dynamic batch size b t When increasing, the learning rate warm-up strategy is enabled and the learning rate decay rate is slowed down;

[0035] When the dynamic batch size b t Greater than threshold b threshold When , a forward propagation + multiple back propagation strategies are started; on the contrary, when the dynamic batch size b t Less than threshold b threshold , disable or shorten the warm-up steps, directly enter the stable training phase, and speed up the learning rate decay.

[0036] Furthermore, the architecture of the parameter adjustment neural network model is as follows:

[0037] Input layer: Input features include batch size, loss function change rate, gradient norm change, and current hyperparameter settings;

[0038] Hidden layer: Multiple fully connected hidden layers are used, and the ReLU activation function is used to ensure that the network can capture complex nonlinear relationships;

[0039] Output layer: output new learning rate η new , momentum parameter μ new .

[0040] Furthermore, the input features of the input layer are expressed as:

[0041] Eigenvector x t : in, is the gradient norm, ΔL t is the rate of change of the loss function.

[0042] Furthermore, the output of the hidden layer is expressed as: h t =ReLU(W h x t +b h ), where W h is the weight matrix of the hidden layer, b h is the bias term.

[0043] Furthermore, the output of the output layer is expressed as: [η new ,μ new ]=Wo h t +b o , where W o is the output layer weight, b o is the bias term.

[0044] Furthermore, the training of the parameter-adjusted neural network model adopts a supervised learning method, using the model convergence status and hyperparameter adjustment results in the historical training records as supervision signals, and using stochastic gradient descent or Adam optimization algorithm to update the weights of the parameter-adjusted neural network model.

[0045] Compared with the existing technology, the beneficial effects of the present invention are:

[0046] 1. The adaptive parameter adjustment mechanism of the present invention enables the model to adapt more quickly to the highly volatile data environment in the water conservancy industry. In particular, in flood warning systems, the model training efficiency and warning accuracy will be greatly improved. The model can converge stably in both large-scale and small-batch data, which can significantly enhance the intelligent level of reservoir management.

[0047] 2. This invention effectively improves the training efficiency and accuracy of deep learning models for water conservancy tasks such as flood warning, reservoir scheduling, and equipment fault detection through adaptive parameter adjustment and batch size optimization strategies. Furthermore, through a real-time neural network parameter adjustment mechanism, the model maintains efficient training even with complex dynamic data. This invention is suitable for scenarios requiring high-precision prediction and dynamic scheduling in the water conservancy and hydropower sectors, particularly for processing large-scale, heterogeneous data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is an architecture diagram of a water conservancy model training method based on adaptive batch size and dynamic parameter optimization;

[0049] Figure 2 This is an example of parameter adjustment for the parameter adjustment module;

[0050] Figure 3 is a training data example;

[0051] Figure 4 This is a diagram of the application process of the parameter adjustment neural network model. DETAILED DESCRIPTION

[0052] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0053] The features and performance of the present invention are further described in detail below with reference to the embodiments.

[0054] Example 1

[0055] See also Figure 1 This embodiment proposes a water conservancy model training system (i.e., the deep learning model in the figure) based on adaptive batch size and dynamic parameter optimization. The system consists of six modules: batch size monitoring module, parameter adjustment module, learning strategy control module, dynamic parameter adjustment decision module, convergence monitoring module, and performance feedback module. Through the collaborative work of these modules, the system optimizes the model training process in a real-time data environment, ensuring rapid model convergence and improving its stability.

[0056] In this embodiment, it should be noted that the above-mentioned Batch Size monitoring module can monitor the input batch size of hydrological data, meteorological data, and equipment data in real time, record historical data changes and dynamically adjust the batch size. It can also record historical data based on data fluctuations and provide it to the subsequent parameter adjustment module.

[0057] In this embodiment, it should be noted that the parameter adjustment module can automatically adjust hyperparameters such as learning rate, momentum, warmup LR, and LR decay based on changes in batch size, ensuring that the model maintains training efficiency under different data scales. This module can enable warmup LR and LR decay strategies to dynamically optimize hyperparameters based on the model's training status. Furthermore, the parameter adjustment module can adaptively adjust batch size based on temporal fluctuations in hydrological data and enable warmup LR when the data volume surges.

[0058] In this embodiment, it should also be noted that a learning strategy control module can also be provided to determine whether to enable forward propagation or multiple backpropagations based on the batch size and model convergence state, thereby optimizing the gradient update frequency and reducing the risk of getting stuck in a local minimum. Furthermore, the learning strategy control module automatically determines whether to enable multiple backpropagations through a neural network to prevent the model from getting stuck in a local optimal solution.

[0059] In this embodiment, it should also be noted that a dynamic parameter adjustment decision module can also be configured to predict the optimal parameter adjustment strategy using rules or neural networks. Rules are based on historical experience, while neural networks learn the optimal strategy using real-time data, ensuring that the system automatically optimizes the parameter adjustment process. In this example, the optimal parameters are predicted by configuring a parameter adjustment neural network model.

[0060] In this embodiment, it should also be noted that the convergence monitoring module (i.e., the model convergence monitoring module in the figure) monitors the loss function and gradient changes of the model in real time, evaluates the convergence state of the model and feeds back to the parameter adjustment module; that is, it monitors the loss function and gradient stability in real time and evaluates the convergence of the model. When it is detected that the convergence speed is too slow or the gradient fluctuation is abnormal, it is fed back to the parameter adjustment neural network model for optimization. Furthermore, the convergence monitoring module combines gradient fluctuation monitoring with loss function trend evaluation to ensure that the model can quickly reach a convergence state.

[0061] The convergence monitoring module can calculate the loss function L in real time t :

[0062] If the loss function slows down, the learning rate and momentum are adjusted based on the dynamic parameter adjustment decision module (training a neural network to make judgments).

[0063] In this embodiment, it should also be noted that the performance feedback module (i.e., the performance recording and feedback module in the figure) records model performance data for each round of training and provides parameter optimization suggestions for subsequent training, ensuring gradual model optimization. Furthermore, the performance feedback module can optimize training hyperparameters in real time to adapt to the complex data environments of different water conservancy tasks.

[0064] This embodiment achieves the goal of dynamically optimizing the training process through the close linkage of various modules. The Batch Size monitoring module passes data fluctuation information to the parameter adjustment module, and the parameter adjustment module adjusts hyperparameters such as learning rate and momentum in real time based on this information. The learning strategy control module selects an appropriate propagation strategy based on the convergence state of the model to further optimize the training path. The dynamic parameter adjustment decision module provides intelligent decision support for the entire training process, while the convergence monitoring module adjusts the model's training strategy in real time by analyzing changes in the gradient and loss function to ensure its stable convergence. The performance feedback module ultimately records the training results of each stage to continuously optimize the system.

[0065] Example 2

[0066] Example 2 Based on the water conservancy model training system based on adaptive batch size and dynamic parameter optimization proposed in Example 1, a water conservancy model training method based on adaptive batch size and dynamic parameter optimization is also proposed. Figure 1 , specifically including:

[0067] Step S1: Obtain hydrological data, meteorological data and water conservancy equipment monitoring data in real time through the Batch Size monitoring module, and calculate the dynamic batch size b t ;

[0068] Step S2: Set the dynamic batch size b t Input the parameter adjustment module and perform water conservancy model training based on the hyperparameters and training strategy output by the parameter adjustment module;

[0069] The parameter adjustment module performs the following operations: t Dynamically adjust the learning rate η and momentum parameter μ, and selectively enable the learning rate warm-up strategy and learning rate decay strategy;

[0070] Step S4: Determine whether the convergence of the loss function of the hydraulic model is blocked through the convergence monitoring module; if so, proceed to step S5; otherwise, jump to step S6;

[0071] Step S5: Set the current batch size b of the water conservancy model training t , gradient norm change, loss function change rate and hyperparameter input pre-trained parameter adjustment neural network model, output optimized learning rate η new and momentum parameter μ new , conduct the next round of water conservancy model training;

[0072] Step S6: Record the hyperparameter configuration and water conservancy model performance indicators of each round of training through the performance feedback module, and update the training data set of the parameter adjustment neural network model to achieve continuous optimization of the model.

[0073] In this embodiment, specifically, the dynamic batch size b is calculated t ,include:

[0074]

[0075] in:

[0076] T is the set time window;

[0077] N t is the amount of input data at the current moment;

[0078] In this embodiment, it should be noted that if b t >b threshold , start the parameter adjustment module.

[0079] In this embodiment, specifically, according to the dynamic batch size b t Dynamically adjust the learning rate η, including:

[0080]

[0081] in:

[0082] η t According to the dynamic batch size b t Dynamically adjusted learning rate;

[0083] η0 is the initial learning rate;

[0084] b min is the minimum batch size;

[0085] b max The maximum batch size.

[0086] In this embodiment, specifically, according to the dynamic batch size b t Dynamically adjust the momentum parameter μ, including:

[0087]

[0088] in:

[0089] μ t According to the dynamic batch size b t Dynamically adjusted momentum parameters;

[0090] μ0 is the initial momentum parameter.

[0091] In this embodiment, specifically, selectively enabling the learning rate warm-up strategy and the learning rate decay strategy includes:

[0092] When the dynamic batch size b tWhen increasing, the learning rate warm-up strategy is enabled and the learning rate decay rate is slowed down, the model learning speed is prolonged, and the momentum is increased to keep the gradient stable;

[0093]

[0094] When the dynamic batch size b t Greater than threshold b threshold When , a forward propagation + multiple back propagation strategies are initiated. This strategy can reduce computational overhead and accelerate model convergence when processing large-scale data.

[0095] On the contrary, when the dynamic batch size b t Less than threshold b threshold , disable or shorten the warm-up steps and directly enter the stable training phase. At the same time, speed up the learning rate decay to control the complexity of the model.

[0096]

[0097] In actual application, the time to enable the learning rate warm-up strategy and the learning rate decay strategy can be further refined according to specific circumstances. This embodiment gives an example, such as Figure 2 shown.

[0098] In this embodiment, a neural network is used to dynamically adjust parameters. When convergence is blocked during the water conservancy model training process, an additional lightweight neural network (i.e., the parameter adjustment neural network model described above) is called to optimize the hyperparameters in the water conservancy model training. Specifically, the architecture design of the parameter adjustment neural network can be based on a multi-layer perceptron (MLP) or a similar deep network. The specific architecture is as follows:

[0099] Input layer: Input features include batch size, loss function change rate, gradient norm change, and current hyperparameter settings;

[0100] Hidden layer: Multiple fully connected hidden layers are used, and the ReLU activation function is used to ensure that the network can capture complex nonlinear relationships;

[0101] Output layer: output new learning rate η new , momentum parameter μ new .

[0102] In this embodiment, specifically, the input features of the input layer are expressed as:

[0103] Eigenvector x t : in, is the gradient norm, ΔL t is the rate of change of the loss function.

[0104] In this embodiment, specifically, the output of the hidden layer is expressed as: h t =ReLU(W h x t +b h ), where W h is the weight matrix of the hidden layer, b h is the bias term.

[0105] In this embodiment, specifically, the output of the output layer is expressed as: [η new ,μ new ]=W o h t +b o , where W o is the output layer weight, b o is the bias term.

[0106] In this embodiment, specifically, the training of the parameter adjustment neural network model adopts a supervised learning method, using the model convergence status and hyperparameter adjustment results in the historical training records as supervision signals, and using stochastic gradient descent or Adam optimization algorithm to update the weights of the parameter adjustment neural network model.

[0107] Loss function of the parameter-tuned neural network model: The mean square error (MSE) is used to optimize the prediction performance of the parameter-tuned neural network. Assume that the actual optimal learning rate and momentum are η * and μ * , then the loss function is:

[0108]

[0109] In this embodiment, it should also be noted that the training of the parameter adjustment neural network model requires a large amount of historical data, mainly including the following information:

[0110] 1Batch Size: current training batch size;

[0111] Gradient change data: the gradient norm change at each training step;

[0112] Loss function data: loss value for each round of training;

[0113] Current hyperparameters: the values ​​of the currently used hyperparameters such as learning rate and momentum;

[0114] Model performance indicators: such as accuracy on the validation set, loss trend, etc.

[0115] This data is collected in real time during the actual training process or obtained from previous training records. The dataset should include information such as different batch sizes, loss function curves, and gradient changes to ensure that the parameter-tuned neural network can generalize across different data environments.

[0116] In each training cycle, the neural network model adjusts the learning rate and momentum in real time according to the current model status (gradient, loss, etc.), and updates the model's training parameters. Figure 4 , the specific steps are as follows:

[0117] First get the current model state:

[0118] Then input the parameter adjustment neural network model to obtain the new hyperparameters: [η new ,μ new ]=NN(x t );

[0119] Finally, the new hyperparameters are used for the next step of training to ensure that the model automatically adjusts the learning strategy in different states to avoid overfitting or underfitting.

[0120] The application process of the water conservancy model training method based on adaptive batch size and dynamic parameter optimization proposed in this embodiment is as follows:

[0121] 1.1 Data Collection and Preparation

[0122] First, it is necessary to collect relevant historical and real-time data based on the needs of different water conservancy projects (such as flood warnings, equipment fault detection, or water resource scheduling). This data includes hydrological data, meteorological data, and equipment sensor data. By establishing a sensor network or leveraging existing water conservancy data platforms, high-frequency real-time data can be acquired and preprocessed to remove noise and perform normalization to ensure high data quality.

[0123] 1.2 System Deployment and Configuration

[0124] The adaptive batch size and dynamic parameter optimization system of the present invention is deployed in relevant management systems. This system automatically adjusts the model's training strategy by monitoring changes in data input in real time. At this stage, deep learning models need to be configured for different tasks (such as flood warning or equipment detection) and integrated with existing water conservancy data platforms to ensure smooth data flow.

[0125] 1.3 Model Training and Optimization

[0126] After receiving data, the system automatically adjusts hyperparameters such as learning rate and momentum based on the current batch size and model state. During the initial training phase, the system uses a warm-up learning rate (LR) mechanism to ensure the model quickly adapts to data changes. If a dramatic increase in data volume is detected, the system automatically increases the batch size and adjusts the forward and backward propagation strategies to avoid local optima.

[0127] 1.4 Real-time monitoring and parameter adjustment

[0128] During model training, the Convergence Monitoring Module continuously monitors the model's loss function and gradient changes. If the training speed slows down or the model enters a convergence state, the system will adjust the learning rate and momentum in real time through the Neural Network Prediction Module to ensure that the model can be trained quickly and efficiently.

[0129] 1.5 Model Evaluation and Deployment

[0130] After model training reaches convergence, the performance feedback module evaluates the model to ensure it achieves optimal prediction accuracy and real-time performance. The model is then deployed in water conservancy applications such as flood warning systems, equipment health monitoring platforms, or reservoir scheduling systems.

[0131] 1.6 Continuous Optimization and Iteration

[0132] During operation, the system will continuously monitor the performance of the model and dynamically adjust the training parameters through a feedback loop, so that the model can continuously adapt to the changing hydrological environment and equipment status to achieve optimal performance.

[0133] Example 3

[0134] Example 3 is a specific practical application case of the water conservancy model training method based on adaptive batch size and dynamic parameter optimization proposed in Example 2.

[0135] In a flood warning system for a certain reservoir, a deep learning model needs to process and predict real-time data from multiple sources, including constantly changing water levels and weather conditions. However, due to large fluctuations in data volume and the sudden nature of the data, traditional training methods with fixed parameters cannot cope with complex data changes, which can easily lead to low model training efficiency, slow convergence, and even overfitting or underfitting. To this end, the adaptive batch size and parameter optimization strategy provided by this invention is applied to optimize the training process of the deep learning model, improving the response speed and accuracy of the warning system.

[0136] 1. This embodiment involves model training based on water conservancy data. The training data is as follows: Figure 3 shown.

[0137] 2. Data processing flow:

[0138] (1) Batch Size Monitoring and Adjustment:

[0139] When the water level data surges, the system monitors the increase in batch size and automatically adjusts the model's learning rate (LR), learning rate warmup (warmup LR), and learning rate decay (LR decay) to ensure that the model converges quickly when processing large amounts of data and avoids falling into local optimality.

[0140] If the batch size is smaller than a certain threshold, the system reduces LR by dynamically adjusting the parameters of the neural network, while increasing momentum to ensure the stability of the model in the case of small data volumes.

[0141] (2) Automatic parameter adjustment decision module:

[0142] The lightweight neural network parameter adjustment model receives the current model training convergence status and automatically predicts and adjusts hyperparameters.

[0143] (3) Forward and back propagation optimization:

[0144] For large quantities of hydrological monitoring data (such as flood warning scenarios), the system enables a one-time forward propagation + multiple-time backpropagation strategy to reduce the frequency of model updates and speed up model training.

[0145] Example 4

[0146] This embodiment proposes a water conservancy model training device based on adaptive batch size and dynamic parameter optimization, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned water conservancy model training method based on adaptive batch size and dynamic parameter optimization are implemented; preferably, the computer program can be executed on a terminal device, such as a personal computer.

[0147] This embodiment also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned water conservancy model training method based on adaptive batch size and dynamic parameter optimization; however, the computer-readable storage medium of the present invention is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in combination with an instruction execution system, device or component.

[0148] The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0149] The computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. The data signal propagated in this manner may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or component. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0150] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0151] The above-described embodiments merely represent specific implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of protection of the present application. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the technical concept of the present application, and all such variations and improvements fall within the scope of protection of the present application.

[0152] This background section is provided to generally present the context of the invention, and the work of the presently named inventors, the work to the extent described in this background section, and aspects of the description in this section that did not constitute prior art at the time of filing are neither explicitly nor implicitly admitted to be prior art to the present invention.

Claims

1. A hydraulic model training method based on adaptive batch size and dynamic parameter optimization, characterized in that: include: Step S1: Obtain hydrological data, meteorological data and water conservancy equipment monitoring data in real time through the Batch Size monitoring module, and calculate the dynamic batch size b t ; Step S2: Set the dynamic batch size b t Input the parameter adjustment module and perform water conservancy model training based on the hyperparameters and training strategy output by the parameter adjustment module; The parameter adjustment module performs the following operations: t Dynamically adjust the learning rate η and momentum parameter μ, and selectively enable the learning rate warm-up strategy and learning rate decay strategy; Step S4: Determine whether the convergence of the loss function of the hydraulic model is blocked through the convergence monitoring module; if so, proceed to step S5; otherwise, jump to step S6; Step S5: Set the current batch size b of the water conservancy model training t , gradient norm change, loss function change rate and hyperparameter input pre-trained parameter adjustment neural network model, output optimized learning rate η new and momentum parameter μ new , conduct the next round of water conservancy model training; Step S6: Record the hyperparameter configuration and water conservancy model performance indicators of each round of training through the performance feedback module, and update the training data set of the parameter adjustment neural network model to achieve continuous optimization of the model.

2. A hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 1, characterized in that: Calculate dynamic batch size b t ,include: in: T is the set time window; N t The amount of input data at the current moment.

3. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 1 is characterized in that: According to the dynamic batch size b t Dynamically adjust the learning rate η, including: in: η t According to the dynamic batch size b t Dynamically adjusted learning rate; η0 is the initial learning rate; b min is the minimum batch size; b max The maximum batch size.

4. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 3 is characterized in that: According to the dynamic batch size b t Dynamically adjust the momentum parameter μ, including: in: μ t According to the dynamic batch size b t Dynamically adjusted momentum parameters; μ0 is the initial momentum parameter.

5. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 1 is characterized in that: Selectively enable the learning rate warm-up strategy and learning rate decay strategy, including: When the dynamic batch size b t When increasing, the learning rate warm-up strategy is enabled and the learning rate decay rate is slowed down; When the dynamic batch size b t Greater than threshold b threshold When , a forward propagation + multiple back propagation strategies are started; on the contrary, when the dynamic batch size b t Less than threshold b threshold , disable or shorten the warm-up steps, directly enter the stable training phase, and speed up the learning rate decay.

6. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 1 is characterized in that: The architecture of the parameter tuning neural network model is as follows: Input layer: Input features include batch size, loss function change rate, gradient norm change, and current hyperparameter settings; Hidden layer: Multiple fully connected hidden layers are used, and the ReLU activation function is used to ensure that the network can capture complex nonlinear relationships; Output layer: output new learning rate η new , momentum parameter μ new .

7. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 6 is characterized in that: The input features of the input layer are expressed as: Eigenvector x t : in, is the gradient norm, ΔL t is the rate of change of the loss function.

8. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 7 is characterized in that: The output of the hidden layer is represented as: h t =ReLU(W h x t +b h ), where W h is the weight matrix of the hidden layer, b h is the bias term.

9. The hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 8 is characterized in that: The output of the output layer is expressed as: [η new ,μ new ]=W o h t +b o , where W o is the output layer weight, b o is the bias term.

10. A hydraulic model training method based on adaptive batch size and dynamic parameter optimization according to claim 9, characterized in that: The training of the parameter adjustment neural network model adopts the supervised learning method, using the model convergence status and hyperparameter adjustment results in the historical training records as supervision signals, and using the stochastic gradient descent or Adam optimization algorithm to update the weights of the parameter adjustment neural network model.