Quick spatial matching system for pumped storage power station site selection
By introducing the KD Tree spatial indexing algorithm and block parallel computing, the site selection of pumped storage power stations is made fast, automated and scientific, solving the problems of low computing efficiency and strong subjectivity in existing technologies, and realizing efficient site matching in complex terrain areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YELLOW RIVER ENG CONSULTING CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies are inefficient and subjective in the site selection of pumped storage power stations, making it difficult to perform rapid and scientific spatial matching when there are a large number of potential reservoir sites, especially in complex terrain areas.
By employing the KD Tree spatial indexing algorithm and block-parallel computing, combined with Python data processing, the entire process from terrain data to recommended reservoir site matching is automated and intelligent, including data import, river network extraction, potential reservoir baseline layout, data standardization and matching calculation, and embedding engineering constraints for rapid screening.
Achieving second-level matching and filtering on a data scale of tens of millions of records improves the automation and scientific nature of site selection, meets the needs of rapid site selection, and ensures that the matching results conform to the actual engineering situation.
Smart Images

Figure CN122388018A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water conservancy and hydropower engineering planning and geographic information technology, and is particularly applicable to a rapid spatial matching system for the site selection of pumped storage power stations. Background Technology
[0002] Site selection for pumped-storage power stations, especially the efficient and scientific matching of upper and lower reservoirs, is a key technical aspect of the power station planning stage. Currently, this field mainly relies on manual interpretation of topographic maps or semi-automated spatial analysis and hydrological calculations using general geographic information system (GIS) software. While traditional methods can achieve basic reservoir site identification, they generally suffer from low computational efficiency, strong subjectivity, and difficulty in systematically implementing complex engineering constraints (such as distance-to-height ratio) when dealing with a large number of potential reservoir sites. The fundamental reason is that existing technologies lack dedicated algorithms for rapid proximity retrieval and batch matching of massive spatial points. This makes computation a bottleneck when evaluating thousands of potential reservoir site combinations, failing to meet the needs of rapid site selection. These shortcomings are particularly pronounced when dealing with complex terrain areas, severely limiting the scale and accuracy of site selection work. Therefore, there is an urgent need for a site selection technology that can deeply integrate automatic terrain analysis, intelligent identification of potential reservoir sites, and efficient spatial matching algorithms. Summary of the Invention
[0003] The purpose of this invention is to provide a rapid spatial matching system for the site selection of pumped storage power stations, which solves the problems of strong subjectivity and low computational efficiency in the existing site selection of pumped storage power stations.
[0004] To achieve the above objectives, the rapid spatial matching method for pumped storage power station site selection described in this invention aims to automate and intelligently integrate the entire process from terrain data to recommended reservoir site matching, and includes the following steps: S1. Import the digital elevation model and remote sensing images of the area to be analyzed into the GIS platform; S2, Based on the digital elevation model, using the hydrological analysis toolset of the GIS platform, calculation parameters are set to automatically extract and generate river network vector lines that reflect the direction of the valley water system in the region; S3. Along the river network vector line, points are automatically set at fixed intervals. Each point is a potential dam site selection location, called a potential reservoir base point. The three-dimensional spatial coordinates of each potential reservoir base point are recorded. S4 uses Python data preprocessing programs to clarify and standardize the spatial coordinate data of all potential reservoir base points, and constructs a two-dimensional K-DTree spatial index data structure based on the planar coordinates of the potential reservoir base points; S5. Based on the planar distance constraint query K-Dtree, determine the initial potential reservoir base point pairs, and then screen the candidate potential reservoir base point pairs that meet the requirements of elevation difference and pumping storage distance-to-elevation ratio. S6. Among all candidate potential reservoir base point pairs, the potential reservoir base point pairs that meet the engineering constraints and logical consistency are the recommended reservoir base point combinations.
[0005] Furthermore, step S2 specifically includes: S2.1, Digital Elevation Model Preprocessing: The digital elevation model is processed to fill depressions and smooth peaks, eliminating false depressions caused by data errors or special terrain, and ensuring the continuity of the water flow path. S2.2 uses the D8 single-flow direction algorithm to calculate the water flow direction of each grid cell in the preprocessed digital elevation model; S2.3, Based on the water flow direction, calculate the upstream flow accumulation of each grid cell, which is the sum of the number of all upstream grid cells that flow into the grid; S2.4 Extract grid connections where the cumulative flow exceeds a preset cumulative flow threshold to generate continuous valley lines, i.e., river network vector lines.
[0006] Furthermore, step S5 employs block processing, dividing all potential reservoir baselines into multiple data blocks for sequential processing.
[0007] Furthermore, in step S5, for each potential reservoir base point in each data block, query the neighboring potential reservoir base points that satisfy the planar distance constraint, and combine the two to form a preliminary potential reservoir base point pair.
[0008] Furthermore, in step S5, the preliminary potential reservoir baseline pairs need to be deduplicated; according to the elevation values, the upstream and downstream reservoirs are labeled for each potential reservoir baseline in the candidate potential reservoir baseline pairs.
[0009] Furthermore, the engineering constraints and logical consistency specifically include checking whether candidate potential reservoir base point pairs are duplicated, whether the pumped storage distance-to-height ratio is satisfied, and whether the upstream and downstream markings are correct.
[0010] Furthermore, the recommended reservoir base point combination described in S6 includes the unique standard and three-dimensional coordinates of the upstream reservoir base point in each combination; the unique standard and three-dimensional coordinates of the downstream reservoir base point; and the planar distance, elevation difference, and distance-to-elevation ratio between the upstream and downstream reservoir base points.
[0011] The present invention discloses a rapid spatial matching system for site selection of pumped storage power stations, comprising a data import and preprocessing module, an automatic river network extraction module, a potential reservoir baseline layout module, a data conversion and standardization module, a spatial index construction and matching calculation module, and a result verification and output module. The data import and preprocessing module is used to load and preprocess digital elevation models and remote sensing image data in the GIS platform; The automatic river network extraction module is integrated into the GIS platform and is used to automatically execute the hydrological analysis process based on the digital elevation model to generate river network vector lines. The potential reservoir base point layout module is used to automatically lay out potential reservoir base points on the river network vector line according to preset rules and generate a spatial coordinate database of potential reservoir base points. The data conversion and standardization module, based on Python, is used to clean and standardize the potential reservoir base point spatial coordinate data generated by the GIS platform, forming a two-dimensional K-DTree spatial index data structure. The spatial index construction and matching calculation module is based on Python and is used to perform block-based and parallelized neighbor K-DTree search, filter the search results under multiple constraints, and form candidate potential reservoir base point pairs. The result verification and output module is used to verify the candidate potential reservoir base point pairs and output the final recommended reservoir base point pair data in a formatted manner.
[0012] The present invention also includes a computer-readable storage medium having a computer program stored thereon, which, when run on a processor, is used to execute the fast spatial matching method for site selection of pumped storage power stations.
[0013] The present invention also includes an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to perform the aforementioned rapid spatial matching method for site selection of pumped storage power stations.
[0014] The advantage of this invention lies in the fact that by introducing the KD Tree spatial indexing algorithm, a high-dimensional spatial fast retrieval architecture for potential database address base points is constructed. By adopting block parallel computing, it achieves second-level matching and filtering of upper and lower database combinations that meet core engineering constraints such as distance-to-height ratio and height difference under the scale of tens of millions of data points. This fundamentally solves the industry pain points of slow computation and insufficient automation in the face of massive data by traditional methods.
[0015] Meanwhile, this invention directly embeds the core engineering constraints (distance-to-height ratio, elevation difference) of pumped storage power stations into the algorithm process, making the matching results more scientific and in line with engineering practice, and improving the reliability of the site selection scheme.
[0016] Finally, the system of this invention is developed based on an open GIS platform and the Python language. It has a high degree of modularity, flexible and adjustable parameters, good applicability and scalability, and can serve the planning and site selection of pumped storage power stations in a large area and multiple regions. Attached Figure Description
[0017] Figure 1 This is a flowchart of the rapid spatial matching method for site selection of pumped storage power stations as described in this invention.
[0018] Figure 2 This is a three-dimensional visualization of the results of the method described in this invention.
[0019] Figure 3 This is a diagram of the rapid spatial matching system for site selection of pumped storage power stations as described in this invention. Detailed Implementation
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1 Taking the pre-selected area of a pumped storage power station as an example, this invention specifically illustrates a rapid spatial matching method for pumped storage power station site selection. Figure 1 As shown, it includes the following steps: Step 1: Determine the pre-selected area of the pumped storage power station and import the digital elevation model and remote sensing image of the area to be analyzed into the GIS platform.
[0022] Based on the regional energy planning blueprint, a complex mountainous area of approximately 200,000 km² was identified as the preliminary site selection area for this pumped storage power station. Digital elevation model (DEM) data for this area was acquired, with a spatial resolution of 12.5 meters and a projection coordinate system of CGCS2000. The DEM data, along with remote sensing imagery used as background reference, was imported with a single click, providing an accurate and consistent spatial data base for subsequent analysis.
[0023] Step 2: Based on the digital elevation model, use the hydrological analysis toolset of the GIS platform to set calculation parameters, automatically extract and generate river network vector lines that reflect the direction of the valley water system in the region.
[0024] The following core calculations will be executed automatically in sequence: S2.1, Digital Elevation Model Preprocessing: The digital elevation model is processed to fill depressions and smooth peaks, eliminating false depressions caused by data errors or special terrain, and ensuring the continuity of water flow path.
[0025] S2.2 employs the D8 single-flow direction algorithm to calculate the water flow direction of each grid cell in the preprocessed digital elevation model. The D8 algorithm determines the water flow direction by calculating the maximum distance weight difference between the central grid and its eight neighboring grids. The distance weight difference is defined as the ratio of the elevation difference to the distance between grids. The grid spacing is either 1 or √2 depending on the direction (orthogonal or diagonal).
[0026] S2.3, based on the direction of water flow, calculate the upstream flow accumulation of each grid cell, which is the sum of the number of all upstream grid cells that flow into the grid.
[0027] S2.4, grids with a cumulative runoff volume greater than a preset cumulative runoff volume threshold are connected and extracted to generate continuous valley lines, i.e., river network vector lines. The smaller the preset cumulative runoff volume threshold, the denser the extracted river network. Grids with a cumulative runoff volume greater than this threshold are identified as river channels and vectorized to generate a continuous "river network" vector line layer. In this embodiment, a total river network line of approximately 1680 kilometers in length was extracted. The "river network" refers to a network formed by connecting valley lines naturally formed by topographic runoff, representing the potential distribution lines of reservoir dam sites.
[0028] Step 3: After obtaining the river network vector lines, automatically set points at fixed intervals along these lines. Each point represents a potential dam site and is called a potential reservoir base point. Simultaneously, extract and record the three-dimensional spatial coordinates (X, Y, Z) of each potential reservoir base point from the DEM model. The potential reservoir base points are located on the valley line, possessing the basic topographical conditions for forming a reservoir by transverse damming of the valley.
[0029] Based on engineering experience, this embodiment selected automated point setting at 500-meter intervals, deploying a total of 800,000 potential reservoir base points to ensure that no potentially reservoir-forming terrain section is missed under the effective reservoir length requirements of conventional pumped storage reservoirs.
[0030] Step 4: Utilize Python data preprocessing programs to clarify and standardize the spatial coordinate data of all potential reservoir base points, and construct a two-dimensional K-DTree spatial index data structure based on the planar coordinates of the potential reservoir base points. Specifically, export the spatial coordinate data of all potential reservoir base points as a "potential base point.csv" file. Run a data transformation and standardization program based on the Python environment to automatically identify and unify the data. To improve computational efficiency for massive datasets, the spatial coordinate data of the potential reservoir base points is converted from the default float64 type to float32 type, reducing memory usage by 50%. Timely memory reclamation prepares for high-performance subsequent core calculations. Construct a two-dimensional K-DTree spatial index data structure based on the planar coordinates (X,Y) of the potential reservoir base points.
[0031] Step 5: Using block processing, all potential reservoir baseline points are divided into multiple data blocks. K-Dtree queries are performed sequentially based on planar distance constraints to determine preliminary potential reservoir baseline point pairs. Then, candidate potential reservoir baseline point pairs that meet the requirements for elevation difference and pumping-storage distance-to-elevation ratio are selected. Specifically: The 800,000 base points in this embodiment are processed in blocks. For each data block, an output directory and results are written to a file. For each potential reservoir base point in each data block, a proximity query operation is performed based on the constructed two-dimensional KD Tree spatial index. Specifically, the plane search radius R is dynamically estimated (i.e., R = MAX_DELTA_Z × MAX_RATIO) based on the product of the maximum elevation difference threshold (MAX_DELTA_Z) and the maximum distance-to-elevation ratio threshold (MAX_RATIO) in the pumped storage power station site selection engineering constraints. For the current potential reservoir base point i, all neighboring base points j whose plane distance is less than or equal to R are retrieved using the query_ball_point method of K-DTree, generating an initial set of potential reservoir base point pairs (i,j). This query ensures that all potential base point pairs that satisfy the distance-to-elevation ratio constraint are included in the subsequent screening process, while avoiding invalid long-distance pairings, thereby effectively reducing the size of the candidate dataset while ensuring matching integrity.
[0032] The initial set of potential reservoir benchmark pairs is deduplicated to eliminate duplicate combinations of (A,B) and (B,A). Then, potential reservoir benchmark pairs that meet the elevation difference requirement are selected, followed by a further selection of potential reservoir benchmark pairs that meet the pumping-storage distance-to-elevation ratio requirement. These potential reservoir benchmark pairs, after deduplication, elevation difference selection, and pumping-storage distance-to-elevation ratio selection, form the candidate potential reservoir benchmark set. The elevation values of the two benchmarks within each potential reservoir benchmark pair are compared to automatically determine the upstream and downstream reservoir benchmarks.
[0033] Step Six: Among all candidate potential reservoir base point pairs, those that meet the engineering constraints and logical consistency requirements are selected as recommended reservoir base point combinations. The engineering constraints and logical consistency requirements specifically include checking whether candidate potential reservoir base point pairs are duplicates, whether they meet the pumped storage distance-to-height ratio, and whether the upstream and downstream labeling is correct. Finally, the recommended reservoir base point combinations are output, including the unique standard and three-dimensional coordinates of the upstream reservoir base point in each combination; the unique standard and three-dimensional coordinates of the downstream reservoir base point; and the planar distance, elevation difference, and distance-to-height ratio between the upstream and downstream reservoir base points.
[0034] In this embodiment, the recommended reservoir baseline point combinations are reloaded into the GIS platform. It can be clearly seen that, within a 200,000 km² area, 74,528 matching schemes for upper and lower reservoirs that fully meet the preset engineering constraints were quickly selected from 800,000 potential baseline points, taking only 17.7 seconds. The 3D results are visualized as follows: Figure 2As shown, this process, from data loading to result generation, takes only seconds, while traditional manual or semi-automated methods may take weeks.
[0035] Example 2 The present invention discloses a rapid spatial matching system for pumped storage power station site selection, comprising a data import and preprocessing module, an automatic river network extraction module, a potential reservoir baseline layout module, a data conversion and standardization module, a spatial index construction and matching calculation module, and a result verification and output module.
[0036] Taking a pre-selected area for a pumped storage power station as an example, the specific process of using the rapid spatial matching system for pumped storage power station site selection described in this invention is as follows: In the graphical interface of the data import and preprocessing module, the DEM data and remote sensing imagery used as background reference can be imported into the system with a single click using the data loading function. This module automatically recognizes the data format and coordinate system and registers them uniformly in the system's preset workspace.
[0037] After the data is loaded, the hydrological analysis and river network extraction module is invoked. This module is the engine for performing topographic and hydrological analysis. Using the "DEM preprocessing" tool within the module, a "fill-in" operation is performed on the original DEM. The system automatically detects and fills in depressions in the terrain, eliminating false water accumulation areas caused by data noise or real micro-topography, ensuring that the simulated water flow can continuously exit the area. This is a crucial prerequisite for ensuring the accuracy of river network extraction. Subsequently, the "river network extraction" process is initiated. Based on the preprocessed DEM model, using the hydrological analysis toolset of the GIS platform, a runoff accumulation threshold is set. Rasteres with runoff accumulation exceeding this threshold are identified as river channels and vectorized to generate a continuous "river network" vector line layer.
[0038] Next, the key parameter "layout interval" is set to 500 meters in the potential reservoir baseline layout module. Based on this parameter, the potential reservoir baseline layout module automatically generates point elements in batches along each river network line at a fixed interval of 500 meters. Each point is a potential dam site selection location, called a potential reservoir baseline point, which has the basic topographical conditions for forming a reservoir by transverse damming of the river valley.
[0039] Then, the data transformation and standardization module cleans and standardizes the spatial coordinate data of all potential reservoir base points, and constructs a two-dimensional K-DTree spatial index data structure based on the plane coordinates (X,Y) of the potential reservoir base points.
[0040] The spatial index construction and matching calculation module, based on Python, divides the potential reservoir baseline points into several data blocks, parallelizes the process, and performs a nearest neighbor KD Tree search to filter out potential reservoir baseline point pairs that meet the planar distance constraints, forming preliminary potential reservoir baseline point pairs. Further filtering is then performed to select candidate potential reservoir baseline point pairs that meet the requirements for elevation difference and pumped storage distance-to-elevation ratio.
[0041] The results verification and output module performs engineering constraint and logical consistency checks on the candidate potential reservoir base point pairs again, and then formats and outputs the final recommended reservoir base point pair data.
Claims
1. A rapid spatial matching method for site selection of pumped storage power stations, characterized in that, Includes the following steps: S1. Import the digital elevation model and remote sensing images of the area to be analyzed into the GIS platform; S2, Based on the digital elevation model, using the hydrological analysis toolset of the GIS platform, calculation parameters are set to automatically extract and generate river network vector lines that reflect the direction of the valley water system in the region; S3. Along the river network vector line, points are automatically set at fixed intervals. Each point is a potential dam site selection location, called a potential reservoir base point. The three-dimensional spatial coordinates of each potential reservoir base point are recorded. S4 uses Python data preprocessing programs to clarify and standardize the spatial coordinate data of all potential reservoir base points, and constructs a two-dimensional K-DTree spatial index data structure based on the planar coordinates of the potential reservoir base points; S5. Based on the planar distance constraint query K-Dtree, determine the initial potential reservoir base point pairs, and then screen the candidate potential reservoir base point pairs that meet the requirements of elevation difference and pumping storage distance-to-elevation ratio. S6. Among all candidate potential reservoir base point pairs, the potential reservoir base point pairs that meet the engineering constraints and logical consistency are the recommended reservoir base point combinations.
2. The rapid spatial matching method for site selection of pumped storage power stations according to claim 1, characterized in that, Step S2 specifically includes: S2.1, Digital Elevation Model Preprocessing: The digital elevation model is processed to fill depressions and smooth peaks, eliminating false depressions caused by data errors or special terrain, and ensuring the continuity of the water flow path. S2.2 uses the D8 single-flow direction algorithm to calculate the water flow direction of each grid cell in the preprocessed digital elevation model; S2.3, Based on the water flow direction, calculate the upstream flow accumulation of each grid cell, which is the sum of the number of all upstream grid cells that flow into the grid; S2.4 Extract grid connections where the cumulative flow exceeds a preset cumulative flow threshold to generate continuous valley lines, i.e., river network vector lines.
3. The rapid spatial matching method for site selection of pumped storage power stations according to claim 1, characterized in that: In step S5, block processing is used, dividing all potential reservoir baselines into multiple data blocks for sequential processing.
4. The rapid spatial matching method for site selection of pumped storage power stations according to claim 3, characterized in that: In step S5, for each potential reservoir base point in each data block, query the neighboring potential reservoir base points that satisfy the planar distance constraint, and combine the two to form a preliminary potential reservoir base point pair.
5. The rapid spatial matching method for site selection of pumped storage power stations according to claim 1, characterized in that: In step S5, it is also necessary to deduplicate the preliminary potential reservoir baseline pairs; according to the elevation values, label the upstream and downstream reservoirs for each potential reservoir baseline in the candidate potential reservoir baseline pairs.
6. The rapid spatial matching method for site selection of pumped storage power stations according to claim 1, characterized in that: The engineering constraints and logical consistency specifically include checking whether candidate potential reservoir base point pairs are duplicated, whether the pumped storage distance-to-height ratio is satisfied, and whether the upstream and downstream labeling is correct.
7. The rapid spatial matching method for site selection of pumped storage power stations according to claim 1, characterized in that: The recommended reservoir base point combination described in S6 includes the unique standard and three-dimensional coordinates of the upstream reservoir base point in each combination; the unique standard and three-dimensional coordinates of the downstream reservoir base point; and the planar distance, elevation difference, and distance-to-elevation ratio between the upstream and downstream reservoir base points.
8. A rapid spatial matching system for site selection of pumped storage power stations, characterized in that: It includes modules for data import and preprocessing, automatic extraction of river and ditch networks, layout of potential reservoir base points, data conversion and standardization, spatial index construction and matching calculation, and result verification and output. The data import and preprocessing module is used to load and preprocess digital elevation models and remote sensing image data in the GIS platform; The automatic river network extraction module is integrated into the GIS platform and is used to automatically execute the hydrological analysis process based on the digital elevation model to generate river network vector lines. The potential reservoir base point layout module is used to automatically lay out potential reservoir base points on the river network vector line according to preset rules and generate a spatial coordinate database of potential reservoir base points. The data conversion and standardization module, based on Python, is used to clean and standardize the potential reservoir base point spatial coordinate data generated by the GIS platform, and to construct a two-dimensional K-DTree spatial index data structure. The spatial index construction and matching calculation module is based on Python and is used to perform block-based and parallelized neighbor KD Tree search, filter the search results under multiple constraints, and form candidate potential reservoir base point pairs. The result verification and output module is used to verify the candidate potential reservoir base point pairs and output the final recommended reservoir base point pair data in a formatted manner.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is run on a processor, it is used to execute the fast spatial matching method for site selection of pumped storage power stations as described in any one of claims 1-8.
10. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it is used to execute the rapid spatial matching method for site selection of pumped storage power stations as described in any one of claims 1-8.