A water body model construction method based on piecewise fitting and dynamic incremental optimization
By employing a water body model construction method based on piecewise fitting and dynamic incremental optimization, the problem of model construction under complex bank slope topography is solved, achieving physical consistency between reservoir capacity and area and improving computational efficiency, adapting to complex terrain and reducing error accumulation.
Patent Information
- Application Number
- CN202611344463.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to adapt to complex bank topography when constructing water body models. Local candidate model selection cannot guarantee the optimal global combination. There is a lack of consistent constraints between reservoir capacity fitting and target water surface area output. Furthermore, feedback point addition causes repeated water body topography triangular mesh cutting, resulting in low computational efficiency and error accumulation.
A method based on piecewise fitting and dynamic incremental optimization is adopted. The segment position, candidate equation type and incremental level are selected by jointly using the candidate interval cost tensor and the shortest path of the directed acyclic graph. Combined with the global verification results, the dynamic incremental water level and the local update of the candidate segment water level are driven to ensure the physical consistency of reservoir capacity and area and computational efficiency.
It enables efficient construction of water body models under complex terrain conditions, reduces computation time and error accumulation, maintains physical consistency between reservoir capacity and area, and improves the global optimization capability of the model.
Smart Images

Figure CN123181756A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital water conservancy engineering and geographic information modeling technology, and relates to dynamic modeling, specifically to a method for constructing a water body model based on piecewise fitting and dynamic incremental optimization. Background Technology
[0002] Models relating water level, reservoir capacity, and water surface area are crucial for reservoir scheduling, flood storage and detention analysis, ecological water volume calculation, and digital twin water bodies. Existing techniques typically rely on sounding points, digital elevation models, or topographic triangulation networks to calculate reservoir capacity and water surface area at several discrete water levels, then establish continuous relationships using polynomial, exponential function, or partitioned least squares methods. While fixed equations and fixed segmentation methods are computationally efficient in areas with uniform bank slopes, they become less effective in terrains with terraces, steep banks, tributaries, and densely folded slopes. Discrete sampling points may miss local curvature changes, and a single fitted equation can easily lead to area or curvature mismatches at segment boundaries. Existing adaptive point-addition methods often adjust sampling density independently based on local errors within the current interval, making it difficult to simultaneously compare different equations, different segment locations, and different increment levels. Furthermore, sequentially stitching together locally optimal intervals can lead to global error accumulation. On the other hand, repeatedly performing the same water level cut on the topographic triangulation network significantly increases modeling time, and normalizing to the global maximum value of all candidate solutions can alter the entire cost of a single local feedback. Therefore, a water body model construction method is still needed that can maintain the physical consistency between reservoir capacity and area, identify the actual location of area jumps, perform global combination selection, and support local incremental updates. Summary of the Invention
[0003] The main objective of this invention is to provide a water body model construction method based on piecewise fitting and dynamic incremental optimization, addressing the problems of fixed segmentation and fixed sampling density being difficult to adapt to complex bank topography, the inability of local candidate model selection to guarantee global optimal combination, lack of consistent constraints between reservoir capacity fitting and target water surface area output, and the repeated cutting of water body topographic triangular meshes caused by feedback point addition. This invention utilizes water body topographic triangular meshes to generate cacheable reference reservoir capacity values, reference water surface areas, and single-sided reference water surface areas. It employs endpoint anchoring of candidate equations to maintain the continuity of segmented reservoir capacity, and uses the candidate interval cost tensor and the shortest path of the directed acyclic graph to jointly select segment positions, candidate equation types, and incremental levels. Finally, it uses global validation results to drive the dynamic incremental water level and local updates of candidate segment water levels.
[0004] To solve the above problems, the technical solution of the present invention is implemented as follows: A method for constructing a water body model based on piecewise fitting and dynamic incremental optimization includes the following steps: acquiring topographic data of the target water body, constructing a water body topographic triangulation network, and calculating the reference reservoir capacity and reference water surface area corresponding to each trial water level; generating candidate piecewise water levels and candidate intervals with fixed water level identifiers based on the changes in the reference water surface area, constructing endpoint-anchored candidate equations for each candidate interval and performing dynamic incremental fitting; establishing a candidate interval cost tensor according to the candidate interval endpoints, candidate equation type, incremental level, and global feedback round; setting the candidate interval solutions as interval solution nodes in a directed acyclic graph, setting edge weights based on the candidate interval cost tensor and the area transformation cost and curvature transformation cost of adjacent intervals, and finding the shortest path from the lowest elevation to the highest operating water level to jointly determine the target candidate water body. The process involves selecting intervals, anchoring candidate equations at target endpoints, and defining the target incremental level. Global validation is performed on the shortest path, and a feedback water level is generated based on the validation results. This feedback water level is then added as a dynamic incremental water level. When the rate of increase in the local reference water surface area on both sides of the feedback water level reaches a segmented threshold, the feedback water level is simultaneously added as a candidate segmented water level. The candidate interval cost tensor and the directed acyclic graph are updated until the global error requirement or feedback termination condition is met. The candidate equations anchored at the target endpoints corresponding to the shortest path are combined into a water body model, and the target reservoir capacity and target water surface area are output based on the target water level. The area conversion cost is used to characterize the deviation between the signed model area jump variable and the signed reference area jump variable, while the curvature conversion cost is adjusted by the rate of increase in the reference water surface area on both sides of the candidate segmented water level.
[0005] Furthermore, a water body topographic triangulation network is constructed, and reference reservoir capacity and reference water surface area are calculated. This includes: using the maximum modeling boundary line covering the entire area to be submerged, island void lines, and topographic abrupt change lines as constraint edges, constrained triangulation is performed on the reservoir bottom measurement points and bank slope topographic points, deleting triangular faces outside the maximum modeling boundary line and inside the island void lines; for any trial water level, within the horizontal projection of each triangular face, a submerged sub-region is determined where the linear topographic elevation of the triangular face is not higher than the trial water level, and the difference between the trial water level and the linear topographic elevation of the triangular face is calculated. The integral is used to determine the reference reservoir capacity value by summing the integral values, and the sum of the horizontal projected areas of the submerged sub-regions is used to determine the reference water surface area. All submerged sub-regions within the maximum modeling boundary line and outside the island hole line are included. The reference water surface area on the left and right sides is saved for the horizontal triangular elevation. The trial water level of the first calculated reference value is registered in the global trial water level pool. Repeated trial water levels are merged according to the preset water level tolerance, and the trial water level, reference reservoir capacity value, reference water surface area and water body topography triangular mesh cutting results are cached.
[0006] Further, candidate segmented water levels and candidate intervals are generated, including: generating at least 9 equally spaced initial trial water levels; merging similar horizontal triangular elevations according to a preset water level tolerance, and determining the merged elevations whose sum of horizontal projected areas reaches a preset jump area threshold, as well as the lowest elevation and the highest operating water level, as mandatory candidate segmented water levels; supplementing trial water levels within the closed interval formed by adjacent mandatory candidate segmented water levels until the number of initial trial water levels and supplementary trial water levels within the two mandatory candidate segmented water levels and the closed interval, after deduplication, is no less than 5; merging and sorting the initial trial water levels, supplementary trial water levels, and mandatory candidate segmented water levels, determining the ratio of the difference in adjacent reference water surface area to the water level difference as the reference water surface area growth rate, and determining the absolute value of the difference in the growth rates of adjacent reference water surface areas as the reference water surface area growth rate. The degree of change is determined by the larger of the sum of the median of the change in the reference water surface area growth rate and 1.5 times the median absolute deviation, and the preset lower limit of the positive segmentation. The water level corresponding to the local maximum value above the segmentation threshold is determined as the ordinary candidate segmentation water level. The water level corresponding to the middle position of the continuous isopleth platform is adopted. When the water level difference between the ordinary candidate segmentation water level and the forced candidate segmentation water level is less than the preset minimum water level span, the forced candidate segmentation water level is retained. Each candidate segmentation water level is assigned a unique fixed water level identifier throughout the process. A candidate interval is generated with two fixed water level identifiers as fixed indices, two endpoints of the candidate interval, and a total of no less than five initial trial water levels, supplementary trial water levels, and feedback water levels within the closed interval of the candidate interval after deduplication. The water level span reaches the preset minimum water level span and does not cross the forced candidate segmentation water level.
[0007] Furthermore, constructing endpoint anchoring candidate equations includes: linearly mapping the actual water level within the candidate interval to a dimensionless water level ranging from 0 to 1; determining the difference between the reference reservoir capacity value at the termination endpoint and the reference reservoir capacity value at the starting endpoint as the local reference reservoir capacity increment; constructing the endpoint anchoring candidate equation by multiplying the reference reservoir capacity value at the starting endpoint and the local reference reservoir capacity increment by a normalized shape function, such that the normalized shape function is 0 at the starting endpoint and 1 at the termination endpoint; the normalized shape function includes the endpoint normalized linear shape function, exponential shape function, and logarithmic shape function. The logarithmic shape function, the power-law shape function, the second-order polynomial shape function, and the third-order polynomial shape function are all defined. Each shape parameter is located within a preset finite interval. The lower limit of the logarithmic shape parameter interval is greater than -1, and the lower limit of the power-law shape parameter interval is greater than 0. When the local reference reservoir capacity increment is 0, a constant candidate interval solution is established. When the local reference reservoir capacity increment is greater than 0, a chain conversion is performed according to the water level span of the candidate interval. The first and second derivatives of the endpoint anchored candidate equation with respect to the dimensionless water level are converted into area output and curvature output, respectively, and parameter values with area output not less than 0 are retained.
[0008] Furthermore, dynamic incremental fitting is performed, including: establishing a level 0 dynamic incremental water level set containing candidate interval endpoints, 1 / 4 quantile water levels, 1 / 2 quantile water levels, 3 / 4 quantile water levels, and previous feedback water levels; and determining the local upper limit of the number of actual water levels in the set and the upper limit of the number of intermediate verification water levels in this round as the local upper limit of the number of water levels; performing least squares fitting with parameter range and monotonicity constraints; saving the level 0 fitting results when the number of newly added water levels is 0; calculating the reference reservoir capacity value at the midpoint of adjacent dynamic incremental water levels; adding the midpoint with the largest normalized reservoir capacity error to the dynamic incremental water level set and refitting, until the entire set is complete. If the normalized reservoir capacity error at the midpoint of the department is not greater than the local error threshold or the number of newly added water levels reaches the upper limit of the number of intermediate verification water levels in this round, the incremental level is marked by the number of newly added water levels; the linear equations are subjected to the same verification and only one linear candidate interval solution marked by the actual number of newly added water levels is saved; the intermediate verification water levels generated by anchoring the candidate equations at each endpoint within the same candidate interval are summarized, and 1 / 3 quantile water levels and 2 / 3 quantile water levels are added between adjacent water levels in each final dynamic incremental water level set. After deduplication, a common evaluation water level set is formed, and the evaluation indicators of each incremental level are recalculated on the common evaluation water level set.
[0009] Furthermore, a candidate interval cost tensor is established, including: using the fixed water level identifiers of the two endpoints of the candidate interval, the candidate equation type, the incremental level, and the global feedback round as index dimensions; determining the tensor elements as the weighted sum of normalized reservoir capacity error, stability error, area consistency error, and water level complexity, and the sum of non-negative piecewise complexity cost; the normalized reservoir capacity error is the ratio of the root mean square error of reservoir capacity on the common evaluation water level set to the normalized reservoir capacity scale, and the normalized reservoir capacity scale is the larger value between the local reference reservoir capacity increment and the preset positive reservoir capacity lower limit; the stability error is the current incremental level... The ratio of the maximum reservoir capacity difference to the normalized reservoir capacity scale on the common evaluation water level set is used to calculate the fitting curve of the first-level dynamic incremental water level set and the final incremental hierarchical fitting curve of the candidate equation anchored at the same endpoints. The area consistency error is the root mean square of the relative area error on the endpoints of the common evaluation water level set and the candidate interval. The denominator of the relative area error is the larger value between the reference water surface area and the preset positive area lower limit. The starting endpoint uses the right reference water surface area, and the ending endpoint uses the left reference water surface area. The water level complexity is the ratio of the actual number of water levels in the 0-level dynamic incremental water level set to the sum of the incremental levels relative to the local upper limit of the number.
[0010] Furthermore, a directed acyclic graph is constructed and the shortest path is obtained, including: using only candidate interval solutions from the current global feedback round as interval solution nodes; connecting the starting node to the interval solution node with the lowest starting water level, with the edge weight being the corresponding tensor element; connecting the ending interval solution node with the highest operating water level to the ending node, with the edge weight being 0; when adjacent interval solution nodes share the same fixed water level identifier, establishing a directed connection edge from the interval solution node on the low water level side to the interval solution node on the high water level side, and determining the edge weight as the sum of the tensor element, weighted area conversion cost, and weighted curvature conversion cost corresponding to the interval solution node on the high water level side; and obtaining the shortest path from the starting node to the ending node according to the water level topology order.
[0011] Further, the area conversion cost and curvature conversion cost are determined, including: subtracting the left area output of the low water level side interval solution from the right area output of the high water level side interval solution's starting end to obtain the signed model area jump variable; subtracting the left reference water surface area from the right reference water surface area to obtain the signed reference area jump variable; dividing the absolute value of the difference between the two signed jump variables by the maximum value between the left and right reference water surface areas and the preset positive area lower limit to obtain the area conversion cost; dividing the absolute value of the unilateral curvature difference of the adjacent interval solutions with respect to the actual water level by the product of the preset positive curvature scale and the curvature adjustment factor to obtain the curvature conversion cost; the curvature adjustment factor is the sum of 1 and the product of the preset non-negative adjustment coefficient and the normalized curvature change degree, and the normalized curvature change degree is the smaller value between the absolute value of the difference in the growth rate of the reference water surface areas on both sides of the candidate segment water level and the ratio of the segment threshold and 1.
[0012] Furthermore, global verification is performed on the shortest path, including: merging and sorting the target dynamic incremental water levels and common evaluation water levels within each target candidate interval; setting the 2 / 5 quantile and 3 / 5 quantile water levels as global verification water levels within the largest adjacent water level gap; dividing the absolute reservoir capacity error of each global verification water level by the corresponding normalized reservoir capacity scale and taking the maximum value to obtain the global normalized reservoir capacity error; dividing the absolute area error of each global verification water level by the larger of the corresponding reference water surface area and the preset positive area lower limit and taking the maximum value to obtain the global normalized area error; determining the area conversion cost of the internal target segment water levels as the area jump variable error; when all three types of errors are not greater than the corresponding threshold, combining the target endpoint anchoring candidate equations into a water body model; when the global normalized reservoir capacity error or the global normalized area error is greater than the corresponding threshold, adding the global verification water level corresponding to the maximum exceedance ratio to the feedback water level set; when the area jump variable error is greater than the corresponding threshold, adding the global verification water level with the closest distance to both sides of the corresponding internal target segment water level to the feedback water level set.
[0013] Furthermore, the candidate interval cost tensor and directed acyclic graph are updated, including: calculating the local reference water surface area growth rate change based on the newly added reference water surface area on both sides of the feedback water level; adding each feedback water level to the candidate interval covering the feedback water level in the next round's level 0 dynamic incremental water level set; when the local reference water surface area growth rate change reaches the segmentation threshold, retrieving candidate segmented water levels according to the preset water level tolerance, using the fixed water level identifier when a match is found, and adding the feedback water level to the candidate segmented water level and assigning a new fixed water level identifier when a match is not found, generating all candidate intervals with the found candidate segmented water level or the newly added feedback water level as endpoints and satisfying the candidate interval generation conditions; and adding a global feedback round. Next, only the original candidate intervals, newly generated candidate intervals, and associated directed edges covering the feedback water level are recalculated. The solutions of the remaining candidate intervals are mapped to the current global feedback round according to the fixed water level identifier, and the shortest path is recalculated. Feedback updates are terminated when the global trial water level pool reaches the preset total limit, the global feedback round reaches the preset round limit, or no trial water level or candidate segment water level is added for two consecutive rounds. If any of the three types of errors is still greater than the corresponding threshold, the termination status that does not meet the global error requirements is output. When the target water level is equal to the minimum elevation or the internal target segment water level, the right reference water surface area is output. When the target water level is equal to the maximum operating water level, the left reference water surface area is output.
[0014] The water body model construction method based on piecewise fitting and dynamic incremental optimization of the present invention has the following beneficial effects: By performing geometric integration on the submerged sub-regions on the water body topographic triangular network, the reference reservoir capacity, reference water surface area, and unilateral reference water surface area at the elevation of the horizontal triangular face are obtained simultaneously, so that the fitting target has a clear correspondence with the topographic geometry; the endpoint anchoring candidate equations ensure the continuity of reservoir capacity in adjacent intervals while retaining the shape parameter adjustment capability, and the derivative conversion according to the actual water level unifies the evaluation dimensions of area and curvature; dynamic incremental fitting allocates computational resources to water level segments with large errors, and the joint evaluation of the water level set makes different candidate equations and different incremental layers more consistent. The system compares data on the same data level; the candidate interval cost tensor organizes reservoir capacity error, stability, area consistency, and water level complexity into fixed-scale costs; the shortest path of the directed acyclic graph jointly determines the segment location, candidate equation type, and incremental level; the area transformation cost matches the actual area jump caused by horizontal terrain; the curvature transformation cost adjusts the smoothing requirements of adjacent curves according to the degree of terrain change; global verification feeds back the excess water level as a dynamic incremental water level or a new candidate segment water level, combined with the global trial calculation of the water level pool reuse water body terrain triangular network cutting results, thereby reducing manual segmentation and parameter trial and error, and achieving a controllable balance between error accuracy, physical consistency, and computational load. Attached Figure Description
[0015] Figure 1 The diagram illustrating the principle of water body topographic triangulation and submersion integral provided in this embodiment of the invention, wherein, Figure 1 (a) is a plan view showing the relationship between the maximum modeling boundary line, island hole line, terrain change line, and trial water level submersion boundary. Figure 1 (b) is a schematic cross-sectional view of the submerged sub-region under the calculated water level; Figure 2 The reference water surface area and candidate segment water level determination diagram provided in the embodiments of the present invention, wherein, Figure 2 (a) is a schematic diagram showing the change of reference water surface area with water level and the reference water surface area on one side. Figure 2 (b) is a comparison chart of the degree of change in the reference water surface area growth rate and the segmented threshold; Figure 3 A comparison diagram of candidate equations for endpoint anchoring provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the principle of joint selection of candidate interval cost tensor and directed acyclic graph provided in an embodiment of the present invention. Figure 5 The diagram shows the verification effect of dynamic increment and global feedback provided in the embodiments of the present invention. Detailed Implementation
[0016] The embodiments of the present invention will be further described below with reference to the accompanying drawings. The following embodiments are used to explain the water body model construction process and the coordination relationships between parameters, and are not intended to limit the source of terrain data, processor type, or the unique values of parameters. Unless otherwise stated, length, water level, and elevation are expressed in meters, horizontal projected area in square meters, and reservoir capacity in cubic meters; all geometric calculations use double-precision floating-point numbers, and when water level comparisons are involved, a preset water level tolerance judgment is performed first.
[0017] In a reproducible embodiment, the modeled water level range for the target water body is 96.00 meters to 126.00 meters, and the horizontal projected area enclosed by the maximum modeling boundary line is 2.43 square kilometers. The data includes 4862 reservoir bottom measurement points and bank slope topographic points, one maximum modeling boundary line, one island / hole line, and seven topographic abrupt change lines. The computing device employs a 16-core processor and 64 gigabytes of memory. Geometric clipping, parameter fitting, and graph search can all be performed by a general-purpose processor. The processor configuration only affects the computation time and does not change the mathematical results of the method; when the data scale is large, independent triangular faces can also be processed in parallel by a graphics processing unit.
[0018] After importing the topographic data, the planar coordinates are first unified to the same projected coordinate datum, and the elevations are unified to the same vertical datum. For repeated measurement points with a planar distance of less than 0.01 meters and an elevation difference of less than 0.02 meters, the points with higher measurement quality are retained; for measurement points falling outside the maximum modeling boundary line, only their original records are retained and they are not included in the subdivision. The maximum modeling boundary line covers all potentially submerged areas below the highest operating water level. Island hole lines are closed and do not intersect with the maximum modeling boundary line. Topographic abrupt change lines are laid along slope breaks, dike toes, or terrace edges, so that the subdivision triangular facets do not cross the topographic discontinuities that need to be retained.
[0019] Constrained triangulation was performed using the maximum modeling boundary line, island hole lines, and topographic abrupt change lines as constraint edges. The example data yielded 9476 triangular faces; after deleting triangular faces outside the maximum modeling boundary line and inside the island hole lines, the water topographic triangulation retained 9138 triangular faces. Degenerate triangular faces with a horizontal projected area less than 0.001 square meters or whose three vertices are collinear were not included in the integration, but their area was included in the data quality report. The calculation object was the static water level and reservoir capacity relationship. All submerged sub-regions within the maximum modeling boundary line and outside the island hole lines were included in the reference reservoir capacity value, without filtering connected regions based on seed triangular faces; the reference reservoir capacity value was continuous with the water level, and low-lying basins did not experience non-physical jumps due to water levels crossing saddles.
[0020] For any triangular facet in a water topographic triangulation network, the elevations of the three vertices determine the linear topographic elevation within the triangular facet. When the calculated water level is lower than all three vertex elevations, the submerged sub-region is empty; when the calculated water level is not lower than all three vertex elevations, the submerged sub-region is a complete triangular facet; in other cases, the intersections of the calculated water level facet and the sides of the triangular facet spanning the water level are calculated separately. Vertices lower than or equal to the calculated water level and the intersections are sorted according to their planar polar angles to form triangular or quadrilateral submerged sub-regions. The proportion of the intersection points within the triangular side connecting the first and second vertices is determined using the following formula: ;in, Let the inner division ratio be the ratio from vertex 1 to vertex 2. To calculate the water level, The elevation of the first vertex. The elevation of the second vertex. When the absolute value of the denominator is less than 10 to the power of -8 meters, the sides of the triangle are treated as horizontal sides, and no division is performed. The quadrilateral submerged subregion is divided into two sub-triangles along any diagonal that does not extend beyond the submerged subregion; under linear terrain conditions, the volume of each sub-triangle is equal to its horizontal projected area multiplied by the arithmetic mean of the water depths at the three vertices, yielding the geometric integral value of the submerged subregion.
[0021] Repeat the above trimming and integration for all retained triangular faces. The reference reservoir capacity and reference water surface area are calculated using the following formulas: ;in, To calculate the water level The corresponding reference storage capacity value, To calculate the water level The corresponding reference water surface area This represents the number of triangular faces involved in the integration within the triangular network of water topography. The triangular face number. For the first A triangular facet is used in the water level calculation. The submerged sub-region below, For the first The triangular facets in the plane coordinate system and Linear topographic elevation at the location, and Describes an integral infinitesimal element in the plane direction. This represents the calculation of the horizontal projected area. This integral relationship guarantees that the derivative of the reference reservoir capacity with respect to the actual water level is equal to the reference water surface area at non-jumping water levels.
[0022] The three vertices of the horizontal triangle have the same elevation. When the calculated water level approaches from the left side of the horizontal triangle's elevation, the horizontal projected area of the horizontal triangle is not included in the reference water surface area; when the calculated water level is equal to the horizontal triangle's elevation or approaches from the right side, the horizontal projected area of the horizontal triangle is included in the reference water surface area. The cache records both the left and right reference water surface areas at the horizontal triangle's elevation. The left reference water surface area is obtained by excluding horizontal triangles whose elevations fall within the preset water level tolerance zone, and the right reference water surface area is obtained by including the aforementioned horizontal triangles; the left and right limits of the reference reservoir capacity value at the horizontal triangle's elevation are the same.
[0023] In this embodiment, the preset water level tolerance is 0.005 meters. The global trial water level pool uses the integer obtained by dividing the water level by the preset water level tolerance and rounding it off as the search key. Each time, it simultaneously searches the current search key and the two search keys with adjacent values. The original water level difference is not greater than the preset water level tolerance as the hit condition, and when there are multiple hit records, the record with the smallest water level difference is selected. The first appearance of the trial water level triggers the water body topography triangulation cutting. The cached record includes the trial water level, reference reservoir capacity value, reference water surface area, single-sided reference water surface area, immersion type of each triangular face, and intersection point of the cross sides. When requesting the water level within the tolerance range again, the cache is read directly. The cached intersection points are stored in order of triangular face identifiers to facilitate the reuse of vertex elevation sorting results in adjacent water level calculations.
[0024] Figure 1 The geometric processing described above is illustrated. Figure 1In (a), the triangular mesh is retained only in the part inside the maximum modeling boundary line and outside the island hole line. The terrain change line is the triangular side that must be retained. The dashed line represents the submerged boundary corresponding to a trial water level. Figure 1 (b) shows the submerged sub-region between the trial water level and the linear triangular topography in profile. The reference reservoir capacity is obtained by integrating the shaded area along the horizontal projection, and the reference water surface area is obtained by accumulating the corresponding surfaces of its horizontal length on the plane.
[0025] The elevations of horizontal triangular faces in the water body topographic triangulation network are scanned separately. Horizontal triangular faces with an elevation difference of no more than 0.005 meters are grouped into the same elevation group, and the group elevation is the weighted average of the horizontal projected areas of each horizontal triangular face. In this embodiment, two elevation groups are obtained at 108.40 meters and 117.60 meters, corresponding to horizontal projected areas of 18,400 square meters and 7,600 square meters, respectively. Both exceed the preset jump area threshold of 5,000 square meters, so 108.40 meters and 117.60 meters are determined as mandatory candidate segmented water levels. 96.00 meters and 126.00 meters are also determined as mandatory candidate segmented water levels. The mandatory candidate segmented water levels ensure that no candidate interval crosses the horizontal topography that needs to represent the actual area jump.
[0026] Between 96.00 meters and 126.00 meters, 31 initial trial water levels with equal intervals of 1.00 meters are generated. After obtaining the mandatory candidate segment water levels, each closed interval formed by adjacent mandatory candidate segment water levels is checked. The two endpoints of the closed interval and the initial trial water level within the interval are deduplicated using a preset water level tolerance. If the number of duplicates is less than 5, supplementary trial water levels are inserted sequentially at the midpoint of the largest adjacent water level gap until 5 are reached. The initial trial water levels, mandatory candidate segment water levels, and supplementary trial water levels all use the water body topographic triangulation reference value calculation and caching mechanism; the subsequent verification water levels and feedback water levels use the same geometric integral benchmark.
[0027] The initial trial water level, supplementary trial water level, and mandatory candidate segmented water level are merged and arranged in ascending order of water level. The growth rate of the reference water surface area is calculated based on the difference between adjacent reference water surface areas and the corresponding water level differences. Then, the absolute value of the difference in the growth rates of adjacent reference water surface areas is calculated, using the following formula: ;in, , These are the numbers arranged in ascending order of water level. The and the first +1 trial water level, , These are the corresponding reference water surface areas. For the first The growth rate of reference water surface area at each water level interval For the first The degree of change in the growth rate of the reference water surface area at the internal trial water level. This is an index for calculating water level sequence. The reference water surface area growth rate represents the new water surface area corresponding to a unit rise in water level. The degree of change in the reference water surface area growth rate is used to locate water levels where the slope of the bank or the rate of expansion of the reservoir basin changes.
[0028] The segmented threshold is calculated using the following formula: ;in, The segmentation threshold, This represents the set comprising the degree of change in the growth rate of all reference water surface areas. For median operations, This represents the median absolute deviation. To preset the lower limit of positive segments, This indicates taking the larger value. The median absolute deviation is calculated using the formula: ;in, For set The first in The degree of change in the growth rate of the reference water surface area. Using the median and median absolute deviation can reduce the effect of a single strong topographic change on the background threshold, while the preset positive segmentation lower limit avoids flat terrain causing the segmentation threshold to be 0. In this embodiment, the median is calculated to be 0.25 × 10³ square meters per meter, the median absolute deviation is 0.07 × 10³ square meters per meter, and the preset positive segmentation lower limit is 1.50 × 10³ square meters per meter. Therefore, the segmentation threshold is taken as 1.50 × 10³ square meters per meter.
[0029] Local maxima exceeding the segmentation threshold are identified as ordinary candidate segment water levels. When determining local maxima, the current value is compared with the rate of change of the area growth rate of the preceding and following reference water surfaces. For platforms with consecutive equal values and all higher than their adjacent values, the water level in the middle of the platform is used. If the number of platform water levels is even, the average of the two middle water levels is used, and the water body topographic triangulation reference value calculation and caching mechanism are invoked. When the water level difference between an ordinary candidate segment water level and any forced candidate segment water level is less than the preset minimum water level span, only the forced candidate segment water level is retained. After adopting the above value selection and merging rules, the same set of topographic data generates the same candidate segment water level sequence under different traversal orders.
[0030] Each candidate segment water level receives a unique fixed water level identifier upon initial generation. This fixed water level identifier is stored as a non-repeating 64-bit incrementing integer; for ease of illustration, 96.00 meters, 108.40 meters, 117.60 meters, and 126.00 meters are displayed as H0960, H1084, H1176, and H1260, respectively. The display name and the 64-bit incrementing integer are stored in the same mapping record, and the fixed water level identifier remains unchanged even after the insertion of new candidate segment water levels. Candidate segment water levels are topologically sorted according to their water level values, and candidate intervals use the fixed water level identifiers of their start and end endpoints as fixed indices. In this embodiment, the preset minimum water level span is set to 2.00 meters, generating only candidate intervals with two endpoints, and the initial trial water level, supplementary trial water level, and feedback water level within the closed interval of the candidate interval, after deduplication using a preset water level tolerance, totaling no less than five candidate intervals that do not cross the mandatory candidate segment water level.
[0031] Figure 2 (a) shows that the reference water surface area increases with the overall water level, and there are signed positive jumps at the horizontal triangular elevations of 108.40 m and 117.60 m. Hollow dots represent the reference water surface area on the left and solid dots represent the reference water surface area on the right. Figure 2 (b) shows the degree of change in the growth rate of the reference water surface area calculated from the discrete reference water surface area. Local maxima exceeding the segment threshold are used to generate ordinary candidate segment water levels. The horizontal triangular elevation is directly added as a forced candidate segment water level even if it does not coincide with the initial trial water level.
[0032] For candidate intervals defined by initial and final fixed water level markers, the actual water level is mapped to a dimensionless water level, and the local reference reservoir capacity increment is calculated using the formula: ;in, The water level is dimensionless. The actual water level within the candidate interval. The water level at the starting point. To terminate the endpoint water level, The reference storage capacity value is the starting endpoint. To terminate the endpoint reference storage capacity value, For local reference storage capacity increment, and These are fixed water level markers for the starting and ending points, respectively. Because... Greater than , It monotonically increases from 0 to 1 within the candidate interval.
[0033] The candidate equation for endpoint anchoring uses the following formula: ;in, Candidate equation type At the actual water level The output storage capacity value, Index for candidate equation types The reference storage capacity value is the starting endpoint. For local reference storage capacity increment, For the normalized shape function, Candidate equation type The corresponding set of shape parameters. Each normalized shape function in When equal to 0, take 0; When the value is equal to 1, it is taken as 1. Therefore, regardless of how the shape parameters are adjusted, the candidate equation strictly passes through the two endpoint reference library values. The endpoint constraints do not occupy the fitting degrees of freedom of the shape parameters.
[0034] Linear shape functions and exponential shape functions are expressed using the following formulas: ;in, It is a linear shape function. It is an exponential shape function. For exponential shape parameters, This is a natural exponential function. Logarithmic and power-shaped functions are expressed using the following formulas: ;in, It is a logarithmic shape function. It is a power-shaped function. For logarithmic shape parameters, It is the natural logarithm function. The shape parameter is the power-law. To prevent the exponential function from generating a singular positive offset at zero, the shape functions of second-order and third-order polynomials are formulated using the following formulas: ;in, It is a second-order polynomial shape function. It is a 3rd order polynomial shape function. These are second-order adjustment parameters, and these are third-order adjustment parameters. All shape functions have undergone endpoint normalization to avoid the problem that exponential, logarithmic, or power equations cannot simultaneously satisfy both endpoints when the minimum water level reference reservoir capacity is 0.
[0035] This embodiment restricts the exponential shape parameter to -6 to 6, the logarithmic shape parameter to -0.95 to 20, the power shape parameter to 0.10 to 6, the second-order adjustment parameter to -0.80 to 0.80, and the third-order adjustment parameter to -0.50 to 0.50, with a positive offset set to 0.01. When the absolute value of the exponential or logarithmic shape parameter is less than 10 to the power of -6, the limit value of the linear shape function is used for calculation to avoid numerical reduction caused by both the numerator and denominator approaching 0 simultaneously. The finite parameter range prevents exponential overflow and also ensures that the optimization problem has a finite search domain.
[0036] The area and curvature outputs of the candidate equations must be differentiated with respect to the actual water level, using the following formula: ;in, For candidate equations at actual water levels Output the area at that location. For candidate equations at actual water levels Curvature output at the point, and These are the normalized shape functions with respect to the dimensionless water level. The first and second derivatives, - This represents the water level span of the candidate interval. The water level span factor ensures that the area output unit for candidate intervals with different spans remains in square meters, and the curvature output unit remains in square meters per meter.
[0037] Exponential, logarithmic, and power-shaped functions have non-negative first-order derivatives within the aforementioned parameter range. For second-order polynomial-shaped functions, examine the values of their first-order derivatives at the two endpoints of the interval; for third-order polynomial-shaped functions, use the formula: ;in, The third-order polynomial shape function with respect to the dimensionless water level The first derivative, It is a second-order adjustment parameter. It is a third-order adjustment parameter. for When not equal to 0 The stationary point. Check both endpoints, and... Check the stationary point value when it is within the closed interval of 0 to 1; When the value is 0, only two endpoints are checked. If any checked value is less than 0, the corresponding parameter value is discarded. When the local reference capacity increment is 0, the shape parameters are not optimized, and only a constant candidate interval solution equal to the reference capacity value of the starting endpoint is established, with both its area output and curvature output being 0.
[0038] Figure 3 The shape differences of the six endpoint-anchored candidate equations within the same candidate interval are shown. Each curve passes through the same common endpoint at 108.40 meters and 117.60 meters, with different curvatures formed by their respective shape parameters within the interval. Dynamic incremental water levels are used to adjust the shape parameters of the nonlinear candidate equations, while the reservoir capacity at the endpoints of the candidate intervals remains unchanged; the linear equations, which do not contain shape parameters, are retained as the baseline model.
[0039] The global feedback rounds start from 0. Each round establishes a level 0 dynamic incremental water level set for each candidate interval and each candidate equation. The set includes the two endpoints of the candidate interval, the 1 / 4 quantile water level, the 1 / 2 quantile water level, the 3 / 4 quantile water level, and the feedback water levels that fell into the candidate interval in previous global feedback rounds. All water levels are deduplicated according to a preset water level tolerance. The maximum number of intermediate verification water levels allowed in this round is 6. The local maximum number and water level complexity are determined using the following formula: ;in, This is the upper limit of the local quantity. This represents the actual number of water levels in the dynamic incremental water level set at level 0. This represents the upper limit for the number of intermediate water level checks in this round. This represents the number of new water levels corresponding to the current incremental level. The complexity is the water level. Since 0 is not greater than... and Not greater than The water level complexity is always greater than 0 and not greater than 1; when the preceding feedback water level increases, the local quantity upper limit increases synchronously with the actual water level quantity of the 0-level dynamic incremental water level set.
[0040] For endpoint anchoring candidate equations containing shape parameters, the least squares objective function is expressed by the formula: ;in, Let the sum of squared residuals be the sum of squared residuals to be minimized. Candidate equation type The set of shape parameters, This represents the number of water levels in the current dynamic incremental water level set. This is a dynamic incremental water level sequential index. For the first A dynamic incremental water level. The library capacity value output by the candidate equation. The reference capacity value in the cache is used. First, several initial values are generated in a equidistant grid within each parameter's finite interval, and infeasible initial values are eliminated using the aforementioned analytical extremum check. Starting from each feasible initial value, a sequential quadratic programming with the residual sum of squares as the objective is executed. In each iteration, both parameter boundary constraints and derivative minimum non-negativity constraints are evaluated simultaneously. The iteration ends when the relative change of the objective function is less than 10 to the power of -10 or when the iteration reaches 100 times, and the result with the smallest residual sum of squares among all feasible converged results is taken.
[0041] After one fitting operation, the reference values of the water body topographic triangulation network are used to calculate and cache the midpoints of each pair of adjacent water levels in the current dynamic incremental water level set. The normalized storage capacity error is obtained by dividing the absolute storage capacity error of each midpoint by the larger value between the local reference storage capacity increment and 10,000 cubic meters. If the maximum normalized storage capacity error is greater than the local error threshold of 0.008, the corresponding midpoint is added to the dynamic incremental water level set and refitted; if the corresponding midpoint already exists within the preset water level tolerance, the next unregistered midpoint is selected according to the error from largest to smallest. The current round of dynamic incremental process ends when all midpoints reach the local error threshold or the number of newly added water levels reaches 6.
[0042] After the initial fitting, the number of newly added water levels is marked as 0, and the level 0 fitting parameters, area output parameters, and curvature output parameters are saved. Each time an intermediate verification water level is added and refitted, the incremental level is marked with the actual number of newly added water levels, and the corresponding parameters are saved. Linear equations are not refitted, but the same midpoint verification is performed, recording the verification depth with the actual number of newly added water levels. After verification, only one linear candidate interval solution is saved. The water level complexity of the linear candidate interval solution is calculated using the actual verification depth.
[0043] After completing the dynamic incremental process for all candidate equations within the same candidate interval, all intermediate verification water levels generated by each candidate equation are summarized. A 1 / 3 quantile water level and a 2 / 3 quantile water level are added between adjacent water levels in the final dynamic incremental water level set for each candidate equation. Duplicates are removed according to the preset water level tolerance, and water levels coinciding with the two endpoints of the candidate interval are deleted, forming the common evaluation water level set for the current round. All candidate equations and all their saved incremental levels are recalculated on the same common evaluation water level set; when calculating the area consistency error, the endpoints of the two candidate intervals are added separately to the area evaluation water level sequence.
[0044] The normalized storage capacity error is calculated using the following formula: ;in, To normalize the storage capacity error, To jointly evaluate the number of water levels in the water level cluster, To jointly evaluate the water level sequence index, For the first A common assessment of the water level, The library capacity value output by the candidate equation. For reference storage capacity, For local reference storage capacity increment, To preset a lower limit for positive storage capacity, this embodiment uses 10,000 cubic meters. This indicates taking the larger value. A fixed local reference reservoir capacity scale ensures that new data only affects the candidate intervals covering newly added water levels.
[0045] The stability error is expressed by the formula: ;in, For stability error, Candidate equation type At the current incremental level The fitted curve, For the same candidate equation type at the final incremental level The fitted curve, This represents the final increment level reached in this round of dynamic increment process. The meanings of the other symbols are the same as those defined in the normalized storage capacity error. Even if the current increment level is 0, the stability error is determined by the actual difference between it and the final curve, and is not preset to 0.
[0046] The formula for calculating the area consistency error is: ;in, For area consistency error, To jointly evaluate the number of water levels in the water level cluster, To jointly evaluate the water level and the total number of evaluations for the endpoints of the two candidate intervals, For area assessment water level sequence index, For the first Water level is assessed by area. This outputs the area of the candidate equation. For reference water surface area, To set a lower limit for the positive area, this embodiment uses 1000 square meters. This indicates that the larger value is taken. The starting endpoint of the candidate interval uses the reference water surface area on the right, and the ending endpoint uses the reference water surface area on the left; the water level for common evaluation uses the reference water surface area of the corresponding water level.
[0047] The tensor elements of the candidate interval cost tensor are expressed by the following formula: ;in, For tensor elements, To normalize the storage capacity error, For stability error, For area consistency error, For water level complexity, , , and Each of the four indicators has a preset positive weight, and the sum of the weights is 1. The preset non-negative piecewise complexity cost is set. In this embodiment, the values are 0.40, 0.15, 0.35 and 0.10 respectively, and the piecewise complexity cost is set to 0.012. Figure 4 The second-order tensor elements of the third-order polynomial equation shown are... Equal to 0.011 Equals 0.005 Equals 0.024 Equal to 5 Equal to 2 and The value equals 11, and the calculated result is 0.089186. The figure displays 0.089 with three decimal places. The candidate interval cost tensor uses two fixed water level identifiers, the candidate equation type, the incremental level, and the global feedback round as indices, and stores effective tensor elements using sparse key-value records.
[0048] The total number of different trial water levels within the global trial water level pool is used separately to constrain the computational cost of water body topography triangulation cutting, and is not included in the local water level complexity of the tensor elements. When multiple candidate intervals call the same trial water level, only one water body topography triangulation cutting is registered. The normalized reservoir capacity scale, the preset lower limit of positive area, and each weight are all determined before modeling begins; adding a new feedback water level only changes the candidate intervals covering the feedback water level and their associated edges, while the tensor elements not covering the feedback water level remain unchanged.
[0049] When constructing the model selection graph, only candidate interval solutions from the current global feedback round are used. Each candidate interval solution forms an interval solution node, which records the starting fixed water level identifier, the ending fixed water level identifier, the candidate equation type, the increment level, and the corresponding tensor element. A start node and an end node are also established; the start node connects to the interval solution node with an starting water level of 96.00 meters, and the interval solution node with an ending water level of 126.00 meters connects to the end node. A directed connection edge from the low water level side to the high water level side is established only when the ending fixed water level identifier of the interval solution node on the low water level side is exactly the same as the starting fixed water level identifier of the interval solution node on the high water level side. All edges are along the direction of water level rise, therefore the model selection graph is a directed acyclic graph.
[0050] At the shared candidate segment water level, the area conversion cost is calculated using the following formula: ;in, As a result of area conversion, To share candidate segment water levels, Output the area to the right of the starting point of the high water level side interval. Output the area to the left of the termination point of the low-water-level interval. The area of the reference water surface is on the right. The area of the reference water surface on the left is the water surface area. This sets a lower limit for the positive area. The values within square brackets are signed jump variables obtained by subtracting the area on the left side of the previous interval from the area on the right side of the next interval. Therefore, not only the jump magnitude but also the jump direction is compared. For ordinary candidate segmented water levels, the left and right reference water surface areas are the same, and the area conversion cost correspondingly constrains the area to be approximately continuous; forced candidate segmented water levels, on the other hand, allow and require the model to match the actual area jump.
[0051] At the shared candidate segment water level, the buffer water level that is closest to and lower than the shared candidate segment water level and the buffer water level that is closest to and higher than the shared candidate segment water level are selected from the global trial water level pool, respectively. The growth rate of the single-sided reference water surface area is calculated using the following formula: ;in, and These represent the reference water surface area growth rates for the left and right sides of the shared candidate segment water level, respectively. To share candidate segment water levels, and These refer to the selected low-water-side buffer water level and high-water-side buffer water level, respectively. and These are the reference water surface areas for the low-water-level buffer and the high-water-level buffer, respectively. and These are the left and right reference water surface areas for the shared candidate segment water level, respectively. The curvature conversion cost is calculated using the following formula: ;in, To normalize the degree of curvature change, The segmentation threshold, As a cost of curvature conversion, and The outputs are the one-sided curvatures of the solutions with respect to the actual water level for the high-water-level and low-water-level intervals, respectively. To preset the positive curvature scale, The preset non-negative adjustment coefficient is defined as 'min', which indicates taking the smaller value, and the absolute value sign indicates taking the absolute value of the difference. This embodiment will... Set at 4000 square meters per meter, Set to 3. When the growth rate of the reference water surface area increases, the denominator of the curvature transformation cost increases; the area transformation cost still independently constrains the area jump variable.
[0052] The edge weight from the starting node to the first interval solution node is equal to the tensor element of the first interval solution node. The edge weight of a regular directed connection edge is equal to the sum of the tensor element of the high-water-level interval solution node, 0.30 times the area transformation cost, and 0.15 times the curvature transformation cost. The edge weight from the last interval solution node to the termination node is 0. Both the area transformation weight and the curvature transformation weight are non-negative numbers and can be set according to the importance the reservoir capacity model places on area jumps or curvature smoothing.
[0053] The shortest path is found using topological dynamic programming. First, the nodes in each interval are sorted from lowest to highest termination water level. The cumulative cost of the starting node is set to 0, and the cumulative cost of the remaining nodes is set to positive infinity. Each node is visited sequentially, and cumulative cost relaxation is performed on all outgoing edges while preserving the predecessor node. Upon reaching the termination node, backtracking is performed along the predecessor node to obtain a sequence of interval solutions continuously covering the lowest elevation to the highest operating water level. This sequence simultaneously determines the target candidate interval, the target endpoint anchoring candidate equation, and the target increment level, without needing to enumerate all possible segment combinations.
[0054] Figure 4 The left side shows a slice of the candidate interval cost tensor across different candidate equation types and incremental levels, using the fixed water level interval H1084 to H1176 as an example. The values in the grid represent the comprehensive cost, and the symbol × indicates that no linear candidate interval solution was retained at the corresponding incremental level. The circular nodes on the right represent candidate interval solutions formed after feedback water levels have been established. Thick solid lines represent the current shortest path, and thin dashed lines represent unselected directed edges. Using an initial trial water level interval of 1.00 meters, the two endpoints of node G, 114.30 meters and 117.60 meters, correspond to five different water levels within the interval: 115.00 meters, 116.00 meters, and 117.00 meters, satisfying the candidate interval generation conditions. The shortest path accumulates the tensor elements, area transformation cost, and curvature transformation cost of the interval solution nodes on the high water level side. Interval solution nodes with smaller individual tensor elements do not necessarily enter the shortest path.
[0055] After obtaining the shortest path, the target dynamic incremental water level and the common evaluation water level are merged and sorted within each target candidate interval to determine the maximum adjacent water level gap. Two global verification water levels are set at the 2 / 5 and 3 / 5 positions of the maximum adjacent water level gap. When the difference between the global verification water level and the cached water level in the global trial water level pool is not greater than the preset water level tolerance, the corresponding cached record is directly read; when the cache is not hit, the water body topography triangulation reference value calculation and caching mechanism are invoked. Therefore, each target candidate interval generates two global verification results. Cache hits only reduce the number of new water body topography triangulation cuts, not the number of water levels participating in the global error calculation. The 2 / 5 and 3 / 5 positions are different from the midpoint used in the dynamic incremental process and the 1 / 3 and 2 / 3 positions used in the common evaluation process, which can reduce the probability of the global verification water level coinciding with the fitted water level or the evaluation water level.
[0056] The globally normalized storage capacity error and the globally normalized area error are calculated using the following formulas: ;in, To achieve global normalization of storage capacity error, For globally normalized area error, For global verification of water level order index, For the first A global verification water level, This is the reservoir capacity value output by the current water body model. For reference storage capacity, for The local reference reservoir capacity increment within the target candidate interval. To preset the lower limit of positive storage capacity, This represents the water surface area output by the current water body model. For reference water surface area, To preset the lower limit of the positive area, This indicates that the maximum value is taken for all global verification water levels. The area jump error of the internal target segment water levels is directly calculated using the area transformation cost.
[0057] In this embodiment, the global normalized reservoir capacity error threshold is set to 0.008, the global normalized area error threshold is set to 0.025, and the area jump error threshold is set to 0.05. Global verification is passed when all three types of errors are no greater than their corresponding thresholds. Feedback continues even when only the reservoir capacity error is satisfied but the area error exceeds the limit, because the final water model outputs both the target reservoir capacity and the target water surface area. The thresholds can be pre-adjusted based on measurement accuracy and scheduling purposes, but the global feedback rounds for the same modeling task remain unchanged.
[0058] When the global normalized reservoir capacity error or the global normalized area error exceeds the limit, the error value is divided by the corresponding threshold to obtain the excess ratio, and the global verification water level corresponding to the maximum excess ratio is added to the feedback water level set. When the area jump error of the internal target segment water level exceeds the limit, the global verification water levels with the nearest left and right sides to the internal target segment water level are added to the feedback water level set. When multiple conditions generate the same feedback water level within the preset water level tolerance range, only one feedback water level is retained in the feedback water level set. After completing the error recording of the current global feedback round, the feedback water level is marked as the dynamic incremental water level for the next global feedback round, and the global verification water level is regenerated in the next global feedback round.
[0059] For each feedback water level, the growth rate of the left and right reference water surface areas is calculated using the reference water surface areas of the nearest left buffer water level, the feedback water level, and the nearest right buffer water level, respectively. The absolute value of the difference between the two is taken as the change in the local reference water surface area growth rate. Each feedback water level is added to the candidate interval covering the feedback water level in the next round's level 0 dynamic incremental water level set. When the change in the local reference water surface area growth rate reaches the segmentation threshold, candidate segmented water levels are retrieved according to the preset water level tolerance. If a match is found, the existing fixed water level identifier is used; if a match is not found, the feedback water level is added as a candidate segmented water level and assigned a new fixed water level identifier. Then, all candidate intervals are generated, with the matched candidate segmented water level or the newly added feedback water level as an endpoint, satisfying the preset minimum water level span, the number of candidate interval water levels, and not crossing the mandatory candidate segmented water level condition. When the change in the local reference water surface area growth rate is lower than the segmentation threshold, the candidate segmented water level sequence is not changed.
[0060] After the global feedback round increases by 1, the original candidate intervals covering the feedback water level, the newly generated candidate intervals, and their associated directed edges are recalculated. The solutions for the remaining candidate intervals are mapped to the current global feedback round based on the fixed water level identifiers of their two endpoints, maintaining the original tensor elements. The model selection graph only references the interval solution nodes of the current global feedback round and does not reuse nodes from previous rounds. The fixed water level identifier does not change with the topological sorting position; therefore, inserting a new candidate segment water level will not cause the index of unaffected candidate intervals to become invalid.
[0061] In this embodiment, the upper limit of the total amount of different water levels in the global trial water level pool is set to 240, and the upper limit of the global feedback rounds is set to 8. Before registering a new trial water level, the upper limit of the total amount is checked. If the upper limit is reached, no new water body topographic triangulation cutting is performed. Feedback is terminated when any upper limit is reached or when the number of newly added trial water levels and the number of newly added candidate segment water levels in two consecutive rounds are both 0. If any of the three types of errors still exceed the limit at the time of termination, the termination status of not meeting the global error requirement is output, and the current shortest path, the water level exceeding the limit, and the error value are saved for recalculation after supplementing topographic survey data or adjusting the modeling water level range.
[0062] In the 0th global feedback round of the example data, the shortest path consists of a second-order polynomial equation from 96.00 meters to 108.40 meters, a third-order polynomial equation from 108.40 meters to 117.60 meters, and a logarithmic equation from 117.60 meters to 126.00 meters. Global validation found area error exceeding the limit at 103.40 meters and reservoir capacity error exceeding the limit at 114.30 meters; the corresponding error exceedance ratios were 1.190 and 1.760, respectively. The local reference water surface area growth rate at 103.40 meters was lower than the segmented threshold and was used as the next round of dynamic incremental water level; the local reference water surface area growth rate at 114.30 meters was higher than the segmented threshold, and while being added to the 0th-level dynamic incremental water level set of the coverage interval, a new fixed water level identifier was obtained and participated in the candidate interval generation. In the first global feedback round, the affected candidate intervals are recalculated and the updated shortest path is obtained. The maximum excess ratio of storage capacity error is 0.770, the maximum excess ratio of area error is 0.711, and the area jump variable error is not greater than the corresponding threshold.
[0063] Figure 5 The degree of error exceeding the limit is represented by the ratio of the global error to the corresponding threshold, with the horizontal line 1 representing the global pass limit. Before feedback, the area error exceeding the limit ratio reached 1.190 at 103.40 meters, and the reservoir capacity error exceeding the limit ratio reached 1.760 at 114.30 meters. The inverted triangle marks the water levels entering the feedback water level set. After completing dynamic incremental water level replenishment, candidate segment water level insertion, and updating the associated directed connection edges, both the reservoir capacity error exceeding the limit ratio and the area error exceeding the limit ratio are below 1 after feedback. The area jump variable error is only calculated within the internal target segment water level and is not plotted as a continuous curve. The forced candidate segment water level in the figure and... Figure 2 The horizontal triangular faces shown have the same elevation.
[0064] After global verification, the target candidate intervals corresponding to the shortest path are saved in ascending order of water level. Each record contains at least the starting fixed water level identifier, the ending fixed water level identifier, the starting water level, the ending water level, the candidate equation type, the shape parameter, the target increment level, the area output parameter, the curvature output parameter, the reference water surface area on one side of the endpoint, and three types of verification errors. When receiving the target water level, it is first determined whether the target water level is within the closed interval from the lowest elevation to the highest operating water level. If it is outside the closed interval, the state of the target water level being outside the model range is output. If it is within the closed interval, a binary search is used to determine the target candidate interval, and then the corresponding target endpoint anchoring candidate equation is calculated to output the target reservoir capacity value, and its first derivative with respect to the actual water level is calculated to output the target water surface area.
[0065] When the target water level is exactly equal to the lowest elevation or the water level of an internal target segment, the right-hand reference water surface area stored at the corresponding water level is output; when the target water level is exactly equal to the highest operating water level, the left-hand reference water surface area is output. The target reservoir capacity value is still output by the common endpoint value of the endpoint-anchored candidate equation. This boundary rule ensures a definite expression of the area increase when the horizontal triangular face is just covered by the water surface, while avoiding the problem that the highest operating water level does not have a right-hand limit within the model range.
[0066] After the model is completed, a derivative consistency check can be performed. For target water levels that are not candidate segment water levels but whose 0.02-meter intervals centered on the target water level are completely within the same target candidate interval, the formula is used: ;in, For the central difference area, Output the reservoir capacity of the water body model. For the target water level, The central difference half-interval is set to 0.01 meters. Anchor the area output of the candidate equation to the target endpoint. To preset the lower limit of the positive area, The relative differences in the consistency of derivatives This indicates taking the larger value. For values greater than 10 to the power of -6, check the conversion between the shape function derivative implementation and the actual water level span. This check is used to verify the software implementation and does not add fitting constraints.
[0067] In another optional implementation, the initial trial water level interval can be selected within a range of 0.5 meters to 5 meters, and the number of equally spaced initial trial water levels within the modeling water level range should be no less than 9. The preset water level tolerance is set to 0.1 to 0.5 times the standard deviation of the measured elevation, and each error threshold is set according to the accuracy requirements of flood control, sediment analysis, or ecological assessment. For water body topographic triangulation networks with more than 1 million triangular faces, an ordered index can be pre-established for the triangular faces according to the lowest and highest elevations of the vertices, so that each trial only accesses triangular faces that intersect with or are below the trial water level, and the clipping tasks of different triangular faces are assigned to multiple processing threads. The above replacement does not change the joint model selection relationship between the candidate interval cost tensor and the shortest path of the directed acyclic graph.
[0068] In each global feedback round, the program saves the candidate segment water level sequence, fixed water level identifier mapping, dynamic incremental water level set, common evaluation water level set, candidate interval cost tensor, predecessor nodes of the model selection graph, and three types of verification errors. When modeling is executed again, the same candidate interval solutions and shortest paths can be reproduced as long as the input terrain data, preset parameters, and global trial water level pool records are consistent.
Claims
1. A method for constructing a water body model based on piecewise fitting and dynamic incremental optimization, characterized in that, Includes the following steps: Obtain topographic data of the target water body, construct a water body topographic triangulation network, and calculate the reference reservoir capacity and reference water surface area corresponding to each trial water level; Candidate segmented water levels and candidate intervals with fixed water level identifiers are generated based on the changes in the reference water surface area. For each candidate interval, endpoint anchoring candidate equations are constructed and dynamic incremental fitting is performed. A candidate interval cost tensor is established according to the candidate interval endpoints, candidate equation types, incremental levels, and global feedback rounds. The candidate interval solutions are set as interval solution nodes in a directed acyclic graph. Edge weights are set according to the candidate interval cost tensor and the area transformation cost and curvature transformation cost of adjacent intervals. The shortest path from the lowest elevation to the highest operating water level is obtained to jointly determine the target candidate interval, target endpoint anchoring candidate equation, and target incremental level. Global verification is performed on the shortest path. Based on the global verification results, a feedback water level is generated and added as a dynamic incremental water level. When the local reference water surface area growth rate on both sides of the feedback water level reaches the segmentation threshold, the feedback water level is simultaneously added as a candidate segmented water level. The candidate interval cost tensor and the directed acyclic graph are updated until the global error requirement or the feedback termination condition is met. The candidate equations corresponding to the target endpoint of the shortest path are anchored and combined into a water body model, and the target reservoir capacity and target water surface area are output based on the target water level. The area conversion cost is used to characterize the deviation between the area jump variables of the signed model and the area jump variables of the signed reference. The curvature conversion cost is adjusted by the change in the growth rate of the reference water surface area on both sides of the candidate segment water level.
2. The method according to claim 1, characterized in that, Constructing a water body topographic triangulation network and calculating reference reservoir capacity and reference water surface area includes: using the maximum modeling boundary line covering the entire area to be submerged, island void lines, and topographic abrupt change lines as constraint edges, performing constrained triangulation on reservoir bottom measurement points and bank slope topographic points, and deleting triangular faces outside the maximum modeling boundary line and inside the island void lines; for any trial water level, determining submerged sub-regions within the horizontal projection of each triangular face where the linear topographic elevation of the triangular face is no higher than the trial water level, and integrating the difference between the trial water level and the linear topographic elevation of the triangular face. The sum of integral values is determined as the reference reservoir capacity value, and the sum of the horizontal projected areas of the submerged sub-regions is determined as the reference water surface area. All submerged sub-regions within the maximum modeling boundary line and outside the island hole line are included. The reference water surface area on the left and the reference water surface area on the right are saved for the horizontal triangular elevation. The trial water level of the first calculated reference value is registered in the global trial water level pool. Repeated trial water levels are merged according to the preset water level tolerance, and the trial water level, reference reservoir capacity value, reference water surface area and water body topography triangular mesh cutting results are cached.
3. The method according to claim 2, characterized in that, Generating candidate segmented water levels and candidate intervals includes: generating at least 9 equally spaced initial trial water levels; merging similar horizontal triangular elevations according to a preset water level tolerance, and determining the merged elevations whose sum of horizontal projected areas reaches a preset jump area threshold, as well as the lowest elevation and the highest operating water level, as mandatory candidate segmented water levels; supplementing trial water levels within the closed interval formed by adjacent mandatory candidate segmented water levels until the number of initial and supplementary trial water levels within the two mandatory candidate segmented water levels and the closed interval, after deduplication, is no less than 5; merging and sorting the initial trial water levels, supplementary trial water levels, and mandatory candidate segmented water levels, determining the ratio of the difference in adjacent reference water surface area to the water level difference as the reference water surface area growth rate, and determining the absolute value of the difference in the growth rates of adjacent reference water surface areas as the reference water surface area growth rate change. The degree of change is determined by the larger of the sum of the median of the change in the growth rate of the reference water surface area and 1.5 times the median absolute deviation, and the preset lower limit of the positive segmentation. The water level corresponding to the local maximum value above the segmentation threshold is determined as the ordinary candidate segmentation water level. The water level corresponding to the middle position of the continuous isopleth platform is adopted. When the water level difference between the ordinary candidate segmentation water level and the forced candidate segmentation water level is less than the preset minimum water level span, the forced candidate segmentation water level is retained. Each candidate segmentation water level is assigned a unique fixed water level identifier throughout the process. A candidate interval is generated with two fixed water level identifiers as fixed indices, two endpoints of the candidate interval, and a total of no less than five initial trial water levels, supplementary trial water levels, and feedback water levels within the closed interval of the candidate interval after deduplication. The water level span reaches the preset minimum water level span and does not cross the forced candidate segmentation water level.
4. The method according to claim 3, characterized in that, Constructing endpoint anchoring candidate equations includes: linearly mapping the actual water level within the candidate interval to a dimensionless water level ranging from 0 to 1; determining the difference between the reference reservoir capacity value at the termination endpoint and the reference reservoir capacity value at the starting endpoint as the local reference reservoir capacity increment; constructing the endpoint anchoring candidate equation by multiplying the reference reservoir capacity value at the starting endpoint and the local reference reservoir capacity increment by a normalized shape function, such that the normalized shape function is 0 at the starting endpoint and 1 at the termination endpoint; the normalized shape function includes the endpoint normalized linear shape function, exponential shape function, logarithmic shape function, and multiplicative shape function. Power-order shape functions, second-order polynomial shape functions, and third-order polynomial shape functions are used, with each shape parameter located within a preset finite interval. The lower limit of the logarithmic shape parameter interval is greater than -1, and the lower limit of the power-order shape parameter interval is greater than 0. When the local reference reservoir capacity increment is 0, a constant candidate interval solution is established. When the local reference reservoir capacity increment is greater than 0, a chain conversion is performed according to the water level span of the candidate interval. The first and second derivatives of the endpoint anchored candidate equation with respect to the dimensionless water level are converted into area output and curvature output, respectively, and parameter values with area output not less than 0 are retained.
5. The method according to claim 4, characterized in that, Perform dynamic incremental fitting, including: establishing a level 0 dynamic incremental water level set containing candidate interval endpoints, 1 / 4 quantile water levels, 1 / 2 quantile water levels, 3 / 4 quantile water levels, and previous feedback water levels; and determining the local upper limit of the number of water levels as the sum of the actual number of water levels in the set and the upper limit of the number of intermediate verification water levels in this round; performing least squares fitting with parameter range and monotonicity constraints; saving the level 0 fitting results with 0 newly added water levels; calculating the reference reservoir capacity value at the midpoint of adjacent dynamic incremental water levels; adding the midpoint with the largest normalized reservoir capacity error to the dynamic incremental water level set and refitting until all midpoints are found. If the normalized reservoir capacity error is not greater than the local error threshold or the number of newly added water levels reaches the upper limit of the number of intermediate verification water levels in this round, the incremental level is marked by the number of newly added water levels; the linear equation is subjected to the same verification and only one linear candidate interval solution marked by the actual number of newly added water levels is saved; the intermediate verification water levels generated by anchoring the candidate equations at each endpoint within the same candidate interval are summarized, and 1 / 3 quantile water levels and 2 / 3 quantile water levels are added between adjacent water levels in each final dynamic incremental water level set. After deduplication, a common evaluation water level set is formed, and the evaluation indicators of each incremental level are recalculated on the common evaluation water level set.
6. The method according to claim 5, characterized in that, A candidate interval cost tensor is established, including: using the fixed water level identifiers at the two endpoints of the candidate interval, the candidate equation type, the incremental level, and the global feedback round as index dimensions; determining the tensor elements as the weighted sum of normalized reservoir capacity error, stability error, area consistency error, and water level complexity, and the sum of non-negative piecewise complexity cost; the normalized reservoir capacity error is the ratio of the root mean square error of reservoir capacity on the common evaluation water level set to the normalized reservoir capacity scale, with the normalized reservoir capacity scale being the larger value between the local reference reservoir capacity increment and the preset positive reservoir capacity lower limit; the stability error is the fitting value of the current incremental level. The curve and the candidate equation with the same endpoint are anchored at the same endpoint. The final incremental level fitting curve is the ratio of the maximum reservoir capacity difference to the normalized reservoir capacity scale on the common evaluation water level set; the area consistency error is the root mean square of the relative area error on the endpoints of the common evaluation water level set and the candidate interval. The denominator of the relative area error is the larger value between the reference water surface area and the preset positive area lower limit. The starting endpoint uses the right reference water surface area and the ending endpoint uses the left reference water surface area; the water level complexity is the ratio of the actual number of water levels in the 0-level dynamic incremental water level set to the sum of the incremental levels relative to the local upper limit of the number.
7. The method according to claim 6, characterized in that, Constructing a directed acyclic graph and finding the shortest path includes: using only candidate interval solutions from the current global feedback round as interval solution nodes; connecting the starting node to the interval solution node with the lowest starting water level, with the edge weight being the corresponding tensor element; connecting the ending interval solution node with the highest operating water level to the ending node, with the edge weight being 0; when adjacent interval solution nodes share the same fixed water level identifier, establishing a directed connection edge from the interval solution node on the low water level side to the interval solution node on the high water level side, and determining the edge weight as the sum of the tensor element, weighted area transformation cost, and weighted curvature transformation cost corresponding to the interval solution node on the high water level side; and finding the shortest path from the starting node to the ending node according to the water level topology order.
8. The method according to claim 7, characterized in that, The area conversion cost and curvature conversion cost are determined as follows: The area jump variable of the signed model is obtained by subtracting the area output of the left side of the solution at the end of the high-water-level interval from the area output of the right side of the starting point of the high-water-level interval solution; the area jump variable of the signed reference area is obtained by subtracting the area of the left reference water surface from the area of the right reference water surface; the area conversion cost is obtained by dividing the absolute value of the difference between the two signed jump variables by the maximum value between the left and right reference water surface areas and the preset positive area lower limit; the curvature conversion cost is obtained by dividing the absolute value of the unilateral curvature difference of the adjacent interval solutions with respect to the actual water level by the product of the preset positive curvature scale and the curvature adjustment factor; the curvature adjustment factor is the sum of 1 and the product of the preset non-negative adjustment coefficient and the normalized curvature change degree; the normalized curvature change degree is the smaller value between the absolute value of the difference in the growth rate of the reference water surface areas on both sides of the candidate segment water level and the ratio of the segment threshold to 1.
9. The method according to claim 8, characterized in that, Global verification of the shortest path is performed, including: merging and sorting the target dynamic incremental water levels and common evaluation water levels within each target candidate interval; setting the 2 / 5 quantile and 3 / 5 quantile water levels as global verification water levels within the largest adjacent water level gap; dividing the absolute reservoir capacity error of each global verification water level by the corresponding normalized reservoir capacity scale and taking the maximum value to obtain the global normalized reservoir capacity error; dividing the absolute area error of each global verification water level by the larger of the corresponding reference water surface area and the preset positive area lower limit and taking the maximum value to obtain the global normalized area error; determining the area conversion cost of the internal target segment water levels as the area jump variable error; when all three types of errors are not greater than the corresponding threshold, combining the target endpoint anchoring candidate equations into a water body model; when the global normalized reservoir capacity error or the global normalized area error is greater than the corresponding threshold, adding the global verification water level corresponding to the maximum exceedance ratio to the feedback water level set; when the area jump variable error is greater than the corresponding threshold, adding the global verification water level with the closest distance to both sides of the corresponding internal target segment water level to the feedback water level set.
10. The method according to claim 9, characterized in that, The process involves updating the candidate interval cost tensor and the directed acyclic graph, including: calculating the local reference water surface area growth rate based on the newly added reference water surface area on both sides of the feedback water level; adding each feedback water level to the candidate interval covering the feedback water level in the next round's level 0 dynamic incremental water level set; when the local reference water surface area growth rate reaches the segmentation threshold, retrieving candidate segmented water levels according to the preset water level tolerance, retaining the fixed water level identifier when a match is found, and adding the feedback water level to the candidate segmented water level and assigning a new fixed water level identifier when a match is not found, generating all candidate intervals with either the found candidate segmented water level or the newly added feedback water level as endpoints and satisfying the candidate interval generation conditions; and adding a global feedback round. Only the original candidate intervals, newly generated candidate intervals, and associated directed edges covering the feedback water level are recalculated. The solutions of the remaining candidate intervals are mapped to the current global feedback round according to the fixed water level identifier, and the shortest path is recalculated. Feedback updates are terminated when the global trial water level pool reaches the preset total limit, the global feedback round reaches the preset round limit, or no trial water level or candidate segment water level is added for two consecutive rounds. If any of the three types of errors is still greater than the corresponding threshold, the termination status that does not meet the global error requirements is output. When the target water level is equal to the minimum elevation or the internal target segment water level, the right reference water surface area is output. When the target water level is equal to the maximum operating water level, the left reference water surface area is output.
