A database-based geographic-semantic joint indexing method, device, and medium

CN122432171BActive Publication Date: 2026-08-14HIGHGO SOFTWARE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0006]本申请实施例提供了一种基于数据库的地理-语义联合索引方法、设备及介质,用于解决如下技术问题:在现有地理图索引查询中,存在分区边界召回率与常态遍历开销之间的矛盾,容易让两段式方案对地理层次不感知以及造成空间分布不均访问失衡

Benefits of technology

本申请实施例通过基于H3六边形分区与分区内HNSW子图的地理-语义联合索引方法,解决了分区边界召回率与常态遍历开销的矛盾,并附带克服现有两段式方案对地理层次不感知、pre/post-filter召回-延迟双输、空间分布不均访问失衡等问题常态查询不承担跨分区边遍历开销;而且还能在边界结果不足时通过按需cross_edge回补提高召回。自适应H3混合分辨率还能降低固定分辨率导致的空cell和小子图退化;同时,动态权重复合距离还支持不同业务语义下的连续排序调节。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432171B_ABST
    Figure CN122432171B_ABST
Patent Text Reader

Abstract

This invention discloses a database-based geographic-semantic joint indexing method, device, and medium, belonging to the field of database and semantic indexing technology. It addresses the technical problems in existing geographic map indexing queries, such as the contradiction between partition boundary recall rate and normal traversal overhead, which can lead to two-stage schemes being unaware of geographic hierarchy and causing uneven spatial distribution and access imbalance. The method includes: performing adjacent hexagonal cell node query processing based on boundary subsets on the HNSW subgraph of each cell in the mixed resolution network to establish directed cross-cell link edges; performing K-ring depth coverage calculations on the target resolution cell; performing concurrent HNSW subgraph queries and corresponding composite distance sorting processing on each candidate cell in the candidate cell set after concurrency filtering; and performing restricted local supplementary search processing on the candidate cells related to the HNSW subgraph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database and semantic indexing technology, and in particular to a database-based geographic-semantic joint indexing method, device and medium. Background Technology

[0002] Uber H3 is Uber's open-source hexagonal geographic grid indexing system, used to divide the Earth's surface into hexagonal grids of different sizes, each with a unique number, for the purpose of quickly processing location data.

[0003] HNSW (Malkov & Yashunin, 2016) is a graph-based approximate nearest neighbor indexing algorithm: each vector is treated as a graph node, and each node is connected to its M nearest neighbors to form a hierarchical graph. During the search, a greedy descent is performed from the top-level default entry node, while beamsearch is performed at the bottom level using a bounded priority queue of size efSearch. R-tree (Guttman, 1984), geohash (Niemeyer, 2008), and KDB-tree are three other commonly used spatial partitioning structures. IEEE 754 double-precision floating-point, the Haversine spherical distance formula, and cosine similarity are all well-known techniques upon which this invention is based.

[0004] In high-dimensional vector approximate nearest neighbor (ANN) query scenarios with geographic radius constraints, existing solutions generally cannot simultaneously achieve both partition boundary recall and query latency. Specifically, there are three typical defects: (i) The "predicate-free graph traversal" scheme represented by ACORN (SIGMOD 2024) maintains two redundant edges in the full HNSW (Hierarchical Navigable Small World) graph and participates in the traversal, resulting in index bloat and invalid traversal overhead; (ii) In the "geographic bucket + adjacency bucket normal cross edge" scheme represented by Qdrant FilterableHNSW, cross-bucket edges always participate in graph traversal and cannot be activated as needed, and the square adjacency of geohash grid is poor; (iii) Represented by SingleStore "geo_distance AND vector", its outer partition is based on attribute predicates or vector space clustering, neither of which is aware of the geographic hierarchy, and it cannot continue to fuse geographic and semantic distance with continuously adjustable weights within the partition, and it does not have a precise compensation mechanism for recall at the partition boundary.

[0005] Therefore, there is an urgent need for a geographic-semantic joint indexing method that physically separates partitioning and connectivity compensation, so that queries within a partition do not incur the overhead of traversing across partition graphs, and cross-partition connectivity edges are activated only as needed when boundary results are insufficient to avoid normal inflation. A single query can use dynamic weights to continuously adjust between geographic and semantic dimensions, and improve recall rate by precise measurement verification at the boundary. Summary of the Invention

[0006] This application provides a database-based geographic-semantic joint indexing method, device, and medium to solve the following technical problem: In existing geographic map index queries, there is a contradiction between the recall rate of partition boundaries and the overhead of normal traversal, which can easily make the two-stage scheme unaware of geographic levels and cause uneven access due to spatial distribution.

[0007] The embodiments of this application adopt the following technical solutions: On one hand, this application provides a database-based geographic-semantic joint indexing method, including: splitting and merging the dataset into parent-child networks based on the recursive relationship between data volume and data intervals within H3 units, and partitioning the data based on resolution to construct a hybrid resolution network; wherein the hybrid resolution network is stored with the ID of the H3 unit as the key and the data list within the unit as the value; performing adjacent hexagonal unit node query processing based on boundary subsets on the HNSW subgraph of each unit in the hybrid resolution network, and establishing directed cross-unit link edges based on distance thresholds; querying and locating the resolution units of the quadruplets corresponding to the directed cross-unit link edges to determine the target resolution unit in the hybrid resolution network; and performing coverage calculations related to K-ring depth on the target resolution unit. The algorithm calculates and obtains a set of candidate units based on the target resolution unit and the K-ring depth. Each candidate unit in the set, after concurrency filtering, undergoes concurrent HNSW subgraph query and corresponding composite distance sorting to obtain the target HNSW subgraph. The top-k results returned after global merging of the target HNSW subgraph are validated using the semi-versus-vector of the query circle boundary. Based on the semi-versus-vector validation results, a restricted local supplementary search is performed on the candidate units using an independent table to obtain supplementary candidate units for returning the global ranking. The independent table is completely separate from the main graph neighbor list and is used to store the quadruplets. The supplementary candidate units are returned to the top-k results, and based on the top-k results, the dataset undergoes query statistics feedback processing.

[0008] This application's embodiments resolve the contradiction between partition boundary recall and normal traversal overhead through a geographic-semantic joint indexing method based on H3 hexagonal partitioning and HNSW subgraphs within partitions. It also overcomes issues in existing two-stage solutions such as lack of geographic layer awareness, double loss of pre / post-filter recall and delay, and uneven spatial distribution leading to access imbalance. Normal queries do not incur cross-partition edge traversal overhead; furthermore, it can improve recall by on-demand cross_edge replenishment when boundary results are insufficient. Adaptive H3 hybrid resolution also reduces the degradation of empty cells and small subgraphs caused by fixed resolution; simultaneously, dynamic weighted composite distance supports continuous sorting adjustment under different business semantics.

[0009] In one feasible implementation, the dataset is split and merged into parent-child networks based on the recursive relationship between the data volume within an H3 unit and the data interval, and a hybrid resolution network is constructed by partitioning the data based on resolution. Specifically, this includes: sampling the spatial distribution of the dataset to determine the data volume within each H3 unit; using a bottom-up merging strategy and a top-down splitting strategy, and partitioning the data based on resolution, judging the recursive relationship between the data volume within an H3 unit and the data interval; if the data volume is less than the minimum value in the data interval, the H3 unit is recursively processed under parent-level merging; if the data volume is greater than the minimum value in the data interval, the H3 unit is recursively processed under child-level splitting; and the hybrid resolution network is constructed based on the parent-level merging and child-level splitting of the H3 units.

[0010] In one feasible implementation, the HNSW subgraph of each unit in the hybrid resolution network is processed by querying adjacent hexagonal unit nodes based on boundary subsets, and directed cross-unit link edges are established based on a distance threshold. Specifically, this includes: constructing the corresponding HNSW subgraph for each H3 unit in the hybrid resolution network; wherein the HNSW subgraphs are mutually independent and connected without a main graph edge; performing node query processing on the boundary subset of the bottom-level nodes of the HNSW subgraph of each H3 unit for 6 adjacent hexagonal units; and performing distance condition compliance query on the 6 adjacent hexagonal units based on the distance threshold to determine the target adjacent hexagonal units that meet the distance threshold; constructing the directed cross-unit link edges based on the edge nodes of the target adjacent hexagonal units; wherein all the directed cross-unit link edges are stored in the form of quadruples in an independent table completely separate from the main graph neighbor list.

[0011] In one feasible implementation, after establishing directed cross-cell link edges based on a distance threshold, the method further includes: maintaining and configuring the header nodes for each H3 cell, and storing all cell headers in the maintenance configuration continuously according to the Z-order curve order of the H3 cell index; storing the HNSW subgraphs corresponding to the hot H3 cells within the header range in deserialized form according to the access frequency order of the H3 cells in the historical query log; and controlling the mmap loading of the HNSW subgraphs corresponding to the remaining cells.

[0012] In one feasible implementation, the resolution unit is queried and located for the quadruples corresponding to the directed cross-cell link edges to determine the target resolution unit in the hybrid resolution network; and the K-ring depth coverage calculation is performed on the target resolution unit to obtain a candidate unit set based on the target resolution unit and the K-ring depth. Specifically, this includes: receiving the queried quadruples corresponding to the directed cross-cell link edges; querying and locating the resolution unit for the quadruples using the H3 API latLng To Cel to obtain the target resolution unit; if the target resolution unit is not in the hybrid resolution network, then backtracking to the H3 unit corresponding to the parent / child level; performing the K-ring depth coverage calculation on the target resolution unit according to the given circumcircle radius and the preset circle radius to obtain the K-ring depth value; performing dynamic depth calculation on the K-ring depth value and the target resolution unit by calling the gridDisk function of the H3 unit API to obtain the candidate unit set; and performing equivalent expansion of the H3 units in the candidate unit set located at the hybrid resolution boundary according to the parent-child cell relationship.

[0013] In one feasible implementation, each candidate unit in the candidate unit set after concurrency filtering is subjected to concurrent querying of the HNSW subgraph and corresponding composite distance sorting to obtain the target HNSW subgraph. Specifically, this includes: for each candidate unit in the candidate unit set, reading the corresponding bounding box key and query circle, and determining the circle-rectangle intersection between the bounding box key and the query circle to remove irrelevant candidate units; sorting the remaining candidate units in the candidate unit set after removal based on a preset concurrency decision and the number of candidate units and the query cost of the HNSW subgraph, to obtain the candidate unit set after concurrency filtering; entering the corresponding HNSW subgraph through the head entry node of the candidate unit in the candidate unit set; and determining the composite distance as the sorting key for the bundle search; sorting the HNSW subgraph under priority rules using the sorting key to obtain the target HNSW subgraph for returning top-k results; wherein the priority rules include: geographic priority rules, semantic priority rules, and balance rules.

[0014] In one feasible implementation, the top-k results returned after the global merging of the target HNSW subgraph are subjected to semi-versus verification of the query circle boundary. Based on the semi-versus verification results, a restricted local supplementary search process related to the HNSW subgraph is performed on the candidate units through an independent table to obtain supplementary candidate units for returning the global ranking. Specifically, this includes: performing global merging of the top-k result set returned by the target HNSW subgraph, and sorting each top-k result in the globally merged top-k result set according to the distance value of the composite distance; taking several top-k results within the head range as preliminary top-k results; and selecting the preliminary top-k results at the query circle boundary. The semi-sine algorithm is verified, and preliminary top-k results with distances exceeding a preset radius are removed to obtain filtered top-k results. If the number of valid results in the top-k results is less than a first preset threshold, the independent table is directly activated, and the corresponding boundary H3 unit is read through the independent table to find its cross-unit candidate edges pointing to adjacent units. The target node of the cross-unit candidate edge is determined as the search entry point, and a local supplementary search based on constrained conditions is performed at the bottom layer of the target HNSW subgraph. The constrained conditions include: search width, expansion depth, and access permissions. The candidate H3 units obtained after the supplementary search are subjected to a second verification process based on the semi-sine algorithm to determine the supplementary candidate units used to return the global ranking.

[0015] In one feasible implementation, the supplementary candidate units are returned to the top-k results, and based on the top-k results, query statistics feedback processing is performed on the dataset. Specifically, this includes: globally sorting the supplementary candidate units and the subsequent candidate units filtered by concurrency based on the composite distance, and returning the final candidate units within the head range to the top-k results to obtain the query statistics feedback results of the dataset; wherein, the query statistics feedback results include: the cumulative query hit rate of each H3 unit, the triggered K_ring depth distribution, the query circle radius distribution, and the boundary completion frequency.

[0016] Secondly, embodiments of this application also provide a database-based geographic-semantic joint indexing device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to execute a database-based geographic-semantic joint indexing method as described in any of the above embodiments.

[0017] Thirdly, embodiments of this application also provide a non-volatile computer storage medium, which is a non-volatile computer-readable storage medium storing at least one program, each program including instructions, which, when executed by a terminal, cause the terminal to execute a database-based geographic-semantic joint indexing method as described in any of the above embodiments.

[0018] This application provides a database-based geographic-semantic joint indexing method, device, and medium. Compared with the prior art, the embodiments of this application have the following beneficial technical effects: This application's embodiments resolve the contradiction between partition boundary recall and normal traversal overhead through a geographic-semantic joint indexing method based on H3 hexagonal partitioning and HNSW subgraphs within partitions. It also overcomes issues in existing two-stage solutions such as lack of geographic layer awareness, double loss of pre / post-filter recall and delay, and uneven spatial distribution leading to access imbalance. Normal queries do not incur cross-partition edge traversal overhead; furthermore, it can improve recall by on-demand cross_edge replenishment when boundary results are insufficient. Adaptive H3 hybrid resolution also reduces the degradation of empty cells and small subgraphs caused by fixed resolution; simultaneously, dynamic weighted composite distance supports continuous sorting adjustment under different business semantics. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 A flowchart of a database-based geographic-semantic joint indexing method is provided for embodiments of this application; Figure 2 A schematic diagram of the overall architecture of a geographic-semantic joint index based on H3 partitions and HNSW within the partitions is provided for embodiments of this application; Figure 3 This application provides a schematic diagram of an H3 hybrid resolution grid and an HNSW subgraph structure within a cell, as illustrated in an embodiment of the present application. Figure 4 This is a schematic diagram of the structure of a database-based geographic-semantic joint index device provided in an embodiment of this application. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0021] It should be noted that the limitations of existing technologies are specifically manifested in the following ways: 1. The normal expansion of redundant two-hop edges in ACORN-type graphs: Because existing technologies solidify two-hop neighbors for each node as graph edges that participate in normal traversal during the HNSW construction period, each main graph edge is accompanied by O(M) redundant edges. This results in the index memory usage increasing by about 2 to 4 times compared to the native HNSW. Moreover, during the normal traversal period of a query, the bitmap needs to be accessed for all redundant edges. The number of bitmap lookups in a single query is proportional to the number of redundant edges, thus incurring this overhead even in regular queries where boundary recall does not constitute a bottleneck.

[0022] 2. The problem of Qdrant adjacency bucket cross edges always participating: Because existing technologies routinely add cross-bucket edges between adjacency buckets and participate in each beam search, cross-bucket edges are not actually needed in most queries (the typical query hit rate is less than 10%). As a result, during the normal traversal of a query, it is necessary to determine whether each hop neighbor is in the query hit bucket set. At the scale of millions to tens of millions of nodes, the additional bucket ownership determination brings a latency overhead of 5%–15%. Moreover, the area of ​​geohash square cells varies significantly at different latitudes, and the density of cross-bucket edges cannot be balanced.

[0023] 3. The two-stage solution of outer coarse partitioning + inner HNSW is not aware of the geographic hierarchy: Since the outer IVF partitioning of the existing technology is based on vector space clustering and is not related to geographic location, it cannot directly use partition pruning for queries with geographic radius constraints; the existing R-tree / geohash and HNSW only intersect at the ID set level, and the geometric index and vector index do not share memory layout; as a result, the loading of HashSet takes 10 to 20 milliseconds in the case of tens of millions of data, the cache misses on the query hot path are frequent, and the two indexes cannot share the partitioning strategy and rebalancing time.

[0024] 4. Recall-Latency Double Loss in Pre-filter and Post-filter: Due to the pre-filter on the full HNSW being affected by the predicate disrupting graph connectivity, and the post-filter needing to take an oversampled set where k′≈k / geo_selectivity is much greater than k before performing geometric filtering, the recall rate of the pre-filter drops from 95% to 60%–70% when the geographic selectivity is less than 1%, while the query latency increases by 2 to 3 times. On the full HNSW, the latency of querying the top-10,000 results for the post-filter is about 20 times that of querying the top-10 results, and even when k′ exceeds the efSearch limit, it may still return less than k results.

[0025] 5. Lack of accurate recall compensation mechanism at partition boundaries: Since the existing technologies mentioned above do not have a two-stage guarantee mechanism of first querying the partition, then accurately measuring and verifying the results near the boundary, and activating cross-partition supplementary search as needed when insufficient; as a result, when the query point is located at the edge of the cell, the true nearest neighbor may fall into the adjacent cell and be missed, and the existing solutions either bear the normal overhead of constantly expanding the neighborhood or give up boundary recall.

[0026] 6. Uneven access to the unified index when spatial distribution is uneven: Since real-world POI data is dense in city centers and sparse in suburbs, the unified HNSW is not aware of geographical distribution; this results in queries for suburban areas also having to access irrelevant nodes in the central business district, leading to a loss of spatial locality, and the inability to locally reconstruct the index when the data scale drifts over time.

[0027] Therefore, the geographic-semantic joint indexing method based on H3 hexagonal partitioning and HNSW subgraphs within partitions in this application consists of two parts: an offline joint indexing construction stage and an online K-ring parallel query stage. Its core is to completely separate the traversal of the main graph within a partition from cross-partition connectivity compensation in terms of physical storage and query timing: cross-partition cross-link edges are stored separately in an independent table `cross_edge_table` and are not included in the main graph's neighbor list, so they are completely undetectable during normal queries; only when the query point is at the partition boundary and the preliminary results, after precise hadersine verification, are less than k rows, is the cross-partition cross-link edge activated on demand to trigger a cross-partition supplementary search. Simultaneously, an adaptive H3 hybrid resolution grid ensures that the data volume of each partition falls within a controlled range, and the priority of geographic and semantic dimensions is continuously adjusted during the query period through dynamic weighted composite distance d=α·geo+β·semantic, ultimately forming a closed-loop engineering scheme of "partition physical isolation + boundary on-demand compensation + continuously adjustable dimensions".

[0028] This application provides a database-based geographic-semantic joint indexing method, such as... Figure 1 As shown, the database-based geographic-semantic joint indexing method specifically includes steps S101-S106: S101. By utilizing the recursive relationship between the data volume and data intervals within H3 units, the dataset is split and merged into parent-child networks. Furthermore, the data is partitioned based on resolution to construct a hybrid resolution network. This hybrid resolution network stores data using the ID of the H3 unit as the key and the list of data within the unit as the value.

[0029] Specifically, the spatial distribution of the dataset is first sampled to determine the amount of data within each H3 unit. Then, using a bottom-up merging strategy and a top-down splitting strategy, and partitioning the data based on resolution, the recursive relationship between the data volume within each H3 unit and the data intervals is determined.

[0030] Furthermore, if the data volume is less than the minimum value in the data interval, then cell H3 will undergo recursive processing under parent merging. If the data volume is greater than the minimum value in the data interval, then cell H3 will undergo recursive processing under child splitting.

[0031] Furthermore, a hybrid resolution network is constructed based on parent merging and child splitting of H3 units.

[0032] In one embodiment, Figure 2 This application provides a schematic diagram of the overall architecture of a geographic-semantic joint index based on H3 partitioning and HNSW within the partition, as illustrated in the embodiments of this application. Figure 2As shown, sample the spatial distribution of the dataset D = {(loc_i, emb_i, attr_i)}, aiming to have the data volume count within each H3 cell fall within the data range [N_min, N_max] (by default, N_min = 256, N_max = 4096, both of which are configurable). Then adopt a strategy that combines bottom-up merging and top-down splitting: initially partition the data at a resolution R_init = 12 (about 0.3 square kilometers); for cells with count < N_min, recursively merge them with their parent level R 1; for cells with count > N_max, split them to the child level R + 1; finally, obtain a mixed-resolution grid G, where different regions can correspond to different R values (typically R ∈ {7, 8, 9, 10, 11, 12}). The grid G is stored with the H3 cell ID as the key and the list of data within the cell as the value.

[0033] S102. Perform adjacent hexagon cell node query processing on the HNSW subgraph of each cell in the mixed-resolution network based on the boundary subset, and establish directed cross-cell link edges based on the distance threshold.

[0034] Specifically, it is also necessary to construct a corresponding HNSW subgraph for each H3 cell in the mixed-resolution network. Among them, the HNSW subgraphs are in an independent state and are not connected by main graph edges.

[0035] In one embodiment, as Figure 2 shown, for each H3 cell (c) in the mixed-resolution network G, independently construct an HNSW subgraph H_c on its internal data, with parameters M = 16, efConstruction = 200, and for cells with a large data volume (count > 2048), adaptively increase M to 32. The default entry node ID of the HNSW top layer of each cell is stored in the cell header. The subgraphs of each cell are independent and not connected by main graph edges.

[0036] Furthermore, perform node query processing on the boundary subset in the bottom-layer nodes of the HNSW subgraph of each H3 cell for 6 adjacent hexagon cells. And based on the distance threshold, perform a compliance query on the 6 adjacent hexagon cells for distance conditions to determine the target adjacent hexagon cells that meet the distance threshold.

[0037] Furthermore, combine the edge nodes of the target adjacent hexagon cells to construct directed cross-cell link edges. Among them, all directed cross-cell link edges are stored in an independent table that is completely separated from the main graph neighbor list in quadruple form.

[0038] In one embodiment, as Figure 2As shown, to address the recall loss when the query point is located at the cell boundary, for the subset B_c of the underlying nodes of the HNSW subgraph in each H3 cell c that is close to the boundary (default condition: the shortest distance from the node to the boundary of the cell < cell radius × β_b, β_b = 0.3), find the nodes within 6 adjacent hexagonal cells whose distance does not exceed the distance threshold τ_cross (default cell radius × 0.3), and then establish directed cross-cell link edges. Among them, Figure 3 This is a schematic diagram of the H3 hybrid resolution grid and the in-cell HNSW subgraph structure provided by an embodiment of this application. As Figure 3 shown, it shows the independent HNSW subgraphs of three adjacent cells (c1 and c2 belong to the dense area with R = 9, and c3 is the merged area with R = 8); the nodes within the cell are connected by solid lines. Among them, the nodes within the cell include: node n1, node n2, and node n3 in cell c1; node m1 and node m2 in cell c2; and node p1, node p2, and node p3 in cell c3. As Figure 2 shown in S11b of , the cross-cell link edges are represented by dashed lines (cross_edge_table). That is to say, all cross-cell link edges are stored in an independent table cross_edge_table that is completely separated from the main graph neighbor list in the form of a quadruple (cell_id_src, node_id_src, cell_id_dst, node_id_dst) (sorted by cell_id_src and compressed by Delta coding, with a typical compression ratio of 3:1 to 5:1). And the key constraint is that the cross_edge_table is only accessed by Figure 2 the boundary compensation process in S11 of , and the normal query path ( Figure 2 S9 in ) does not read this table by default; this constraint is ensured by the storage layout of "the main graph neighbor list and the cross_edge_table are isolated from each other in memory mapping".

[0039] Furthermore, it is also necessary to perform maintenance configuration on the head nodes of each H3 cell, and store all cell headers in the maintenance configuration continuously in the order of the Z-order curve of the H3 cell index.

[0040] In one embodiment, as Figure 2As shown, for the global cell header and bloom filter in this application, a header needs to be maintained for each H3 cell: cell_header(c_id) = (cell_id, resolution, center_latlng, bbox, count, hnsw_entry_id, attr_bloom_filter). All cell headers are stored contiguously in Z-order order according to the H3 index to ensure good storage locality when accessing adjacent cells.

[0041] Furthermore, based on the access frequency order of H3 units in the historical query logs, the HNSW subgraphs corresponding to the hot H3 units in the header range are stored in process form in deserialized form. The loading of mmap is then controlled for the HNSW subgraphs corresponding to the remaining units.

[0042] In one embodiment, such as Figure 2 As shown, for the initialization of the persistent cache for hot cell regions, the access frequency of cells needs to be sorted based on historical query logs. The HNSW graphs of the top X% of hot cells (default X=5, adjustable within the 1%–10% configuration range) are persistently stored in process memory in deserialized form; the remaining cells are loaded as needed via mmap. In other words, the hot cell set... Figure 2 The query statistics feedback sliding window in S12 updates dynamically.

[0043] S103. Query and locate the resolution cells for the quadruples corresponding to the directed cross-cell link edges to determine the target resolution cells in the hybrid resolution network. Then, perform K-ring depth coverage calculations on the target resolution cells to obtain a set of candidate cells based on the target resolution cells and the K-ring depth.

[0044] Specifically, the system first receives the quadruples corresponding to the directed cross-unit link edges retrieved from the network. Then, using H3APIlatLngToCel, it locates the target resolution unit by querying the quadruples. If the target resolution unit is not in the hybrid resolution network, it falls back to the H3 unit corresponding to the parent / child level.

[0045] In one embodiment, such as Figure 2 As shown, the query quadruple (q_loc, q_emb, radius, k) is received first. Then, the H3 API latLng To Cell(q_loc, target_R) is called to obtain the target resolution cell c_q where the query point is located; if the target resolution does not exist in the mixed resolution network G (it is in a merged or split region), it falls back to the corresponding cell of its parent / child level.

[0046] Furthermore, based on the given circumcircle radius and preset circle radius of the target resolution cell, a coverage calculation related to the K-ring depth must be performed on the target resolution cell to obtain the K-ring depth value.

[0047] Furthermore, by calling the gridDisk function of the H3 cell API, dynamic depth calculation is performed on the K-ring depth value and the target resolution cell, ultimately obtaining a candidate cell set. Then, H3 cells in the candidate cell set located at the mixed resolution boundary are equivalently expanded according to parent-child cell relationships.

[0048] In one embodiment, such as Figure 2 As shown, this illustrates the coverage relationship between the central cell c_q containing the query point q_loc and the K-ring. Specifically, in the dynamic depth calculation of the K-ring, the required K-ring depth K_ring = [radius / hex_edge_length(R)] needs to be calculated based on the radius (preset circle radius, e.g., the query circle radius) and the hex_edge_length(R) of the current target resolution cell c_q (given circumcircle radius). Then, the H3 API gridDisk(c_q, K_ring) is called to obtain the candidate cell set C_cand. Cells in the candidate cell set C_cand located at the mixed resolution boundary are equivalently expanded according to their parent-child cell relationships.

[0049] S104. Perform concurrent query on the HNSW subgraph and corresponding composite distance sorting on each candidate unit in the candidate unit set after concurrency filtering to obtain the target HNSW subgraph.

[0050] Specifically, for each candidate unit in the candidate unit set, the corresponding bbox key and query circle are read, and the circle-rectangle intersection between the bbox key and the query circle is determined to remove irrelevant candidate units from the candidate unit set.

[0051] Furthermore, it is necessary to make a pre-defined concurrency decision and sort the remaining candidate units in the candidate unit set after the elimination process based on the number of candidate units and the query cost of the HNSW subgraph, so as to obtain the candidate unit set after concurrency filtering.

[0052] In one embodiment, such as Figure 2As shown, for each candidate cell c_i in the candidate cell set C_cand, its bounding box key and the query circle (q_loc, radius) are read, and a precise circle-rectangle intersection determination is performed. Then, cells that do not actually intersect are removed. Afterwards, the remaining candidate cells are sorted by the number of cells (count) and the historical HNSW query cost to obtain the candidate cell set filtered by concurrency. The concurrency is: W = min(#C_cand_filtered, max_parallel), where max_parallel defaults to 8.

[0053] Furthermore, the candidate cells are then accessed through the head entry node of the candidate cell set to enter the corresponding HNSW subgraph. The composite distance is then used as the sorting key for the beam search.

[0054] Furthermore, using the sorting key obtained above, the HNSW subgraph is sorted according to priority rules to obtain the target HNSW subgraph used to return the top-k results. The priority rules include: geographic priority rule, semantic priority rule, and balance rule.

[0055] In one embodiment, such as Figure 2 As shown, a subgraph query is performed concurrently for each candidate cell c_i after filtering. The hnsw_entry_id (entry node) is read from the cell head and entered into the H_{c_i} subgraph (target HNSW subgraph); the composite distance d(u, q) = α·haversine(loc_u, q_loc) / radius + β·(1 cos(emb_u, q_emb)) is used as the sorting key for beamsearch, where (α, β) is dynamically given by the query request, satisfying α+β=1 and α, β∈[0,1]; haversine is the semi-sine verification calculation. Since a smaller composite distance indicates a higher ranking, typical presets are: geographic priority (α=0.8, β=0.2), semantic priority (α=0.2, β=0.8), and balanced (α=0.5, β=0.5); each target HNSW subgraph returns its top-k_local (k_local=2k, k_local=20 when k=10); and cross_edge_table (independent table) is not read, and the main graph traversal must be strictly limited to the subgraph H_{c_i}.

[0056] S105. Perform semi-versus-vector verification on the top-k results returned after global merging of the target HNSW subgraph, based on the query circle boundary. Then, using an independent table, perform a restricted local supplementary search on the candidate cells related to the HNSW subgraph to obtain supplementary candidate cells for returning the global ranking. The independent table is completely separate from the main graph neighbor list and is used to store quadruples.

[0057] Specifically, the top-k result set returned by the target HNSW subgraph is first globally merged, and then each top-k result in the globally merged top-k result set is sorted according to the distance value of the composite distance. Then, several top-k results within the head range are selected as the preliminary top-k results.

[0058] In one embodiment, such as Figure 2 As shown, the top-k_local sets returned by the W target HNSW subgraphs are globally merged, then globally sorted according to the composite distance d, and finally the top k are taken as the preliminary result. The merging process uses a heap-based k-way merge with a time complexity of O(W×k_local×logW).

[0059] Furthermore, the preliminary top-k results at the boundary of the query circle are verified using the semi-sine algorithm, and the preliminary top-k results with a distance exceeding the preset radius are removed to obtain the filtered top-k results.

[0060] In one embodiment, such as Figure 2 As shown, we first perform precise boundary verification, that is, for the preliminary top-k results that are near the boundary of the query circle (i.e., |haversine(loc_u, q_loc)). The result of radius| / radius<ε_b, default ε_b=0.10) is used to recalculate the spherical distance using the exact hadersine formula, and results with distances exceeding radius (query circle radius) are discarded.

[0061] Furthermore, if the number of valid results in the top-k results is less than the first preset threshold, the independent table is activated directly, and the cross-cell candidate edge pointing to the adjacent cell of the corresponding boundary H3 cell is read through the independent table.

[0062] Furthermore, the target node of the cross-cell candidate edge must be identified as the search entry point, and a local supplementary search based on constraints must be performed at the bottom layer of the target HNSW subgraph. These constraints include: search width, expansion depth, and access permissions.

[0063] Further, the candidate H3 units obtained after supplementary search are subjected to a secondary verification process related to the haversine algorithm, and finally the supplementary candidate units for returning the global sorting are determined.

[0064] In one embodiment, as Figure 2 shown, after precise haversine verification, if the number of valid results k' < k, the cross_edge_table (independent table) is activated, and the cross-cell candidate edges pointing to adjacent cells of the involved boundary cell c_i are read through the cross_edge_table; and taking the target node of the cross-cell candidate edge as the entry, a restricted local supplementary search is performed at the bottom layer of the HNSW subgraph of the target cell. The restricted conditions include: the search width ef_repair = min(efSearch, 4×(k - k')), the expansion depth does not exceed L_repair hops (default 2 to 3 hops), and only the adjacent cells intersecting the query circle bbox are accessed. The candidate nodes obtained after the subsequent supplementary search must also pass the precise haversine verification before being added to the candidates, and finally the supplementary candidate units for returning the global sorting are determined. Each boundary cell returns at most [(k - k') / W_b] supplementary candidates (W_b is the number of boundary cells participating in the backfill).

[0065] As a feasible implementation, if k' ≥ k, directly return, the cross_edge_table is not accessed, and the entire query does not bear any overhead of cross-partition edges.

[0066] S106. Return the supplementary candidate units to the top-k results, and based on the top-k results, perform a feedback process on the query statistics of the data set.

[0067] Specifically, it is also necessary to perform global sorting on both the supplementary candidate units and the post-candidate units after concurrency screening according to the composite distance, and return the final candidate units within the head range to the top-k results to obtain the query statistics feedback result of the data set. The query statistics feedback result includes: the cumulative query hit rate of each H3 unit, the depth distribution of the triggered K_ring, the query circle radius distribution, and the boundary backfill frequency.

[0068] In one embodiment, as [[ID=第二十二]] Figure 2As shown, the supplementary candidates and existing results (post-candidate units filtered by concurrency) are globally sorted by a composite distance d, then the top k results are returned, and finally, the final candidate units within the head range are returned to the top-k results. The query statistics feedback results of the obtained dataset include: the cumulative query hit rate (hit_rate(c)) for each unit, the K_ring depth distribution of the triggered data, the radius distribution, and the boundary recall rate (boundary_recall_rate(c)). Furthermore, index self-maintenance is required, namely: 1) Adjusting the resident cache set of hot units in S5 based on hit_rate(c) feedback (sliding window update, default window 7 days); 2) Triggering local reconstruction of S1 based on changes in data scale and query pattern drift within the unit: when the count of unit c exceeds the range of [N_min, N_max] for more than τ_drift period (default 24 hours), splitting or merging the unit and rebuilding the corresponding HNSW subgraph is performed. During this period, the unit is temporarily unavailable, but other units maintain service; 3) When boundary_recall_rate(c) exceeds the threshold τ_b (default 0.3), triggering local cross_edge_table encryption reconstruction of S3 (increasing β_b to 0.5 on the boundary node set B_c of c, or increasing the number of candidate edges retained across units, and rebuilding the relevant cross edges of the unit).

[0069] In one embodiment, an experimental verification framework and a comparative baseline are used to demonstrate the beneficial effects of this application: 1) Experimental Setup: Due to single-machine memory and time constraints, the data in the table below is based on 100,000 synthetic POIs (dim=128, a Gaussian mixture spatial distribution of dense urban centers and sparse suburbs, semantic embeddings synthesized according to the true semantic prior of "nearby POIs tend to be of the same topic") + 200 queries, radius=1km, k=10. This scale is used to demonstrate the relative advantages and disadvantages of this method compared with the baseline in the three dimensions of recall, latency, and memory, as well as the role of each innovative component. Millions to tens of millions of real-world datasets (OpenStreet Map-Global-POI, Foursquare-NYC) can be used as extended examples to further verify absolute latency and recall, without affecting the role of the prototype experiment in demonstrating the relative technical effect. The experimental datasets are shown in Table 1. Table 1 Experimental Dataset

[0070] 2) Set a baseline for comparison, including: 1. Baseline 1: pre-filterHNSW (H3-grid subset + full HNSW node access period ID check), representing the SingleStore type scheme.

[0071] 2. Baseline 2: post-filterHNSW (full HNSWtop-k′+geometric filtering, k′=ef_search×8 in this experiment), representing the traditional two-stage approach.

[0072] 3. Baseline 3: ACORN-γ approximate reproduction (M=32elevated simulates two-hop redundancy, ef_search=128 normal width beam, arXiv2403.04871).

[0073] 4. Baseline 4: Qdrant Filterable HNSW approximate reproduction (geohash / H3 bucket labels + same graph elevatedM=24 / ef_search=96).

[0074] 5. Baseline 5: IVF clusters + intra-cluster HNSW (KMeans256 clusters, n_probe=64, independent HNSW for each cluster).

[0075] The complete solution consists of adaptive H3 hybrid resolution [N_min=256, N_max=4096] + in-cell HNSW + cross_edge on-demand activation + composite distance + boundary hadersine verification backfill.

[0076] 3) Actual measurement results: Table 2 Comparison of Recall Rate and Delay Rate

[0077] As shown in Table 2, the required parameters are k=10, radius=1km, and balanced weights α=β=0.5; 100,000 POIs / 200 queries. In the key observations, this application achieved a recall of 70.1% under balanced weights, approximately 6 times higher than the best of the five baselines (baseline 5IVF+HNSW 11.6%), and approximately 14 times higher than the SingleStore pre-filter (4.9%). The p50 latency (1.0ms) was lower than all baselines, and the p99 latency (2.8ms) was significantly lower than the post-filter (31.1ms). This data demonstrates that this application can significantly improve the recall-latency tradeoff under the same query conditions, but the 70.1% figure is not interpreted as the absolute upper limit of recall for all weights and data sizes. By increasing k_local, efSearch, or ef_repair, latency and memory overhead can be reconfigured under different recall targets. The index memory (0.15GB) increased by approximately 0.07GB relative to the baseline, mainly due to the overhead of cross_edge_table and per-cell header, but it is still within an acceptable range.

[0078] Table 3. Cost breakdown of cross_edge on-demand activation

[0079] As shown in Table 3, k=10 and radius=1km are required. Key observation: At a scale of 100k POIs, 98.5% of queries do not access the cross_edge_table at all, verifying the core value of the physical separation design of partitioning and connectivity compensation—normal query paths do not bear any traversal overhead across partition edges; only 1.5% of boundary queries trigger on-demand activation. This distribution is in stark contrast to the always-participating schemes of ACORN / Qdrant: even with a small experimental scale and a low proportion of boundary edges, the on-demand activation mechanism can save cross-edge traversal costs for the vast majority of queries.

[0080] Table 4 shows the three preset ablation levels.

[0081] As shown in Table 4, k=10 and radius=1km are required. Key observation: (α, β) is continuously adjusted from semantic priority → balanced → geographic priority. The average geographic distance of the top-1 search results monotonically decreases from 262 meters to 90 meters (the geographic priority effect is realized), while the recall rate decreases as α increases. The recall rate reaches 92.8% in the semantic priority scenario and 70.1% in the balanced scenario. The geographic priority scenario emphasizes distance constraints rather than pure semantic recall. This phenomenon indicates that this application does not promise the same recall rate under all weights, but rather makes a continuously adjustable trade-off between semantic similarity and geographic proximity through query options. When the application requires a higher recall k, k_local, efSearch, or ef_repair can be added as subordinate implementation parameters.

[0082] Table 5 Adaptive H3 Hybrid Resolution vs Fixed Resolution Ablation

[0083] As shown in Table 5, k=10, balanced weights, and 100,000 POIs are required. Key observations: With a fixed resolution R=10, over 50,000 units are generated, averaging ~2 points per unit. The HNSW subgraph degenerates into brute-force comparison, with a p99 latency of 26.9ms. With a fixed R=12, further subdivision to nearly 100,000 units results in a p99 latency as high as 229.8ms. This application uses a merging / splitting strategy [N_min=256, N_max=4096] to compress the number of units to 1,279, with the data volume per unit concentrated within a reasonable range. The p99 latency is reduced to 2.8ms—a 9.6-fold improvement over a fixed R=10 and an 82-fold improvement over a fixed R=12, verifying the engineering necessity of innovation point 2.

[0084] In addition, embodiments of this application also provide a database-based geographic-semantic joint index device, such as... Figure 4 As shown, the database-based geographic-semantic composite index device 400 specifically includes: At least one processor 401; and a memory 402 communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions executable by the at least one processor 401 to enable the at least one processor 401 to execute: By leveraging the recursive relationship between data volume and data range within H3 units, the dataset is split and merged into parent-child networks. Furthermore, the data is partitioned based on resolution to construct a hybrid resolution network. The hybrid resolution network stores data using the ID of the H3 unit as the key and the list of data within the unit as the value. The HNSW subgraph of each cell in the hybrid resolution network is processed by querying adjacent hexagonal cell nodes based on boundary subsets, and directed cross-cell link edges are established based on distance thresholds. The resolution cells are located by querying the quadruples corresponding to the directed cross-cell link edges to identify the target resolution cells in the hybrid resolution network; and the K-ring depth coverage calculation is performed on the target resolution cells to obtain a set of candidate cells based on the target resolution cells and the K-ring depth. Each candidate unit in the candidate unit set after concurrency filtering is subjected to concurrent query of HNSW subgraph and corresponding composite distance sorting to obtain the target HNSW subgraph. The top-k results returned after the global merging of the target HNSW subgraph are verified by the semi-sine of the query circle boundary. Based on the semi-sine verification results, the candidate cells are subjected to restricted local supplementary search processing related to the HNSW subgraph through an independent table to obtain supplementary candidate cells for returning the global ranking. The independent table is completely separated from the main graph neighbor list and is used to store quadruples. The supplementary candidate units are returned to the top-k results, and based on the top-k results, the dataset is processed for query statistics feedback.

[0085] This application's embodiments resolve the contradiction between partition boundary recall and normal traversal overhead through a geographic-semantic joint indexing method based on H3 hexagonal partitioning and HNSW subgraphs within partitions. It also overcomes issues in existing two-stage solutions such as lack of geographic layer awareness, double loss of pre / post-filter recall and delay, and uneven spatial distribution leading to access imbalance. Normal queries do not incur cross-partition edge traversal overhead; furthermore, it can improve recall by on-demand cross_edge replenishment when boundary results are insufficient. Adaptive H3 hybrid resolution also reduces the degradation of empty cells and small subgraphs caused by fixed resolution; simultaneously, dynamic weighted composite distance supports continuous sorting adjustment under different business semantics.

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

[0087] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0088] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0092] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0093] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0094] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0095] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0096] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of this specification.

Claims

1. A database-based geographic-semantic joint indexing method, characterized in that, The method includes: By leveraging the recursive relationship between data volume and data range within H3 units, the dataset is split and merged into parent-child networks, and the data is partitioned based on resolution to construct a hybrid resolution network. The hybrid resolution network is stored using the ID of the H3 unit as the key and the list of data within the unit as the value. The HNSW subgraph of each unit in the hybrid resolution network is processed by querying adjacent hexagonal unit nodes based on boundary subsets, and directed cross-unit link edges are established based on distance thresholds. The resolution units corresponding to the quadruples of the directed cross-unit link edges are queried and located to determine the target resolution units in the hybrid resolution network; and the K-ring depth coverage calculation is performed on the target resolution units to obtain a set of candidate units based on the target resolution units and the K-ring depth. Each candidate unit in the candidate unit set after concurrency filtering is subjected to concurrent query of HNSW subgraph and corresponding composite distance sorting to obtain the target HNSW subgraph. The top-k results returned after the global merging of the target HNSW subgraph are verified by the semi-sine of the query circle boundary. Based on the semi-sine verification results, the candidate units are subjected to restricted local supplementary search processing related to the HNSW subgraph through an independent table to obtain supplementary candidate units for returning the global ranking. The independent table is completely separated from the main graph neighbor list and is used to store the quadruple. The supplementary candidate units are returned to the top-k results, and based on the top-k results, the dataset is subjected to query statistics feedback processing.

2. The database-based geographic-semantic joint indexing method according to claim 1, characterized in that, By leveraging the recursive relationships between data volumes and data intervals within H3 units, the dataset undergoes parent-child network splitting and merging. Furthermore, the data is partitioned based on resolution to construct a hybrid resolution network, specifically including: The spatial distribution of the dataset is sampled to determine the amount of data within each H3 unit; By employing a bottom-up merging strategy and a top-down splitting strategy, and partitioning the data based on resolution, the recursive relationship between the data volume and data intervals within the H3 unit is determined and processed. If the amount of data is less than the minimum value in the data range, then the H3 unit will be recursively processed under the parent merge. If the amount of data is greater than the minimum value in the data interval, then the H3 unit will be recursively processed under sub-level splitting. The hybrid resolution network is constructed based on the parent merging and child splitting of the H3 units.

3. The database-based geographic-semantic joint indexing method according to claim 1, characterized in that, The HNSW subgraph of each unit in the hybrid resolution network is processed by querying adjacent hexagonal unit nodes based on boundary subsets, and directed cross-unit link edges are established based on distance thresholds, specifically including: Based on each H3 unit in the hybrid resolution network, a corresponding HNSW subgraph is constructed; wherein the HNSW subgraphs are mutually independent and connected by edges without a main graph. For each H3 cell, perform node query processing on the boundary subset of the bottom-level nodes of the HNSW subgraph, which consists of 6 adjacent hexagonal cells. Based on a distance threshold, a distance condition matching query is performed on 6 adjacent hexagonal units to determine the target adjacent hexagonal units that meet the distance threshold; Based on the edge nodes of the target adjacent hexagonal cells, the directed cross-cell link edges are constructed; wherein, all the directed cross-cell link edges are stored in the form of quadruples in an independent table completely separate from the main graph neighbor list.

4. The database-based geographic-semantic joint indexing method according to claim 3, characterized in that, After establishing directed cross-cell link edges based on a distance threshold, the method further includes: For each H3 cell, maintain and configure the header node, and store all cell headers in the maintenance configuration consecutively according to the Z-order curve of the H3 cell index; Based on the access frequency order of H3 units in the historical query logs, the HNSW subgraphs corresponding to the hot H3 units in the header range are stored in process form in deserialized form; and the HNSW subgraphs corresponding to the remaining units are subject to control over mmap loading.

5. The database-based geographic-semantic joint indexing method according to claim 1, characterized in that, The resolution units corresponding to the quadruples of the directed cross-unit link edges are queried and located to determine the target resolution units in the hybrid resolution network; and the K-ring depth coverage calculation is performed on the target resolution units to obtain a set of candidate units based on the target resolution units and the K-ring depth, specifically including: Receive the quadruple corresponding to the queried directed cross-cell link edge; The target resolution unit is obtained by querying and locating the four-tuple using H3APIlatLngToCel; ​​if the target resolution unit is not in the hybrid resolution network, the process falls back to the H3 unit corresponding to the parent / child level. Based on the given circumcircle radius and preset circle radius of the target resolution cell, a coverage calculation related to the K-ring depth is performed on the target resolution cell to obtain the K-ring depth value; By calling the gridDisk function of the H3 cell API, the K-ring depth value and the target resolution cell are dynamically calculated to obtain the candidate cell set; and the H3 cells in the candidate cell set that are at the boundary of the mixed resolution are equivalently expanded according to the parent-child cell relationship.

6. The database-based geographic-semantic joint indexing method according to claim 1, characterized in that, Each candidate unit in the candidate unit set after concurrency filtering is subjected to concurrent querying of the HNSW subgraph and corresponding composite distance sorting to obtain the target HNSW subgraph, which specifically includes: Based on each candidate unit in the candidate unit set, the corresponding bbox key and query circle are read, and the circle-rectangle intersection between the bbox key and the query circle is determined, and irrelevant candidate units in the candidate unit set are eliminated. By using a preset concurrency decision and based on the number of candidate units and the query cost of the HNSW subgraph, the remaining candidate units in the candidate unit set after the elimination process are sorted to obtain the candidate unit set after concurrency filtering. Enter the corresponding HNSW subgraph through the head entry node of the candidate unit in the candidate unit set; and determine the composite distance as the sorting key for the beam search; The HNSW subgraph is sorted according to priority rules using the sorting key to obtain the target HNSW subgraph used to return the top-k results; wherein, the priority rules include: geographic priority rule, semantic priority rule and balance rule.

7. The database-based geographic-semantic joint indexing method according to claim 1, characterized in that, The top-k results returned after the global merging of the target HNSW subgraph are verified using the semi-versus of the query circle boundary. Based on the semi-versus verification results, a restricted local supplementary search is performed on the candidate units related to the HNSW subgraph through an independent table to obtain supplementary candidate units for returning the global ranking. Specifically, this includes: The top-k result set returned by the target HNSW subgraph is globally merged, and each top-k result in the globally merged top-k result set is sorted according to the distance value of the composite distance. Several top-k results within the head range are selected as preliminary top-k results; The preliminary top-k results that are at the boundary of the query circle are verified by the semi-sine algorithm, and the preliminary top-k results that are more than the preset radius are removed to obtain the filtered top-k results. If the number of valid results of the top-k results is less than the first preset threshold, the independent table is directly activated, and the corresponding boundary H3 unit is read through the independent table to find the cross-unit candidate edge pointing to the adjacent unit. The target node of the cross-cell candidate edge is determined as the search entry point, and a local supplementary search based on constraints is performed at the bottom layer of the target HNSW subgraph; wherein, the constraints include: search width, expansion depth and access permissions; The candidate H3 units obtained after the supplementary search are subjected to secondary verification processing using the semi-sine algorithm to determine the supplementary candidate units used to return the global sort.

8. A database-based geographic-semantic joint indexing method according to claim 1, characterized in that, The supplementary candidate units are returned to the top-k results, and based on the top-k results, the dataset is subjected to query statistics feedback processing, specifically including: Based on the composite distance, the supplementary candidate units and the subsequent candidate units filtered by concurrency are all globally sorted, and the final candidate units within the head range are returned to the top-k results to obtain the query statistics feedback results of the dataset; wherein, the query statistics feedback results include: the cumulative query hit rate of each H3 unit, the triggered K_ring depth distribution, the query circle radius distribution, and the boundary completion frequency.

9. A database-based geographic-semantic composite indexing device, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a database-based geographic-semantic joint indexing method according to any one of claims 1-8.

10. A non-volatile computer storage medium, characterized in that, The storage medium is a non-volatile computer-readable storage medium that stores at least one program, each program including instructions that, when executed by a terminal, cause the terminal to perform a database-based geographic-semantic joint indexing method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Security human-vehicle multi-mode retrieval method and device, electronic equipment and storage medium

    CN120234439A

  • Hybrid approximate neighbor search method fusing clustering guide partition and graph structure pruning

    CN122064849A