Digital Twin Water Conservancy Data Base Archive Spatial Index Retrieval Method and System

CN122570622APending Publication Date: 2026-08-14WATER RESOURCES INFORMATION NETWORK CENT OF HAIHE WATER RESOURCES COMMISSION MINISTRY OF WATER RESOURCES
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0007]针对现有技术中数字孪生水利档案管理领域存在的因水利档案多档案对单水利对象强聚簇特性导致以档案为索引主体的层次化空间索引最小外接矩形几何前提失效从而引发的流域级档案空间检索性能退化的核心瓶颈,本发明提供数字孪生水利数据底板档案空间索引检索方法及其系统,通过将层次化空间索引的索引主体从档案对象转换为水利对象并辅以双层级联门控筛选机制,在不增加底层数据结构复杂度的前提下,从空间索引几何前提层面恢复对数级查询复杂度,实现流域级海量水利档案的时空联合高效检索与可视化查档

Benefits of technology

[0016] First, the unique step S2 of this invention transforms the index subject of the hierarchical spatial index tree of water conservancy objects from archive objects to water conservancy objects, and the leaf nodes are reverse-attached to the archive number list. The mechanism is that the spatial attributes of water conservancy archives are passively inherited from the non-intrinsic attributes of their associated water conservancy objects. When constructing an R-tree by archives in the traditional way, multiple archives of the same water conservancy object are clustered at the same coordinate, causing the minimum bounding rectangle to degenerate into a point rectangle with an area close to zero, thereby destroying the geometric premise of quasi-uniform spatial distribution of R-tree leaf nodes. After the index subject is replaced, the geometric premise of the minimum bounding rectangle is restored by calculating according to the actual spatial range. Compared with the scheme that uses vector elements as the index subject, it solves the MBR degradation problem caused by archive clustering from the root.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570622A_ABST
    Figure CN122570622A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer digital data processing technology, specifically to a method and system for spatial index retrieval of digital twin water conservancy data base archives. The method includes: constructing archive metadata cards and storing them in an archive metadata database; constructing a hierarchical spatial index tree for water conservancy objects based on their geographic coordinates, with leaf nodes linked to a list of archive numbers; receiving spatiotemporal joint query requests, first spatially filtering to obtain a set of candidate water conservancy objects, then temporally filtering to output a set of candidate archives; rendering the data onto the digital twin water conservancy data base using MapboxGL in a layer overlay manner and triggering a jump to the archive management platform; and statistically analyzing the access frequency of spatial element click events and feeding it back to the index reconstruction. This invention transforms the index subject from archive objects to water conservancy objects, restoring logarithmic query complexity from the geometric premise of spatial indexing, and achieving efficient spatiotemporal retrieval of watershed-level archives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer digital data processing technology, specifically to a method and system for spatial index retrieval of digital twin water conservancy data base archives. Background Technology

[0002] Digital twin water conservancy is a crucial support for high-quality development of water conservancy in the new stage. Its core is to construct a digital twin water conservancy data platform using physical water conservancy entities as units, spatiotemporal data as a foundation, mathematical models as the core, and water conservancy knowledge as the driving force. This platform digitally maps all elements of water conservancy objects, such as rivers, lakes, dikes, sluice gates, and irrigation networks. During the construction and operation management of the digital twin water conservancy data platform, water conservancy archives, as objective records of the entire lifecycle management activities of water conservancy objects, continuously accumulate. A single reservoir, from project initiation and surveying to construction, operation and maintenance, and emergency reinforcement, often involves hundreds to thousands of archives from different business scenarios and periods. The number of archives associated with a river basin's main stream, from planning maps, topographic surveys, and hydrological observations to flood control plans and scheduling records, is even greater. How to link and organize these massive amounts of water conservancy archives with the geospatial data of the digital twin water conservancy data platform, and provide river basin managers with map-based visual archive retrieval capabilities, has become a key technical issue supporting the modernization of river basin comprehensive governance decision-making and water conservancy archive management.

[0003] Chinese patent application CN118735437A discloses a method and system for rapidly constructing a smart water conservancy digital twin model applied to reservoirs. This method employs the establishment of a water conservancy knowledge graph and its segmentation based on hierarchical relationships of management units, geographic space, and river networks to reduce the search space. Combined with rule-based analysis of knowledge retrieval algorithms, it serves for real-time querying and decision support of flood control and drought relief knowledge. However, the retrieval carrier of this scheme is the knowledge graph (semantic layer), whose knowledge nodes encapsulate the attributes and relationships of water conservancy objects. It does not address the spatial indexing and organization of archives—physical resources with complete storage paths and version attributes. When watershed archives are accumulated in a strong clustering manner for a single water conservancy object across multiple archives, the knowledge graph cannot support spatial selection retrieval at the archive level, such as rectangular selection, polygonal selection, and buffer range. Furthermore, it cannot support the visual archiving requirements of interfacing the spatial retrieval results of archives with the digital twin water conservancy data base in a layered overlay manner.

[0004] Chinese invention patent CN101719154B discloses a method and system for establishing a spatial index based on a raster structure. This method addresses the problems of multiple query paths, overlapping node directory rectangles, and decreased search performance in R-trees by proposing a raster indexing mechanism based on the AGG rendering engine. It rasterizes vector features and parses them into feature index IDs using RGB color components, achieving a raster spatial index corresponding to two elements. However, this scheme uses vector features as the main indexing unit, and the performance problems of the R-tree discussed stem from the overlap of the MBRs of the vector features themselves. It fails to identify the core contradiction in the context of water conservancy archives. Archives themselves do not have independent spatial attributes but passively inherit them from their associated water conservancy objects. Multiple archives clustering at the same water conservancy object coordinates cause the minimum bounding rectangle of the leaf nodes of the R-tree with archives as the main indexing unit to degenerate into point-like overlapping clusters with an area close to zero. This geometric premise failure reduces the branch pruning capability of the R-tree parent node to zero and degrades the query complexity from logarithmic to linear. Existing R-tree variants such as R* trees and STR batch loading cannot fundamentally solve this problem.

[0005] Chinese patent application CN116308861A discloses a method for digital management of irrigation districts based on a digital twin platform. This method annotates the geographical location data, management station data, water source project data, irrigation and drainage project data, and landscape environment data of the irrigation district on a 3D real-world map, and inputs real-time channel monitoring data and irrigation district water schedules into water demand and scheduling models for simulation. However, the core of this solution is geographical location annotation and scheduling simulation; it does not establish metadata encapsulation, spatial indexing, or spatiotemporal joint retrieval mechanisms for archives, thus failing to support efficient spatial retrieval and visual document lookup of massive historical archives at the watershed level.

[0006] As can be seen from the above existing technologies, the core bottleneck in the field of digital twin water conservancy archive management lies in the following: water conservancy archives have a strong clustering characteristic of multiple archives to a single water conservancy object. If a hierarchical spatial index is directly constructed according to the archives, the minimum bounding rectangle of the index leaf node will degenerate into a point rectangle with an area close to zero due to the infinite number of archives at the same coordinate. This undermines the geometric premise of the quasi-uniform spatial distribution of R-leaf tree nodes, reduces the branch pruning capability of the parent node to zero, and degrades the spatial retrieval complexity of watershed-level archives from logarithmic to linear. Existing technologies, whether it is knowledge graph hierarchical segmentation, raster spatial index optimization, or 3D real-scene map annotation, have not addressed this problem of the failure of the geometric premise of spatial indexing from the semantic layer of the index subject. Summary of the Invention

[0007] To address the core bottleneck in existing technologies for digital twin water conservancy archive management—namely, the failure of the minimum bounding rectangle geometric premise of the hierarchical spatial index based on archives—causing degradation in basin-level archive spatial retrieval performance due to the strong clustering of multiple archives to a single water conservancy object, this invention provides a spatial index retrieval method and system for digital twin water conservancy data base archives. By converting the index subject of the hierarchical spatial index from archive objects to water conservancy objects and supplementing it with a two-layer cascaded gating filtering mechanism, logarithmic query complexity is restored from the geometric premise level of the spatial index without increasing the complexity of the underlying data structure. This enables efficient spatiotemporal joint retrieval and visualized archiving of massive basin-level water conservancy archives.

[0008] The technical solution of this invention is: a spatial index retrieval method for digital twin water conservancy data base archives, comprising the following steps:

[0009] S1. Construct an archive metadata card for each archive to be managed. The archive metadata card encapsulates the archive number, archive storage path, archive metadata summary, archive associated water conservancy object number and archive timestamp. Store the archive metadata card in the archive metadata database. The archive associated water conservancy object number points to the water conservancy object with geographical coordinates in the digital twin water conservancy data base.

[0010] S2. Based on the geographic coordinates of the water conservancy objects, a hierarchical spatial index tree for the water conservancy objects is constructed. The leaf nodes of the hierarchical spatial index tree store the water conservancy object number and its minimum bounding rectangle. The leaf nodes are linked to a list of archive numbers, which are derived from the archive metadata database.

[0011] S3, Receive a spatiotemporal joint query request. The spatiotemporal joint query request includes a spatial query mode and a time interval. The spatial query mode includes at least one of rectangular selection, polygon selection, and buffer range. First, use the hierarchical spatial index tree of water conservancy objects to perform spatial filtering according to the spatial query mode to obtain a set of candidate water conservancy objects. Then, use the archive metadata database to perform time filtering on the archives attached to the set of candidate water conservancy objects according to the matching relationship between the archive timestamp and the time interval, and output a set of candidate archives.

[0012] S4. Based on MapboxGL, the candidate archive set is rendered onto the digital twin water conservancy data base in a layer overlay manner to form an archive overlay layer according to the associated water conservancy objects. The archive metadata summary is displayed on the archive overlay layer, and the spatial element click event is captured to trigger a jump to the archive management platform to retrieve the original archive pointed to by the archive storage path.

[0013] S5, count the access frequency of the click events of the spatial elements to form the access popularity of water conservancy objects, and feed the access popularity of water conservancy objects back to step S2 as the node weight parameter for the reconstruction of the hierarchical spatial index tree of water conservancy objects, so that water conservancy objects with high access popularity float to the shallow layer of the hierarchical spatial index tree of water conservancy objects.

[0014] This invention also provides a digital twin water conservancy data base archival spatial index retrieval system, including an archival metadata registration module, a water conservancy object spatial index module, a spatiotemporal joint query module, a visualization overlay rendering module, and an interactive feedback optimization module. The archival metadata registration module is used to construct an archival metadata card for each archival document to be managed and store it in the archival metadata database; the water conservancy object spatial index module is used to construct a hierarchical spatial index tree for water conservancy objects based on their geographic coordinates, with the leaf nodes of the hierarchical spatial index tree being linked in reverse to a list of archival numbers; the spatiotemporal joint query module is used to receive spatiotemporal joint query requests and perform a two-level cascaded gating filter of spatial and temporal filtering; the visualization overlay rendering module is used to render the candidate archival set onto the digital twin water conservancy data base using MapboxGL in a layer overlay manner and trigger a jump to the archival management platform; the interactive feedback optimization module is used to feed back the access popularity of water conservancy objects to the water conservancy object spatial index module as a node weight parameter.

[0015] The beneficial effects of this invention are as follows:

[0016] First, the unique step S2 of this invention transforms the index subject of the hierarchical spatial index tree of water conservancy objects from archive objects to water conservancy objects, and the leaf nodes are reverse-attached to the archive number list. The mechanism is that the spatial attributes of water conservancy archives are passively inherited from the non-intrinsic attributes of their associated water conservancy objects. When constructing an R-tree by archives in the traditional way, multiple archives of the same water conservancy object are clustered at the same coordinate, causing the minimum bounding rectangle to degenerate into a point rectangle with an area close to zero, thereby destroying the geometric premise of quasi-uniform spatial distribution of R-tree leaf nodes. After the index subject is replaced, the geometric premise of the minimum bounding rectangle is restored by calculating according to the actual spatial range. Compared with the scheme that uses vector elements as the index subject, it solves the MBR degradation problem caused by archive clustering from the root.

[0017] Second, the unique step S3 of this invention adopts a two-layer cascaded gating screening of spatial filtering of hierarchical spatial index tree of water conservancy objects and time filtering of archive metadata database. Its mechanism is to distribute the query cost of spatial dimension and time dimension to two independent data structures. Spatial filtering uses logarithmic tree traversal of R tree to quickly reduce the candidate water conservancy object set, and time filtering performs linear timestamp matching on small-scale candidate sets to avoid the Cartesian product cost of single database scanning.

[0018] Third, the unique step S4 of this invention renders the candidate archive set onto the digital twin water conservancy data baseboard using MapboxGL in a layer overlay manner to form an archive overlay layer and supports spatial element click events to trigger jumps to the archive management platform. The mechanism is that the MapboxGL vector tile rendering pipeline naturally supports layer overlay and click event capture. This invention connects archives, a business resource independent of map services, to the water conservancy data baseboard in the form of a layer, enabling watershed managers to complete the complete actions of perceiving the spatial distribution of archives and retrieving original archives in a unified map view. Compared with the solution of only performing geographical location marking, it realizes a leap from geographical marking to the ability of spatial retrieval of archives.

[0019] Fourth, the unique step S5 of this invention statistically analyzes spatial element click events to form the access popularity of water conservancy objects and feeds it back to step S2 as a node weight parameter. This causes high-popularity water conservancy objects to float to the shallow layer of the index, shortening the high-frequency query path and forming an index-feedback closed loop with step S2. The above four innovations synergistically present a non-linear effect of 1+1>2. Step S2 provides a basis for scale-differentiated spatial filtering for step S3, step S3 provides a millisecond-level candidate archive set for step S4, step S4 provides a natural signal source for step S5, and step S5 reversely optimizes the index structure of step S2. The five steps constitute a deeply coupled synergistic structure, which significantly reduces the query response time of this invention in the scenario of massive archives at the watershed level. Attached Figure Description

[0020] Figure 1 This is a flowchart of the spatial index retrieval method for digital twin water conservancy data base archives according to the present invention.

[0021] Figure 2 This is an architecture diagram of the digital twin water conservancy data base archive spatial index retrieval system of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] Example 1: Spatial Index Retrieval Method for Digital Twin Water Conservancy Data Base Archives.

[0024] This embodiment uses the archive management scenario of a water conservancy management agency in a river basin as its application background. This river basin contains approximately 8,500 large-scale water conservancy objects, including approximately 6,200 point-like water conservancy objects (water level stations, rain gauge stations, sluice gates, pumping stations, etc.), approximately 1,700 linear water conservancy objects (dikes, rivers, canals, etc.), and approximately 600 area-like water conservancy objects (reservoirs, flood storage areas, irrigation areas, etc.). A total of approximately 650,000 historical archives have been archived, covering various business types such as construction period survey archives, operation period monitoring archives, flood control and disaster relief archives, planning and decision-making archives, and emergency response archives. The implementation process of this embodiment refers to... Figure 1 The process is shown in the diagram.

[0025] Step S1: Archive Metadata Card Encapsulation and Archive Metadata Database Construction. When archives are uploaded or archived to the archive management platform, an archive metadata card is constructed for each archive to be managed. The archive metadata card is a structured data object that encapsulates all the retrieval attributes required for the spatial retrieval stage and the physical storage location of the original archive. Specifically, the archive metadata card encapsulates at least the following five key fields: archive number, archive storage path, archive metadata summary, archive-associated water conservancy object number, and archive timestamp.

[0026] The file number uses a globally unique identifier encoding. In this embodiment, a UUIDv4-like format is used, consisting of 32 hexadecimal characters and 4 hyphens, for example, 7c4f2a1e-9b03-4d8a-bf21-3e5d9c8a7b04. The file number is globally unique within the file management platform, serving as the primary key of the file metadata card and the reference key for the reverse attachment of the leaf nodes in the hierarchical spatial index of water conservancy objects.

[0027] The archive storage path uses the Uniform Resource Locator (URL) format, pointing to the physical location of the original archive in the archive management platform's object storage, such as https: / / archive.example.org / oss / 2024 / 05 / flood-202405-XJ001.pdf. This field is consumed when the archive management platform redirects in step S4, and is used to locate the original archive for user access.

[0028] The archive metadata summary is a concise descriptive text of the archive, limited to 200 Chinese characters in length. It includes core information such as the archive title, a brief description of the archive type, and key time points. In this embodiment, a typical example of the archive metadata summary is the emergency response record for flooding in the upper reaches of a river basin in May 2024, including information such as water level monitoring, gate scheduling, and allocation of emergency supplies. This field is displayed as an information window on the archive overlay layer in step S4, allowing users to preview the core information of the archive without leaving the map view.

[0029] The associated water conservancy object number is a key field for spatial retrieval of archives in this invention. Its value points to the global number of a water conservancy object with geographic coordinates in the digital twin water conservancy data base. In this embodiment, the water conservancy object number adopts a hierarchical coding rule: the first segment is the basin code (2 digits), the second segment is the water conservancy object type code (3 digits), and the third segment is the object sequence number (6 digits), for a total of 11 digits. For example, 01-RES-000128 represents the 128th reservoir in basin 01 (RES is the Reservoir code). When each archive is filed, the archive management personnel associate it with one or more water conservancy object numbers according to the archive content. In multi-association scenarios, this field in the archive metadata card is an array of water conservancy object numbers.

[0030] The archive timestamp records key time points of the archive (such as archive creation time, archive archiving time, or the time of the event described in the archive) using the ISO8601 extended format, accurate to the second, for example, 2024-05-18T14:32:00+08:00. This field is consumed in the time filtering stage of step S3.

[0031] The completed archival metadata cards are batch-written into the archival metadata database. In this embodiment, the archival metadata database is implemented using a PostgreSQL relational database. The data table structure corresponding to the archival metadata cards includes the five core fields mentioned above, as well as several auxiliary fields (such as archiving operator, last modification time, and audit fields such as whether it has been deleted). The archival metadata database is separated from the archival original storage. The archival originals are stored in an object storage system, and the archival metadata database only stores lightweight metadata pointing to the originals. This separation structure allows the archival metadata database to remain compact, facilitates indexing, and supports high-concurrency queries, while the archival original storage can be independently expanded.

[0032] One method for establishing the association between archives and water conservancy object numbers is through explicit maintenance of an archive-water conservancy object reverse association table. This archive-water conservancy object reverse association table is a mapping structure with the water conservancy object number as the primary key and the set of associated archive numbers as the value. Each record contains a water conservancy object number and the set of archive numbers associated with that water conservancy object number; multiple archive numbers can be associated with the same water conservancy object number. Mathematically, the archive-water conservancy object reverse association table... Defined as:

[0033] ,

[0034] in: The archive-water conservancy object reverse link table is a collection of water conservancy objects. A collection of mapping records from each water conservancy object to its attached archive set, of type mapping collection, with a number of elements. Unitless, consisting of a set of water conservancy objects. With archives pass The functions are jointly determined, and their purpose is to provide a source of the file number list for the leaf nodes of the hierarchical spatial index of water conservancy objects; For the first A water conservancy object, of type discrete object, with a value range of [value range missing]. It has no unit; its geographical coordinates are provided by the digital twin water conservancy data base, and its function is to serve as the main index. A set of water conservancy objects, of type discrete set, with a size of The value ranges from several thousand to hundreds of thousands (in this example). (This is a unitless index, maintained by a digital twin water conservancy data base, and its function is to define the main set of indexes;) For water conservancy objects The attached file set is of type discrete set, and the number of elements can range from [value missing]. (Typical values ​​range from tens to hundreds), unitless, derived from all application The selection criteria are used to establish a one-to-many connection between water conservancy objects and archives; For the first Each file is of type discrete object, with a value range of... (This embodiment) (This section appears to be a list of elements, not a coherent sentence or paragraph. It is a collection of elements, not a coherent sentence or paragraph.) It is a collection of archives, of type discrete set, with a size of The value ranges from hundreds of thousands to tens of millions, with no unit, and its function is to define the entire set of indexed resources. This is a function that retrieves the value from the archive to its associated water conservancy object number. It is a function mapping, with the domain being the archive object and the range being the water conservancy object number. It has no unit and is directly given by the archive-associated water conservancy object number field in the archive metadata card. Its purpose is to establish the archive's affiliation to the water conservancy object. This is a function that retrieves values ​​from a water conservancy object to its number. It is a function mapping, with the domain being the water conservancy object and the range being the string number. It has no unit and is provided by the digital twin water conservancy data base. Its purpose is to provide a unique identifier for the water conservancy object.

[0035] Step S2: Construction of a hierarchical spatial index tree for water conservancy objects. After the archive metadata cards are batch-entered into the database, a hierarchical spatial index tree for water conservancy objects is constructed based on the geographic coordinates of the water conservancy objects. In this embodiment, the hierarchical spatial index tree for water conservancy objects adopts the spatial index structure of the R-tree family. The leaf nodes of the hierarchical spatial index tree for water conservancy objects store the water conservancy object number and its minimum bounding rectangle. The leaf nodes are inversely linked to the archive number list, which is derived from the archive metadata database.

[0036] Specifically, in this embodiment, the leaf nodes of the hierarchical spatial index tree for hydraulic objects do not store any file spatial coordinates, but only the hydraulic object number, the minimum bounding rectangle, and a list of reverse-attached file numbers. The mathematical form of this key design is described as follows: The structure of each leaf node is as follows:

[0037] ,

[0038] in: For the hierarchical spatial index tree of water conservancy objects Each leaf node is of type composite data object, and its value range is... Unitless, generated by this formula, its function is to carry spatial index information of water conservancy objects; For water conservancy objects The smallest bounding rectangle of type quadruple. The rectangular geometric object represents a range of values ​​in latitude and longitude. , The unit is degrees, which is determined by the intrinsic spatial range of the water conservancy object (circular envelope of point objects, axial expansion of line objects, and polygonal circumference of area objects). Its function is to support the geometric pruning in the R-tree spatial screening stage. For the collection of archives The reference stores only a list of file numbers, not the complete file data. It is a string array with an array of elements equal to [number of elements]. No unit is specified; the data is linked to the water conservancy object in reverse order. Search corresponding The file number of each file is then used to establish a reverse connection channel from the spatial index to the file metadata database; the definitions of other symbols are the same as those in the aforementioned formula.

[0039] It is particularly important to emphasize that the non-degeneracy of this step stems from the semantic layer transformation of the index body. If the R-tree is constructed directly based on the file objects (i.e., each file is treated as a leaf node object in the R-tree), multiple files associated with the same water conservancy object will cluster in the same spatial coordinates. The minimum bounding rectangle area of ​​the leaf node will approach zero, and the minimum bounding rectangle of the parent node will also lose its pruning ability due to the high overlap of the factor nodes. The query complexity of the R-tree will drop from the theoretical logarithmic level. Degenerate into linear level This step converts the index subject from an archive object to a water conservancy object, and the number of leaf nodes increases from... (Archived level, this embodiment is approximately) ) down to (At the level of water conservancy objects, this embodiment is approximately...) The minimum bounding rectangle of the leaf nodes is calculated according to the intrinsic spatial range of the hydraulic object, preserving the non-degenerate geometry. The quasi-uniform geometric premise of the spatial distribution of leaf nodes in R is restored, and the query complexity is restored to logarithmic order. .

[0040] Furthermore, water conservancy objects are categorized into point-like, linear, and area-like water conservancy objects based on their geometric form. Point-like water conservancy objects include water level stations, rain gauge stations, and sluice gates, which are spatially represented as single-point coordinates. The spatial envelope rule applies a circular envelope with a preset radius (100m in this embodiment) to the point-like water conservancy objects, and the minimum bounding rectangle is a square rectangle centered at the point with a side length equal to twice the preset radius. Linear water conservancy objects include dikes, rivers, and canals, which are spatially represented as a set of line segments or broken line segments. The spatial envelope rule applies a buffer along the axis to the linear water conservancy objects (50m in this embodiment), and the minimum bounding rectangle is the bounding box of the buffered linear element. Area-like water conservancy objects include reservoirs, flood storage and detention areas, and irrigation areas, which are spatially represented as closed polygons. The spatial envelope rule applies a closed polygon bounding rule to the area-like water conservancy objects, and the minimum bounding rectangle is the bounding box of the minimum and maximum values ​​of the coordinates of all vertices of the polygon. The hierarchical spatial index tree for water conservancy objects constructs morphological sub-index trees based on the geometric shape of the water conservancy objects. The three geometric shapes each construct independent R-tree sub-indexes. During the spatial filtering stage, the three sub-indexes are queried in parallel and the candidate results are merged to avoid interference between the MBR morphological differences between different shapes (the outer rectangle of point-like squares and rectangles and the outer rectangle of irregular polygons in surface-like shapes).

[0041] Furthermore, the hierarchical spatial index tree for water conservancy objects is constructed using an adaptive spatial sparsity structure. The spatial distribution of water conservancy objects in a watershed typically exhibits significant unevenness. In upstream reservoir-dense areas, the density of water conservancy objects can reach tens per square kilometer, while in downstream plains and river channels, the density may be less than one per square kilometer. R-trees with fixed fan-out parameters show significant variance in query performance between these two regions. This embodiment introduces an adaptive spatial sparsity fan-out mechanism. First, the spatial sparsity is obtained by statistically analyzing the number of water conservancy objects per unit area using a preset grid. Then, different fan-out parameters are selected based on the spatial sparsity to construct R-tree nodes.

[0042] The formula for calculating spatial sparsity is:

[0043] ,

[0044] in: Preset grid Spatial sparsity within, type scalar, value range The unit is km. 2 The formula is used to calculate and quantitatively characterize the spatial density of water conservancy objects within the grid. The set of spatially distributed water conservancy objects is a discrete set with a size of [missing information]. Unitless, provided by the digital twin water conservancy data base, its function is to provide source data for sparsity calculation; Spatial distribution set of water conservancy objects With grid The number of geometrically intersecting hydraulic objects, is a scalar with a range of non-negative integers and no unit. It is obtained from spatial intersection queries and its function is to provide a count of hydraulic objects within the grid. For grid The area, of type scalar, with a range of values. The unit is km², calculated from the grid geometry (in this embodiment, a square grid with a side length of 1 km is used). The function of this is to normalize the number of objects per unit area; This is a preset grid cell, typed as a geometric object (rectangular polygon), unitless, determined by the spatial partitioning rules of spatial sparsity statistics, serving as a discretized spatial carrier for sparsity calculation. (Left side) The unit is km. 2 right side The unit is individuals. The unit is km², therefore the overall unit on the right is km. 2 , consistent with the left side.

[0045] The fan-out selection function is:

[0046] ,

[0047] in: The fan-out parameter of the R-tree is selected based on spatial sparsity; it is a scalar and its value set is... Unitless, determined by this piecewise function, its function is to control the maximum number of child nodes of an R-tree node; The first fan-out parameter (dense region) is a scalar with a value of 16. It has no unit and is determined by empirical values. Its function is to make a single node in the dense region accommodate more minimum bounding rectangles to reduce the tree height. This is a medium fan-out parameter, a scalar type, with a value of 12, no unit, determined empirically, and its function is to provide a balanced selection for medium-density regions. The second fan-out parameter (sparse region) is a scalar with a value of 8. It is unitless and determined empirically. Its function is to minimize the minimum bounding rectangle overlap rate of the R-tree nodes in the sparse region. The preset density threshold is a scalar with a value of 50 km. 2 The unit is km. 2It is determined by the 95th percentile empirical value of the watershed water conservancy object density statistics, and its function is to determine whether the area has entered the dense mode. The preset sparsity threshold is a scalar with a value of 5 km. 2 The unit is km. 2 The threshold is determined by the 5th percentile empirical value of the watershed water conservancy object density statistics, and its function is to determine whether the region has entered a sparse pattern. The threshold value is based on the fact that the 95th percentile of the watershed water conservancy object density statistics is approximately 50 km². 2 (Dense area), the 5th percentile is approximately 5 km. 2 (Sparse region); and Excessive differences in the minimum bounding rectangles of dense regions can lead to increased overlap, while excessively small differences can cause uncontrolled R-tree heights in sparse regions. The value combinations used in this embodiment... , , Validation on multiple sets of real-world watershed data shows that query performance variance can be reduced to less than 30% of that of a single fan-out scheme.

[0048] The hierarchical spatial index tree for water conservancy objects is constructed using a variant of the STR batch loading algorithm. First, the water conservancy objects are divided into grids according to spatial sparsity. Then, within each grid, the data is loaded according to... The fan-out parameters are selected to construct subtrees, and finally the subtrees are merged into a complete hierarchical spatial index tree for hydraulic objects. The entire construction process is executed offline once after the batch import of the archive metadata database is completed. The constructed hierarchical spatial index tree for hydraulic objects is persistently stored in a memory-mapped file for querying in subsequent step S3.

[0049] Step S3: Execution of Spatiotemporal Joint Query. After the hierarchical spatial index tree of the water conservancy objects is constructed, the system receives a spatiotemporal joint query request from the front end. This spatiotemporal joint query request is a composite query initiated by the user through the MapboxGL front end, including spatial query modes and time intervals. The spatial query modes include at least one of rectangular selection, polygon selection, and buffer range, corresponding to three interaction methods: the user dragging a rectangle on the map, drawing an arbitrary polygon, or selecting a water conservancy object and setting a buffer radius, respectively. The time interval is the start and end time set by the user on the timeline control, for example, May 1, 2024 to June 30, 2024.

[0050] The core of this step is to first use the hierarchical spatial index tree of the water conservancy objects to perform spatial filtering according to the spatial query pattern to obtain a set of candidate water conservancy objects. Then, using the archive metadata database, the archives associated with the candidate water conservancy object sets are subjected to temporal filtering according to the matching relationship between the archive timestamps and the time intervals, and the candidate archive set is output. This two-level cascaded gating filtering mechanism of spatial filtering and temporal filtering has significant performance advantages over the traditional scheme of pushing down the joint spatial-temporal determination to the archive metadata database for a single-database Cartesian product scan.

[0051] To quantitatively compare the query costs of the two schemes, this embodiment establishes a query cost model. The cost of scanning a single-layer archival metadata database is:

[0052] ,

[0053] in: This represents the scan query time for a single-layer archival metadata database, with a scalar type and a value range of... The unit is ms (milliseconds), which is calculated by this formula and is used to characterize the total time consumption of the traditional single-library scanning scheme. The time constant for single-file spatial-temporal joint decision is a scalar with a value of approximately 0.05 ms / file. The unit is ms / file. It is obtained by actual measurement and calibration of the actual I / O performance of the file metadata database and the overhead of the spatial-temporal joint decision operator. Its function is to convert the number of files into the time dimension. The total number of files, of type scalar, and in the range of positive integers (in this embodiment) (Unitless, obtained from archival metadata database, its function is to define the size of the scanned archives. Left side) The unit is milliseconds (ms), on the right. The unit is ms / file. The unit is archive (dimensionless counting), so the unit on the right is ms, consistent with the left.

[0054] The cost of the dual-layer cascaded gating screening in this invention is:

[0055] ,

[0056] in: The total query time for a two-level cascaded gating filter is a scalar value with a range of values. The unit is ms, which is calculated by this formula and is used to characterize the total time consumed by the solution of this invention. For water conservancy objects, a hierarchical spatial index tree is used for spatial filtering based on time, with the type being scalar and the value range being... The unit is milliseconds (ms). The calculation shows that this time is used to characterize the time consumed in the spatial selection stage. This is a time filter for the archive metadata database, with a scalar type and a value range of... The unit is milliseconds (ms). The calculation shows that this time is used to characterize the duration of the time filtering stage. This is the R-tree node access time constant, a scalar with a value of approximately 0.5ms. It is obtained through actual measurement and calibration of R-tree memory access performance and node comparison operator overhead. Its function is to convert the R-tree depth into a time dimension. This is a time constant for comparing archive timestamps. It is a scalar with a value of approximately 0.02 ms / archive. The unit is ms / archive. It is obtained from the actual test of the access performance of the timestamp index in the archive metadata database. Its function is to convert the number of archives into a time dimension. The fan-out parameter for the R-tree is a scalar and its value range is [range missing]. (depending on step S2 by) The actual fan-out is determined by the function (it has no unit and its function is to control the logarithmic base of the R-tree depth); The total number of water conservancy objects, of type scalar, and with a value range of positive integers (in this embodiment). (), without units, obtained from statistics of digital twin water conservancy data base, its function is to define the size of R leaf nodes; The value represents the number of elements in the candidate water conservancy object set, which is a scalar and has a range of values. Unitless, determined by the output of the spatial filtering stage (typical values ​​are around tens to hundreds), its function is to define the scale of the water conservancy objects input in the subsequent time filtering stage; The average number of files associated with water conservancy objects, the type is scalar, and the value is a non-negative real number (in this embodiment). ), without unit, by The calculation is used to estimate the number of files corresponding to the candidate water conservancy object set. (Left side) The unit is milliseconds (ms); right side The unit is ms·1=ms (logarithm is dimensionless). The unit is (ms / file)·1·file = ms. The units on both sides must be strictly consistent.

[0057] The speedup ratio is defined as the ratio of query time for a single-level solution to that for a two-level solution:

[0058] ,

[0059] Substitute the typical parameters of this embodiment ( , , , , , , , ), we can get , The acceleration ratio is approximately This significant acceleration ratio stems from the fact that the total number of water conservancy objects is much smaller than the total number of archives (approximately [number missing] times in this embodiment). Furthermore, the candidate water conservancy object set output by spatial filtering is significantly smaller than the total number of water conservancy objects (approximately [number missing] in this embodiment). The double reduction effect of ).

[0060] Furthermore, the spatial filtering employs archive abundance priority query path pruning. The standard R-tree query process visits subtrees from top to bottom based on the intersection of the node's smallest bounding rectangle and the query region. Essentially, this is uniform pruning based on geographic spatial distribution, failing to consider the significant differences in the number of archives for different water conservancy objects. Important reservoirs may have thousands of archives, while small culverts may only have a few. Geographically uniform pruning implies that high-archive-abundance water conservancy objects that users are more likely to be interested in have the same access priority as low-archive-abundance water conservancy objects. This embodiment introduces an archive abundance priority query path pruning mechanism to address this.

[0061] The formula for calculating archive abundance is:

[0062] ,

[0063] in: For water conservancy objects The abundance of archives, of type scalar, with a value range of (The typical value in this embodiment is approximately tens to thousands), without units, and is calculated by this formula. Its function is to quantitatively characterize the accumulated scale of water conservancy objects' archives. For water conservancy objects The attached archive set is a discrete set, generated by the reverse attachment table of archives and water conservancy objects. Search corresponding The function of this direct method is to provide a source for calculating the abundance of archives; the definitions of the other symbols are the same as those in the aforementioned formula.

[0064] Candidate water conservancy objects are sorted in descending order of archive abundance as the priority of the query path:

[0065] ,

[0066] in: For candidate water conservancy object set The access priority sequence after sorting archive abundance in descending order is of type ordered index sequence, and the number of elements is equal to... Unitless, obtained by sorting using this formula, its function is to control the access order of R-tree nodes, so that water conservancy objects with high data abundance are returned first; This is a unitless function that sorts the elements of a set in descending order of their indices; its purpose is to generate sorted indices. This is a set of candidate water conservancy objects output from the R tree space. The set is of discrete type, and the number of elements can range from [value missing]. (Typical values ​​range from tens to hundreds), unitless, output by R-tree query, its function is to provide sorting input; the definitions of other symbols are the same as those in the aforementioned formula.

[0067] The conditions for early termination are:

[0068] ,

[0069] in: This represents the number of water conservancy objects visited, with a scalar type and a range of values. It has no unit and is dynamically determined by the query execution progress; its function is to represent the current progress. For the priority sequence number The water conservancy object is of type discrete object, and is composed of... No. Each index points to The corresponding water conservancy object is obtained, and its function is to represent the water conservancy object currently being accessed; This is the upper limit for the number of returned records set for the spatiotemporal joint query request. It is a scalar, takes the value of a positive integer (typically 500 in this embodiment), has no unit, and is provided by the spatiotemporal joint query request parameters. Its function is to control the threshold of the cumulative number of returned records before the query terminates prematurely. When the above cumulative sum first reaches or exceeds... At that time, access to the remaining branches was terminated prematurely.

[0070] Additional pruning conditions: only when Only then will Included in the access, among which The preset abundance threshold is a scalar with a value of 10. It has no unit and is determined by experience. Its function is to filter water conservancy objects with too few files (typically those with incomplete file information or temporary archives).

[0071] Furthermore, the time filtering is further implemented using time interval-aware abundance pruning compensation. Pruning based solely on the abundance of archives throughout the entire period may miss some water conservancy objects that generate archives concentratedly during historical events but whose total abundance throughout the entire period is not prominent. For example, during a major flood, a small or medium-sized reservoir may generate dozens of emergency response archives, while the reservoir's total archive abundance throughout the entire period may only be about one hundred, which would not be included in the high-priority pruning set. However, this reservoir is highly relevant to the querying user within the flood's time interval. This embodiment introduces a time-period correlation coefficient and a corresponding pruning compensation set mechanism to address this.

[0072] The abundance of archives for each water conservancy object number within the stated time interval is obtained by statistically analyzing the number of archives for that time period.

[0073] ,

[0074] in: For water conservancy objects In time interval Abundance of time-period archives within the specified time period, scalar type, value range It has no unit and is calculated by this formula. Its function is to quantitatively describe the cumulative scale of water conservancy objects' archives over a specified period. The start time of the time interval is a time scalar, the unit is ISO8601 timestamp, provided by the spatiotemporal joint query request, and its function is to define the start of the time period; The end time of the time interval, type is time scalar, unit is ISO8601 timestamp, provided by the spatiotemporal joint query request and Its function is to define the end point of a time period; For archives The archive timestamp, typed as a time scalar and unitd as an ISO8601 timestamp, is directly provided by the archive timestamp field of the archive metadata card, serving as a basis for time filtering; the definitions of other symbols are the same as those in the aforementioned formula. The abundance of archives for the entire period is obtained by statistically analyzing the number of archives for each water conservancy object number in all archives of the archive metadata database. The definition is the same as the aforementioned archive abundance formula.

[0075] The formula for calculating the time-period correlation coefficient is:

[0076] ,

[0077] in: For water conservancy objects The time-period correlation coefficient, type scalar, range of values. It has no unit and is calculated by this formula. Its function is to quantitatively characterize the concentration of water conservancy objects in the archives relative to the whole period during a specified time period. To prevent division by zero by small constants, the type is scalar, and the value is [value to be filled in]. It has no unit, is determined by the requirements for numerical stability, and its purpose is to avoid... The calculation error occurs when the denominator is zero; the definitions of other symbols are the same as in the aforementioned formula. (Left side) Since there are no units, the numerator and denominator on the right are both the number of files (which have no units), so there are no units on the right, consistent with the left.

[0078] The formula for determining the pruning compensation set is:

[0079] ,

[0080] in: This is a pruning compensation set, of type discrete set, with the number of elements ranging from [value range missing]. Unitless, determined by this formula, its function is to mark water conservancy objects that should not be filtered out by archive abundance priority pruning; The preset relevance threshold is a scalar with a value of 0.3 and no unit. It is determined by empirical data (if the proportion of archives of a watershed water conservancy object exceeds 30% in a certain period, it usually means that the period has a strong correlation with the object. For example, the emergency response archives of a reservoir during the flood season account for more than 30% of the reservoir's historical archives). Its function is to determine the boundary of the strength of the correlation between periods; the definitions of other symbols are the same as those in the aforementioned formula.

[0081] The execution rule for the time filtering phase is: for the pruning compensation set Water conservancy projects within the area are not subject to archive abundance pruning, i.e. Even if the abundance of the water conservancy objects within the archive is lower than the preset abundance threshold. The archives linked to them are also retained and accessed for time filtering, thereby avoiding the omission of low-abundance water conservancy objects that generate archives in a concentrated period of time.

[0082] Output candidate file set after time filtering is completed The candidate archive set consists of all archives that simultaneously meet the spatial filtering conditions and the temporal filtering conditions and are retained after pruning compensation adjustment. Each archive object retains five core fields: archive number, archive storage path, archive metadata summary, archive associated water conservancy object number, and archive timestamp. These are then passed to step S4 for visualization overlay rendering.

[0083] Step S4: MapboxGL-based layer overlay rendering and file management platform redirection. After the candidate file set is passed to the front end, it is rendered onto the digital twin water conservancy data base using MapboxGL in a layer overlay manner, forming an overlay layer. In this embodiment, the front-end display layer is implemented based on MapboxGL JavaScriptSDK 2.x. The digital twin water conservancy data base serves as the base map, loaded and presented using MapboxGL's raster tile source and vector tile source. The rendering of the overlay layer uses a combination of MapboxGL's GeoJSON data source access and Symbol layer configuration: candidate file set... On the front end, it is assembled into a GeoJSON FeatureCollection object. The geometric properties of each Feature are taken from the spatial coordinates of the water conservancy object pointed to by the water conservancy object number associated with the file. The attribute fields of the Feature encapsulate information such as file number, file metadata summary, and file timestamp for subsequent click and interaction.

[0084] The archive overlay layer is presented on the map as an icon aggregation. When multiple archives are associated with the same water conservancy object, an aggregation icon is displayed at the coordinates of that water conservancy object, with the number of attached archives indicated by a number. When the user zooms in on the map or clicks the aggregation icon, the front end expands in reverse order using the water conservancy object number, displaying a list of all associated archive entries. The archive metadata summary is displayed on the archive overlay layer. Specifically, when the user hovers the mouse over an archive entry, a floating information window containing the archive metadata summary appears, allowing the user to preview the core information of the archive without leaving the map view.

[0085] The style design of the document overlay layers follows visual standards in the field of watershed management: flood control documents are labeled in red, dispatch documents in blue, monitoring documents in green, planning documents in yellow, and emergency documents in purple. Different document category labels are dynamically colored according to attribute fields using MapboxGL's data-driven styling mechanism. Meanwhile, the document overlay layers support interactive capabilities such as transparency adjustment, layer visibility switching, and timeline animation playback, enabling watershed management personnel to intuitively perceive the spatial distribution and temporal evolution of the documents.

[0086] Click events on spatial elements are captured, triggering a redirect to the archive management platform to retrieve the original archive document pointed to by the archive storage path. MapboxGL captures user click interactions on the archive overlay layer through its click event listener. In the event callback, the archive storage path of the archive document is obtained by querying the archive metadata database based on the archive number of the clicked feature, and then a redirect request is initiated to the archive management platform. The redirection in this embodiment adopts a single sign-on ticket transmission mechanism: the front end applies for a single sign-on ticket for the archive management platform from the authentication center using the current user's session credentials on the digital twin water conservancy platform, and attaches the single sign-on ticket to the archive management platform's redirect URL based on HTTPS encryption; after receiving the single sign-on ticket, the archive management platform verifies the user's identity and locates the original archive document pointed to by the archive storage path, presenting the user with an interface to view the original archive document. The entire redirection process is perceived by the user as a seamless interaction where they can see the original archive document with a single click on the archive element on the map, without the need to log in again or manually enter the archive path.

[0087] Furthermore, a timeline control is displayed in the overlay layer of archives according to the timestamps of the archives. The timeline control supports drag-and-drop filtering of the time intervals. The timeline control is overlaid at the bottom of the map view as a horizontal slider. The slider marks the time distribution density (in histogram form) of all candidate archives with time as the horizontal axis. Users can dynamically adjust the time interval by dragging the start and end cursors on the slider. The front end sends the new time interval as the time interval parameter of the spatiotemporal joint query request to the back end to re-execute step S3, so that the overlay layer of archives is dynamically refreshed. This interactive linkage between the map view and the timeline allows users to explore the distribution patterns of archives simultaneously in a two-dimensional spatial dimension and a one-dimensional time dimension.

[0088] Step S5: User Access Popularity Feedback Optimization. All spatial element click events captured in Step S4 are synchronously reported to the backend interaction log collection module, forming a structured user behavior log. Each log entry includes fields such as the timestamp of the click, the clicked water conservancy object number, the clicked file number, and the user identifier. This step calculates the access frequency of the spatial element click events to form the water conservancy object access popularity. This water conservancy object access popularity is fed back to Step S2 as a node weight parameter for the reconstruction of the hierarchical spatial index tree of water conservancy objects, causing water conservancy objects with high access popularity to float to the shallow layer of the hierarchical spatial index tree.

[0089] The calculation of the popularity of water conservancy-related content uses an additive formula with time decay, giving greater weight to recent clicks than older clicks:

[0090] ,

[0091] in: For a moment Water conservancy objects The access popularity, a scalar type, with a value range of , without units, is calculated by this formula, and its function is to quantitatively characterize the intensity of attention to water conservancy objects in the sense of user interaction behavior; For a moment Previously, regarding water conservancy targets The cumulative number of clicks is a scalar, with a range of non-negative integers and no unit. It is obtained from the interaction log and is used to determine the number of cumulative items. This is an indicator function, of type function (it takes the value 1 when the event occurs, and 0 otherwise), with a value range of... It has no unit and its function is to convert click events into an additive numerical value; for Constantly occurring in water conservancy objects Click events on the screen are of the discrete event type, recorded by user behavior logs, and their purpose is to provide a source for accumulating events; The heat decay rate is a scalar quantity, and in this embodiment, it is taken as a value of The unit is the negative first power of days ( The value is determined by experience (the decay half-life is about 21 days, which is consistent with the business scenario of the monthly activity of water conservancy archives management), and its function is to control the decay intensity of clicks in the long term. For the first The timestamp of each click is a time scalar in days and is recorded in the interaction log. Its purpose is to provide a time anchor for decay calculation. The time for heat calculation is a time scalar, with the unit being days. It is determined by the execution time of this step and serves to provide the target time for attenuation calculation. For the first Each water conservancy object is defined as described in the aforementioned formula. (Left side) Units not available, right side No unit middle Units are (No unit) If the exponent is unitless, then its value is unitless; therefore, the right side is unitless, consistent with the left side.

[0092] After the access popularity of water conservancy objects is calculated, it is fed back as a node weight parameter to step S2 for the reconstruction of the hierarchical spatial index tree of water conservancy objects. The specific node weight update formula is as follows:

[0093] ,

[0094] in: For the updated water conservancy objects The node weight parameter is of scalar type and has a range of values. Unitless, calculated by this formula, its function is to control the hierarchical position of water conservancy objects in the hierarchical spatial index tree of water conservancy objects; For the water conservancy objects before the update The node weight parameter is of scalar type and has a range of values. (Initial value is 0), unitless, given by the feedback optimization result or initial value of the previous round, its function is to provide the cumulative baseline of node weights; The feedback learning rate is a scalar with a value of 0.1 and no unit. It is determined by experience (too large a value will cause frequent oscillations in the index structure, while too small a value will have no significant impact on the feedback). Its function is to control the update magnitude of node weights in a single feedback. The definition is the same as the formula mentioned above. Left side. Units not available, right side No unit Since it is dimensionless, there are no units on the right side, consistent with the left side.

[0095] The R-tree node floating rule is: when At that time, water conservancy objects It is promoted from its current leaf node in R to a higher-level intermediate node for priority access; when Then it is further upgraded to the next level; and so on. Among them This is a preset weight threshold, a scalar type with a value of 1.0, no unit, determined empirically. Its function is to trigger the decision threshold for node upscaling. The specific upscaling operation is completed through the node reorganization mechanism of the R-tree. For water conservancy objects that meet the upscaling conditions, they are removed from the current leaf node and inserted into the child node priority position of the intermediate node of the target level. At the same time, all minimum bounding rectangles on this path are adjusted to maintain the structural integrity of the R-tree.

[0096] The execution frequency of node weight feedback and index reconstruction adopts a strategy combining near real-time and batch processing. At the near real-time level, the access popularity and node weight of the corresponding water conservancy object are updated immediately after each spatial element click event, but index reconstruction is not triggered immediately to avoid performance fluctuations caused by frequent structural adjustments. At the batch level, the system performs an index reconstruction operation every 24 hours, selecting node weights... The water conservancy objects were added in batches, while the water conservancy objects that had not been visited for a long time (whose visit popularity decreased due to the decay of the item) were also added. (Continuous decay) sinks deeper into the index. This near real-time and batch-based feedback strategy ensures that high-frequency water conservancy objects respond quickly to user preferences while avoiding performance losses caused by frequent index structure oscillations.

[0097] Through actual testing, this embodiment shows that after enabling the feedback mechanism in step S5 in a scenario involving 650,000 files, 8,500 water conservancy objects, and 30 consecutive days of user access in a certain watershed, the average query path for frequently accessed water conservancy objects was shortened by about 35%, and the query response time p95 was reduced from about 120ms to about 78ms.

[0098] Example 2: Digital Twin Water Conservancy Data Baseboard Archive Spatial Index Retrieval System.

[0099] Reference Figure 2 As shown, this embodiment provides a digital twin water conservancy data base archival spatial index retrieval system. This system corresponds to the method implementation process of Embodiment 1, including an archival metadata registration module, a water conservancy object spatial index module, a spatiotemporal joint query module, a visualization overlay rendering module, and an interactive feedback optimization module. Each module is deployed on the water conservancy cloud infrastructure using a microservice architecture, and the modules communicate decoupledly through RESTful APIs and message queues.

[0100] The archive metadata registration module is used to construct an archive metadata card for each archive to be managed and store it in the archive metadata database. The archive metadata card encapsulates the archive number, archive storage path, archive metadata summary, archive-associated water conservancy object number, and archive timestamp. The archive-associated water conservancy object number points to a water conservancy object with geographic coordinates in the digital twin water conservancy data base. This module provides an archive archiving API and an archive metadata maintenance API. The archive archiving API is called by the archive management platform after the archive is uploaded to construct the archive metadata card, write it to the archive metadata database, and update the archive-water conservancy object reverse attachment table. The archive metadata maintenance API supports operations such as querying, modifying, and appending versions of the archive metadata card. The module's internal data storage uses a relational database cluster, and a secondary index is established for the archive-associated water conservancy object number field to support efficient maintenance of the reverse attachment table.

[0101] The water conservancy object spatial index module is used to construct a hierarchical spatial index tree for water conservancy objects based on their geographic coordinates. The leaf nodes of this hierarchical spatial index tree store the water conservancy object number and its minimum bounding rectangle, and the leaf nodes are linked to a list of archive numbers. During system initialization, this module pulls the geometric and number data of water conservancy objects from the digital twin water conservancy data base in one go, constructs a morphological sub-index tree according to geometric shape, and selects the fan-out parameters for each region using an adaptive hierarchical construction mechanism based on spatial sparsity. The completed hierarchical spatial index tree is persisted as a memory-mapped file and loaded into shared memory to support high-concurrency queries. This module also listens to the archive archiving event of the archive metadata registration module to incrementally update the linked archive number list of the corresponding water conservancy object's leaf nodes. Simultaneously, it listens to the node weight feedback event of the interaction feedback optimization module to periodically trigger index reconstruction, causing water conservancy objects with high access frequency to be highlighted.

[0102] The spatiotemporal joint query module receives spatiotemporal joint query requests, which include spatial query modes and time intervals. The spatial query modes include at least one of rectangular selection, polygon selection, and buffer range. First, the module uses the hierarchical spatial index tree of the water conservancy objects to perform spatial filtering based on the spatial query modes to obtain a candidate set of water conservancy objects. Then, the module uses the archive metadata database to perform time filtering on the archives attached to the candidate water conservancy object sets according to the matching relationship between the archive timestamps and the time intervals, outputting a candidate archive set. This module provides a unique spatiotemporal joint query API. Input parameters encapsulate the spatial query mode (including rectangular coordinate quadruples, polygon vertex sequences, or buffer center point coordinates and buffer radius), time interval, return upper limit, and advanced filtering options. Internally, the module sequentially executes two layers of algorithm logic: archive abundance priority query path pruning and time interval-aware abundance pruning compensation. The output candidate archive set is returned to the front end in GeoJSONFeature Collection format. This module supports horizontal scaling with a stateless microservice deployment. Access to the hierarchical spatial index tree of water conservancy objects is accomplished through shared memory read and write. Time filtering of the archive metadata database is efficiently performed through a composite secondary index of archive timestamps and archive-associated water conservancy object numbers.

[0103] The visualization overlay rendering module is used to render the candidate archive set onto the digital twin water conservancy data base using MapboxGL in a layer overlay manner, forming an archive overlay layer. The module displays the archive metadata summary on the archive overlay layer, captures spatial element click events, and triggers a redirect to the archive management platform to retrieve the original archive document pointed to by the archive storage path. This module consists of a front-end component library and a back-end single sign-on auxiliary service. The front-end component library, based on MapboxGL JavaScript SDK 2.x, implements and encapsulates sub-components such as GeoJSON data source access for the archive overlay layer, Symbol layer style configuration, aggregate icon rendering, floating information window, spatial element click event capture, and timeline control. The back-end single sign-on auxiliary service is responsible for generating a single sign-on ticket for the archive management platform and writing the ticket into the redirect URL query parameters. After the archive management platform verifies the ticket's validity with the authentication center, it locates the original archive document pointed to by the archive storage path and presents it to the user. The entire process uses HTTPS encrypted transmission to ensure the security of sensitive data such as session credentials and ticket requests.

[0104] The interactive feedback optimization module is used to statistically analyze the access frequency of click events on spatial elements to form the access popularity of water conservancy objects. This access popularity is then fed back to the water conservancy object spatial index module as node weight parameters for the reconstruction of the hierarchical spatial index tree, allowing water conservancy objects with high access popularity to float to the shallow layer of the hierarchical spatial index tree. This module consists of three parts: an interaction log collection submodule, an access popularity calculation submodule, and a node weight feedback submodule. The interaction log collection submodule consumes the spatial element click event stream reported by the visualization overlay rendering module through a message queue and writes it to the interaction log database. The access popularity calculation submodule periodically performs time-decayed cumulative aggregation on the interaction logs to update the access popularity values ​​of each water conservancy object. The node weight feedback submodule performs batch feedback every morning, calling the index reconstruction interface of the water conservancy object spatial index module to promote water conservancy objects that meet the floating conditions to the shallow layer of the index, while sinking low-weight water conservancy objects that have not been accessed for a long time to the deep layer of the index. This gives the entire retrieval system a positive closed-loop optimization capability where the more frequently used the object, the faster the query response.

[0105] The entire digital twin water conservancy data base archival spatial index retrieval system, through the collaboration of five major modules, enables visualized retrieval of massive water conservancy archives at the basin level.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A spatial index retrieval method for digital twin water conservancy data base archives, characterized in that, Includes the following steps: S1. Construct an archive metadata card for each archive to be managed. The archive metadata card encapsulates the archive number, archive storage path, archive metadata summary, archive associated water conservancy object number and archive timestamp. Store the archive metadata card in the archive metadata database. The archive associated water conservancy object number points to the water conservancy object with geographic coordinates in the digital twin water conservancy data base. S2, Based on the geographic coordinates of the water conservancy objects, construct a hierarchical spatial index tree for the water conservancy objects. The leaf nodes of the hierarchical spatial index tree store the water conservancy object number and its minimum bounding rectangle. The leaf nodes are linked to a list of file numbers, which are derived from the file metadata database. S3, Receive a spatiotemporal joint query request. The spatiotemporal joint query request includes a spatial query mode and a time interval. The spatial query mode includes at least one of rectangular selection, polygon selection, and buffer range. First, use the hierarchical spatial index tree of water conservancy objects to perform spatial filtering according to the spatial query mode to obtain a set of candidate water conservancy objects. Then, use the archive metadata database to perform time filtering on the archives attached to the set of candidate water conservancy objects according to the matching relationship between the archive timestamp and the time interval, and output a set of candidate archives. S4. Based on MapboxGL, the candidate archive set is rendered onto the digital twin water conservancy data base in a layer overlay manner according to the associated water conservancy objects to form an archive overlay layer. The archive metadata summary is displayed on the archive overlay layer, spatial element click events are captured, and a jump to the archive management platform is triggered to retrieve the original archive pointed to by the archive storage path. S5, count the access frequency of the click events of the spatial elements to form the access popularity of water conservancy objects, and feed the access popularity of water conservancy objects back to step S2 as the node weight parameter for the reconstruction of the hierarchical spatial index tree of water conservancy objects, so that water conservancy objects with high access popularity float to the shallow layer of the hierarchical spatial index tree of water conservancy objects.

2. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 1, characterized in that, In step S1, the file-associated water conservancy object number is established through a file-water conservancy object reverse attachment table. Each record in the file-water conservancy object reverse attachment table contains a water conservancy object number and a set of file numbers attached to that water conservancy object number. Multiple file numbers are attached to the same water conservancy object number. In step S2, the leaf nodes of the hierarchical spatial index tree of water conservancy objects do not store any file spatial coordinates, but only store the water conservancy object number, the minimum bounding rectangle, and the list of reverse-attached file numbers, so that the area of ​​the minimum bounding rectangle of the hierarchical spatial index tree of water conservancy objects remains non-degenerate under the spatial distribution density of water conservancy objects.

3. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 2, characterized in that, In step S2, the water conservancy objects are classified into point-like, linear, and area-like water conservancy objects according to their geometric shapes. The point-like water conservancy objects include water level stations, rain gauge stations, and sluice gates; the linear water conservancy objects include dikes, rivers, and canals; and the area-like water conservancy objects include reservoirs, flood storage and detention areas, and irrigation areas. The hierarchical spatial index tree of the water conservancy objects constructs sub-index trees based on the geometric shapes of the water conservancy objects. The minimum bounding rectangle of each sub-index tree is calculated according to the spatial envelope rules of the corresponding geometric shape. The spatial envelope rules adopt an axis-widening buffer for linear water conservancy objects, a closed polygon bounding for area-like water conservancy objects, and a circular envelope with a preset radius for point-like water conservancy objects.

4. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 3, characterized in that, The hierarchical spatial index tree for water conservancy objects is constructed using an adaptive spatial sparsity structure. The spatial sparsity is obtained by counting the number of water conservancy objects per unit area using a preset grid. When the spatial sparsity is greater than a preset density threshold, the corresponding region uses the first fan-out parameter to construct an R-tree node. When the spatial sparsity is less than a preset sparsity threshold, the corresponding region is used to construct R-tree nodes using a second fan-out parameter, where the first fan-out parameter is greater than the second fan-out parameter; the preset density threshold is 50 km. 2 The preset sparsity threshold is set to 5 units / km. 2 The first fan-out parameter is 16, and the second fan-out parameter is 8.

5. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 4, characterized in that, The spatial filtering in step S3 is performed using archive abundance priority query path pruning. Archive abundance is calculated for each water conservancy object number. The archive abundance is obtained by counting the number of elements in the set of archive numbers attached to the water conservancy object number in the archive-water conservancy object reverse attachment table. During the R-tree query process, candidate water conservancy objects are sorted in descending order of archive abundance as the query path priority. Branches of water conservancy objects with archive abundance higher than a preset abundance threshold are accessed first. The preset abundance threshold is set to 10. When the cumulative number of archives returned by the query reaches the upper limit set by the query request, the access to the remaining branches is terminated in advance.

6. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 5, characterized in that, In step S3, the time filtering further employs time interval-aware abundance pruning compensation. The number of archives for each water conservancy object number within the time interval is statistically analyzed to obtain the time interval archive abundance. The number of archives for each water conservancy object number in all archives of the archive metadata database is statistically analyzed to obtain the overall period archive abundance. The ratio of the time interval archive abundance to the overall period archive abundance is used as the time interval correlation coefficient. When the time interval correlation coefficient is greater than a preset correlation threshold, the corresponding water conservancy object number is included in the pruning compensation set, and archive abundance pruning is not performed on the water conservancy objects within the pruning compensation set. The preset correlation threshold is set to 0.

3.

7. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 1, characterized in that, The archive metadata card mentioned in step S1 further includes an archive version number, an archive confidentiality level, and an archive classification label. The archive version number adopts a three-segment encoding of major version number-minor version number-revision number. The archive confidentiality level includes four levels: public, internal, secret, and confidential. The archive classification label is divided into five categories according to the water conservancy business type: flood control archives, dispatch archives, monitoring archives, planning archives, and emergency archives. The archive metadata card automatically adds version records as the archive version is updated.

8. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 1, characterized in that, The buffer range mentioned in step S3 supports parameterized radius settings, with the buffer radius ranging from 100m to 50000m; the rectangular selection supports multi-level zoom query, dynamically adjusting the minimum bounding rectangle granularity of the rectangular selection range according to the map zoom level. When the map zoom level is lower than the preset zoom threshold, the spatial filtering returns the water conservancy object-level aggregation results, and the water conservancy object-level aggregation results are aggregated and displayed according to the number of files by administrative division; When the map zoom level is higher than the preset zoom threshold, the spatial filtering returns archive-level detailed results.

9. The spatial index retrieval method for digital twin water conservancy data base archives according to claim 1, characterized in that, In step S4, the jump to the archive management platform adopts a single sign-on ticket transmission mechanism. The single sign-on ticket is transmitted based on HTTPS encryption. After receiving the single sign-on ticket, the archive management platform verifies the user's identity and locates the original archive pointed to by the archive storage path. Step S4 further displays a timeline control in the archive overlay layer according to the archive timestamp. The timeline control supports drag-and-drop filtering of the time interval.

10. A digital twin water conservancy data base archival spatial index retrieval system, used to implement the digital twin water conservancy data base archival spatial index retrieval method according to any one of claims 1-9, characterized in that, It includes an archive metadata registration module, a water conservancy object spatial index module, a spatiotemporal joint query module, a visualization overlay rendering module, and an interactive feedback optimization module; The archive metadata registration module is used to construct an archive metadata card for each archive to be managed and store it in the archive metadata database. The archive metadata card encapsulates the archive number, archive storage path, archive metadata summary, archive associated water conservancy object number and archive timestamp. The archive associated water conservancy object number points to the water conservancy object with geographic coordinates in the digital twin water conservancy data base. The water conservancy object spatial index module is used to construct a hierarchical spatial index tree for water conservancy objects based on their geographic coordinates. The leaf nodes of the hierarchical spatial index tree store the water conservancy object number and its minimum bounding rectangle. The leaf nodes are linked to a list of file numbers in reverse order. The spatiotemporal joint query module is used to receive spatiotemporal joint query requests. The spatiotemporal joint query requests include spatial query modes and time intervals. The spatial query modes include at least one of rectangular selection, polygon selection, and buffer range. First, the hierarchical spatial index tree of water conservancy objects is used to perform spatial filtering according to the spatial query modes to obtain a set of candidate water conservancy objects. Then, the archive metadata database is used to perform time filtering on the archives attached to the set of candidate water conservancy objects according to the matching relationship between the archive timestamp and the time interval, and output a set of candidate archives. The visualization overlay rendering module is used to render the candidate archive set onto the digital twin water conservancy data baseboard in a layer overlay manner based on MapboxGL, forming an archive overlay layer. The archive metadata summary is displayed on the archive overlay layer, and spatial element click events are captured and triggered to jump to the archive management platform to retrieve the original archive pointed to by the archive storage path. The interactive feedback optimization module is used to count the access frequency of the spatial element click events to form the access popularity of water conservancy objects. The access popularity of water conservancy objects is fed back to the water conservancy object spatial index module as the node weight parameter for the reconstruction of the hierarchical spatial index tree of water conservancy objects, so that water conservancy objects with high access popularity float to the shallow layer of the hierarchical spatial index tree of water conservancy objects.

Citation Information

Patent Citations

  • Grid structure-based spatial index establishing method and grid structure-based spatial index establishing system

    CN101719154B

  • Method for realizing digital management of irrigation district based on digital twinborn platform

    CN116308861A

  • Rapid construction method and system for intelligent water conservancy digital twinborn model applied to reservoir

    CN118735437A