A flood flow prediction model construction method

By introducing multi-source data and physical constraints into the Transformer model, the problem of lack of physical interpretability in existing flood prediction models is solved, achieving high-precision and robust flood flow prediction, and providing reliable data support, especially in bridge safety assessment and protection decision-making.

CN122634338APending Publication Date: 2026-08-25SOUTHWEST JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610721437.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing deep learning-based flood prediction models lack physical interpretability and fail to effectively integrate actual hydrophysical laws, resulting in limited stability and accuracy in flood flow prediction.

Method used

By combining the Transformer model with physical constraints and using multi-source data fusion and hydrophysical laws as constraints, a flood flow prediction model is constructed. The model leverages the time-series processing capabilities of the Transformer with physical constraints, and introduces water storage status and pier forces to construct physical loss terms, thereby improving the interpretability and stability of the model.

Benefits of technology

It improves the accuracy and physical rationality of flood flow forecasting, enabling high-precision and robust flood flow forecasting in complex environments, and providing a basis for bridge safety assessment and protection decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122634338A_ABST
    Figure CN122634338A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a flood flow prediction model construction method, comprising: obtaining a plurality of samples of a to-be-predicted river basin, wherein each sample comprises a terrain of a river section, a vegetation index, and inflow time series data in a historical period; inputting each sample into a Transformer model for training; in the training process, updating model parameters by constraining the model output to be consistent with the measured flood flow of the river section in each sample after the historical period in each sample, and the difference between the measured inflow data and the model output at the same time step to be consistent with the change rate of the water level of the river basin over time; and the trained model takes the terrain of any river section, the vegetation index, and the inflow time series data in any period as input, and takes the flood flow of the any river section after the any period as output. The embodiment improves the accuracy and stability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data modeling technology, and in particular to a method for constructing a flood flow prediction model. Background Technology

[0002] With the intensification of climate change, the frequency of extreme weather events such as torrential rains and floods is increasing, leading to a shortened service life of infrastructure. Floods not only cause road interruptions but also exert significant hydrodynamic effects on bridge structures, exacerbating localized scour of bridge piers, degradation of foundation bearing capacity, and the risk of structural instability, seriously threatening the operational safety of bridges. Therefore, establishing a flood prediction model that combines high accuracy and physical interpretability, and applying it to the assessment of bridge safety status under flood conditions, is of great significance for bridge disaster prevention and mitigation and the construction of intelligent transportation systems.

[0003] In recent years, deep learning-based models have demonstrated advantages in flood forecasting. Patent CN202510836788.8 discloses a flood disaster forecasting method based on a multilayer perceptron, constructing an efficient forecasting system. Patent CN202510065066.7 discloses a karst basin runoff forecasting method based on reinforcement learning and deep learning. This method utilizes hourly two-dimensional cumulative rainfall maps, two-dimensional average temperature maps, and fixed basin features, extracting features through a 2D-CNN, and inputting the resulting hourly time series data into a Long Short-Term Memory (LSTM) network to construct a 2D-CNN-LSTM deep learning network. However, most of the deep learning models in these methods lack physical interpretability and fail to effectively integrate actual hydrophysical laws, resulting in limited stability and accuracy in flood flow forecasting. Summary of the Invention

[0004] This invention provides a method for constructing a flood flow prediction model to solve at least one of the above-mentioned technical problems.

[0005] In a first aspect, embodiments of the present invention provide a method for constructing a flood discharge prediction model, comprising: Multiple samples of the watershed to be predicted are obtained, each of which includes the topography and vegetation index of a river cross section, as well as the inflow time series data for a historical period. Each sample is input into the Transformer model for training. During the training process, the model parameters are updated by constraining the model output to be consistent with the measured flood discharge of the river section in each sample after the historical period in each sample, and the difference between the measured inflow data and the model output at the same time step to be consistent with the rate of change of the basin water level over time. The trained model takes the topography and vegetation index of any river section, as well as the inflow time series data at any time period, as input, and the flood flow of the any river section after the any time period as output.

[0006] In a second aspect, embodiments of the present invention provide an electronic device, the electronic device comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the flood flow prediction model construction method described in any embodiment.

[0007] Thirdly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the flood flow prediction model construction method described in any embodiment.

[0008] In summary, this invention provides a method for constructing a flood discharge prediction model. By introducing physical constraints during model training, it improves the accuracy and physical plausibility of flood prediction, enabling high-precision and robust flood discharge prediction in complex environments. Specifically, the method of this embodiment achieves the following beneficial effects: 1. Improve flood flow forecasting accuracy through multi-source data fusion. By integrating heterogeneous data from multiple sources such as rainfall, runoff, topography, underlying surface, and vegetation index, the accuracy of flood flow forecasting is effectively improved, especially in short-term forecasting, providing reliable data support for flood warning and emergency response.

[0009] 2. The temporal processing capabilities of the Transformer are combined with physical constraints. By introducing water storage conditions and pier forces to construct physical loss terms, the model's prediction results are effectively constrained, making them conform to hydrophysical laws and enhancing the model's interpretability and stability. Attached Figure Description

[0010] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0011] Figure 1 This is a flowchart of a flood flow prediction model construction method provided by an embodiment of the present invention; Figure 2This is a schematic diagram of a flood flow prediction system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0013] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0014] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0015] Figure 1 This is a flowchart illustrating a flood discharge prediction model construction method provided in an embodiment of the present invention. The method is executed by an electronic device. Figure 1 As shown, the method specifically includes: S110. Collect hydrological and environmental data for the watershed to be predicted.

[0016] This step collects the data needed for model training, serving as the data source for the entire method.

[0017] In one specific implementation, historical measured data from multiple hydrological stations within the watershed to be predicted are first selected, including: Rainfall data r This represents the inflow of rainfall; runoff data q: Represents the inflow from the upper reaches of the river; Surface inflow G b and groundwater recharge G x : Represents surface inflow and underground inflow.

[0018] Simultaneously, the following environmental data for the watershed to be predicted were collected: Underlying surface data D The underlying surface data, derived from the geospatial data cloud platform, refers to land use types. It is mainly based on 2-meter resolution GF-2 satellite imagery, which is manually interpreted through the ArcGIS platform to classify land types into terraces, dams, forests, grasslands, bare land, etc. Terrain data G Topographic data is derived from digital elevation models (DEMs), such as using GDEMV3 30-meter resolution digital elevation model and SRTM SLOPE 30-meter slope data to obtain terrain data; Vegetation Index (Onshore) p : Derived from MODIS products, such as MODIS MOD13Q1.

[0019] S120. Based on the collected data, construct multiple samples of the watershed to be predicted, which are used to construct a flood flow prediction model for the watershed to be predicted; wherein, each sample includes the topography and vegetation index of a river section, as well as the inflow time series data of the river section in a historical period.

[0020] Optionally, the inflow time series data includes rainfall time series data, runoff time series data, surface inflow time series data, and groundwater recharge time series data.

[0021] In one specific implementation, sample construction may include the following steps: Step 1: Calculate the historical time-series rainfall data for each hydrological level using the area-weighted method to obtain the historical time-series data of the basin-wide average rainfall. This step processes the rainfall data and calculates the basin-wide average precipitation using the area-weighted method. (ml / h, milliliters per hour), its weight can be determined by the proportion of the controlled area of ​​each rain gauge to the total watershed area. The formula is as follows: (1) In the formula, K Indicates the number of hydrological stations. A i Representing the i The area of ​​the Thiessen polygon controlled by a hydrological station. A total The total area of ​​the basin. P i The rainfall at a single station is represented by the formula; , A i and P i All of these represent data from the same period or time step. By performing the above calculations on the data from each time step, the average precipitation over the watershed at each time step can be obtained.

[0022] Step 2: Select any river cross-section as the sample construction object. Based on the confluence time from each hydrological station to the selected river cross-section, shift the historical time-series data of the inflow to obtain the historical time-series data of the inflow for the selected river cross-section. This step synchronizes the time-series data.

[0023] Specifically, each sample corresponds to a river cross-section to be predicted. For ease of distinction and description, this embodiment refers to the river cross-section to be predicted as the target river cross-section. Optionally, the target river cross-section can be the river cross-section where the bridge pier is located (referred to as the bridge pier cross-section), or other river cross-sections can be selected. The historical time series data of inflow includes historical rainfall time series data, runoff time series data, surface inflow time series data, and groundwater recharge time series data. After the river cross-section is determined, the data from different hydrological stations are synchronized to the same time scale using the following formula: (2) In the formula, X i ( t ) is the first i A hydrological station at time step t Inflow data converging at the sample river cross-section, P i ( t-τ i ) is the first i The hydrological station was in advance τ i Measured inflow data for duration; τ i For the first i The confluence time from each hydrological station to the target river section is calculated. By performing the above operations on each type of inflow data, time synchronization of each inflow time series data can be achieved. The rainfall in the target watershed at each time step can be taken as the watershed average precipitation at that time step.

[0024] This step aims to eliminate the impact of differences in inflow propagation time between different hydrological stations on flood forecasting. Based on the confluence time from each hydrological station to the target cross-section, the inflow time-series data are time-synchronized. This is achieved by... i A hydrological station at time step Rainfall is mapped to time steps tThe model input is used to achieve physical temporal alignment of different spatial rainfall processes at the target section, thereby improving the model's ability to represent and predict flood propagation processes.

[0025] Step 3: Extract rainfall time series data for any historical period from the inflow historical time series data of any river section, and combine it with parameters such as topography and vegetation index of any river section to form a sample.

[0026] By repeating steps two and three multiple times, multiple samples can be obtained.

[0027] Optionally, the data for each sample can be standardized to obtain the final sample. For example, the Z-score standardization algorithm can be used, which involves subtracting the mean of the dataset and then dividing by the standard deviation to eliminate the influence of units of measurement. (3) In the formula, X To standardize the data, μ Let σ be the mean of the data, σ be the standard deviation of the data, and Z be the standardized data.

[0028] S130. Input each sample into the Transformer model for training. The trained model takes the topography and vegetation index of any river section and the inflow time series data at any time period as input, and takes the short-term flood flow of the any river section after the any time period as output.

[0029] This embodiment uses the Transformer model as the flood discharge prediction model. The data processing flow in the model is as follows: First, the data from the same time step in the sample are encoded to obtain the multi-source hydrological data features at the same time step. Optionally, to improve the Transformer model's ability to represent the features of multi-source hydrological data, the standardized input data is first embedded and mapped to obtain a high-dimensional feature representation, the expression of which is as follows: (4) In the formula, Z It is standardized data. E It is the feature vector of the input data. W e To embed the weight matrix, b e This is the bias term. For environmental data that does not change over time, the same value can be used at each time step.

[0030] Then, temporal location encoding is added to the multi-source hydrological data features at each time step, and the added features are fused to obtain the hydrological time-series features. Specifically, since the Transformer structure itself lacks the ability to perceive sequence location information, location encoding is added to the input embedding to preserve the time series order information. The expression is as follows: (5) (6) In the formula, and For position encoding, pos For location, j For indexing, d model For model dimensions.

[0031] Step 3: Perform multi-head self-attention processing on the hydrological time-series features to learn multi-scale temporal correlation features in the flood evolution process. This step uses a self-attention mechanism to calculate the correlation between different time steps in the input sequence. First, a query vector, key vector, and value vector are generated from the input feature vector. Then, attention weights are obtained by calculating the correlation between the query vector and the key vector, and these weights are used to perform a weighted summation of the value vectors to extract feature representations containing global temporal dependencies. The expression is as follows: (7) In the formula, Indicates attention weights, Q For query vector, K For key vectors, V For value vectors, d k The dimension of the key. The query vector. Q Key vector K Sum value vector V The calculation expression is as follows: (8) (9) (10) In the formula, W Q , W K , W V These are the weight matrices corresponding to the query vector, key vector, and value vector, respectively. E 'This represents the input feature representation after adding position encoding.'

[0032] Through the self-attention mechanism, the model can adaptively focus on historical time series information that has a significant impact on flood flow prediction, thereby improving the model's ability to represent the flood evolution process.

[0033] Furthermore, to enhance the model's ability to extract features at different time scales, the Transformer model uses a multi-head self-attention mechanism to linearly map the query vector Q, key vector K, and value vector V to... The algorithm constructs three distinct subspaces and performs self-attention computation in parallel within each subspace. The outputs of each attention head are then concatenated, and a linear transformation is used to obtain the fused feature representation. Its expression is as follows: (11) In the formula, h For the number of heads, W o It is the output weight matrix, and each attention head. h Calculate as follows: (12) In the formula, W qh , W kh , W vh They are the first The weight matrix of queries, keys, and values ​​in each subspace.

[0034] Through the multi-head attention mechanism, the model can learn multi-scale temporal correlation features in the flood evolution process from different feature subspaces, thereby improving the model's ability to represent complex hydrological change processes.

[0035] Step 4: Use a feedforward neural network to process the multi-scale temporal correlation features and predict the flood flow of the river section in the sample after the historical period.

[0036] A feedforward neural network is used to perform nonlinear mapping and feature enhancement on the temporal features extracted by the self-attention mechanism, thereby improving the model's ability to express complex flood evolution patterns. The feedforward neural network includes two linear transformation layers and a ReLU activation function, the expression of which is as follows: (13) In the formula, This represents the input features of the feedforward neural network. This represents the output features of the feedforward neural network. W 1. W 2 is the weight matrix. b 1. b 2 is the bias term, max(0,x ) is the ReLU activation function.

[0037] To improve the training stability of the Transformer model and prevent gradient vanishing or exploding during deep network training, residual connections and layer normalization operations are introduced in each layer, as shown in the following expressions: (14) In the formula, x i For input; The output is also the hidden feature representation after Transformer encoding; SubLayer( x i The result is the result after processing by the feedforward network, and LayerNorm is the normalization operation.

[0038] By preserving the original feature information through residual connections and using layer normalization to improve the model's training stability and convergence speed, the model's ability to learn complex flood time series data is enhanced.

[0039] After multi-layer Transformer encoding, a hidden feature representation containing global temporal dependencies can be obtained, and future flood flow prediction can be achieved through a fully connected output layer: (15) In the formula, W o This is the output layer weight matrix; b o For bias terms; This represents the predicted value of future flood flow.

[0040] In particular, during the training process of this embodiment, the model parameters are updated by constraining the model output to be consistent with the measured flood flow of the river section in each sample after the historical period in each sample, and by ensuring that the difference between the measured inflow data and the model output at the same time step is consistent with the rate of change of the basin water level over time.

[0041] Specifically, to improve the physical consistency of flood flow prediction results, this embodiment introduces physical constraints to construct a loss function based on the flood flow prediction results output by the Transformer model. Since changes in watershed water storage state are jointly determined by inflow and outflow, the physical constraints on the Transformer prediction results can be achieved through the water balance relationship.

[0042] In this embodiment, the Transformer model outputs the predicted flood discharge value at future time points. And introduce the equivalent water storage capacity of the basin. S (t As an implicit physical state variable, used to characterize the water storage state within the watershed, the change in water storage in the watershed satisfies the following water balance relationship: (16) In the formula, S ( t () represents the equivalent water storage of the basin at time step t. I ( t ) represents the measured inflow data at time step t (the sum of inflow data from all sources). ( t ) represents the flood discharge at time step t predicted by the Transformer model.

[0043] Based on the above water balance relationship, the following loss function can be constructed. : (17) (18) (19) In the formula, L data and L physics These represent data loss and physical loss, respectively. M represents the number of samples used to calculate the physical loss, and m represents the index of the sample used to calculate the physical loss. This represents the rate of change of the equivalent water storage of the basin over time at time step t. The algorithm calculates its own value for each sample separately. Then take each sample The samples are summed and averaged; N represents the number of samples used to calculate the data loss, and n represents the index of the sample used to calculate the data loss. Y true ( t ( ) represents the measured flood discharge at time step t. L data The algorithm calculates its own value for each sample separately. Then take each sample Add them together and take the average. λ This is a hyperparameter used to adjust the balance between data loss and physical loss.

[0044] By introducing a physical loss function, the Transformer model output is made to conform to the hydrophysical laws governing flood evolution, thereby improving the reliability and physical interpretability of the model's predictions. In practical applications, given a constant basin capacity, the basin's water storage state is proportional to its water level. The rate of change of the water level at the target cross-section over time can be taken at time step t.

[0045] Furthermore, in practical applications, there is a difference between the water level monitored by the hydrological station and the water level at the target cross-section of the bridge. This difference is influenced by factors such as river topography and gradient, and the two are not entirely consistent. Optionally, if a hydrological station is within a set range (relatively close) to the target cross-section, the rate of change of the monitored water level over time at the hydrological station closest to the target cross-section can be selected as the rate of change of the target cross-section's water level over time at the same time step. If no sufficiently close water level station exists, historical monitoring data can be used to calibrate the mapping relationship between the hydrological station's water level and the target cross-section's water level (e.g., by using a lookup table mapping), the expression of which is as follows: (20) In the formula, H b ( t () represents the target cross-sectional water level at time step t. H s ( t ( ) represents the water level at the hydrological station at time t. A For river cross-section and gradient parameters, This represents the measured flood discharge at the target cross-section at time step t. The hydrological station water level is then converted to the target cross-section water level using the above mapping relationship, thus representing the rate of change of the target cross-section water level over time.

[0046] Furthermore, considering the impact of floods on bridge pier safety, this embodiment also uses the Transformer model to predict flood discharge based on bridge hydrodynamics. ( t This study further predicted the drag and lift forces acting on bridge piers under flood conditions, and improved the accuracy of flood flow prediction by correcting the predicted and measured force values. Specifically, the process includes the following steps: Step 1: Use the model output for each sample as the flood flow rate, and calculate the average flow velocity at the pier cross-section in each sample. This process is only applicable to samples where the target cross-section is the section where the pier is located. The formula for calculating the average flow velocity at the pier cross-section is as follows: (twenty one) in, This represents the average flow velocity at time step t. This indicates the effective water passage area of ​​the bridge pier cross section.

[0047] Step 2: Based on the average flow velocity at the pier cross-section in each sample, predict the pier drag force and predicted lift for each sample. Specifically, predict the pier drag force and predicted lift for each sample using the following formula: (twenty two) (twenty three) in, and They represent The pier drag force and predicted lift at the time step, where ρ is the water density; and These are the drag coefficient and lift coefficient, respectively. and These represent the effective areas corresponding to drag force and lift force, respectively. These parameters are measurable when the bridge structure is determined, and the specific methods for determining them are existing technologies, which will not be elaborated here.

[0048] Step 3: Update the Transformer model parameters by ensuring that the drag force and predicted lift of each sample are consistent with the measured data. To guarantee that the prediction results satisfy hydrodynamic laws, a physical loss function is constructed by introducing drag force equations and lift equations: (twenty four) In the formula, and Represent the measured values ​​of the pier drag force and predicted lift at time step t, respectively, and W represents the value used for calculation. The number of samples, Indicates the sample index; in In this process, each sample calculates its own... Then take each sample Add them together and take the average. Measured values. and It can be obtained through sensor measurement or through coefficient calibration. The total loss function is then updated as follows: (25) in, This represents the weighting coefficient. It's worth noting that... and It can be calculated for all samples, while Calculations were performed only for samples whose target cross-section is a bridge pier cross-section.

[0049] Based on the loss function (17) or (24), the parameters of the Transformer model can be trained. In one specific implementation, the Adam optimizer can be used for model training, with a maximum number of iterations set to 1000, and performance evaluated on a validation set every 50 iterations. The initial learning rate is set to 10. -4 And dynamically adjust based on the performance on the validation set. Hyperparameter λ (and The weights used between loss terms can be determined by cross-validation to select the best among multiple candidate values.

[0050] After training, to verify model performance, the Nash efficiency coefficient (NSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²) can be used. 2 Using this as an evaluation index, the optimal hyperparameters are selected to achieve accurate prediction of flood flow and hydrodynamics for the next two hours.

[0051] Furthermore, based on the trained flood flow prediction model, an integrated flood flow and hydrodynamic monitoring system can be constructed, including subsystems for data acquisition, data management, and flood flow prediction, such as... Figure 2 (As shown). This system can acquire multi-source data over a period of time in real time, inputting it into a trained Transformer model to predict flood flow in the near future (e.g., predicting flood flow for the next two hours using hourly multi-source data from the past day), ensuring the real-time nature and accuracy of flood flow monitoring. The data acquisition subsystem is responsible for acquiring raw data from hydrological stations and / or various sensors, and transmitting it to the prediction subsystem and storage and management subsystem. The data management subsystem enables efficient management functions such as storing, adding, deleting, modifying, and querying hydrological data.

[0052] In summary, this embodiment provides a method for constructing a flood flow prediction model. By introducing physical constraints during model training, it improves the accuracy and physical rationality of flood prediction, enabling high-precision and robust flood flow prediction in complex environments. Furthermore, this embodiment utilizes flood flow to predict pier drag and lift, inversely constraining the accuracy of flood flow prediction and providing a basis for bridge safety assessment and protection decisions. Specifically, the method of this embodiment achieves the following beneficial effects: 1. Improve flood flow forecasting accuracy through multi-source data fusion. By integrating heterogeneous data from multiple sources such as rainfall, runoff, topography, underlying surface, and vegetation index, the accuracy of flood flow forecasting is effectively improved, especially in short-term forecasting, providing reliable data support for flood warning and emergency response.

[0053] 2. The temporal processing capabilities of the Transformer are combined with physical constraints. By introducing water storage conditions and pier forces to construct physical loss terms, the model's prediction results are effectively constrained, making them conform to hydrophysical laws and enhancing the model's interpretability and stability.

[0054] 3. Existing technologies mostly focus on flood flow prediction itself, lacking consideration of the application of flood flow in bridge hydrodynamic response. The prediction results are therefore difficult to directly serve bridge disaster prevention, mitigation, and safety early warning. The method in this embodiment, however, incorporates pier drag and lift prediction into the model construction. This not only inversely constrains the accuracy of flood flow prediction but also ensures that the prediction results can be used to calculate pier drag and lift predictions, providing a basis for bridge safety assessment and protection decisions.

[0055] It should be noted that all data involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0056] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 60, a memory 61, an input device 62, and an output device 63; the number of processors 60 in the device can be one or more. Figure 3 Taking a processor 60 as an example; the processor 60, memory 61, input device 62, and output device 63 in the device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0057] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the flood flow prediction model construction method in this embodiment of the invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 61, thereby realizing the aforementioned flood flow prediction model construction method.

[0058] The memory 61 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 61 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include memory remotely located relative to the processor 60, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0059] Input device 62 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 63 may include display devices such as a display screen.

[0060] This invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the flood flow prediction model construction method of any embodiment.

[0061] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0062] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0063] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0064] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as C or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing a flood discharge prediction model, characterized in that, include: Multiple samples of the watershed to be predicted are obtained, each of which includes the topography and vegetation index of a river cross section, as well as the inflow time series data for a historical period. Each sample is input into the Transformer model for training. During the training process, the model parameters are updated by constraining the model output to be consistent with the measured flood discharge of the river section in each sample after the historical period in each sample, and the difference between the measured inflow data and the model output at the same time step to be consistent with the rate of change of the basin water level over time. The trained model takes the topography and vegetation index of any river section, as well as the inflow time series data at any time period, as input, and the flood flow of the any river section after the any time period as output.

2. The method according to claim 1, characterized in that, The inflow time series data includes rainfall time series data, runoff time series data, surface inflow time series data, and groundwater recharge time series data.

3. The method according to claim 1, characterized in that, The inflow time series data includes rainfall time series data; Accordingly, obtaining multiple samples of the watershed to be predicted includes: Obtain historical time-series rainfall data from multiple hydrological stations in the watershed to be predicted; The area-weighted method was used to calculate the historical time-series rainfall data of each hydrological level to obtain the historical time-series data of the average rainfall over the watershed. Select any river section as the sample construction object, and based on the confluence time from each hydrological station to the river section, shift the historical time series data of the average rainfall over time to obtain the historical time series data of the rainfall of the river section. From the historical time-series rainfall data of any river section, extract the rainfall time-series data for any historical period, and add it to a sample along with the topography and vegetation index of any river section.

4. The method according to claim 1, characterized in that, The model parameters are updated by ensuring that the model output and the measured flood discharge at a river section in each sample tend to be consistent after a certain historical period, and that the difference between the measured inflow data and the model output at the same time step tends to be consistent with the measured rate of change of the basin water level. This includes: By using the following loss function, the difference between the measured inflow data and the model output at the same time step is constrained to be consistent with the rate of change of the watershed water level over time: In the formula, L physics This represents the loss function value, where M represents the number of samples and m represents the sample index. ( t The figure represents the flood discharge at time step t in the model output. This represents the measured inflow data at time step t. This represents the rate of change of the measured water level in the basin over time at time step t.

5. The method according to claim 1, characterized in that, The river cross-section in each sample is the river cross-section where the bridge piers are located; Correspondingly, the training process also includes: The model output corresponding to each sample is used as the flood flow, and the average flow velocity of the river section where the bridge pier is located in each sample is calculated. Based on the average flow velocity of the river section where the bridge piers are located in each sample, predict the pier drag force and predicted lift for each sample. The parameters of the Transformer model are updated by ensuring that the pier drag force and predicted lift for each sample are consistent with the measured data.

6. The method according to claim 5, characterized in that, The step of using the model output corresponding to each sample as flood flow and calculating the average flow velocity of the river section where the bridge piers are located in each sample includes: Based on the following data, calculate the average flow velocity of the river section where the bridge piers are located in each sample: in, This represents the flood discharge at time step t at the river cross-section where the bridge pier is located, as output by the model. This represents the average flow velocity at time step t in the river section where the bridge pier is located. This indicates the effective water passage area of ​​the river channel where the bridge pier is located.

7. The method according to claim 6, characterized in that, The method of predicting the pier drag force and predicted lift for each sample based on the average flow velocity of the river section where the pier is located includes: Based on the following formulas, predict the pier drag force and predicted lift for each sample: in, and They represent The pier drag force and predicted lift at the time step, where ρ is the density of water. and These are the drag coefficient and lift coefficient, respectively. and These represent the effective areas corresponding to drag force and lift force, respectively.

8. The method according to claim 1, characterized in that, Perform the following operations in the Transformer model: Encode the data at the same time step in the sample to obtain the multi-source hydrological data features at the same time step; Temporal location coding is added to the features of multi-source hydrological data at each time step, and the added features are fused to obtain hydrological temporal features; Multi-head self-attention processing is applied to the aforementioned hydrological time-series features to learn multi-scale temporal correlation features in the flood evolution process; The multi-scale temporal correlation features are processed using a feedforward neural network to predict the flood flow of the river section in the sample after the historical period.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the flood flow prediction model construction method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the flood flow prediction model construction method according to any one of claims 1-8.

Citation Information

Patent Citations

  • A karst watershed runoff prediction method based on reinforcement learning and deep learning

    CN119989893B

  • Flood disaster prediction method based on multi-layer perceptron (MLP) model

    CN120654894A