Methods, apparatus, media, and devices for implementing determined geolocation connectivity

CN119513217BActive Publication Date: 2026-09-18JOINT WARFARE COLLEGE NAT DEFENSE UNIV OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411394511.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2026-09-18
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

[0002]目前,通常是利用路径分析来判断两个地理位置之间的连通性,而路径分析往往需要大量的地理空间数据和计算资源,因此,在需要处理大量的地理位置连通性判断的应用场景中,处理效率问题往往较为突出

Benefits of technology

[0011] Based on the above embodiments of this disclosure, a method, apparatus, storage medium, and electronic device for determining geographic connectivity are provided. Since grid node technology (such as H3 grid node technology) can efficiently divide the geographic space on Earth into multiple levels of grid nodes with different resolutions, and grid nodes typically have unique encodings and spatial relationships, this disclosure, by utilizing grid node technology, can conveniently and flexibly obtain intra-block edge connectivity information of sub-grid nodes and neighboring grid nodes, as well as inter-block edge connectivity information of the top-level grid node, in any user-specified geographic area without requiring a large amount of geospatial data in a particular geographic area. By explicitly indicating the positional relationships between sub-grid nodes and neighboring grid nodes through intra-block edge connectivity information, this disclosure can conveniently obtain sub-grid node connectivity information. Because sub-grid nodes and the top-level grid node have unique spatial relationships, this disclosure can efficiently obtain the top-level grid node connectivity information using sub-grid node connectivity information and inter-block edge connectivity information. Since the connectivity information of top-level grid nodes can reflect the connectivity of geographical locations within different top-level grid nodes, the technical solution provided in this disclosure can quickly determine the connectivity between any two geographical locations within a top-level grid node using this connectivity information. It is also flexible enough to be applied when the user changes their specified geographical region and is well-suited for application scenarios requiring large-scale determination of geographical location connectivity. Therefore, the technical solution provided in this disclosure enriches the methods for determining geographical location connectivity, improves implementation flexibility, and helps reduce the implementation cost of determining geographical location connectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513217B_ABST
    Figure CN119513217B_ABST
Patent Text Reader

Abstract

Disclosed are a method, device, medium and equipment for implementing determination of geographical location connectivity, wherein the method comprises: acquiring each grid node with a predetermined resolution contained in a geographical area, each grid node being taken as a top-level grid node; acquiring sub-grid nodes of each top-level grid node and neighbor grid nodes of each sub-grid node; setting intra-block edge connectivity relationship information for sub-grid nodes and their neighbor grid nodes with the same parent grid node, and setting inter-block edge connectivity relationship information for sub-grid nodes and their neighbor grid nodes with different parent grid nodes; determining sub-grid node connectivity information according to the intra-block edge connectivity relationship information; and determining top-level grid node connectivity information according to the sub-grid node connectivity information and the inter-block edge connectivity relationship information. The technical scheme provided by the disclosure is conducive to enriching the implementation mode of determination of geographical location connectivity and reducing the implementation cost of determination of geographical location connectivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to computer technology, and in particular to a method for determining geographic location connectivity, an apparatus for determining geographic location connectivity, a storage medium, and an electronic device. Background Technology

[0002] Currently, path analysis is typically used to determine the connectivity between two geographical locations. However, path analysis often requires a large amount of geospatial data and computing resources. Therefore, in application scenarios that need to handle a large number of geographical location connectivity determinations, the issue of processing efficiency is often quite prominent.

[0003] How to quickly determine the connectivity between two geographic locations with limited computing resources, so as to be better applied in application scenarios that require handling a large number of geographic location connectivity determinations, is a technical problem worthy of attention. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure is proposed. Embodiments of this disclosure provide a method, apparatus, storage medium, and electronic device for determining geographic location connectivity.

[0005] According to a first aspect of the present disclosure, a method for determining geographic location connectivity is provided, comprising: acquiring grid nodes of a geographic region having a predetermined resolution, wherein each grid node is considered as a top-level grid node; acquiring child grid nodes of each top-level grid node and neighboring grid nodes of each child grid node; setting intra-block edge connectivity information for child grid nodes with the same parent grid node and their neighboring grid nodes to represent adjacency within a top-level grid node, and setting inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes to represent connectivity between two top-level grid nodes through their respective child nodes; determining child grid node connectivity information based on the intra-block edge connectivity information; and determining top-level grid node connectivity information based on the child grid node connectivity information and the inter-block edge connectivity information; wherein the top-level grid node connectivity information is used to determine the connectivity of two geographic locations belonging to the geographic region.

[0006] According to a second aspect of the present disclosure, another method for determining geographic location connectivity is provided, comprising: determining top-level grid nodes corresponding to two geographic locations in a geographic region, wherein the geographic region is covered by a plurality of top-level grid nodes; determining whether the top-level grid nodes corresponding to the two geographic locations are connected based on pre-set top-level grid node connectivity information; if the determination result is that the top-level grid nodes corresponding to the two geographic locations are connected, then determining that the two geographic locations are connected; otherwise, determining that the two geographic locations are not connected; wherein the top-level grid node connectivity information is set in the manner described in the above method.

[0007] According to a third aspect of the present disclosure, an apparatus for determining geographic location connectivity is provided, comprising: a first acquisition module for acquiring grid nodes with a predetermined resolution contained in a geographic region, wherein each grid node is designated as a top-level grid node; a second acquisition module for acquiring child grid nodes of each top-level grid node and neighboring grid nodes of each child grid node; a connectivity setting module for setting intra-block edge connectivity information for child grid nodes with the same parent grid node and their neighboring grid nodes to indicate adjacency within a top-level grid node, and setting inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes to indicate connectivity between two top-level grid nodes through their respective child nodes; a first determination module for determining child grid node connectivity information based on the intra-block edge connectivity information; and a second determination module for determining the top-level grid node connectivity information based on the child grid node connectivity information and the inter-block edge connectivity information; wherein the top-level grid node connectivity information is used to determine the connectivity of two geographic locations belonging to the geographic region.

[0008] According to a fourth aspect of the present disclosure, an apparatus for determining geographic location connectivity is provided, comprising: a third determining module, configured to determine top-level grid nodes corresponding to two geographic locations in a geographic region, wherein the geographic region is covered by a plurality of top-level grid nodes; a judging module, configured to judge whether the top-level grid nodes corresponding to the two geographic locations are connected based on pre-set top-level grid node connectivity information; and a connectivity determining module, configured to determine that the two geographic locations are connected if the judging module determines that the top-level grid nodes corresponding to the two geographic locations are connected, otherwise, determine that the two geographic locations are not connected; wherein the top-level grid node connectivity information is set by the above-described apparatus.

[0009] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program for implementing any of the methods described above.

[0010] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; the processor being configured to read the executable instructions from the memory and execute the instructions to implement any of the methods described above.

[0011] Based on the above embodiments of this disclosure, a method, apparatus, storage medium, and electronic device for determining geographic connectivity are provided. Since grid node technology (such as H3 grid node technology) can efficiently divide the geographic space on Earth into multiple levels of grid nodes with different resolutions, and grid nodes typically have unique encodings and spatial relationships, this disclosure, by utilizing grid node technology, can conveniently and flexibly obtain intra-block edge connectivity information of sub-grid nodes and neighboring grid nodes, as well as inter-block edge connectivity information of the top-level grid node, in any user-specified geographic area without requiring a large amount of geospatial data in a particular geographic area. By explicitly indicating the positional relationships between sub-grid nodes and neighboring grid nodes through intra-block edge connectivity information, this disclosure can conveniently obtain sub-grid node connectivity information. Because sub-grid nodes and the top-level grid node have unique spatial relationships, this disclosure can efficiently obtain the top-level grid node connectivity information using sub-grid node connectivity information and inter-block edge connectivity information. Since the connectivity information of top-level grid nodes can reflect the connectivity of geographical locations within different top-level grid nodes, the technical solution provided in this disclosure can quickly determine the connectivity between any two geographical locations within a top-level grid node using this connectivity information. It is also flexible enough to be applied when the user changes their specified geographical region and is well-suited for application scenarios requiring large-scale determination of geographical location connectivity. Therefore, the technical solution provided in this disclosure enriches the methods for determining geographical location connectivity, improves implementation flexibility, and helps reduce the implementation cost of determining geographical location connectivity.

[0012] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0013] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0014] Figure 1 This is a flowchart of an embodiment of the method for determining geographic location connectivity disclosed herein;

[0015] Figure 2 A flowchart illustrating an embodiment of setting intra-block edge adjacency information and a hash table in this disclosure;

[0016] Figure 3 A flowchart illustrating an embodiment of obtaining the effective connected components of a subgrid node according to this disclosure;

[0017] Figure 4 This is a flowchart illustrating an embodiment of obtaining the connected components of a top-level grid node according to the present disclosure;

[0018] Figure 5 A flowchart illustrating an embodiment of this disclosure regarding the setting of block connectivity relationships between top-level grid nodes;

[0019] Figure 6 This is a flowchart of another embodiment of the method for determining geographic location connectivity disclosed herein;

[0020] Figure 7 This is a schematic diagram of an embodiment of the apparatus for determining geographic location connectivity disclosed herein;

[0021] Figure 8 This is a schematic diagram of another embodiment of the apparatus for determining geographic location connectivity disclosed herein;

[0022] Figure 9 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation

[0023] Example embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. It is obvious that the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure, and it should be understood that this disclosure is not limited to the example embodiments described herein.

[0024] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0025] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0026] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0027] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0028] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.

[0029] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0030] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0031] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0032] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0033] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0034] The embodiments of this disclosure can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems, etc.

[0035] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks can be executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.

[0036] This disclosure outlines

[0037] In developing this disclosure, the inventors discovered that many fields, such as urban planning, land use planning, and national defense construction, often require processing large amounts of geographic connectivity judgments. Geographic Information Systems (GIS) are widely used in these fields because they offer powerful tools and functions. GIS provides intuitive and accurate data support to users by integrating, analyzing, and displaying geospatial information. For example, GIS can be used to create various thematic maps, thus assisting relevant departments in making decisions regarding land use planning and urban spatial layout. In another example, GIS can be used to simulate battlefield environments and conduct military terrain analysis, thereby helping relevant personnel make more scientific military decisions. However, the powerful tools and functions of GIS are based on the need for large amounts of geospatial data and computational resources, which limits the widespread application of GIS; furthermore, its powerful functions present challenges in terms of flexibility of use.

[0038] Currently, technologies utilizing grid nodes to cover the Earth (such as the H3 geospatial indexing system) have been developed. This technology divides the Earth's surface into multi-level grid nodes (such as hexagonal grid nodes) with similar / identical shapes, seamless spatial non-overlapping, and continuous scale. This technology possesses unique encoding and spatial relationships. For example, through ordered recursive geographic encoding of grid nodes, each node, from the Earth's scale to the centimeter scale, has a unique geographic code. The API (Application Programming Interface) provided by this technology allows for easy acquisition of spatial relationships between grid nodes at the same or different levels. Actual geographical locations often belong to a specific grid node at a certain level. Introducing grid node technology into the process of determining geographical connectivity, and fully utilizing its unique encoding and spatial relationships, can reduce the amount of geospatial information used and the consumption of computational resources, thereby making the calculation of connectivity between geographical locations simpler and more efficient.

[0039] Exemplary Overview

[0040] The technical solution disclosed herein for determining geographic connectivity can be applied to various application scenarios. For example, in a material requisition scenario, suppose there are approximately one million units near a material requisition center, of which two hundred thousand units have materials to be requisitioned and respond to the requisition request. The material requisition initiator can use the technical solution disclosed herein to determine the units connected to the material requisition center among the two hundred thousand units responding to the requisition request, and further determine the units to be requisitioned from among the connected units.

[0041] Exemplary methods

[0042] Figure 1 This is a flowchart of an embodiment of the method for determining geographic location connectivity disclosed herein. Figure 1 The method shown includes steps S100, S101, S102, S103, and S104. The following describes... Figure 1 Each step in the process will be explained separately.

[0043] S100: Obtain the grid nodes with a predetermined resolution contained in a geographic region.

[0044] The geographical region in this disclosure refers to a region on the Earth's landmass, excluding oceans. This geographical region is typically determined based on user requirements and can be one or more communities, one or more villages, one or more towns or cities, one or more provinces, etc. In one example, the geographical region in this disclosure can be a geographical region whose center point is determined by a user-specified shape (such as a rectangle or circle) and size.

[0045] In this disclosure, a grid node refers to a regular polygonal grid node, such as a regular hexagonal grid node. The resolution in this disclosure refers to an indicator that determines the size and hierarchy of a grid node. The predetermined resolution should range across all grid node hierarchies. For example, for the H3 geospatial indexing system, a total of 16 grid node hierarchies are set; therefore, the predetermined resolution of this disclosure can be any value between 0 and 15. Similarly, the predetermined resolution is usually specified by the user.

[0046] In one example, the process of obtaining grid nodes with a predetermined resolution within a geographic region can be as follows: First, obtain the location information (such as the latitude and longitude of a given geographic location), the radius of the geographic region, and the predetermined resolution (such as 10 or 13). Then, based on the H3 geospatial indexing system, obtain all grid nodes with the predetermined resolution within the land geographic region formed by taking the geographic location represented by the location information of the predetermined geographic location as the center and the radius of the geographic region as the radius. For example, the corresponding API provided by the H3 geospatial indexing system can be used to obtain H3 grid nodes using the latitude and longitude of a given geographic location, the radius of the geographic region, and the predetermined resolution as parameters. Based on the results returned by the system, multiple grid nodes can be obtained. For ease of description, this disclosure refers to all grid nodes obtained in this step as top-level grid nodes. All obtained top-level grid nodes can be stored in an array, for example, in a one-dimensional array `blocks`. It should be noted that this disclosure allows adjustments to the results returned by the system (such as deleting some grid nodes), and the adjusted grid nodes are used as the top-level grid nodes obtained in this step. Whether it's the H3 geospatial indexing system or other systems, each grid node at different levels is usually assigned a unique identifier (e.g., each grid node has a unique 64-bit identifier). The identifiers of any two different grid nodes will definitely be different. The grid nodes obtained in this step may include grid node identifiers, and the grid nodes mentioned below also include grid node identifiers.

[0047] This disclosure utilizes the API provided by the H3 geospatial indexing system to conveniently obtain all top-level grid nodes belonging to a user-specified geographic region (a geographic region with a specified center position and radius) and having a corresponding resolution. Since the grid nodes in the H3 geospatial indexing system are regular hexagonal grid nodes, and regular hexagonal grid nodes have the characteristic that the shortest distance from the center point to all its neighboring grid nodes is equal, the technical solution provided by this disclosure can facilitate subsequent applications.

[0048] S101. Obtain the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node.

[0049] All sub-grid nodes obtained in this step are typically located within the geographical area of ​​S100. In one specific example, all neighboring grid nodes obtained in this step are located within the geographical area of ​​S100. In another specific example, some of the neighboring grid nodes obtained in this disclosure are located within the geographical area of ​​S100, while others are located outside the geographical area of ​​S100.

[0050] In this disclosure, a sub-grid node of a top-level grid node refers to a grid node with a higher resolution than the top-level grid node, located at the next lower level, and whose center point belongs to the area range of the top-level grid node. For a specific example, in the H3 geospatial indexing system, if the resolution of the top-level grid node is 12, then the resolution of the sub-grid nodes is 13, and a top-level grid node typically has 7 sub-grid nodes, with the center point of the top-level grid node coinciding with the center point of one of its 7 sub-grid nodes.

[0051] In this disclosure, a sub-grid node has the same resolution as its neighboring grid nodes, and the number of neighboring grid nodes a sub-grid node has is usually related to the shape of the grid node. For example, for a regular hexagonal grid node, a sub-grid node has 6 neighboring grid nodes, and the shortest distance from the center point of any sub-grid node to each of its neighboring grid nodes is the same.

[0052] This disclosure allows the use of the corresponding APIs provided by the H3 geospatial indexing system to obtain the sub-grid nodes of each top-level grid node, and to obtain all neighboring grid nodes of each sub-grid node using the corresponding APIs provided by the H3 geospatial indexing system.

[0053] Optionally, this disclosure may utilize a two-dimensional array to store the correspondence between each top-level grid node and all its sub-grid nodes. For example, all top-level grid nodes obtained in S100 and all sub-grid nodes obtained in this step are stored in a two-dimensional array blocksnodes. A top-level grid node and all its sub-grid nodes constitute a one-dimensional array (i.e., one dimension) in blocksnodes. The number of one-dimensional arrays contained in this two-dimensional array can be determined by the number of top-level grid nodes.

[0054] This disclosure utilizes the API provided by the H3 geospatial indexing system to easily obtain all sub-grid nodes of each top-level grid node within a geographic area, as well as all neighboring grid nodes of each sub-grid node. By using a two-dimensional array to store the correspondence between the top-level grid nodes and sub-grid nodes, it facilitates the subsequent implementation of operations to set inter-block edge connectivity information.

[0055] S102. Set information for the intra-block edge connectivity of child grid nodes with the same parent grid node and their neighboring grid nodes to represent the adjacent edges within a top-level grid node, and set information for the inter-block edge connectivity of child grid nodes with different parent grid nodes and their neighboring grid nodes to represent the interconnection of two top-level network nodes through their respective child nodes.

[0056] The intra-block edge connectivity information in this step refers to information that indicates that a sub-grid node and one of its neighboring grid nodes are both within the same top-level grid node, and that they are adjacent to each other through the same edge (i.e., they share an edge).

[0057] The inter-block edge connectivity information in this step refers to information that indicates a sub-grid node and its neighboring grid node are located in two top-level grid nodes respectively, and that the sub-grid node and the neighboring grid node are adjacent to each other by the same edge (i.e., they share an edge).

[0058] In other words, the objects with the same parent mesh node in this step are: a child mesh node and a neighboring mesh node of that child mesh node. Similarly, the objects with different parent mesh nodes in this step are: a child mesh node and a neighboring mesh node of that child mesh node.

[0059] For a specific example, for any child grid node (e.g., child grid node j) within any top-level grid node (e.g., top-level grid node i), if a neighboring grid node (e.g., neighboring grid node k) of child grid node j shares the same parent grid node (i.e., top-level grid node i), then this disclosure sets intra-block edge connectivity information for child grid node j and neighboring grid node k. This intra-block edge connectivity information indicates that an edge of child grid node j and an edge of neighboring grid node k are closely adjacent, and the parent grid node of both child grid node j and neighboring grid node k is top-level grid node i. Optionally, the intra-block edge connectivity information of this disclosure may include: the identifier of top-level grid node i, the identifier of child grid node j, and the identifier of neighboring grid node k. If a neighboring grid node k of a sub-grid node j has a different parent grid node, and both parent grid nodes are top-level grid nodes (e.g., the parent grid node of sub-grid node j is top-level grid node i, and the parent grid node of neighboring grid node k is top-level grid node i+1 obtained in step S100), then this disclosure sets inter-block edge connectivity information for the sub-grid node j and the neighboring node k. This inter-block edge connectivity information can indicate that one edge of sub-grid node j and one edge of neighboring grid node k are closely adjacent, and top-level grid node i and top-level grid node i+1 are connected through sub-grid node j and neighboring grid node k. Optionally, the inter-block edge connectivity information of this disclosure may include: the identifier of top-level grid node i, the identifier of sub-grid node j, the identifier of top-level grid node i+1, and the identifier of neighboring grid node k.

[0060] Since all neighboring grid nodes obtained in S101 of this disclosure may include neighboring grid nodes that do not belong to the geographical area specified by the user, this step can exclude neighboring grid nodes that do not belong to the geographical area specified by the user during the process of setting intra-block edge connectivity information and inter-block edge connectivity information.

[0061] A concrete example is given: for any top-level grid node (hereinafter referred to as top-level grid node i) and any child grid node (hereinafter referred to as child grid node j) of any top-level grid node (hereinafter referred to as top-level grid node i), determine whether the parent grid node of the neighboring grid node k belongs to the set of top-level grid nodes (e.g., determine whether the parent grid node of the neighboring grid node k is in the one-dimensional array blocks). If it does not belong to the set of top-level grid nodes, skip the neighboring grid node k (e.g., delete the neighboring grid node k); if it belongs to the set of top-level grid nodes (e.g., the parent grid node of the neighboring grid node k is in the one-dimensional array blocks), skip the neighboring grid node k. If a node is in a one-dimensional array `blocks`, then determine whether the parent node of the neighboring grid node `k` is the top-level grid node `i`. If it is the top-level grid node `i`, then set the intra-block edge connectivity information for the child grid node `j` and the neighboring grid node `k`. If it is not the top-level grid node `i`, then set the inter-block edge connectivity information for the child grid node `j` and the neighboring grid node `k`, indicating that one edge of the child grid node `j` and one edge of the neighboring grid node `k` are closely adjacent, and the parent node of the top-level grid node `i` and the parent node of the neighboring grid node `k` are connected through the child grid node `j` and the neighboring grid node `k`.

[0062] This disclosure can use a table, queue, or array structure to store the edge connectivity information within the block. For example, this disclosure can use a three-dimensional array to store the edge connectivity information within the block. One dimension of the three-dimensional array represents the top-level grid node (such as the top-level grid node identifier), another dimension represents the child grid node of the top-level grid node (such as the child grid node identifier), and the remaining dimension represents the neighboring grid node of the child grid node (such as the neighboring grid node identifier).

[0063] This disclosure provides information on intra-block edge connectivity, including top-level grid nodes, sub-grid nodes, and neighboring grid nodes. For example, it uses a three-dimensional array to store intra-block edge connectivity information. It also provides information on inter-block edge connectivity, including sub-grid nodes and their parent grid nodes, and neighboring grid nodes and their parent grid nodes. This clearly represents two different positional relationships between grid nodes at different levels, facilitating the subsequent steps of obtaining sub-grid node connectivity information and top-level grid node connectivity information.

[0064] Similarly, this disclosure can use structures such as tables, queues, or arrays to store inter-block edge connectivity information. For example, this disclosure can use a hash table (i.e., a hash table) to store this inter-block edge connectivity information. The key-value pairs contained in this hash table can be configured as follows: the key in the key-value pair can be set to the top-level grid node (such as the parent grid node identifier of a child grid node) and the child grid node (such as the child grid node identifier), and the value in the key-value pair can be set to the top-level grid node (such as the parent grid node identifier of a neighboring grid node) and the neighboring grid node (such as the neighboring grid node identifier). This hash table can be called an indirect connection hash table. By using the key-value pairs of a hash table to store the top-level grid node, child grid node, neighboring grid node, and parent grid node of a neighboring grid node, this disclosure not only facilitates the dynamic expansion of inter-block edge connectivity information but also facilitates fast lookup operations in subsequent steps, thereby facilitating the rapid establishment of top-level grid node connectivity information.

[0065] In a specific example, the pseudocode describing S102 containing this disclosure can take the following form:

[0066]

[0067]

[0068] A specific implementation process corresponding to the above pseudocode can be as follows: Figure 2 As shown.

[0069] Figure 2 In the middle, S200, the steps to start this process.

[0070] S201. Set the one-dimensional array blocks as the set of top-level grid nodes in the geographic region, that is, use the one-dimensional array blocks to store all the top-level grid nodes in the geographic region.

[0071] S202. Set the sub-grid nodes of each top-level grid node in the obtained blocks into a two-dimensional array blocknodes, that is, each top-level grid node and all its sub-grid nodes form a one-dimensional array in blocknodes.

[0072] S203. Perform the operation of traversing the top-level grid nodes in the blocks, and determine whether the current operation of traversing the top-level grid nodes in the blocks has been completed. If it has been completed, proceed to S209, which ends the current process. If it has not been completed, proceed to S204.

[0073] S204. Perform the operation of traversing the sub-grid nodes in the corresponding one-dimensional array of the blocknodes corresponding to the top-level grid node that is currently being traversed, and determine whether the operation of traversing the sub-grid nodes in the corresponding one-dimensional array has been completed. If it has been completed, return to S203, that is, continue to perform the operation of traversing the top-level grid nodes in blocks. If it has not been completed, go to S205.

[0074] S205. Perform the operation of traversing the neighboring grid nodes of the currently traversed sub-grid node, and determine whether the operation of traversing the neighboring grid nodes of the current sub-grid node has been completed. If it has been completed, return to S204, that is, continue to perform the operation of traversing the sub-grid nodes in the corresponding one-dimensional array of blocknodes of the currently traversed top-level grid node. If it has not been completed, go to S206.

[0075] S206. Determine if the parent grid node of the currently traversed neighboring grid node is the same as the parent grid node of the currently traversed child grid node, i.e., determine if both the parent grid node of the currently traversed neighboring grid node and the parent grid node of the currently traversed child grid node are the currently traversed top-level grid node. If both are the currently traversed top-level grid nodes, proceed to S207. If the parent grid node of the currently traversed neighboring grid node is not the currently traversed top-level grid node, but the parent grid node of the currently traversed neighboring grid node belongs to the top-level grid node in blocks, proceed to S208. If the parent grid node of the currently traversed neighboring grid node is not the currently traversed top-level grid node, and the parent grid node of the currently traversed neighboring grid node does not belong to the top-level grid node in blocks, return to S205, i.e., continue to execute the operation of traversing the neighboring grid nodes of the currently traversed child grid node.

[0076] S207. The neighboring grid node can be used as a connected grid node, and intra-block edge connectivity information is set for this connected grid node. Returning to S205, the operation of traversing the neighboring grid nodes of the currently traversed child grid node continues. An example of setting intra-block edge connectivity information is to set row information in the three-dimensional array `blockEdges` with three dimensions: the currently traversed top-level grid node, the currently traversed child grid node, and the currently traversed neighboring grid node. For example, this row information can include: top-level grid node identifier, child grid node identifier, and neighboring grid node identifier.

[0077] S208: Set the inter-block edge connectivity information for the currently traversed neighboring grid nodes, and return to S205, that is, continue to perform the operation of traversing the neighboring grid nodes of the currently traversed sub-grid node.

[0078] An example of setting inter-block edge connectivity information is as follows: If this is the first time setting inter-block edge connectivity information (i.e., the hash table boundaryNodesMap does not currently exist), the hash table boundaryNodesMap can be created first. If the hash table boundaryNodesMap exists, the identifier of the currently traversed top-level grid node and the identifier of the currently traversed child grid node are used as the keys in the key-value pair, and the identifier of the parent grid node of the currently traversed neighboring grid node and the identifier of the currently traversed neighboring grid node are used as the values ​​in the key-value pair, and stored in the hash table boundaryNodesMap.

[0079] S209. Steps to end this process.

[0080] S103. Based on the above intra-block edge connectivity information, determine the sub-grid node connectivity information.

[0081] The sub-grid node connectivity information in this disclosure refers to information used to represent the connectivity relationships between all sub-grid nodes. In one example, the sub-grid node connectivity information can be represented by connected components. For instance, the sub-grid node connectivity information may include one or more valid connected components, each of which is formed by at least two sub-grid nodes. Each valid connected component can be considered as a connected subgraph formed by at least two sub-grid nodes. Since intra-block edge connectivity information can represent the close adjacency relationship of two sub-grid nodes sharing a common edge, one or more connected components for sub-grid nodes can be obtained by analyzing and organizing the intra-block edge connectivity information.

[0082] An example of how this disclosure uses intra-block edge connectivity information to determine the connectivity information of sub-grid nodes is as follows: Figure 3 As shown.

[0083] Figure 3 In step S300, the adjacency matrix of sub-grid nodes is generated based on the intra-block edge connectivity information.

[0084] Optionally, this disclosure can generate an adjacency matrix for each sub-grid node based on the intra-block edge connectivity information. The adjacency matrix can be a two-dimensional matrix. The size of the adjacency matrix of the sub-grid node in this disclosure is usually related to the number of sub-grid nodes and the number of neighboring grid nodes. For example, one dimension of the adjacency matrix is ​​the sub-grid node and the other dimension is the neighboring grid node. If the number of sub-grid nodes is N1 and the number of neighboring grid nodes is N2, then the size of the adjacency matrix can be N1*N2.

[0085] This disclosure allows setting the positions of sub-grid nodes and neighboring grid nodes with intra-block edge adjacency in the adjacency matrix to 1, and setting the positions of sub-grid nodes and neighboring grid nodes without intra-block edge adjacency to 0 or empty.

[0086] S301. Based on the adjacency matrix of the sub-grid nodes, obtain the connected components of the sub-grid nodes using the disjoint-set data structure algorithm.

[0087] For any given subgrid node, this disclosure employs a disjoint-set data structure (DFS) algorithm to process the adjacency matrix of that subgrid node, thereby obtaining at least one connected component of that subgrid node. Each connected component typically includes a set of node identifiers (such as at least one subgrid node identifier and / or at least one neighboring grid node identifier). A set of node identifiers may include one node identifier or multiple node identifiers. If a set of node identifiers includes multiple node identifiers, then the grid nodes represented by any two node identifiers in that set are connected (e.g., between a subgrid node and a neighboring grid node, between two subgrid nodes, or between two neighboring grid nodes).

[0088] S302. Obtain the valid connected components from the connected components of all obtained sub-grid nodes.

[0089] If a connected component contains only one node identifier, it indicates that the grid node corresponding to that node identifier is not connected to any other grid node. This disclosure considers such a connected component invalid and can delete it. Therefore, a valid connected component in this disclosure refers to a connected component that can represent a connection between at least two grid nodes. This disclosure can obtain valid connected components with each sub-grid node as its root node.

[0090] This disclosure obtains the connected components of subgrid nodes by forming an adjacency matrix and processing it using a disjoint-set data structure algorithm. This allows for convenient acquisition of subgrid node connectivity information with less storage space, which helps to further reduce the implementation complexity of the technical solution and improve its implementation speed.

[0091] S104. Based on the above sub-grid node connectivity information and inter-block edge connectivity information, determine the top-level grid node connectivity information.

[0092] The top-level grid node connectivity information in this disclosure refers to information that represents the direct and indirect connectivity relationships between all top-level grid nodes in a geographic region. Optionally, this top-level grid node connectivity information may include a connectivity domain with each top-level grid node as the root node, and a connectivity domain can be represented by an array containing multiple top-level grid node identifiers. This connectivity information is used to determine the connectivity between two geographic locations belonging to the geographic region; that is, when determining whether two geographic locations in the geographic region are connected, the connectivity of the top-level grid nodes to which these two geographic locations belong can be used to determine this.

[0093] Because grid node technology (such as H3 grid node technology) can efficiently divide the geospatial area on Earth into multi-level grid nodes with different resolutions, and grid nodes usually have unique encoding and spatial relationships, this disclosure can conveniently and flexibly obtain the intra-block edge connectivity information of sub-grid nodes and neighboring grid nodes, as well as the inter-block edge connectivity information of the top-level grid node, in any user-specified geographic area without requiring a large amount of geospatial data in a particular geographic area. By explicitly indicating the positional relationships between sub-grid nodes and neighboring grid nodes through intra-block edge connectivity information, this disclosure can conveniently obtain sub-grid node connectivity information. Because sub-grid nodes and the top-level grid node have unique spatial relationships, this disclosure can efficiently obtain the top-level grid node connectivity information using sub-grid node connectivity information and inter-block edge connectivity information. Since the connectivity information of top-level grid nodes can reflect the connectivity of geographical locations within different top-level grid nodes, the technical solution provided in this disclosure can quickly determine the connectivity between any two geographical locations within a top-level grid node using this connectivity information. It is also flexible enough to be applied when the user changes their specified geographical region and is well-suited for application scenarios requiring large-scale determination of geographical location connectivity. Therefore, the technical solution provided in this disclosure enriches the methods for determining geographical location connectivity, improves implementation flexibility, and helps reduce the implementation cost of determining geographical location connectivity.

[0094] An example of how this disclosure uses sub-grid node connectivity information and inter-block edge connectivity information to determine the top-level grid node connectivity information is as follows: Figure 4 As shown.

[0095] Figure 4In S400, any two top-level grid nodes are combined with each sub-grid node in any two effective connected components to obtain multiple first combinations and multiple second combinations.

[0096] Optionally, a first combination in this disclosure is a combination formed by any top-level grid node and any sub-grid node in an effective connected component, and a second combination in this disclosure is a combination formed by any top-level grid node and any sub-grid node in another effective connected component.

[0097] S401. When there is information in the inter-block edge connectivity information that matches the first combination and the second combination, store these two top-level grid nodes as top-level grid node connectivity components.

[0098] Specifically, the judgment operation performed by this disclosure on the first combination and the second combination can be as follows: determine whether there exists a key-value pair in the hash table that is the first combination and the second combination, that is, whether there is a record in the hash table that matches the first combination and the second combination. If there is a matching record, then both top-level grid nodes can be considered as boundary points. Here, a boundary point means that a connected region can be entered from the point or a connected region can be exited from the point. This disclosure can store these two top-level grid nodes as connected components of the top-level grid nodes.

[0099] S402. Using the disjoint-set data structure algorithm, the connected components of multiple top-level grid nodes are merged to obtain the connected components of the top-level grid nodes.

[0100] The connected component merging process in this disclosure refers to merging two or more connected components with connectivity to form a maximum connected region. Specifically, after obtaining all the connected components of the top-level grid nodes using S400 and S401, this disclosure can use a disjoint-set data structure (DFS) algorithm to perform connected component merging on all the connected components of the top-level grid nodes, thereby obtaining the connected region of the top-level grid nodes. The connected region of the top-level grid nodes in this disclosure represents the maximum connection between all top-level grid nodes. The pseudocode for performing the merging operation using the disjoint-set data structure algorithm in this disclosure can be represented as follows:

[0101]

[0102] This disclosure utilizes a hash table to perform key-value pair matching and lookup operations, which helps to identify non-boundary points in the top-level grid nodes that cannot be connected to other top-level grid nodes, and facilitates the easy acquisition of the connected components of the top-level grid nodes. By merging the connected components, the connected domain of the top-level grid nodes can be formed simply and quickly, which helps to further reduce the implementation complexity of the technical solution of this disclosure and further improve the efficiency of the technical solution of this disclosure.

[0103] A specific example of the relevant content in steps S103 and S104 of this disclosure is as follows: Figure 5 As shown.

[0104] Figure 5 In the middle, S500, the steps to start this process.

[0105] S501. Perform the operation of traversing the top-level grid nodes in the blocks, and determine whether the current operation of traversing the top-level grid nodes in the blocks has been completed. If it has been completed, proceed to S509, which ends the current process; otherwise, proceed to S502.

[0106] S502: Perform the operation of traversing the sub-grid nodes in the corresponding one-dimensional array of the blocknodes corresponding to the top-level grid node that is currently being traversed, and determine whether the operation of traversing the sub-grid nodes in the corresponding one-dimensional array has been completed. If it has been completed, return to S503, that is, continue to perform the operation of traversing the top-level grid node in blocks. If it has not been completed, return to S503.

[0107] S503. Establish the adjacency matrix of sub-grid nodes based on the intra-block edge connectivity information. In this adjacency matrix, if a sub-grid node and a neighboring grid node have a close adjacency relationship in the intra-block edge connectivity relationship, then set the corresponding position in the neighboring matrix to 1; otherwise, it can be set to 0 or empty.

[0108] S504. Use the disjoint-set data structure algorithm to process the adjacency matrix of the currently traversed subgrid node, obtain the connected components of the subgrid node, delete the connected components that contain the subgrid node itself, and thus obtain the effective connected components of the subgrid node.

[0109] S505: Perform the traversal operation of each grid node in the effective connected component of the currently traversed sub-grid node, and determine whether the current traversal operation of the grid nodes in the effective connected component has been completed. If the traversal has been completed, return to S502, that is, continue to perform the traversal operation of the sub-grid nodes in the corresponding one-dimensional array of blocknodes corresponding to the currently traversed top-level grid node; if the traversal has not been completed, go to S506.

[0110] S506. Using the combination of the currently traversed top-level grid node and the grid nodes in the currently traversed effective connected components (the first combination), perform a matching record search in the hash table. If a matching record is found, and the matching record contains the second combination (i.e., the combination of another top-level grid node and another grid node in an effective connected component), proceed to S508. If no matching record is found, return to S505, that is, continue to execute the operation of traversing the grid nodes in the effective connected components of the currently traversed sub-grid node. It should be noted that there may be one or more matching records.

[0111] S508. Record information about the block connectivity between the currently traversed top-level grid node and the top-level grid node in the value of the matching record. For example, set a connectivity component for the currently traversed top-level grid node and the top-level grid node in the value of the matching record.

[0112] S509, Steps to end this process.

[0113] In a specific example, Figure 5 The pseudocode for the relevant content in each step shown can be represented in the following form:

[0114]

[0115]

[0116] Figure 6 This is a flowchart of another embodiment of the method for determining geographic location connectivity disclosed herein. Figure 6 The method shown includes steps S600, S601, S602, and S603. The following describes... Figure 6 Each step in the process will be explained separately.

[0117] S600: Determine the top-level grid nodes corresponding to two geographical locations within a geographic region.

[0118] The geographic region in this disclosure is covered by multiple top-level grid nodes. This coverage can be considered seamless, and the top-level grid nodes can be hexagonal in shape. The geographic location in this disclosure can be represented by its latitude and longitude. The top-level grid node corresponding to the geographic location is the top-level grid node to which the geographic location belongs. Here, the top-level grid node can be a grid node corresponding to any resolution other than the maximum resolution in the geospatial indexing system. For example, for an H3-based geospatial indexing system, the top-level grid node in this disclosure can be a grid node corresponding to any resolution other than the 15th resolution. Furthermore, the resolution of the top-level grid node in this step is related to... Figures 1 to 5The top-level grid nodes in the array have the same resolution. In one example, this disclosure can utilize the corresponding API provided by the H3 geospatial indexing system to obtain the top-level grid nodes corresponding to each of the two geographic locations by taking their latitude and longitude and corresponding resolution as input parameters.

[0119] S601. Based on the pre-set top-level grid node connectivity information, determine whether the top-level grid nodes corresponding to the two geographical locations are connected. If the determination result is that the top-level grid nodes corresponding to the two geographical locations are connected, proceed to S602. If the determination result is that the top-level grid nodes corresponding to the two geographical locations are not connected, proceed to S603.

[0120] The method for setting the connectivity information of the top-level network node in this step can be found above. Figures 1-5 The description is omitted here. In one example, this disclosure can search for the top-level grid nodes corresponding to the two geographical locations in the connected components of the top-level grid nodes. If the top-level grid nodes corresponding to the two geographical locations appear in a valid connected component at the same time, then the top-level grid nodes corresponding to the two geographical locations are considered to be connected; otherwise, the top-level grid nodes corresponding to the two geographical locations are considered to be disconnected.

[0121] S602. Determine that the two geographical locations mentioned above are connected, that is, the two geographical locations are connected.

[0122] S603. Determine that the two geographical locations mentioned above are not connected, that is, the two geographical locations are not connected.

[0123] Since the connectivity information of the top-level grid nodes can represent the connectivity relationship of all top-level grid nodes in a geographic region, and any two geographic locations in a geographic region have their own top-level grid nodes, this disclosure can quickly determine the connectivity between any two geographic locations in a geographic region by using the connectivity information of the top-level grid nodes to which the two geographic locations belong. Since this process requires less computational resources, it is well applicable to application scenarios that require large-scale determination of geographic location connectivity.

[0124] Exemplary device

[0125] Figure 7 This is a schematic diagram of one embodiment of the apparatus for determining geographic connectivity according to the present disclosure. The apparatus of this embodiment can be used to implement the corresponding method embodiments of the present disclosure. Figure 7 The device shown includes: a first acquisition module 700, a second acquisition module 701, a connection relationship setting module 702, a first determination module 703, and a second determination module 704.

[0126] The first acquisition module 700 is mainly used to acquire grid nodes with a predetermined resolution contained in a geographic region, wherein each grid node is used as a top-level grid node. Optionally, the first acquisition module 700 may include a first submodule 7001 and a second submodule 7002, wherein the first submodule 7001 is used to acquire the location information, geographic region radius, and predetermined resolution of a predetermined geographic location, and wherein the second submodule 7002 is used to acquire, based on the H3 geospatial indexing system, all grid nodes with the predetermined resolution contained in a land geographic region formed by taking the geographic location represented by the location information of the predetermined geographic location as the center and the geographic region radius as the radius. The specific operations performed by the first acquisition module 700 and its included submodules can be found in the relevant description of S100 in the above method.

[0127] The second acquisition module 701 is mainly used to acquire the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node. Optionally, the second acquisition module 701 may include a third sub-module 7011 and a fourth sub-module 7012. The third sub-module 7011 is mainly used to acquire the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node based on the H3 geospatial indexing system; the fourth sub-module 7012 is used to store the correspondence between each top-level grid node and its sub-grid nodes for all top-level grid nodes. The specific operations performed by the second acquisition module 701 and its included sub-modules can be found in the relevant description of S101 in the above method.

[0128] The connectivity setting module 702 is mainly used to set intra-block edge connectivity information for child grid nodes with the same parent grid node and their neighboring grid nodes, indicating adjacency within a top-level grid node, and to set inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes, indicating connectivity between two top-level network nodes through their respective child nodes. Optionally, the connectivity setting module 702 includes a fifth sub-module 7021 and a sixth sub-module 7022. The fifth sub-module is used to set intra-block edge connectivity information for any child grid node and any of its neighboring grid nodes, where the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the child grid node and the parent grid node of the neighboring grid node are the same top-level grid node. This information includes the same top-level grid node, the child grid node, and the neighboring grid node. The sixth submodule 7022 is used to set inter-block edge connectivity information between any sub-grid node and any of its neighboring grid nodes, where the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the sub-grid node and the parent grid node of the neighboring grid node are different top-level grid nodes. In one example, the sixth submodule is specifically used to set the key in a key-value pair based on the sub-grid node and its parent grid node, and to set the value in the key-value pair based on the neighboring grid node and its parent grid node, and to store the key-value pair in an indirect connectivity hash table. The specific operations performed by the connectivity setting module 702 and its included submodules can be found in the description of S102 in the above method.

[0129] The first determining module 703 is mainly used to determine the connectivity information of sub-grid nodes based on the intra-block edge connectivity information set by the connectivity setting module 702. Optionally, the first determining module 703 includes: a seventh sub-module 7031, an eighth sub-module 7032, and a ninth sub-module 7033. The seventh sub-module 703 is used to generate an adjacency matrix of the sub-grid nodes based on the intra-block edge connectivity information; the eighth sub-module 7032 is used to obtain the connected components of the sub-grid nodes based on the adjacency matrix of the sub-grid nodes using a disjoint-set data structure algorithm; and the ninth sub-module 7033 is used to obtain valid connected components from the connected components of the sub-grid nodes. For a given sub-grid node, the valid connected components indicate that the sub-grid node is connected to other grid nodes. The specific operations performed by the first determining module 703 and its sub-modules can be found in the description of S103 in the above method.

[0130] The second determining module 704 is mainly used to determine the top-level grid node connectivity information based on the sub-grid node connectivity information determined by the first determining module 703 and the inter-block edge connectivity information set by the connectivity setting module 702. The top-level grid node connectivity information is used to determine the connectivity between two geographical locations belonging to the geographical region. Optionally, the second determining module 704 may include: a tenth sub-module 7041, an eleventh sub-module 7042, and a twelfth sub-module 7043. The tenth sub-module 7041 is mainly used to combine any two top-level grid nodes with each sub-grid node in any two valid connected components to obtain multiple first combinations and multiple second combinations. The eleventh sub-module 7042 is mainly used to store the two top-level grid nodes as top-level grid node connected components when there is information matching the first and second combinations in the inter-block edge connectivity information. The twelfth sub-module 7043 is mainly used to perform connectivity merging processing on multiple top-level grid node connected components using a disjoint-set data structure algorithm to obtain the connectivity domain of the top-level grid node; wherein, the connectivity domain of the top-level grid node indicates that there is a connection relationship between at least two top-level grid nodes. For details on the specific operations performed by the second determining module 704 and its sub-modules, please refer to the relevant description of S104 in the above method.

[0131] Figure 8 This is a schematic diagram of another embodiment of the apparatus for determining geographic connectivity according to the present disclosure. The apparatus of this embodiment can be used to implement the corresponding method embodiments of the present disclosure. Figure 8 The device shown includes: a third determining module 800, a judging module 801, and a connectivity determining module 802.

[0132] The third determining module 800 is mainly used to determine the top-level grid nodes corresponding to two geographical locations within a geographical region, wherein the geographical region is covered by multiple top-level grid nodes. For the specific operations performed by the third determining module 800, please refer to the relevant description of S600 in the above method.

[0133] The judgment module 801 is mainly used to determine whether the top-level grid nodes corresponding to the two geographical locations determined by the third determination module 800 are connected, based on the pre-set top-level grid node connectivity information. For the specific operations performed by the judgment module 801, please refer to the relevant description of S601 in the above method.

[0134] The connectivity determination module 802 is mainly used to determine that the two geographical locations are connected if the determination result of the determination module 801 indicates that the top-level grid nodes corresponding to the two geographical locations are connected; otherwise, it determines that the two geographical locations are not connected. The connectivity information of the top-level network nodes is as described above. Figure 7The device shown is configured as described above. The specific operations performed by the connectivity determination module 802 can be found in the descriptions of S602 and S603 in the above method.

[0135] Exemplary electronic devices

[0136] The following is for reference. Figure 9 To describe an electronic device according to embodiments of the present disclosure. Figure 9 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. (As follows) Figure 9 As shown, the electronic device 91 includes one or more processors 911 and memory 912.

[0137] The processor 911 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 91 to perform desired functions.

[0138] The memory 912 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, and flash memory. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 911 may execute the program instructions to implement the methods for determining geographic connectivity and / or other desired functions described in the various embodiments of this disclosure above.

[0139] In one example, the electronic device 91 may further include an input device 913 and an output device 914, etc., these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown). Furthermore, the input device 913 may also include, for example, a keyboard, a mouse, etc. The output device 914 can output various information to the outside. The output device 914 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0140] Of course, for the sake of simplicity, Figure 9 Only some of the components of the electronic device 91 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 91 may include any other suitable components depending on the specific application.

[0141] Exemplary computer program products and computer-readable storage media

[0142] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for implementing the determination of geographic location connectivity described in the "Exemplary Methods" section of this specification according to various embodiments of this disclosure.

[0143] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0144] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the methods for implementing the determination of geographic location connectivity described in the "Exemplary Methods" section of this specification according to various embodiments of this disclosure.

[0145] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not an exhaustive list) of a readable storage medium may include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0146] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0147] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0148] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0149] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0150] It should also be noted that in the apparatus, devices, and methods disclosed herein, the components or steps can be disassembled and / or recombined. Such disassembly and / or recombination should be considered as equivalent solutions to this disclosure.

[0151] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0152] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for determining geographic location connectivity, comprising: Obtain each grid node with a predetermined resolution contained in a geographic region, wherein each grid node is used as a top-level grid node; Obtain the child grid nodes of each top-level grid node and the neighboring grid nodes of each child grid node; Set up intra-block edge connectivity information for child grid nodes with the same parent grid node and their neighboring grid nodes to represent adjacent blocks within a top-level grid node, and set up inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes to represent two top-level grid nodes connected through their respective child nodes. Based on the intra-block edge connectivity information, the sub-mesh node connectivity information is determined as follows: Generate the adjacency matrix of the sub-grid nodes based on the intra-block edge connectivity information; Based on the adjacency matrix of the sub-grid nodes, the connected components of the sub-grid nodes are obtained using the disjoint-set data structure algorithm. Obtain valid connected components from the connected components of the sub-mesh nodes; Specifically, for a sub-grid node, the effective connected component of the sub-grid node indicates that the sub-grid node is connected to other grid nodes; The top-level grid node connectivity information is determined based on the sub-grid node connectivity information and the inter-block edge connectivity information. The connectivity information of the top-level grid nodes is used to determine the connectivity between two geographical locations belonging to the geographical region.

2. The method according to claim 1, wherein, The process of obtaining grid nodes with a predetermined resolution within a geographic region includes: Obtain the location information, geographic radius, and predetermined resolution of a predetermined geographic location; Based on the H3 geospatial indexing system, obtain all grid nodes with the predetermined resolution contained in the land geographic region formed by taking the geographic location represented by the location information of the predetermined geographic location as the center and the radius of the geographic region as the radius.

3. The method according to claim 1, wherein, The process of obtaining the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node includes: Based on the H3 geospatial indexing system, the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node are obtained respectively. For all top-level grid nodes, store the correspondence between each top-level grid node and its child grid nodes.

4. The method according to claim 1, 2, or 3, wherein, The step of setting up intra-block edge connectivity information for child grid nodes and their neighboring grid nodes that share the same parent grid node to represent adjacent nodes within a top-level grid node includes: For any sub-grid node and any of its neighboring grid nodes, if the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the sub-grid node and the parent grid node of the neighboring grid node are the same top-level grid node, then set the intra-block edge connectivity information of the sub-grid node and the neighboring grid node, which includes the same top-level grid node, the sub-grid node and the neighboring grid node.

5. The method according to claim 1, 2, or 3, wherein, The provision of inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes, used to represent the connection between two top-level grid nodes through their respective child nodes, includes: For any sub-grid node and any of its neighboring grid nodes, if the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the sub-grid node and the parent grid node of the neighboring grid node are different top-level grid nodes, set up inter-block edge connectivity information for the sub-grid node and the neighboring grid node, including the sub-grid node and its parent grid node and the neighboring grid node and its parent grid node.

6. The method according to claim 5, wherein, The step of setting inter-block edge connectivity information between the sub-grid node and its neighboring grid node, including the sub-grid node and its parent grid node, and the neighboring grid node and its parent grid node, includes: Set the key in the key-value pair based on the child grid node and its parent grid node, set the value in the key-value pair based on the neighbor grid node and its parent grid node, and store the key-value pair in the indirect connected hash table.

7. The method according to claim 1, 2, or 3, wherein, The adjacency matrix of the sub-grid nodes is a two-dimensional matrix, where one dimension of the two-dimensional matrix represents the sub-grid nodes and the other dimension represents the neighboring grid nodes.

8. The method according to claim 1, 2, or 3, wherein, The step of determining the top-level grid node connectivity information based on the sub-grid node connectivity information and the inter-block edge connectivity information includes: Combine any two top-level grid nodes with each of the sub-grid nodes in any two valid connected components to obtain multiple first combinations and multiple second combinations; When there is information in the inter-block edge connectivity information that matches the first combination and the second combination, the two top-level grid nodes are stored as top-level grid node connectivity components. The connected components of multiple top-level grid nodes are merged using the disjoint-set data structure algorithm to obtain the connected components of the top-level grid nodes.

9. A method for determining geographic location connectivity, comprising: Determine the top-level grid nodes corresponding to two geographical locations within a geographical region, wherein the geographical region is covered by multiple top-level grid nodes; Based on the pre-set top-level grid node connectivity information, determine whether the top-level grid nodes corresponding to the two geographical locations are connected; If the determination result is that the top-level grid nodes corresponding to the two geographical locations are connected, then the two geographical locations are determined to be connected; otherwise, the two geographical locations are determined to be disconnected. The configuration method for the top-level grid node connectivity information is as described in any one of claims 1-8.

10. An apparatus for determining geographic location connectivity, comprising: The first acquisition module is used to acquire each grid node with a predetermined resolution contained in a geographic region, wherein each grid node is used as a top-level grid node. The second acquisition module is used to acquire the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node; The connectivity module is used to set up intra-block edge connectivity information for child grid nodes with the same parent grid node and their neighboring grid nodes, representing adjacent nodes within a top-level grid node, and to set up inter-block edge connectivity information for child grid nodes with different parent grid nodes and their neighboring grid nodes, representing two top-level grid nodes connected through their respective child nodes. The first determining module is used to determine the connectivity information of sub-grid nodes based on the intra-block edge connectivity information in the following manner: generating an adjacency matrix of sub-grid nodes based on the intra-block edge connectivity information; obtaining the connected components of sub-grid nodes based on the adjacency matrix of sub-grid nodes using a disjoint-set data structure algorithm; and obtaining valid connected components from the connected components of the sub-grid nodes; wherein, for a sub-grid node, the valid connected components of the sub-grid node indicate that the sub-grid node is connected to other grid nodes; The second determining module is used to determine the top-level grid node connectivity information based on the sub-grid node connectivity information and the inter-block edge connectivity information. The connectivity information of the top-level grid nodes is used to determine the connectivity between two geographical locations belonging to the geographical region.

11. The apparatus according to claim 10, wherein, The first acquisition module includes: The first submodule is used to obtain the location information, geographical area radius, and predetermined resolution of a predetermined geographical location; The second submodule is used to obtain, based on the H3 geospatial indexing system, all grid nodes with the predetermined resolution contained in the land geographic region formed by taking the geographic location represented by the location information of the predetermined geographic location as the center and the radius of the geographic region as the radius.

12. The apparatus according to claim 10, wherein, The second acquisition module includes: The third submodule is used to obtain the sub-grid nodes of each top-level grid node and the neighboring grid nodes of each sub-grid node based on the H3 geospatial indexing system. The fourth submodule is used to store the correspondence between each top-level grid node and its child grid nodes for all top-level grid nodes.

13. The apparatus according to claim 10, 11, or 12, wherein, The connectivity setting module includes: The fifth submodule is used to set intra-block edge connectivity information for any sub-grid node and any of its neighboring grid nodes, where the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the sub-grid node and the parent grid node of the neighboring grid node are the same top-level grid node.

14. The apparatus according to claim 10, 11, or 12, wherein, The connectivity setting module includes: The sixth submodule is used to set up inter-block edge connectivity information for any sub-grid node and any of its neighboring grid nodes, where the parent grid node of the neighboring grid node belongs to the top-level grid node, and the parent grid node of the sub-grid node and the parent grid node of the neighboring grid node are different top-level grid nodes.

15. The apparatus according to claim 14, wherein, The sixth submodule is specifically used for: Set the key in the key-value pair based on the child grid node and its parent grid node, set the value in the key-value pair based on the neighbor grid node and its parent grid node, and store the key-value pair in the indirect connected hash table.

16. The apparatus according to claim 10, 11, or 12, wherein, The first determining module includes: The seventh submodule is used to generate the adjacency matrix of the sub-mesh nodes based on the intra-block edge connectivity information; The eighth submodule is used to obtain the connected components of the subgrid nodes based on the adjacency matrix of the subgrid nodes and the disjoint-set data structure algorithm. The ninth submodule is used to obtain valid connected components from the connected components of the sub-mesh nodes; Specifically, for a sub-grid node, the effective connected component of the sub-grid node indicates that the sub-grid node is connected to other grid nodes.

17. The apparatus according to claim 16, wherein, The second determining module includes: The tenth submodule is used to combine any two top-level grid nodes with each subgrid node in any two valid connected components to obtain multiple first combinations and multiple second combinations. The eleventh submodule is used to store the two top-level grid nodes as top-level grid node connected components when there is information in the inter-block edge connectivity information that matches the first combination and the second combination. The twelfth submodule is used to perform connected component merging on the connected components of multiple top-level grid nodes using the disjoint-set data structure algorithm to obtain the connected components of the top-level grid nodes.

18. An apparatus for determining geographic location connectivity, comprising: The third determining module is used to determine the top-level grid nodes corresponding to two geographical locations in a geographical region, wherein the geographical region is covered by multiple top-level grid nodes; The judgment module is used to determine whether the top-level grid nodes corresponding to the two geographical locations are connected based on the pre-set top-level grid node connectivity information. The connectivity determination module is used to determine that the two geographical locations are connected if the determination result of the determination module is that the top-level grid nodes corresponding to the two geographical locations are connected; otherwise, it determines that the two geographical locations are not connected. The connectivity information of the top-level grid nodes is provided by the apparatus described in any one of claims 10-17.

19. A computer-readable storage medium storing a computer program for performing the method of any one of claims 1-9.

20. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Systems and methods for identifying grids of geographical region in map

    CN110785797A

  • Region division method and device, electronic equipment and storage medium

    CN114169771A