Method, medium and device for efficient flood simulation of adaptive grid in detention basin

CN122886466APending Publication Date: 2026-10-09ANHUI & HUAI RIVER WATER RESOURCES RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611053604.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

(1)单区独立建模导致计算冗余严重

Benefits of technology

[0040]由上述技术方案可知,本发明方法通过MIP模型实现多滞洪区MBR的全局最优拼接,相比传统独立建模大幅减少冗余栅格数量;结合MPI+OpenMP混合并行计算技术,显著提升大尺度、长时序洪水模拟的计算效率,满足防洪预警对时效性的要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886466A_ABST
    Figure CN122886466A_ABST
Patent Text Reader

Abstract

The application discloses a kind of dispersed flood detention area adaptive grid efficient flood simulation method, medium and equipment, the method first uses the adaptive algorithm of principal component analysis and rotation jamming method combination, generates each flood detention area minimum circumscribed rectangle;Again, the mixed integer programming model with the objective of minimizing the number of calculation grids is constructed, the spatial optimal splicing of multiple minimum circumscribed rectangles is realized, and a unified calculation grid is formed.Subsequently, a one-dimensional hydrodynamic model at the basin scale is constructed, hydrological co-simulation of basin-river-flood detention area is realized, key cross-section dynamic hydrological data of flood detention area flood gate is extracted, and converted into two-dimensional hydrodynamic model space-time coupling source-sink boundary;Discrete solution is obtained using alternating implicit algorithm, and calculation is accelerated by OpenMP parallel technology.At the same time, the water level at the coupling place of the flood detention area is returned to the one-dimensional model, a one-two-dimensional coupling mechanism is constructed, and the whole basin hydrological process is co-simulated;A two-way index mapping between the original grid and the spliced grid is established, and the simulation results are mapped back to the original flood detention area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flood simulation and calculation technology, specifically to an efficient flood simulation method, medium, and equipment using an adaptive grid for decentralized flood detention areas. Background Technology

[0002] Flood disasters are among the major natural disasters threatening human life and property. High-precision simulation of the inundation process is of significant practical importance for improving the timeliness of flood warnings, perfecting risk assessment systems, and supporting flood control and disaster reduction decision-making. Affected by intensified global climate change and frequent extreme rainfall events, numerous flood detention areas in mountainous regions with complex terrain and scattered spatial distribution play a crucial role in reducing flood peaks and delaying flood propagation. To accurately depict the flood evolution process and the flood detention area's regulating effect, two-dimensional hydrodynamic models, with their ability to finely characterize the spatiotemporal evolution of flood flow fields, have become a core tool for flood simulation and risk analysis.

[0003] To address the challenges posed by dispersed flood detention areas—characterized by high topographic fragmentation, scattered spatial distribution, and complex boundary morphologies—existing optimization studies of two-dimensional hydrodynamic calculation methods primarily fall into two categories: finite difference / finite volume methods based on structured grids and finite element / finite volume methods based on unstructured grids. The former offers advantages such as simple numerical formats and high computational efficiency, making it widely applicable in river flood and large-scale flood simulations. The latter excels in adaptability to complex boundaries and topographic characterization, making it suitable for areas with fragmented terrain and irregular boundaries. To meet the simulation requirements of flood detention areas, existing research has attempted to improve computational efficiency through subdomain block modeling, unified large-domain stitching, and adaptive mesh refinement, and has utilized methods such as interpolation back-mapping to achieve precise alignment between the computational results and the original spatial model. These techniques have, to some extent, improved the modeling efficiency and simulation accuracy in dispersed flood detention area scenarios, providing valuable insights for flood process simulation in complex terrain.

[0004] However, existing technologies still have significant shortcomings in two-dimensional hydrodynamic calculations for decentralized flood detention areas: (1) Independent modeling of a single area leads to serious computational redundancy. Traditional methods usually model and solve each flood detention area separately, ignoring the spatial relationship and overall layout of the flood detention areas, resulting in a large number of areas of repeated calculation, low computational efficiency, and difficulty in supporting the simulation needs of large scale and long time series.

[0005] (2) The grid splicing layout lacks global optimality. Some studies have attempted to improve the solution efficiency through grid splicing, but they mostly rely on manual experience settings or greedy strategies, making it difficult to achieve the global optimal spatial combination of multiple flood detention areas. This can easily lead to problems such as a high proportion of redundant grids and improper boundary transition processing, thereby affecting numerical stability and overall performance.

[0006] (3) The accuracy of the back-mapping results is not consistent with the physical consistency. Existing methods mostly use simple interpolation to back-map the calculation results to the original flood detention area without fully considering the differences in rotation angle, scale changes and overlapping area. This can easily introduce mass loss and momentum error, disrupt the conservation of water volume and kinetic energy balance, and weaken the physical reliability of the simulation results. Summary of the Invention

[0007] The present invention proposes an efficient flood simulation method, medium, and equipment for decentralized flood detention areas using adaptive grids, which can at least solve one of the technical problems in the background art.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: An efficient flood simulation method with adaptive grid for decentralized flood detention areas includes the following steps: S100. Based on the target area's digital elevation model (DEM) data, identify scattered flood detention areas, combine principal component analysis (PCA) with the rotating caliper method to generate the minimum bounding rectangle (MBR) with a north-south spatial orientation, and construct grid data MBR-Grid. S200: Construct a mixed integer programming model (MIP), obtain the optimal spatial layout of multiple minimum bounding rectangles (MBR), and splice them together to form a unified computational grid while completing the elevation mapping of the grid data. S300: Based on a unified computing grid, a one-dimensional hydrodynamic model at the watershed scale is constructed. Using the floodgate as the coupling interface, the time-series hydrological data of the floodgate is extracted and transformed into a two-dimensional model coupling source-sink boundary. S400: Construct a two-dimensional hydrodynamic model based on two-dimensional shallow water equations, and call the two-dimensional model to couple source and sink terms and boundaries through the coupling interface to obtain the calculation results of water level field and / or flow velocity field; S500: Establish a dual index mapping between the original grid, MBR, and unified computational grid; use bilinear interpolation and area weighting to correct the calculation results of the water level field and / or flow velocity field; and backmap back to the original flood detention area. S600 performs error analysis and physical conservation verification on the back-mapping results, and outputs flood evolution simulation results to support flood control decision-making.

[0009] Furthermore, the method for generating the minimum bounding rectangle in step S100 of the present invention includes: An adaptive rotation algorithm is constructed by combining PCA and the rotating caliper method to generate the minimum bounding rectangle that satisfies dual constraints, which include: Spatial orientation constraints ensure that the long side of the rectangle is strictly parallel to the north-south or east-west direction, achieving standardized alignment between due south and due north. The area-optimal constraint, under the orientation constraint, selects the rectangle with the smallest area that covers all grids in the flood detention area as the target MBR; Using the coordinates of the center point of the effective grid in the flood detention area as the analysis sample, the principal extension direction is extracted by principal component analysis (PCA) to provide the initial search angle for the rotating caliper method. After traversing the rotation angles, only two types of orientation rectangles, 0° and 90°, are retained. The areas are compared and the better scheme is selected as the final minimum bounding rectangle (MBR) to provide a standardized boundary framework for subsequent spatial analysis.

[0010] Furthermore, the method for constructing grid data in step S100 of the present invention includes: The number of rows and columns of the MBR-Grid corresponding to each MBR is calculated at a resolution of 10m. A seven-parameter Bursa model is used to correct the spatial offset of the MBR-Grid. Median filtering and inverse distance weighted interpolation are used to process the elevation data of the MBR edges. The original DEM data is cropped using the MBR as a mask. A one-to-one elevation mapping between grid ID and raster index is established to associate the MBR-Grid with the original terrain data. The specific process is as follows: Integrated output MBR parameters: bottom left corner coordinates ,width ,high Accuracy is maintained to the 0.001m level; DEM pixel size is read. , as the grid resolution; Calculate the number of rows and columns, and verify. and :

[0011]

[0012] by The origin is the point where the corner points of the DEM grid coincide. , ); No. OK, Column grid four vertex coordinates: bottom left corner ( ), bottom right corner ( ), top left corner ( ), top right corner ( ); Includes grid ID (Row_Col), row and column indices, and center point coordinates. Elevation value Reserved fields; Compare the spatial references of MBR and DEM, and use a seven-parameter Bursa model transformation when there are differences, with a point position error ≤0.1m. 3×3 windowed mid-range filtering is used for noise reduction, inverse distance weighted interpolation is used to fill in missing values, and the DEM is accurately clipped using the MBR as a mask to ensure that the boundary grid completely falls into the MBR; Extract the coordinate set of the grid center point Calculate the DEM raster index in reverse and verify its validity. and :

[0013]

[0014] In the formula, Indexed as a DEM raster column; For DEM raster row indexing; , These are the abscissa and ordinate of the center point of the calculated grid, respectively. , These are the x and y coordinates of the top-left corner origin of the DEM data, respectively. This represents the total number of rows in the DEM data. This represents the total number of columns in the DEM data; This refers to the DEM raster resolution. Elevation values ​​are extracted using a block-read mode based on the raster index. The cache is set to 1 / 4 the size of a single DEM band. Elevation values ​​are written using a one-to-one spatial join with the grid ID and raster index as the key. .

[0015] Furthermore, the unified computational grid method in step S200 of the present invention includes: S210. For multiple dispersed flood detention areas, the spatial layout of the MBR in each flood detention area is optimized by constructing a mixed integer programming (MIP) model to minimize the total number of computational grids after splicing.

[0016] Where K represents the total number of flood detention areas; , These represent the width and length of the MBR in the k-th flood detention area, respectively; and the DEM raster resolution. This represents the number of grids corresponding to a single MBR. After summing, the total number of calculated grids in the stitched area is obtained. Constraint settings: For any two different flood detention areas The following spatial relationships must be satisfied:

[0017] in, d represents the spatial coordinate range of the k-th MBR; d is the preset buffer band width, which takes the value as an integer multiple of the grid resolution to ensure that the buffer band is aligned with the grid boundary. The starting coordinates of the bottom left corner of each MBR must be an integer multiple of the grid resolution, expressed as follows:

[0018] in, For the first The starting x-coordinate of the bottom left corner of the smallest bounding rectangle MBR; For the first The starting ordinate of the bottom left corner of the smallest bounding rectangle MBR; , These are non-negative integer variables, corresponding to the raster index baseline values ​​in the x-axis and y-axis directions, respectively; This refers to the DEM raster resolution. S220. Based on the above MIP model, solve for the optimal layout and complete the construction of a unified computing grid covering all flood detention areas, providing a continuous and regular spatial computing domain for efficient two-dimensional hydrodynamic calculations. Solving the MIP model using the branch and bound method: By decomposing the integer programming problem into a series of linear programming subproblems, and by calculating the upper and lower bounds of the subproblems to prune the ineffective search space, the global optimal solution can be obtained efficiently. The solution outputs the optimal spatial layout parameters of the MBRs in each flood detention area, including the optimized starting coordinates. , corresponding integer variables , And the row and column range of each MBR in the unified computing domain; Unified computational grid stitching: Determine the global boundary of the unified computational grid based on the optimal layout parameters of all MBRs: in, , ; In the formula, Let x be the upper right x-coordinate of the k-th MBR in the unified computational grid coordinate system; Let x be the lower left x-coordinate of the k-th MBR in the unified computational grid coordinate system; The width of the k-th MBR; Let y be the top right ordinate of the k-th MBR in the unified computational grid coordinate system; Let y be the lower left ordinate of the k-th MBR in the unified computational grid coordinate system; The length of the k-th MBR; Global x-axis range:

[0019] Global y-axis range:

[0020] Based on the global boundary and the DEM raster resolution res, calculate the global number of rows and columns of the unified computational grid: Global column count:

[0021] Global line count:

[0022] In the formula, To standardize the global minimum x-coordinate of the computation grid; To standardize the global maximum x-coordinate of the computation grid; To standardize the global minimum ordinate of the computation grid; To standardize the global maximum ordinate of the computation grid; To standardize the calculation of the total number of columns in the grid; To standardize the calculation of the total number of rows in the grid; Map the MBR-Grid of each flood detention area to a unified computing grid according to the optimal layout parameters; Local row and column numbers of a single MBR-Grid Convert to global row and column numbers:

[0023]

[0024] In the formula, For local column indexes within a single MBR-Grid; For local row indexes within a single MBR-Grid; For the global column index corresponding to the unified computing grid; For the global row index corresponding to the unified computing grid; This is the global index baseline value of the k-th MBR in the X-axis direction; This is the global index baseline value of the k-th MBR in the Y-axis direction.

[0025] Furthermore, the method for constructing a one-dimensional hydrodynamic model at the watershed scale in step S300 of the present invention includes: The calculation is based on the watershed area associated with the decentralized flood detention area, and includes tributaries that make actual water catchment to the flood detention area; By systematically sorting out the water system layout within the basin, clarifying the ownership and connection logic between the main stream and tributaries, and constructing a clear hierarchical main stream-tributary complete water system topology; By combining the digital river topographic map of the basin with measured river centerline data, a river system is constructed using a segment-section topology model. River segments are divided according to the river plan morphology and hydraulic characteristics, and transitional river segments are set at the confluence of tributary mouths and main streams to avoid distortion of confluence simulation. The design calculation sections are evenly distributed along the river section, and the spacing is adjusted according to the scale of the main stream and tributaries. At the same time, control sections are added at the gate front, gate site and gate back positions of each flood storage and detention area to accurately depict the water flow status at the gate.

[0026] The geometric parameters of the cross-section were determined by combining measured river cross-section data with remote sensing interpretation data, and missing data were supplemented by interpolation and river gradient correction. Based on the actual conditions of the river channel, segmented initial roughness is set, and the Saint-Venant equations are discretized using the Preissmann four-point implicit difference scheme. After parameter input and initialization, a one-dimensional hydrodynamic model at the watershed scale is output.

[0027] Furthermore, the method for obtaining the spatiotemporal coupling source-sink term boundary of the two-dimensional hydrodynamic model in step S300 of the present invention includes: Hydrological stations near the sluice gate were selected to verify the accuracy of the model using measured data. If the model did not meet the requirements, the key parameters were calibrated and the solution was recalculated until the requirements were met.

[0028] Based on the previously planned gate site cross-sections, an index table corresponding to the flood detention area number, gate type, and cross-section ID was established, and spatial coordinate matching was used to ensure no mismatches. The flow rate and water level of each gate site section are extracted from the output of the one-dimensional model. For a single gate that has both flood control and flood discharge functions, positive flow values ​​represent flood entry and negative flow values ​​represent flood discharge. Constructing a one-dimensional cross-section-two-dimensional grid coupling mapping relationship: based on the matching relationship between the actual geographical coordinates of the floodgate and the two-dimensional grid coordinate system; In the two-dimensional unified computing grid, the boundary grid cell corresponding to the gate is located, and the one-dimensional output flow sequence of the flood gate section is bound to the corresponding two-dimensional grid cell in the form of source-sink term, while the flood discharge is associated in the form of reverse sink term; Missing data periods are filled by linear interpolation of valid data from adjacent periods to ensure the continuity of the data sequence; the verified data is converted into a standardized input format supported by the two-dimensional hydrodynamic model, including timestamps and two-dimensional grid cell ID fields; Establish a time synchronization coupling mechanism for the two-dimensional model: During the initialization phase of the two-dimensional model, boundary data is imported through the data interface. For each time step calculated by the two-dimensional model, the corresponding one-dimensional boundary data is automatically read. At the same time, the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the gate site section of the one-dimensional model, realizing dynamic bidirectional collaborative calculation between the two and completing the coupling of source and sink terms boundary of the two-dimensional model.

[0029] Furthermore, the method for obtaining the calculation results of the water level field and / or flow velocity field in step S400 of the present invention includes: S410. Using each grid cell of the unified computational grid as the basic computational unit, the two-dimensional Saint-Venant equations are adopted as the fundamental equations for hydrodynamic calculations. In the Cartesian coordinate system, the vector form of the equations is expressed as follows:

[0030]

[0031]

[0032]

[0033]

[0034] In the formula, The horizontal coordinate is the coordinate of the space. The vertical coordinate is the coordinate of the space. For time, For the source term vector, A variable vector, including water level and unit width flow , Both F and G are flux vectors, including water depth h. and Directions and The flow rate on the surface, , is the Xie Cai coefficient. Where is the Manning coefficient, and g is the acceleration due to gravity; S420. The mass and momentum equations are discretized using the finite difference method with alternating implicit and explicit methods, and the equation matrices generated in each direction are solved using the chasing method. During the solution process, the coupling boundary data transmitted by S300 is read in real time through the preset data interface, and the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the one-dimensional model, so that the one-dimensional and two-dimensional models are dynamically coupled and coordinated.

[0035] Furthermore, the method for establishing the dual index mapping relationship in step S500 of the present invention includes: Mapping of the original flood detention area grid to the MBR-Grid: Establish a one-to-one correspondence between the unrotated original grid and the rotated MBR-Grid grid, and generate a pixel-level mapping; Mapping MBR-Grid to Unified Computing Grid: Constructing the correspondence between the local indexes of each MBR-Grid and the global indexes of the unified computing grid, generating a mapping table, and completing validity checks and boundary corrections; Specifically as follows: Index mapping between the original flood detention area raster and the MBR-Grid: For each flood detention area, record the local index of the original unrotated raster. Local index of the rotated MBR-Grid mesh A one-to-one correspondence is established, and a mapping table is constructed synchronously. Maintain pixel-level spatial relationships; in, This is a local index defined based on the original boundary of the flood detention area. This is a local index defined based on the MBR boundary generated by S12, with both having the same resolution; if the original raster has edge cuts due to rotation, the completely overlapping raster index pairs are retained. The mapping table is stored using a two-dimensional array or a database table, including the flood detention area number, , , , Field; Index mapping between MBR-Grid and unified computing grid: Recording the local indexes of each MBR-Grid Global index with unified computing grid To establish the correspondence between the mappings, construct a mapping table. ; The mapping formula is:

[0036]

[0037] In these two formulas, , This refers to the starting row and column offsets of the MBR-Grid within the unified computational grid; verification is required. Remove invalid mappings and perform boundary corrections; Calculation results back-mapping: A two-step back-mapping strategy is adopted to achieve result sharing and accuracy preservation among multi-level grid systems; Step 1: Unified computational grid → MBR-Grid. For each grid in the MBR-Grid, the water level and flow velocity hydraulic parameters are obtained by searching the neighborhood of the unified computational grid and performing interpolation calculations. Step 2: MBR-Grid → Original Raster. Match the MBR-Grid calculation results to the original raster. If there is an area difference between the two grids, area weight correction is used to ensure numerical conservation and spatial accuracy.

[0038] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0039] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0040] As can be seen from the above technical solution, the method of the present invention realizes the global optimal stitching of MBR in multiple flood detention areas through the MIP model, which greatly reduces the number of redundant grids compared with traditional independent modeling; combined with MPI+OpenMP hybrid parallel computing technology, it significantly improves the computational efficiency of large-scale, long-term flood simulation and meets the timeliness requirements of flood warning.

[0041] PCA and rotating caliper method are used to generate MBR with "true south and true north" orientation to ensure that the mesh boundary is regular and consistent; the spatial non-overlapping constraint and buffer zone design of the MIP model effectively avoid water flow interference between adjacent flood detention areas, and the numerical stability is significantly improved compared with manual splicing or greedy algorithm, reducing the computational oscillation caused by improper boundary transition.

[0042] By establishing a dual index mapping relationship and combining bilinear interpolation and area weight correction, high-precision result back mapping is achieved; by verifying water conservation and kinetic energy balance, the simulation results are ensured to conform to physical laws, thereby improving the reliability of the calculation results and their value in supporting decision-making. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the overall process of the method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the specific execution flow of the method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the distribution of decentralized flood detention areas according to a specific embodiment of the present invention; Figure 4 This is a schematic diagram of the coupling of a one- or two-dimensional hydrodynamic model according to an embodiment of the present invention; Figure 5 This is a unified computing grid according to a specific embodiment of the present invention; Figure 6a -d is a comparison chart of the measured data of the present invention with the water level simulation results of the Mike11 model and the self-developed model in 2018 flood; Figure 7a -c is a comparison chart of the measured data and the simulated flood flow results of the self-developed model in 2018 in this embodiment of the invention; Figure 8a -f is a comparison chart of the measured data of this invention with the water level simulation results of the Mike11 model and the self-developed model in 2020 flood; Figure 9a -e is a comparison chart of the measured data and the simulated flood flow results of the self-developed model in 2018 in this embodiment of the invention; Figure 10 This is a specific embodiment of the flood diversion time series of a decentralized flood detention area according to the present invention; Figure 11 The rendering effect of the computational grid at a water depth of 11 hours during flooding is shown in a specific example of the present invention. Figure 12 This is a schematic diagram showing the overall effect of rendering water depths at 2 hours, 11 hours, and 36 hours after flood ingress in a specific embodiment of the present invention. Figure 13 This is a structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0045] like Figure 1 As shown in this embodiment, the adaptive grid-based efficient flood simulation method for decentralized flood detention areas includes the following steps: S100. Based on the target area digital elevation model (DEM) data, identify scattered flood detention areas, and combine principal component analysis (PCA) and rotating caliper method to generate the minimum bounding rectangle (MBR) with due south and due north spatial orientation, and construct grid data (MBR-Grid). S200: Construct a mixed integer programming model (MIP), obtain the optimal spatial layout of multiple minimum bounding rectangles (MBR), and stitch them together to form a unified computational grid while completing the elevation mapping of the grid data; S300: Based on a unified computing grid, a one-dimensional hydrodynamic model at the watershed scale is constructed. Using the floodgate as the coupling interface, the time-series hydrological data of the floodgate is extracted and transformed into a two-dimensional model coupling source-sink boundary. S400: Construct a two-dimensional hydrodynamic model based on two-dimensional shallow water equations, and call the two-dimensional model to couple source and sink terms and boundaries through the coupling interface to obtain the calculation results of water level field and / or flow velocity field; S500: Establish a dual index mapping between the original grid, MBR, and unified computational grid; use bilinear interpolation and area weighting to correct the calculation results of the water level field and / or flow velocity field; and backmap back to the original flood detention area. S600 performs error analysis and physical conservation verification on the back-mapping results, and outputs flood evolution simulation results to support flood control decision-making.

[0046] The following explains each step: S100. Based on the target area digital elevation model (DEM) data, identify scattered flood detention areas, and combine principal component analysis (PCA) and rotating caliper method to generate the minimum bounding rectangle (MBR) with due south and due north spatial orientation, and construct grid data (MBR-Grid). The methods for generating the minimum bounding rectangle include: The Gauss-Kruger coordinate system with a central meridian of 105°E was adopted. ArcGIS software was used to perform depression filling (Z tolerance set to 0.1m) and noise reduction on the DEM data to eliminate outliers and discontinuous areas in the terrain data, ensuring the continuity and accuracy of the terrain data.

[0047] The study area includes four flood detention areas, with the number of grid cells in each flood detention area being 68,913, 45,942, 32,701, and 13,402, respectively. Based on the data of the identified scattered flood detention areas, and combining principal component analysis (PCA) and the rotating caliper method, a minimum bounding rectangle (MBR) that satisfies the dual constraints is generated. First, there is a spatial orientation constraint: the long side of the rectangle is strictly parallel to the north-south direction (corresponding to the y-axis of the geographic coordinate system, with a rotation angle of 0°) or the east-west direction (corresponding to the x-axis of the geographic coordinate system, with a rotation angle of 90°), so as to achieve the standard orientation of "due south and due north". Second, the area optimal constraint selects the rectangle with the smallest area that covers all grids in the flood detention area within the directional constraint range, providing accurate boundary references for the spatial analysis and management of the flood detention area.

[0048] Using rasterized data of the flood detention area as input, the center point coordinates of all valid rasters are extracted as the core analysis sample, denoted as ( (i=1,2,...,n, where n is the total number of grid cells in the flood detention area).

[0049] The coordinates of the center point of each identified flood detention area are extracted, and principal component analysis (PCA) is used to solve for the main direction of the flood detention area (e.g., the eigenvector of flood detention area 1 is (0.21, 0.98)). The coordinates of the raster center point must be based on a unified geographic coordinate system to ensure that the x-axis corresponds to the east-west direction and the y-axis corresponds to the north-south direction, laying the foundation for subsequent orientation determination. PCA extracts the main extension direction of the flood detention area by analyzing the statistical distribution characteristics of the data. Combined with the rotating caliper method, it traverses a ±10° range and selects the 0° or 90° orientation MBR with the smallest area to ensure that the MBR can fit the boundary of the flood detention area to the greatest extent and reduce redundancy space.

[0050] Calculate the mean of the coordinates of all raster center points to eliminate the interference of origin offset on the analysis, using the following formula:

[0051] Construct a 2×2 covariance matrix C to describe the dispersion and linear dependence of the x and y coordinates. The matrix elements are calculated as follows: (x-coordinate variance, reflecting the degree of dispersion in the x-direction) (The covariance of x and y reflects the degree of linear correlation between them.) therefore The matrix is ​​a symmetric matrix.

[0052] Finding eigenvalues ​​and eigenvectors: by solving the characteristic equation Two eigenvalues ​​were obtained. and (set up Among them, the largest eigenvalue Corresponding feature vector This refers to the main extension direction of the raster data distribution in the flood detention area, which can accurately reflect the natural morphological orientation of the flood detention area.

[0053] The rotating caliper method calculates the parameters of the circumscribed rectangle by iterating through the rotation angles, optimizes the search efficiency by combining the initial direction of PCA, and selects the optimal solution that meets the requirements through orientation constraints. The specific process is as follows: Initial angle setting: The angle corresponding to the principal direction extracted by PCA. (a and b are the eigenvector components) are used as the initial search angles for the rotating caliper. Since the main direction is the direction in which the data is most spread out, the area of ​​the circumscribed rectangle of the angles near it is usually smaller, which can significantly reduce the invalid search range.

[0054] Angle traversal and coordinate rotation: in Rotation angle within range (The step size can be set according to the accuracy requirements; a value of 0.1°-1° is recommended.) For each... Perform a coordinate rotation transformation, as shown in the following formula:

[0055]

[0056] Note: Rotation transformation is based on coordinate mean. Centered on the image to prevent it from shifting during rotation.

[0057] Calculation of circumscribed rectangle parameters: for the rotated coordinates ,extract Directional extrema , and Directional extrema , Calculate the matrix parameters: width ,high ,area

[0058] Targeted constraint filtering: After traversal, only retain... and Two circumscribed rectangles corresponding to different angles (corresponding to "due north" orientation with their long sides parallel to the north-south and east-west directions, respectively) are compared in area, and the rectangle with the smaller area is selected as the target MBR.

[0059] Methods for constructing grid data include: The number of rows and columns of the MBR-Grid corresponding to each MBR is calculated at a resolution of 10m (e.g., the number of rows and columns of the MBR-Grid in flood detention area 1 is 350×351). A seven-parameter Bursa model is used to perform spatial offset correction on the MBR-Grid. Median filtering and inverse distance weighted interpolation are used to process the elevation data of the MBR edges. The original DEM data is cropped using the MBR as a mask. A one-to-one elevation mapping of "grid ID - raster index" is established to realize the association between the MBR-Grid and the original terrain data. The specific process is as follows: Integrated output MBR parameters: bottom left corner coordinates ,width ,high Accuracy is maintained to the 0.001m level; DEM pixel size is read. This is used as the DEM raster resolution. The number of rows and columns is calculated, and verification is performed. and :

[0060]

[0061] by Use the origin as the reference point, ensuring it coincides with the corner points of the DEM grid. , ). No. OK, Column grid four vertex coordinates: bottom left corner ( bottom right corner ), top left corner ( ), top right corner ( ); m and l are integer raster offset indices, where m represents offsetting m complete raster cells to the right along the horizontal axis from the original DEM origin, and l represents offsetting l complete raster cells upwards along the horizontal axis from the original DEM origin.

[0062] Includes grid ID (Row_Col), row and column indices, and center point coordinates. Elevation value Reserved fields.

[0063] Compare the MBR and DEM spatial references, and use a seven-parameter Bursa model transformation when discrepancies are found, with a point position error ≤0.1m. Use 3×3 windowed mid-range filtering for noise reduction, and inverse distance weighted interpolation to fill in missing values ​​(radius 3×res). Accurately crop the DEM using the MBR as a mask to ensure that the boundary grid completely falls within the MBR.

[0064] Extract the coordinate set of the grid center point Calculate the DEM raster index in reverse and verify its validity. and ):

[0065]

[0066] In the formula, Indexed as a DEM raster column; For DEM raster row indexing; , These are the abscissa and ordinate of the center point of the calculated grid, respectively. , These are the x and y coordinates of the top-left corner origin of the DEM data, respectively. This represents the total number of rows in the DEM data. This represents the total number of columns in the DEM data; This represents the DEM raster resolution.

[0067] Elevation values ​​are extracted using a block-reading mode based on the raster index, with the cache set to 1 / 4 the size of a single DEM band. Elevation values ​​are written in a one-to-one spatial connection using "grid ID-raster index" as the key. .

[0068] S200: Construct a mixed integer programming model (MIP), obtain the optimal spatial layout of multiple minimum bounding rectangles (MBR), and stitch them together to form a unified computational grid while completing the elevation mapping of the grid data; A mixed-integer programming (MIP) model is constructed with the objective function of minimizing the total number of computational grids after concatenation. Simultaneously, the MBR-Grids of each grid are constrained to have no spatial overlap, and a buffer zone is reserved between adjacent minimum bounding rectangle MBRs. By solving this model, the optimal spatial layout of multiple MBRs is obtained, thereby constructing a unified computational grid covering all flood detention areas.

[0069] Unified computational grid methods include: S210. For multiple dispersed flood detention areas, the spatial layout of the MBR in each flood detention area is optimized by constructing a mixed integer programming (MIP) model to minimize the total number of computational grids after splicing.

[0070] Where K represents the total number of flood detention areas; , These represent the width and length of the MBR in the k-th flood detention area, respectively; res is the DEM raster resolution. This represents the number of grid cells corresponding to a single MBR. After summing, the total number of calculated grid cells in the stitched area is obtained.

[0071] Constraint settings: To avoid computational redundancy or conflicts caused by spatial overlap between MBRs, for any two different flood detention areas The following spatial relationships must be satisfied:

[0072] in, d represents the spatial coordinate range of the k-th MBR; d is the preset buffer zone width, which is an integer multiple of the grid resolution (usually 1-3), used to reserve the boundary transition area for hydrodynamic calculations, avoid mutual interference between the flow simulations of adjacent flood detention areas, and ensure that the buffer zone is aligned with the grid boundary.

[0073] To ensure that the starting coordinates of the MBR are aligned with the grid boundary of the subsequent unified computation grid, the starting coordinates of the lower left corner of each MBR must be an integer multiple of the grid resolution, expressed as:

[0074] in, For the first The starting x-coordinate of the bottom left corner of the minimum bounding rectangle (MBR); For the first The starting ordinate of the bottom left corner of the minimum bounding rectangle (MBR); , These are non-negative integer variables, corresponding to the raster index baseline values ​​in the x-axis and y-axis directions, respectively; This represents the DEM raster resolution.

[0075] S220. Based on the above MIP model, the optimal layout is solved, and then a unified computing grid covering all flood detention areas is constructed, providing a continuous and regular spatial computing domain for efficient two-dimensional hydrodynamic calculations. The branch-and-bound method is used to solve the MIP model: This method decomposes the integer programming problem into a series of linear programming subproblems (branching process) and prunes the ineffective search space by calculating the upper and lower bounds of the subproblems (bounding process), thus efficiently obtaining the global optimum. The output of the solution is the optimal spatial layout parameters of the MBRs in each flood detention area, including: optimized starting coordinates. , corresponding integer variables , And the row and column range of each MBR in the unified computation domain ( ).

[0076] (1) Unified computational grid stitching Determine the global boundary of the unified computational grid based on the optimal layout parameters of all MBRs: in, , .

[0077] In the formula, Let x be the upper right x-coordinate of the k-th MBR in the unified computational grid coordinate system; Let x be the lower left x-coordinate of the k-th MBR in the unified computational grid coordinate system; The width of the k-th MBR (geographical distance along the X-axis). Let y be the top right ordinate of the k-th MBR in the unified computational grid coordinate system; Let y be the lower left ordinate of the k-th MBR in the unified computational grid coordinate system; The length of the k-th MBR (geographical distance along the Y-axis).

[0078] Global x-axis range:

[0079] Global y-axis range:

[0080] Based on the global boundary and the DEM raster resolution res, calculate the global number of rows and columns of the unified computational grid: Global column count:

[0081] Global line count:

[0082] In the formula, To standardize the global minimum x-coordinate of the computation grid; To standardize the global maximum x-coordinate of the computation grid; To standardize the global minimum ordinate of the computation grid; To standardize the global maximum ordinate of the computation grid; To standardize the calculation of the total number of columns in the grid; To standardize the calculation of the total number of rows in the grid; Map the MBR-Grid of each flood detention area to a unified computing grid according to the optimal layout parameters.

[0083] Local row and column numbers of a single MBR-Grid Convert to global row and column numbers:

[0084]

[0085] In the formula, For local column indexes within a single MBR-Grid; For local row indexes within a single MBR-Grid; For the global column index corresponding to the unified computing grid; For the global row index corresponding to the unified computing grid; This is the global index baseline value of the k-th MBR in the X-axis direction; This is the global index baseline value of the k-th MBR in the Y-axis direction.

[0086] The elevation values ​​H and original attributes of each grid are retained to ensure the data integrity of the core area of ​​the flood detention area.

[0087] The following methods are used to process the buffer zone region between adjacent MBRs and the non-flood detention area grid within the computational domain: ① Elevation value processing: If there is valid DEM data in the surrounding area, inverse distance weighted interpolation is used to supplement it; if there is no data area, it is set to the preset background value (usually the highest elevation in the area or 0 value, which is set according to the requirements of the hydrodynamic model).

[0088] ② Attribute identification processing: Add a "Grid Type" field, which is marked as "Flood Detention Area Grid", "Buffer Zone Grid" and "Background Grid" respectively, to facilitate differentiation and processing in subsequent calculations.

[0089] In summary, the optimized multi-MBR spatial layout calculates the global boundary range of the unified computing grid (621187–628732m in the X-axis direction and 3543315–3547886m in the Y-axis direction). Based on the global boundary range and a 10m resolution, the total number of computing grids in the unified computing grid is approximately 341,000, which reduces redundant grids by 94.7% compared to before optimization. Elevation data is supplemented for the grid buffer zone area using inverse distance interpolation, and the background area elevation is uniformly set to -9999m. Furthermore, the flood detention area, buffer zone, and background area in the unified computing grid are type-labeled to clarify the attributes of different regions, resulting in the final unified computing grid after stitching.

[0090] S300: Based on a unified computing network, a one-dimensional hydrodynamic model at the watershed scale is constructed. The floodgates are used as one- and two-dimensional coupling interfaces to extract the time-series hydrological data of the floodgates and transform it into a two-dimensional model coupling source-sink boundary. To address the watershed hydrological and hydraulic characteristics of the nested main stream and flood storage and detention areas, a one-dimensional hydrodynamic model at the watershed scale is constructed to accurately characterize the flood evolution process of the main stream and tributaries. Using floodgates as a one- or two-dimensional coupling interface, dynamic hydrological data from the interface section is extracted and transformed into the spatiotemporal coupling source-sink term boundary of the subsequent two-dimensional hydrodynamic model.

[0091] Methods for constructing one-dimensional hydrodynamic models at the watershed scale include: S310. Based on the watershed range associated with the decentralized flood detention area, tributaries that make actual water catchment contributions to the flood detention area are included. By systematically sorting out the water system layout within the basin, clarifying the ownership and connection logic between the main stream and tributaries, a clear hierarchical "main stream-tributary" complete water system topology is constructed.

[0092] S320. Combining the digital river topographic map of the basin with measured river centerline data, a river segment-section topology model is used to build the river system.

[0093] River sections are divided according to the river's planar morphology and hydraulic characteristics, and transitional river sections are set at the confluence of tributary estuaries and the main stream to avoid distortion in the confluence simulation. The design calculation sections are evenly distributed along the river section, and the spacing is adjusted according to the scale of the main stream and tributaries. At the same time, control sections are added at the gate front, gate site and gate back positions of each flood storage and detention area to accurately depict the water flow status at the gate.

[0094] S330. Combine measured river cross-section data with remote sensing interpretation data to determine cross-sectional geometric parameters. Missing data are supplemented by interpolation and river gradient correction. Initial roughness coefficients for each segment are set based on the actual river channel conditions, and then matched to actual hydraulic resistance through model calibration. The Saint-Venant equations are discretized using the Preissmann four-point implicit difference scheme. After parameter input and initialization, a one-dimensional hydrodynamic model at the watershed scale (standardized hydrological data) is output.

[0095] Hydrological stations near the sluice gate were selected to verify the accuracy of the model using measured data. If the model did not meet the requirements, the key parameters were calibrated and the solution was recalculated until the requirements were met.

[0096] S340. Based on the previously deployed gate site cross-sections, establish a corresponding index table of flood detention area number-gate type-cross-section ID, and ensure no mismatch through spatial coordinate matching.

[0097] The flow rate and water level at each gate site cross-section are extracted from the output of the one-dimensional model. For single gates that have both flood control and flood discharge functions, positive flow rates represent flood discharge and negative flow rates represent flood discharge. A coupled mapping relationship between the one-dimensional cross-section and the two-dimensional grid is constructed based on the matching relationship between the actual geographical coordinates of the flood control gates and the coordinate system of the two-dimensional grid. In a two-dimensional unified computational grid, the boundary grid cell corresponding to the gate is located, and the one-dimensional output flow sequence of the flood gate section is bound to the corresponding two-dimensional grid cell in the form of source-sink terms, while the flood discharge is associated in the form of reverse sink terms.

[0098] S350. Use statistical analysis methods to identify and remove outliers in water level and flow data; Missing data periods are filled in using linear interpolation of valid data from adjacent periods to ensure data sequence continuity. The validated data is then converted to a standardized input format supported by the two-dimensional hydrodynamic model, including timestamps and two-dimensional grid cell ID fields. Establish a time synchronization coupling mechanism for the two-dimensional model: During the initialization phase of the two-dimensional model, boundary data is imported through the data interface. For each time step calculated by the two-dimensional model, the corresponding one-dimensional boundary data is automatically read. At the same time, the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the gate site section of the one-dimensional model, realizing dynamic bidirectional collaborative calculation between the two and completing the coupling of source and sink terms boundary of the two-dimensional model.

[0099] S400: Construct a two-dimensional hydrodynamic model based on two-dimensional shallow water equations. Use a coupling interface to call the two-dimensional model and couple source-sink boundary terms to obtain the calculated water level field and / or velocity field results. The numerical solution is obtained by using the alternating implicit ADI algorithm and by optimizing the model through calibration of roughness parameters. The calculation results of water level field and / or flow velocity field are obtained. Simultaneously, a reverse feedback channel from the two-dimensional model calculation results to the one-dimensional model is constructed. By transmitting the real-time water level of the flood detention area back to the one-dimensional model, a two-way coupling mechanism between the one-dimensional and two-dimensional models is formed. S410. Using each grid cell of a unified computational grid as the basic computational unit, the two-dimensional Saint-Venant equations are adopted as the fundamental equations for hydrodynamic calculations. In Cartesian coordinates, the vector form of these equations is expressed as follows:

[0100]

[0101]

[0102]

[0103]

[0104] In the formula, The horizontal coordinate is the coordinate of the space. The vertical coordinate is the coordinate of the space. For time, For the source term vector, A variable vector, including water level and unit width flow , Both F and G are flux vectors, including water depth h. and Directions and The flow rate on the surface, , is the Xie Cai coefficient. Where is the Manning coefficient, and g is the acceleration due to gravity; The mass and momentum equations are discretized using an alternating implicit and explicit finite difference method. The equation matrices generated in each direction are solved using a chasing method. The solution process is as follows: First, each time step The process is decomposed into two half-steps: the first step discretizes the x-direction using an implicit scheme and the y-direction using an explicit scheme, and the second step is the reverse; in each implicit direction, a tridiagonal linear equation system is constructed along the grid rows (or columns); subsequently, the "catch-up method" is applied to each tridiagonal matrix sequentially. Elimination is performed from front to back (catching up), followed by substitution from back to front (catching up), quickly obtaining the unknown variable values ​​for all grid points in that direction; finally, the results of the two half-steps are superimposed to update the global variables for the next time step.

[0105] The calculation results are obtained based on the solution results. The calculation results include the water level field calculation results and the flow velocity field calculation results.

[0106] like Figure 5 As shown, the real-time water level parameters of the grid around the gate in the two-dimensional hydrodynamic model are fed back to the one-dimensional model. Through spatial interpolation and time alignment, the water level boundary conditions of the gate boundary in the one-dimensional model are dynamically corrected. The corrected value replaces the original fixed or empirical boundary and is used for the hydraulic calculation of the one-dimensional channel in the next time step, realizing the real-time synchronization and bidirectional coupling of the hydraulic process at the gate.

[0107] S420. The mass and momentum equations are discretized using the finite difference method with alternating implicit and explicit methods, and the equation matrices generated in each direction are solved using the chasing method. During the solution process, the coupling boundary data transmitted by S3 is read in real time through the preset data interface, and the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the one-dimensional model to ensure the dynamic coupling and coordination of the one-dimensional and two-dimensional models.

[0108] S500: Establish a dual index mapping between the original grid, MBR, and unified computational grid; use bilinear interpolation and area weighting to correct the calculation results of the water level field and / or flow velocity field; and backmap back to the original flood detention area. Methods for establishing dual index mapping relationships include: To ensure accurate transfer of calculation results between different grid systems, a two-level index mapping relationship is established.

[0109] (1) Mapping of the original flood detention area grid to the MBR-Grid: Establish a one-to-one correspondence between the unrotated original grid and the rotated MBR-Grid grid, and generate a cell-level mapping table. For edge cutting areas caused by rotation, only the grid indexes of complete overlap are retained to ensure spatial correlation and data accuracy.

[0110] (2) Mapping MBR-Grid with Unified Computing Grid: Construct the correspondence between the local index of each MBR-Grid and the global index of the unified computing grid, generate a mapping table and complete the validity check and boundary correction, laying the foundation for seamless docking of calculation results.

[0111] Specifically as follows: Index mapping between the original flood detention area raster and the MBR-Grid: For each flood detention area, record the local index of the original unrotated raster. Local index of the rotated MBR-Grid mesh A one-to-one correspondence is established, and a mapping table is constructed using red cloth. Maintain pixel-level spatial relationships; in, For local indexes defined based on the original boundaries of the flood detention area ( For row index, (for column indexes), This is a local index defined based on the MBR boundary generated by S220, with both having the same resolution; if the original raster has edge cuts due to rotation, only completely overlapping raster index pairs are retained. The mapping table is stored using a two-dimensional array or database table, containing "flood detention area number, , , , "field".

[0112] Index mapping between MBR-Grid and unified computing grid: Recording the local indexes of each MBR-Grid Global index with unified computing grid To establish the correspondence between the mappings, construct a mapping table. ; The mapping formula is:

[0113]

[0114] In these two formulas, , This refers to the starting row and column offsets of the MBR-Grid within the unified computational grid; verification is required. Invalid mappings are removed and boundary corrections are added.

[0115] Calculation results back-mapping: To achieve result sharing and accuracy maintenance among multi-level grid systems, a "two-step back mapping" strategy is adopted.

[0116] The first step is to map the hydrodynamic calculation results under the unified computing grid to the MBR-Grid, and use the bilinear interpolation method to process the result interpolation between grid nodes. Step 1 Mapping (Unified Computational Grid → MBR-Grid): For any grid in the MBR-Grid ,pass Find the corresponding unified computational grid neighborhood and use bilinear interpolation to calculate the water level / velocity values ​​for that grid; determine the interpolation point (MBR-Grid center). The coordinates and values ​​of the four surrounding uniform computational grid nodes are as follows: , , , Calculate the interpolation coefficients:

[0117]

[0118] In these two formulas, , representing the relative position weights of the interpolation points in the x and y directions; The formula for calculating the interpolation result is:

[0119] The second step is to further map the results on the MBR-Grid to the original flood detention area grid, and use the area weighting method to correct the result deviation under different grid scales to ensure that the back-mapping results match the spatial scale of the original grid. The second step, mapping (MBR-Grid → Original Raster): via... The calculation results of MBR-Grid are matched to the original grid. If there is an area overlap difference between the original grid and the MBR-Grid grid, area weight correction is used. The area weighting correction formula is:

[0120] In this formula, This is the original raster result. For MBR-Grid interpolation results, The area of ​​overlap between the two is calculated using a polygon intersection algorithm. The total area of ​​the original raster ( (for resolution); if they completely overlap, take the value directly. As .

[0121] The accuracy of the back-mapping results was verified. The water level error was ≤0.001m, the flow velocity error was ≤0.001m / s, and the mean deviation and standard deviation were both ≤1%, indicating that the back-mapping results were consistent with the original calculation results in terms of overall statistical characteristics and had no obvious deviation.

[0122] Back-mapping accuracy control: Interpolation error is verified using random sampling of the MBR-Grid, requiring key hydrological elements to meet accuracy thresholds; verification is performed on each original grid. ; Calculate the statistical characteristic deviation between the original raster and the unified computational grid results, and control it within a reliable range.

[0123] S600 performs error analysis and physical conservation verification on the back-mapping results, and outputs flood evolution simulation results to support flood control decision-making.

[0124] Error analysis and conservation verification are performed on the back-mapping results, including water conservation and kinetic energy balance checks. After successful verification, the final flood evolution simulation results are output, providing basic data support for flood control planning, risk assessment, and emergency dispatch decisions in the basin.

[0125] The conservation property is verified as follows: To ensure the physical reliability of the calculation results, the simulation results are checked for water conservation. The total water volume in the entire computational domain is calculated at different time steps, and its variation over time is analyzed. If the relative rate of change is less than a preset threshold, it indicates that the simulation results perform well in terms of water conservation.

[0126] During the stable phase of flood evolution, the relative rate of change of water volume within the calculation area is ≤1%; Water conservation test: Calculate the total water volume of the entire calculation area at a certain moment and analyze the changes in the total water volume at different moments; The formula for calculating total water volume is:

[0127] The formulas for calculating the change and the relative rate of change are:

[0128]

[0129] In these three equations, h(x,y,t) represents the water depth of the grid cell (x,y) at time t. , These are the side lengths of the grid cells in the x and y directions, respectively (both equal to the DEM raster resolution res). , For any two observation times, The relative change rate is set to a preset threshold (usually 1%). If the threshold requirement is met, it indicates that the water conservation is good.

[0130] Based on good conservation properties, the flood evolution simulation results of the original flood detention area grid are output, including the spatiotemporal distribution of water level. With the spatiotemporal distribution of flow velocity , ; The output data formats support raster files, vector files containing flooded area features and corresponding water level attributes at the time, and table files containing fields such as grid ID, coordinates, time, water level, and flow velocity components. The output results can be directly used for optimizing the layout of flood detention areas in watershed flood control planning, delineating the inundation range and depth in flood risk assessment, and predicting the flood evolution process in emergency dispatch decision-making, etc., providing accurate basic data support for flood control and disaster reduction.

[0131] After passing the above conservation checks, the flood evolution simulation results of the original flood detention area grid are output, including the spatiotemporal distribution of water level and flow velocity. The output data supports multiple formats such as raster (GeoTIFF), vector (Shapefile), and table (CSV), and can be directly used for applications such as flood detention area layout optimization, inundation range and depth delineation, flood risk assessment, and emergency dispatch decision-making.

[0132] The following examples illustrate this: like Figure 2 As shown in Figure S100, based on the target area digital elevation model (DEM) data, scattered flood detention areas are identified. Principal component analysis (PCA) and the rotating caliper method are used to generate the minimum bounding rectangle (MBR) with a north-south spatial orientation. Further, grid data (MBR-Grid) is constructed and elevation mapping is completed. 10m resolution DEM data (using the Gauss-Kruger coordinate system, central meridian 105°E) was collected for the study area. ArcGIS software was used to perform depression filling (Z-limit set to 0.1m) and noise reduction on the DEM data to eliminate outliers and discontinuous areas, ensuring the continuity and accuracy of the topographic data. The study area includes four flood detention areas, with 68913, 45942, 32701, and 13402 raster cells respectively. Their specific distribution is as follows: Figure 3 As shown; Extract the coordinates of the center point of each identified flood detention area, use principal component analysis (PCA) to solve the main direction of the flood detention area (for example, the eigenvector of flood detention area 1 is (0.21,0.98)), combine the rotating caliper method to traverse the ±10° range, select the 0° or 90° oriented MBR with the smallest area to ensure that the MBR can fit the boundary of the flood detention area to the greatest extent and reduce redundant space; The number of rows and columns of the MBR-Grid corresponding to each MBR is calculated according to a 10m resolution (e.g., the number of rows and columns of the MBR-Grid in flood detention area 1 is 350×351). The spatial offset correction of the MBR-Grid is performed using a seven-parameter Bursa model. The elevation data of the MBR edge is processed using median filtering and inverse distance weighted interpolation. The original DEM data is clipped using the MBR as a mask. A one-to-one elevation mapping of "grid ID-raster index" is established to realize the association between the MBR-Grid and the original terrain data.

[0133] S200. Construct a mixed integer programming model (MIP), obtain the optimal spatial layout of multiple minimum bounding rectangles (MBR), and stitch them together to form a unified computational grid while completing the elevation mapping of the grid data; With "minimizing the total number of computational grids after splicing" as the core objective function, the mathematical expression is as follows:

[0134] Where W_k and L_k are the width and length of the k-th MBR, respectively, and res = 10m (i.e., the mesh resolution); at the same time, constraints are set, including: ① the distance between any two MBRs is ≥20m to avoid calculation interference caused by MBRs overlapping or being too close; ② the coordinates of the lower left corner of the MBR are integer multiples of 10m to ensure that the MBR coordinates are aligned with the mesh resolution, which is convenient for subsequent mesh stitching. The branch and bound method is used to solve the MIP model. The x-axis spacing between MBR1 and MBR2 is used as the branch variable. By step-by-step branching and boundary calculation, the search range of the optimal solution is narrowed, and the optimal spatial layout of multiple MBRs is finally obtained (for example, the starting coordinates of MBR2 are adjusted to (37520, 55200)). This ensures that the total number of computational grids is minimized under the premise that each MBR meets the constraints. Based on the optimized multi-MBR spatial layout, the global boundary range of the unified computing grid (621187–628732m in the X-axis direction and 3543315–3547886m in the Y-axis direction) was calculated. Based on the global boundary range and a 10m resolution, the total number of computing grids in the unified computing grid was calculated to be approximately 341,000, representing a 94.7% reduction in redundant grids compared to before optimization. Elevation data was supplemented for the grid buffer zone region using inverse distance interpolation, and the background area elevation was uniformly set to -9999m. Simultaneously, the flood detention area, buffer zone, and background area in the unified computing grid were type-labeled to clarify the attributes of different regions. The completed unified computing grid is shown below. Figure 3 As shown.

[0135] S300: Based on a unified computing grid, a one-dimensional hydrodynamic model at the watershed scale is constructed. Using the floodgate as the coupling interface, the time-series hydrological data of the floodgate is extracted and transformed into a two-dimensional model coupling source-sink boundary. A one-dimensional hydrodynamic model at the basin scale was constructed. Based on measured river cross-section data and remote sensing interpretation data, the geometric and hydraulic parameters of the model were initialized and configured. The spatiotemporal process of flood evolution across the entire basin was accurately simulated through numerical solution of the one-dimensional hydrodynamic model.

[0136] Using the floodgates of each flood detention area as the core interface for one-dimensional coupling, the flow and water level time series data of key sections of the gate are extracted in real time through the one-dimensional model. The extracted data is standardized and transformed into spatiotemporal coupling source-sink boundary conditions that can be directly called by the two-dimensional hydrodynamic model.

[0137] Establish a data interaction interface between the two-dimensional model and adopt a time synchronization mechanism to achieve collaborative computing: for each calculation step of the two-dimensional model, the corresponding one-dimensional coupling boundary data of the time period is automatically read. S400: A two-dimensional hydrodynamic model is constructed based on two-dimensional shallow water equations. The source and sink terms of the two-dimensional model are coupled through a coupling interface. The alternating implicit ADI algorithm is used for numerical solution. The model is optimized by calibrating parameters such as roughness to obtain the calculation results of water level field and / or flow velocity field. Simultaneously, a reverse feedback channel from the calculation results of the two-dimensional model to the one-dimensional model is constructed. By transmitting the real-time water level of the flood detention area back to the one-dimensional model, a two-way coupling mechanism between the one-dimensional and two-dimensional models is formed. like Figure 4 As shown, the unified computational grid resolution was set to 10m×10m, and the grid roughness was assigned according to the land use type of the study area. The inflow boundary conditions for the four polder areas were set as inflow sequence with peak values ​​of 328m³ / s, 492m³ / s, 219m³ / s, and 352m³ / s, respectively, to ensure that the boundary conditions conform to the actual scenario. A hydrodynamic model is constructed based on the two-dimensional shallow water equations (Saint-Venant equations), which are expressed in vector form as follows:

[0138]

[0139]

[0140]

[0141]

[0142] Of these five styles, The horizontal coordinate is the coordinate of the space. The vertical coordinate is the coordinate of the space. For time, For the source term vector, A variable vector, including water level and unit width flow , Both F and G are flux vectors, including water depth h. and Directions and The flow rate on the surface, , is the Xie Cai coefficient. This is the Manning coefficient; The mass and momentum equations are discretized using an alternating implicit and explicit finite difference method, and the equation matrices generated in each direction are solved using a chasing method.

[0143] Simultaneously, the real-time water level parameters of the grid surrounding the gate in the two-dimensional model are fed back to the one-dimensional model to dynamically correct the hydraulic calculation process of the gate boundary in the one-dimensional model, ensuring the hydraulic continuity and physical consistency of the coupled process.

[0144] S500: Establish a dual index mapping between the original raster, MBR, and unified computing grid, and use bilinear interpolation and area weight correction to backmap the calculation results to the original flood detention area; A dual index mapping relationship is established between "Original Raster - MBR - Grid" (Map1) and "MBR - Grid - Unified Computing Grid" (Map2), forming a complete mapping chain from the original raster to the unified computing grid; the index mapping data is stored in a PostgreSQL database, and a two-dimensional array structure is used to optimize the data query speed, ensuring that the corresponding grid and raster can be quickly located during the back mapping process; The back-mapping of calculation results is completed in two steps using a combination of bilinear interpolation and area weighting. First, the hydrodynamic calculation results under a unified computational grid are mapped to the MBR-Grid, and bilinear interpolation is used to process the interpolation between grid nodes. Second, the results on the MBR-Grid are further mapped to the original flood detention area grid, and the area weighting method is used to correct the result deviation under different grid scales to ensure that the back-mapping results match the spatial scale of the original grid. Back-mapping accuracy verification: The accuracy of the back-mapping results was verified. The water level error was ≤0.001m, the flow velocity error was ≤0.001m / s, and the mean deviation and standard deviation were both ≤1%, indicating that the back-mapping results were consistent with the original calculation results in terms of overall statistical characteristics and had no obvious deviation.

[0145] S600: Perform error analysis and physical conservation verification on the back mapping results, and output flood evolution simulation results to support flood control decision-making; Numerical error analysis: Numerical error analysis was performed on the hydrodynamic results after back-mapping. The mean absolute error (MAE) and root mean square error (RMSE) were selected as the main evaluation indicators. The water level MAE was 0.032m and the water level RMSE was 0.048m. The simulation results were in good agreement with the measured data. The rationality of the hydrodynamic calculation results was verified from the perspective of water conservation. During the stable phase of flood evolution, the relative rate of change of water volume within the calculation area was ≤1%. Results Output and Application: The flood evolution simulation results are output in multiple formats (including GeoTIFF, Shapefile, and CSV formats). The output results cover hourly water level and velocity field data within 72 hours, which can be directly used for practical work such as flood control scheduling plan formulation, flood risk assessment, and flood detention area planning, providing scientific and accurate data support for flood control decision-making.

[0146] To further verify the feasibility and superiority of this efficient two-dimensional hydrodynamic calculation method for decentralized flood detention areas based on adaptive stitching and mesh mapping, the present invention provides the following specific example for illustration: like Figure 5 As shown, this example takes four dispersed flood detention areas in the Chuzhou River basin as the research object and uses the proposed grid stitching and mapping method to carry out simulation. First, the minimum bounding rectangle of the flood detention area is spatially laid out using an optimization algorithm to generate... Figure 5 The unified computational grid shown has clear boundaries and significantly reduced redundant grids, laying the foundation for efficient subsequent computation.

[0147] As shown in Figures 6, 7, 8, and 9, to ensure the reliability of the simulation, a one-dimensional hydrodynamic model at the basin scale was first constructed. The model was calibrated using flood data from 2015 and 2016, and validated using flood events from 2018 and 2020. Validation covered the Simashan flood diversion channel, the discharge of the Chahe River, and the water level processes at stations including Jinji Gate, Guhe, Chizhen, Xianghekou, Xiaoqiao, Chuzhou, and Quanjiao. The results showed that the model had good simulation accuracy (Figures 6-9) and could accurately reflect the flood evolution process in the basin. Based on the validated one-dimensional model, the flow data of each flood detention area's inlet and outlet gates were extracted at different time intervals (time series as shown in Figures 6-9). Figure 10 As shown in the figure, the source and sink terms of the two-dimensional hydrodynamic model are used as the boundary. Finally, a two-dimensional simulation is performed on the optimized unified computational grid, and the results for the key evolution periods of the flood (2h, 11h, 36h) are as follows. Figure 11 , Figure 12 As shown, a comparison with the field records reveals a high degree of consistency between the two in terms of the flooded area and the trend of water level changes, effectively verifying the feasibility and accuracy of the proposed method.

[0148] The specific verification results of this example are as follows: 1. Improved computational efficiency: After adopting the method of this invention, the number of computational grids is reduced from 6.45 million in the traditional method to 341,000, and the simulation time is reduced from 96 minutes to 5 minutes, with a 19.2-fold improvement in computational efficiency. This significantly reduces the consumption of computational resources and time costs, and is suitable for rapid simulation of large-scale decentralized flood detention areas. 2. Simulation accuracy verification: The deviation between the simulated total flood inflow and the measured total flood inflow is ≤3%, and the water level deviation during key periods (such as the peak flood period) is ≤0.05m. The simulation results are highly consistent with the measured data, indicating that the method of the present invention can accurately simulate the actual flood evolution process. 3. Process consistency verification: By comparing the simulation results and field records of key time nodes in the flood evolution process, it was found that the two are consistent in terms of flood inundation range, water level change trend, and flow velocity distribution characteristics, which further proves the reliability and practicality of the method of the present invention.

[0149] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above-described adaptive grid-based efficient flood simulation method for decentralized flood detention areas.

[0150] like Figure 13 As shown, this embodiment of the invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the above-described adaptive grid efficient flood simulation method for decentralized flood detention areas.

[0151] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0152] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0153] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the above-described methods for efficient flood simulation of decentralized flood detention areas using an adaptive grid.

[0154] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.

[0155] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

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

[0157] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0158] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for efficient flood simulation using an adaptive grid in decentralized flood detention areas, characterized in that, Includes the following steps: S100. Based on the target area's digital elevation model (DEM) data, identify scattered flood detention areas, combine principal component analysis (PCA) with the rotating caliper method to generate the minimum bounding rectangle (MBR) with a north-south spatial orientation, and construct grid data MBR-Grid. S200: Construct a mixed integer programming model (MIP), obtain the optimal spatial layout of multiple minimum bounding rectangles (MBR), and splice them together to form a unified computational grid while completing the elevation mapping of the grid data. S300: Based on a unified computing grid, a one-dimensional hydrodynamic model at the watershed scale is constructed. Using the floodgate as the coupling interface, the time-series hydrological data of the floodgate is extracted and transformed into a two-dimensional model coupling source-sink boundary. S400: Construct a two-dimensional hydrodynamic model based on two-dimensional shallow water equations, and call the two-dimensional model to couple source and sink terms and boundaries through the coupling interface to obtain the calculation results of water level field and / or flow velocity field; S500: Establish a dual index mapping between the original grid, MBR, and unified computational grid; use bilinear interpolation and area weighting to correct the calculation results of the water level field and / or flow velocity field; and backmap back to the original flood detention area. S600 performs error analysis and physical conservation verification on the back-mapping results, and outputs flood evolution simulation results to support flood control decision-making.

2. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The method for generating the minimum bounding rectangle in step S100 includes: An adaptive rotation algorithm is constructed by combining PCA and the rotating caliper method to generate the minimum bounding rectangle that satisfies dual constraints, which include: Spatial orientation constraints ensure that the long side of the rectangle is strictly parallel to the north-south or east-west direction, achieving standardized alignment between due south and due north. The area-optimal constraint, under the orientation constraint, selects the rectangle with the smallest area that covers all grids in the flood detention area as the target MBR; Using the coordinates of the center point of the effective grid in the flood detention area as the analysis sample, the principal extension direction is extracted by principal component analysis (PCA) to provide the initial search angle for the rotating caliper method. After traversing the rotation angles, only two types of orientation rectangles, 0° and 90°, are retained. The areas are compared and the better scheme is selected as the final minimum bounding rectangle (MBR) to provide a standardized boundary framework for subsequent spatial analysis.

3. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The method for constructing grid data in step S100 includes: The number of rows and columns of the MBR-Grid corresponding to each MBR is calculated at a resolution of 10m. A seven-parameter Bursa model is used to correct the spatial offset of the MBR-Grid. Median filtering and inverse distance weighted interpolation are used to process the elevation data of the MBR edges. The original DEM data is cropped using the MBR as a mask. A one-to-one elevation mapping between grid ID and raster index is established to associate the MBR-Grid with the original terrain data. The specific process is as follows: Integrated output MBR parameters: bottom left corner coordinates ,width ,high Accuracy is maintained to the 0.001m level; DEM pixel size is read. , as the grid resolution; Calculate the number of rows and columns, and verify. and : by The origin is the point where the corner points of the DEM grid coincide. , ); No. OK, Column grid four vertex coordinates: bottom left corner ( ), bottom right corner ( ), top left corner ( ), top right corner ( ); m and l are integer raster offset indices, where m represents offsetting m complete raster cells to the right along the horizontal axis from the original DEM origin, and l represents offsetting l complete raster cells upward along the horizontal axis from the original DEM origin. Includes grid ID (Row_Col), row and column indices, and center point coordinates. Elevation value Reserved fields; Compare the spatial references of MBR and DEM, and use a seven-parameter Bursa model to transform when there are differences, with a point position error of ≤0.1m; use 3×3 window mid-range filtering to denoise, inverse distance weighted interpolation to fill in missing values, and use MBR as a mask to accurately cut the DEM to ensure that the boundary grid completely falls into the MBR; Extract the coordinate set of the grid center point Calculate the DEM raster index in reverse and verify its validity. and : In the formula, Indexed as a DEM raster column; For DEM raster row indexing; , These are the abscissa and ordinate of the center point of the calculated grid, respectively. , These are the x and y coordinates of the top-left corner origin of the DEM data, respectively. This represents the total number of rows in the DEM data. This represents the total number of columns in the DEM data; This refers to the DEM raster resolution. Elevation values ​​are extracted using a block-read mode based on the raster index. The cache is set to 1 / 4 the size of a single DEM band. Elevation values ​​are written using a one-to-one spatial join with the grid ID and raster index as the key. .

4. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The unified computational mesh method in step S200 includes: S210. For multiple dispersed flood detention areas, the spatial layout of the MBR in each flood detention area is optimized by constructing a mixed integer programming (MIP) model to minimize the total number of computational grids after splicing. Where K represents the total number of flood detention areas; , These represent the width and length of the MBR in the k-th flood detention area, respectively; res is the DEM raster resolution. This represents the number of grids corresponding to a single MBR. After summing, the total number of calculated grids in the stitched area is obtained. Constraint settings: For any two different flood detention areas The following spatial relationships must be satisfied: in, d represents the spatial coordinate range of the k-th MBR; d is the preset buffer band width, which takes the value as an integer multiple of the grid resolution to ensure that the buffer band is aligned with the grid boundary. The starting coordinates of the bottom left corner of each MBR must be an integer multiple of the grid resolution, expressed as follows: in, For the first The starting x-coordinate of the bottom left corner of the smallest bounding rectangle MBR; For the first The starting ordinate of the bottom left corner of the smallest bounding rectangle MBR; Let x be the starting x-coordinate of the lower left corner of the k-th largest bounding rectangle MBR; For the first The starting ordinate of the bottom left corner of the largest bounding rectangle MBR; , These are non-negative integer variables, corresponding to the raster index baseline values ​​in the x-axis and y-axis directions, respectively; S220. Based on the above MIP model, solve for the optimal layout and complete the construction of a unified computing grid covering all flood detention areas, providing a continuous and regular spatial computing domain for efficient two-dimensional hydrodynamic calculations. Solving the MIP model using the branch and bound method: By decomposing the integer programming problem into a series of linear programming subproblems, and by calculating the upper and lower bounds of the subproblems to prune the ineffective search space, the global optimal solution can be obtained efficiently. The solution outputs the optimal spatial layout parameters of the MBRs in each flood detention area, including the optimized starting coordinates. , corresponding integer variables , And the row and column range of each MBR in the unified computing domain; Unified computational grid stitching: Determine the global boundary of the unified computational grid based on the optimal layout parameters of all MBRs: in, , ; In the formula, Let x be the upper right x-coordinate of the k-th MBR in the unified computational grid coordinate system; Let x be the lower left x-coordinate of the k-th MBR in the unified computational grid coordinate system; The width of the k-th MBR; Let y be the top right ordinate of the k-th MBR in the unified computational grid coordinate system; Let y be the lower left ordinate of the k-th MBR in the unified computational grid coordinate system; The length of the k-th MBR; Global x-axis range: Global y-axis range: Based on the global boundary and the DEM raster resolution res, calculate the global number of rows and columns of the unified computational grid: Global column count: Global line count: In the formula, To standardize the global minimum x-coordinate of the computation grid; To standardize the global maximum x-coordinate of the computation grid; To standardize the global minimum ordinate of the computation grid; To standardize the global maximum ordinate of the computation grid; To standardize the calculation of the total number of columns in the grid; To standardize the calculation of the total number of rows in the grid; Map the MBR-Grid of each flood detention area to a unified computing grid according to the optimal layout parameters; Local row and column numbers of a single MBR-Grid Convert to global row and column numbers: In the formula, For local column indexes within a single MBR-Grid; For local row indexes within a single MBR-Grid; For the global column index corresponding to the unified computing grid; For the global row index corresponding to the unified computing grid; This is the global index baseline value of the k-th MBR in the X-axis direction; This is the global index baseline value of the k-th MBR in the Y-axis direction.

5. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The method for constructing a one-dimensional hydrodynamic model at the watershed scale in step S300 includes: The calculation is based on the watershed area associated with the decentralized flood detention area, and includes tributaries that make actual water catchment to the flood detention area; By systematically sorting out the water system layout within the basin, clarifying the ownership and connection logic between the main stream and tributaries, and constructing a clear hierarchical main stream-tributary complete water system topology; By combining the digital river topographic map of the basin with measured river centerline data, a river system is constructed using a segment-section topology model. River segments are divided according to the river plan morphology and hydraulic characteristics, and transitional river segments are set at the confluence of tributary mouths and main streams to avoid distortion of confluence simulation. The design calculation sections are evenly distributed along the river section, and the spacing is adjusted according to the scale of the main stream and tributaries. At the same time, control sections are added at the gate front, gate site and gate back positions of the flood storage and detention area flood gate to accurately depict the water flow state at the gate. The geometric parameters of the cross-section were determined by combining measured river cross-section data with remote sensing interpretation data, and missing data were supplemented by interpolation and river gradient correction. Based on the actual conditions of the river channel, segmented initial roughness is set, and the Saint-Venant equations are discretized using the Preissmann four-point implicit difference scheme. After parameter input and initialization, a one-dimensional hydrodynamic model at the watershed scale is output.

6. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The method for obtaining the spatiotemporal coupling source-sink term boundary of the two-dimensional hydrodynamic model in step S300 includes: Hydrological stations near the sluice gate site were selected to verify the accuracy of the model using measured data. If the model did not meet the requirements, the key parameters were calibrated and the solution was recalculated until the requirements were met. Based on the previously planned gate site cross-sections, an index table corresponding to the flood detention area number, gate type, and cross-section ID was established, and spatial coordinate matching was used to ensure no mismatches. The flow rate and water level of each gate site section are extracted from the output of the one-dimensional model. For a single gate that has both flood control and flood discharge functions, positive flow values ​​represent flood entry and negative flow values ​​represent flood discharge. Constructing a one-dimensional cross-section-two-dimensional grid coupling mapping relationship: based on the matching relationship between the actual geographical coordinates of the floodgate and the two-dimensional grid coordinate system; In the two-dimensional unified computing grid, the boundary grid cell corresponding to the gate is located, and the one-dimensional output flow sequence of the flood gate section is bound to the corresponding two-dimensional grid cell in the form of source-sink term, while the flood discharge is associated in the form of reverse sink term; Missing data periods are filled by linear interpolation of valid data from adjacent periods to ensure the continuity of the data sequence; the verified data is converted into a standardized input format supported by the two-dimensional hydrodynamic model, including timestamps and two-dimensional grid cell ID fields; Establish a time synchronization coupling mechanism for the two-dimensional model: During the initialization phase of the two-dimensional model, boundary data is imported through the data interface. For each time step calculated by the two-dimensional model, the corresponding one-dimensional boundary data is automatically read. At the same time, the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the gate site section of the one-dimensional model, realizing dynamic bidirectional collaborative calculation between the two and completing the coupling of source and sink terms boundary of the two-dimensional model.

7. The efficient flood simulation method with adaptive grid for decentralized flood detention areas according to claim 1, characterized in that, The methods for obtaining the calculation results of the water level field and / or flow velocity field in step S400 include: S410. Using each grid cell of the unified computational grid as the basic computational unit, the two-dimensional Saint-Venant equations are adopted as the fundamental equations for hydrodynamic calculations. In the Cartesian coordinate system, the vector form of the equations is expressed as follows: In the formula, The horizontal coordinate is the coordinate of the space. The vertical coordinate is the coordinate of the space. For time, For the source term vector, A variable vector, including water level and unit width flow , Both F and G are flux vectors, including water depth h. and Directions and The flow rate on the surface, , is the Xie Cai coefficient. Where is the Manning coefficient, and g is the acceleration due to gravity; S420. The mass and momentum equations are discretized using the finite difference method with alternating implicit and explicit methods, and the equation matrices generated in each direction are solved using the chasing method. During the solution process, the coupling boundary data transmitted by S300 is read in real time through the preset data interface, and the real-time water level of the grid corresponding to the gate in the two-dimensional model is fed back to the one-dimensional model, so that the one-dimensional and two-dimensional models are dynamically coupled and coordinated.

8. The efficient flood simulation method for decentralized flood detention areas using adaptive grids according to claim 4, characterized in that, The method for establishing the dual index mapping relationship in step S500 includes: Mapping of the original flood detention area grid to the MBR-Grid: Establish a one-to-one correspondence between the unrotated original grid and the rotated MBR-Grid grid, and generate a pixel-level mapping; Mapping MBR-Grid to Unified Computing Grid: Constructing the correspondence between the local indexes of each MBR-Grid and the global indexes of the unified computing grid, generating a mapping table, and completing validity checks and boundary corrections; Specifically as follows: Index mapping between the original flood detention area raster and the MBR-Grid: For each flood detention area, record the local index of the original unrotated raster. Local index of the rotated MBR-Grid mesh A one-to-one correspondence is established, and a mapping table is constructed synchronously. Maintain pixel-level spatial relationships; in, This is a local index defined based on the original boundary of the flood detention area. This is a local index defined for the MBR boundary based on S220, with both having the same resolution; if the original raster has edge cuts due to rotation, the completely overlapping raster index pairs are retained. The mapping table is stored using a two-dimensional array or a database table, including the flood detention area number, , , , Field; Index mapping between MBR-Grid and unified computing grid: Recording the local indexes of each MBR-Grid Global index with unified computing grid To establish the correspondence between the mappings, construct a mapping table. ; The mapping formula is: In these two formulas, , This refers to the starting row and column offsets of the MBR-Grid within the unified computational grid; verification is required. Remove invalid mappings and perform boundary corrections; Calculation results back-mapping: A two-step back-mapping strategy is adopted to achieve result sharing and accuracy preservation among multi-level grid systems; Step 1: Unified computational grid → MBR-Grid. For each grid in the MBR-Grid, the water level and flow velocity hydraulic parameters are obtained by searching the neighborhood of the unified computational grid and performing interpolation calculations. Step 2: MBR-Grid → Original Raster. Match the MBR-Grid calculation results to the original raster. If there is an area difference between the two grids, area weight correction is used to ensure numerical conservation and spatial accuracy.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the processor performs the method as described in any one of claims 1 to 8.

10. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 8.