Disclosure of Invention
Aiming at the defects in the prior art, the method for interpreting the water resource partition coding topological relation in an end-to-end connection mode greatly reduces the time consumed by repeated work during large-scale drainage basin or regional water resource evaluation work and distributed hydrologic model construction, and is beneficial to improving the consistency of regional water resource partition evaluation and distributed hydrologic model evaluation ranges.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the scheme provides a water resource partition coding topological relation interpretation method for head-to-tail connection, which comprises the following steps:
s1, analyzing an encoding expression by checking a water resource partition encoding structure, and counting the number of the water resource partitions step by step to construct a multidimensional vector matrix for hierarchical storage;
S2, interpreting the topological relation of the partition codes of the water resources at the same level, storing the partition code structure of the combined water resources in a grading manner based on a multidimensional vector matrix, and jumping out step by step in a head-to-tail connection mode of the partition of the water resources at the lowest level;
S3, serial connection of all levels of water resource partitions is performed based on a head-to-tail connection mode, topology relation interpretation codes which are sequentially increased from upstream to downstream are formed, the magnitude of the convergence accumulation number in the topology relation interpretation codes is counted through a convergence accumulation number method, codes after the topology relation is interpreted are compared, continuity and accuracy of the topology relation are determined, and interpretation of the topology relation of the water resource partition codes is completed.
The method has the advantages that the topological relation codes are interpreted in an end-to-end connection mode of the water resource partition codes, so that the range of the water resource partition evaluation unit is consistent with that of the hydrologic response unit of the distributed hydrologic model, the combination of a macroscopic regularity conclusion and a fine hydrologic simulation process is facilitated, the process of carrying out conventional hydrologic analysis again is reduced as much as possible in the end-to-end connection mode, the time consumed by repeated work is greatly reduced for large-scale watershed or area, and the efficiency of hydrologic work is obviously improved.
Further, the step S1 includes the steps of:
S101, checking a water resource partition coding structure, and analyzing expressions of upstream and downstream, main and branch flows and water resource partitions with different levels in coding;
S102, if the water resource partition codes do not have the upstream-downstream relationship or the water resource partitions of different levels are not distinguished, preprocessing the data topological relationship of the resource partition codes;
s103, counting the number of the step-by-step water resource partitions, and constructing multi-dimensional vector matrix hierarchical storage.
The coding mode is arranged according to fixed logic, the coding can be effectively split through analysis and hierarchical storage of the coding expression mode, and the storage mode of the hierarchical partition is beneficial to faster identification and reading of a computer.
Still further, the step S2 includes the steps of:
S201, using n levels to represent the lowest level in water resource partition coding, and constructing the topological relation of the lowest level water resource partition in all n-1 levels in a river basin according to the analysis of an analysis coding expression, wherein n represents the level of the water resource partition;
S202, according to the multi-dimensional vector matrix hierarchical storage, locating the most upstream and most downstream data positions in the multi-dimensional vector matrix, and defining the downstream of the sea water resource partition as 0;
S203, judging whether the n-1 level water resource partitions where the n-level outlets are positioned are outlets of the river basin or not according to the difference of the analysis coding modes
Judging whether the corresponding coding region is a dry stream or not according to the difference of the analysis coding modes;
s204, according to the judging result, combining the river channel structure of the river basin and analyzing the coded expression, importing the data position of the most upstream of the water resource partition where the n-1 level main stream is located, and importing the data position of the most upstream of the water resource partition where the level main stream is located if the level jump exists in the coding mode;
S205, based on the outlet of the nth level water resource partition, the topology relationship of the water resource partitions in the level where the water resource partitions are connected end to end in series is carried out step by step, and the downstream of the water resource partition is taken as the sea water resource partition as the ending condition, so that the interpretation of the topology relationship of the whole river basin is obtained, and the step-by-step jump-out is completed.
The method has the advantages that the topological relation can be directly decoded according to the digital change condition corresponding to the construction characteristics of the coding topological relation through the head-to-tail connection mode, the spatial positions of the water resource partitions one by one are obtained through comparison and judgment without further depending on the content such as flow direction, flow rate and the like in the conventional hydrologic analysis, the speed of the method in a large-scale area is obviously faster than that of the method in the latter, a plurality of works of the conventional hydrologic analysis are needed in the water resource coding, and the work load is obviously aggravated if the work is needed to be repeated again in the water resource partition topological relation coding, the efficiency of the hydrologic work is obviously improved, and the repeated work is reduced as much as possible.
Still further, the lowest level water resource partition gradually jumps out in a head-to-tail connection mode, and the following conditions are required to be satisfied:
The first condition is that when the regional multi-water resource partition enters the sea, the position of the water resource partition at the sea entrance is detected;
and the second condition is that whether a cross-level exists when the lowest-level water resource partition corresponding to the outlet jumps out to the n-1 level, and judging the dry running water resource partition code connected when the lower-level water resource partition jumps out by combining the river channel structure.
The method has the advantages that the advantages of block storage in the step S1 are fully considered, the topological relation of the whole water resource partition can be connected in series through the condition of the water outlet in the block data, and repeated work is reduced while omission is avoided by jumping upwards step by step from the lowest level.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
Examples
As shown in fig. 1, the invention provides a method for interpreting the topological relation of water resource partition codes in a head-to-tail connection mode, which comprises the following steps:
s1, analyzing the coding expression by checking the water resource partition coding structure, counting the number of the water resource partitions step by step, and constructing a multidimensional vector matrix for hierarchical storage, wherein the implementation method is as follows:
S101, checking a water resource partition coding structure, and analyzing expressions of upstream and downstream, main and branch flows and water resource partitions with different levels in coding;
S102, if the water resource partition codes do not have the upstream-downstream relationship or the water resource partitions of different levels are not distinguished, preprocessing the data topological relationship of the resource partition codes;
s103, counting the number of the step-by-step water resource partitions, and constructing multi-dimensional vector matrix hierarchical storage.
In this embodiment, the water resource partition coding structure is checked, and the method for distinguishing the upstream and downstream (distinguishing methods such as gradually increasing and decreasing the partition coding from upstream to downstream) and the main and sub-stream (distinguishing methods such as new characters and odd and even numbers are introduced) and the water resource partitions of different levels (distinguishing methods such as different lengths are set) in the coding expression mode is mainly analyzed.
S2, interpreting the topological relation of the partition codes of the same-level water resource, storing the partition code structure of the combined water resource in a grading manner based on a multidimensional vector matrix, and jumping out step by step in a head-to-tail connection mode of the partition of the water resource with the lowest level, wherein the implementation method is as follows:
S201, using n levels to represent the lowest level in water resource partition coding, and constructing the topological relation of the lowest level water resource partition in all n-1 levels in a river basin according to the analysis of an analysis coding expression, wherein n represents the level of the water resource partition;
S202, according to the multi-dimensional vector matrix hierarchical storage, locating the most upstream and most downstream data positions in the multi-dimensional vector matrix, and defining the downstream of the sea water resource partition as 0;
S203, judging whether the n-1 level water resource partitions where the n-level outlets are positioned are outlets of the river basin or not according to the difference of the analysis coding modes
Judging whether the corresponding coding region is a dry stream or not according to the difference of the analysis coding modes;
s204, according to the judging result, combining the river channel structure of the river basin and analyzing the coded expression, importing the data position of the most upstream of the water resource partition where the n-1 level main stream is located, and importing the data position of the most upstream of the water resource partition where the level main stream is located if the level jump exists in the coding mode;
S205, based on the outlet of the nth level water resource partition, the topology relationship of the water resource partitions in the level where the water resource partitions are connected end to end in series is carried out step by step, and the downstream of the water resource partition is taken as the sea water resource partition as the ending condition, so that the interpretation of the topology relationship of the whole river basin is obtained, and the step-by-step jump-out is completed.
The lowest-level water resource partition gradually jumps out in a head-to-tail connection mode, and the following conditions are required to be met:
The first condition is that when the regional multi-water resource partition enters the sea, the position of the water resource partition at the sea entrance is detected;
and the second condition is that whether a cross-level exists when the lowest-level water resource partition corresponding to the outlet jumps out to the n-1 level, and judging the dry running water resource partition code connected when the lower-level water resource partition jumps out by combining the river channel structure.
In the embodiment, the topological relation between the water resource partitions of the same level is interpreted according to the preprocessing in the step S1, the multidimensional vector matrix constructed based on the step S1 is combined with the water resource partition coding structure, the water resource partitions of the lowest level jump out step by step in a head-to-tail connection mode, and the head-to-tail connection mode mainly considers the following 3 aspects of (1) detecting the position of the water resource partition at the sea entrance when the water resource partition of the area enters the sea (reflecting the breakpoint condition of the water resource partition coding mainly), and (2) considering whether the water resource partition of the lowest level corresponding to the outlet has a cross level when the water resource partition of the lowest level jumps out to the n-1 level (jumping to the n-2, n-3, 1 level) and (3) distinguishing the main water resource partition connected when the water resource partition of the lower level jumps out in combination with the river channel structure of the river.
In the embodiment, n levels are adopted to represent the lowest level in water resource partition coding, 1 level is adopted to represent the highest level, the topological relation of the lowest level (n level) water resource partition in all n-1 levels in a river basin is constructed according to the analysis of a coding expression mode in S1, the most upstream and most downstream data positions in a progressive matrix are positioned based on a constructed multidimensional vector matrix, the downstream of a sea water resource partition is further defined as 0, according to the difference in coding modes such as the upstream and the downstream in step S1, the 1 level is adopted to judge whether the n-1 level water resource partition where an n-level outlet is located is the outlet of the river basin or whether the coding partition corresponds to a main stream or a tributary in the river basin or not, the expression mode of the river basin structure and the coding is further combined, the most upstream data positions of the n-1 level main stream are collected in the partitions, the condition of jumping is existed in the coding mode (n level is directly collected into n-2, the 1 level is reached), the most upstream data positions of the zones of the jumped-down stages are collected, the n level water resource partition is judged to be 0 according to the difference in coding modes in the coding modes, and finally, the n-level water resource outlet is taken as the basic data of the progressive water resource partition to be the downstream, and the topological relation is achieved, and the water resource is connected in series.
S3, serial connection of all levels of water resource partitions is performed based on a head-to-tail connection mode, topology relation interpretation codes which are sequentially increased from upstream to downstream are formed, the magnitude of the convergence accumulation number in the topology relation interpretation codes is counted through a convergence accumulation number method, codes after the topology relation is interpreted are compared, continuity and accuracy of the topology relation are determined, and interpretation of the topology relation of the water resource partition codes is completed.
In the embodiment, all levels of water resource partitions are connected in series based on the head-to-tail connection mode in the step S2 to form a topological relation interpretation code which is sequentially increased from upstream to downstream, the magnitude of the total accumulation number in the topological code is counted through a total accumulation number method in conventional hydrologic analysis, codes after the topological relation is interpreted are compared, and continuity and accuracy of the topological relation are ensured.
In this embodiment, the Europe and Polyagate river is selected as the research area, the specific range is shown in FIG. 2, and the digital elevation data is downloaded from 90 m SRTM (Shuttle Radar Topography Mission) data provided by the space agency of art designing, wherein the conventional hydrologic analysis and corresponding pretreatment processes are not repeated.
A1, according to conventional hydrologic analysis, gradually increasing from upstream to downstream, carrying out partition treatment on water resources of the agate river basin according to a main and branch flow inflow relation (mainly dividing the water resources into 5 stages, wherein an odd number is a water collecting region and an even number is a tributary in each stage), and carrying out gradual statistics according to a pretreatment process without repeated description, wherein the number of the stage-by-stage water resource partitions (for example, a first stage comprises 5 second-stage regions, a first second-stage region comprises 13 third-stage regions, a first third-stage region comprises 5 fourth-stage regions and a first fourth-stage region comprises 1 fifth-stage region) is further counted according to a coding expression mode of the water resource partitions, and a multi-dimensional vector matrix is further constructed for stage storage;
A2, the topological relation of the five-level areas in the four-level areas one by one is clear, in the example, the topological relation of the five-level areas in the four-level areas one by one adopts the same 1, 2 and..n sequence arrangement, mainly the coding of the beginning and the end of the five-level areas one by one is not clear, and the implementation method is that the beginning and the end of the five-level areas one by one are combined with the water resource partition coding structure, and the lowest-level water resource partition is jumped up step by step in a head-to-tail connection mode, and the implementation method is as follows:
Firstly, defining the downstream of a seawater resource partition (8828) into 0 based on a multidimensional vector matrix constructed by A1;
And secondly, judging the 5-level water resource partition except the water outlet to perform topology coding according to the analysis of coding modes such as upstream and downstream, dry tributaries and the like in the A1, and further judging the condition that the 5-level water outlet corresponds to the water resource partition and is converged into the upper level, namely, the partition where the upstream of the water resource partition is most upstream is converged into the 4-level or even 3-1-level water resource partition one by one.
And finally, gradually linking an outlet point with the most upstream partition point of the main stream from the most upstream of the river basin, superposing codes corresponding to upstream water outlets according to 1-n sequence codes of five-stage areas in the four-stage area after linking, further obtaining each water resource partition with upstream and downstream characteristics in the 5-stage area in series, and realizing the interpretation of the topological relation of the whole river basin by taking the downstream of the water resource partition as an ending condition of the seawater entering resource partition (the downstream matrix data is 0).
A3, after the water resource partitions of each level are connected in series based on the head-to-tail connection mode in A2, topology relation interpretation codes which are sequentially increased from upstream to downstream are formed (as shown in fig. 2 and 3), the magnitude of the total accumulation number in the topology codes is counted through a total accumulation number method in conventional hydrologic analysis, and the continuity and accuracy degree of the topology relations are further ensured (as shown in fig. 4) by comparing the codes after the topology relation interpretation with the total accumulation number in the topology codes.
According to the invention, the topological relation code is interpreted in a head-to-tail connection mode of the water resource partition code, so that the range of the water resource partition evaluation unit is consistent with that of the hydrologic response unit of the distributed hydrologic model, the combination of a macroscopic regularity conclusion and a fine hydrologic simulation process is facilitated, the process of carrying out conventional hydrologic analysis again is reduced as much as possible in the head-to-tail connection mode, the time consumed by repeated work is greatly reduced for large-scale watershed or area, and the hydrologic work efficiency is obviously improved.