A method, apparatus, device, medium and product for matching geographical sites

CN122309575APending Publication Date: 2026-06-30CHINA MOBILE GRP FUJIAN CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE GRP FUJIAN CO LTD
Filing Date
2026-03-03
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, the computational complexity of geographic site matching methods increases linearly with the data size, resulting in huge CPU computing resources and memory consumption, high matching response latency, low processing performance, and poor scalability.

Method used

By dividing geographic sites according to location information and constructing a grid index, the candidate grid range around the site to be matched is determined in the grid index, candidate matching sites are filtered, and precise spherical distance calculation is performed to determine the site that is successfully matched.

Benefits of technology

It reduces computational complexity, saves CPU computing resources and memory consumption, improves processing performance, shortens matching response latency, and enhances scalability, meeting the efficiency and real-time requirements of large-scale geographic site data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309575A_ABST
    Figure CN122309575A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, medium, and product for matching geographic sites. The method involves dividing the geographic site based on its location information to obtain a grid index; determining a candidate grid range around the site to be matched based on the grid index; the candidate grid range includes candidate matching sites corresponding to the site to be matched; determining the geographic location difference between each candidate matching site and the site to be matched, and determining candidate matching sites that meet geographic distance conditions based on the geographic location difference to obtain a target matching site; determining the spherical distance between the target matching site and the site to be matched to obtain a target geographic distance; and identifying the target matching site corresponding to the target geographic distance that is less than a preset spherical distance threshold as a successfully matched site of the site to be matched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure generally relates to the field of data processing technology, and more particularly to a method, apparatus, device, medium, and product for matching geographic sites. Background Technology

[0002] In the field of geographic information processing, geographic site matching is a core component of applications such as location services and spatial data retrieval, and there is an urgent need to achieve proximity matching processing for massive geographic site data.

[0003] In related technologies, geographic site matching typically employs a brute-force calculation method based on the spherical distance formula, requiring indiscriminate traversal of all geographic site data. For each site, a complex and precise spherical distance calculation involving angle-radian conversion and trigonometric function operations is performed. Matching sites are then filtered using a distance threshold. This method's computational complexity increases linearly with the data size. When dealing with large-scale geographic site data, it generates enormous CPU and memory consumption, resulting in high matching response latency, low processing performance, and poor scalability. Summary of the Invention

[0004] This disclosure addresses some of the deficiencies mentioned in the background art by providing a method, apparatus, device, medium, and product for matching geographic sites.

[0005] In a first aspect, embodiments of this disclosure provide a method for matching geographic sites, comprising: Based on the location information corresponding to the geographic site, the grid index corresponding to the geographic site is obtained by dividing the area. The grid index determines the candidate grid range around the site to be matched; wherein, the candidate grid range includes the candidate matching sites corresponding to the site to be matched; Determine the geographical location difference between each of the candidate matching sites and the site to be matched, and determine the candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site; Determine the spherical distance between the target matching site and the site to be matched to obtain the target geographical distance; The target matching site corresponding to the target geographical distance that is less than the preset spherical distance threshold is determined as the successfully matched site of the site to be matched.

[0006] In one embodiment of the first aspect, the step of dividing the data based on the location information corresponding to the geographic site to obtain the grid index corresponding to the geographic site includes: Determine the grid longitude parameters and the latitude and longitude coordinates of each of the aforementioned geographic stations; The latitude and longitude coordinates are processed based on the grid longitude parameters to obtain the grid cell coordinates of each geographic station; The grid index is obtained by performing a hash mapping based on the grid cell coordinates.

[0007] In one embodiment of the first aspect, determining the candidate grid range around the site to be matched in the grid index includes: Determine the target matching distance and the sites to be matched; The number of extended grids is determined based on the target matching distance in the grid index; Based on the number of expanded grids, the candidate grid range is obtained by expanding outward from the site to be matched as the core.

[0008] In one embodiment of the first aspect, determining the geographical location difference between each of the candidate matching sites and the site to be matched, and determining candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site, includes: The geographic coordinates of each candidate matching site and the site to be matched in the grid index are used to determine the geographic location difference between each candidate matching site and the site to be matched; wherein, the geographic location difference includes longitude difference and latitude difference; Determine the latitude difference, and based on the target latitude difference and the latitude of each candidate matching station, determine the target longitude difference corresponding to each candidate matching station respectively; Based on the latitude difference and target longitude difference of each candidate matching station, the geographical distance conditions corresponding to each candidate matching station are generated. Based on the geographical location difference of each candidate matching site and the geographical distance condition, the candidate matching sites are filtered to obtain the target matching site.

[0009] In one embodiment of the first aspect, the step of filtering the candidate matching sites based on the geographical location difference of each candidate matching site and the geographical distance condition to obtain the target matching site includes: If the longitude difference and latitude difference in the geographical location difference corresponding to the candidate matching site are less than or equal to the target longitude difference and latitude difference, the candidate matching site is determined as the target matching site; otherwise, the candidate matching site is eliminated.

[0010] In one embodiment of the first aspect, determining the spherical distance between the target matching site and the site to be matched to obtain the target geographical distance includes: Based on the number of target matching sites, several sets of target matching sites are obtained; Simultaneously, the spherical distance between the target matching site and the site to be matched in each of the target matching site sets is determined to obtain the target geographical distance.

[0011] In a second aspect, embodiments of this disclosure provide a geographic site matching device, comprising: The partitioning module is used to partition the data based on the location information corresponding to the geographic site, and obtain the grid index corresponding to the geographic site. The first determining module is configured to determine a candidate grid range around the site to be matched based on the grid index; wherein the candidate grid range includes candidate matching sites corresponding to the site to be matched; The second determining module is used to determine the geographical location difference between each of the candidate matching sites and the site to be matched, and to determine the candidate matching sites that meet the geographical distance conditions based on the geographical location difference, so as to obtain the target matching site; The third determining module is used to determine the spherical distance between the target matching site and the site to be matched, thereby obtaining the target geographical distance; The fourth determining module is used to determine the target matching station corresponding to the target geographical distance less than the preset spherical distance threshold as the successfully matched station of the station to be matched.

[0012] In a third aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement a method for matching geographic sites.

[0013] In a fourth aspect, a computer-readable storage medium is provided having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of a geographic site matching method.

[0014] In a fifth aspect, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement steps of a geographic site matching method.

[0015] As will be described in detail below, a method, apparatus, device, medium, and product for matching geographic sites according to embodiments of this disclosure are disclosed. By dividing geographic sites according to location information and constructing a grid index, and determining the candidate grid range around the site to be matched within the grid index, candidate matching sites are extracted. This eliminates the need to indiscriminately traverse all geographic site data, reducing the number of sites involved in subsequent calculations, lowering computational complexity, and saving basic CPU computing resources and memory consumption.

[0016] By filtering target matching sites based on geographic location differences, complex spherical distance calculations are performed on these sites, and successful matches are determined based on thresholds. This layered filtering approach further reduces the number of complex and precise calculations, avoids a large number of invalid calculations, improves the processing performance of geographic site matching, shortens the matching response latency, and the computational load of the matching process no longer grows linearly with the total size of geographic site data, thus improving scalability and meeting the high efficiency and real-time requirements of large-scale geographic site data proximity matching. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a geographic site matching method provided in this embodiment of the disclosure; Figure 2 A schematic diagram of a geographic site matching device provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0018] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present disclosure and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the drawings, not the entire structure.

[0019] 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 further defined and explained in subsequent figures.

[0020] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0021] Research has found that in the field of geographic information processing, geographic site matching is a core component of applications such as location services and spatial data retrieval, and there is an urgent need to achieve proximity matching processing for massive geographic site data.

[0022] In related technologies, geographic site matching typically employs a brute-force calculation method based on the spherical distance formula, requiring indiscriminate traversal of all geographic site data. For each site, a complex and precise spherical distance calculation involving angle-radian conversion and trigonometric function operations is performed. Matching sites are then filtered using a distance threshold. This method's computational complexity increases linearly with the data size. When dealing with large-scale geographic site data, it generates enormous CPU and memory consumption, resulting in high matching response latency, low processing performance, and poor scalability.

[0023] Based on the above research, this disclosure provides a method for matching geographic sites. This method involves dividing geographic sites according to their location information and constructing a grid index. Candidate grid ranges surrounding the site to be matched are then determined within the grid index to extract candidate matching sites. This eliminates the need to indiscriminately traverse all geographic site data, reducing the number of sites involved in subsequent calculations, lowering computational complexity, and saving basic CPU and memory consumption.

[0024] By filtering target matching sites based on geographic location differences, complex spherical distance calculations are performed on these sites, and successful matches are determined based on thresholds. This layered filtering approach further reduces the number of complex and precise calculations, avoids a large number of invalid calculations, improves the processing performance of geographic site matching, shortens the matching response latency, and the computational load of the matching process no longer grows linearly with the total size of geographic site data, thus improving scalability and meeting the high efficiency and real-time requirements of large-scale geographic site data proximity matching.

[0025] To facilitate understanding of this embodiment, a geographic site matching method disclosed in this disclosure will first be described in detail. The geographic site matching method provided in this disclosure is generally executed by an electronic device with a certain computing power. In some possible implementations, the geographic site matching method can be implemented by a processor calling computer-readable instructions stored in memory.

[0026] Figure 1 The diagram shows a flowchart of a geographic site matching method provided in an embodiment of this disclosure. The method includes steps S101 to S105, wherein: S101. Based on the location information corresponding to the geographic site, divide the data to obtain the grid index corresponding to the geographic site.

[0027] In the embodiments of this disclosure, the geographic site may belong to the fields of communications, logistics, etc. Specifically, in the communications field, the geographic site may be the location of a base station, a user signaling collection point, or a communication equipment room; in the logistics field, the geographic site may be a logistics outlet, a parcel locker location, or a vehicle location.

[0028] Here, the area corresponding to a geographic station can be divided into grids based on latitude and longitude, and then mapped and indexed to obtain the grid index corresponding to the geographic station.

[0029] This process involves determining the latitude and longitude coordinates of each geographic station within the grid, mapping these coordinates to the grid, and obtaining the grid index corresponding to each geographic station.

[0030] S102. The candidate grid range around the site to be matched is determined by the grid index; wherein the candidate grid range includes the candidate matching sites corresponding to the site to be matched.

[0031] In embodiments of this disclosure, the candidate grid range of a site to be matched can be determined based on the site's location in the grid index (i.e., latitude and longitude coordinates).

[0032] Here, firstly, the number of grids that the site to be matched needs to expand outward can be determined; then, the candidate grid range of the site to be matched is determined based on the number of grids.

[0033] Here, the candidate grid range is a rectangular area. For example, when the number of grids extending outward is 3, the candidate grid range is a 3×3 rectangular area centered on the site to be matched.

[0034] S103. Determine the geographical location difference between each candidate matching site and the site to be matched, and determine the candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site.

[0035] In the embodiments of this disclosure, the longitude difference and latitude difference between each candidate matching site and the site to be matched can be determined, and the longitude difference and latitude difference can be determined as the geographical location difference between each candidate matching site and the site to be matched.

[0036] Here, if a candidate matching station meets the geographical distance condition based on the difference in longitude and latitude, the candidate matching station is determined as the target matching station; otherwise, the candidate matching station is eliminated.

[0037] Among them, the geographical distance condition is used to indicate whether the location difference between the candidate matching site and the site to be matched meets the preset distance condition.

[0038] S104. Determine the spherical distance between the target matching site and the site to be matched to obtain the target geographical distance.

[0039] In the embodiments of this disclosure, the spherical distance between the target matching site and the site to be matched can be determined by the standard spherical distance formula, thus obtaining the target geographical distance.

[0040] The standard formula for spherical distance can be the Haversine Formula.

[0041] Here, the latitude and longitude coordinates of the target matching station and the station to be matched can be converted from angle values ​​to radians to obtain radian coordinates.

[0042] Then, the target geographical distance can be obtained by calculating the radian coordinates using the standard spherical distance formula.

[0043] S105. The target matching sites corresponding to the target geographical distances that are less than the preset spherical distance threshold are determined as the successfully matched sites of the sites to be matched.

[0044] In embodiments of this disclosure, a preset spherical distance threshold (i.e., the target matching distance hereinafter referred to as the target geographical distance) can be determined. If the target geographical distance is less than the preset spherical distance threshold, the target matching site corresponding to the target geographical distance is determined as a successfully matched site of the site to be matched.

[0045] In the embodiments of this disclosure, firstly, the location information corresponding to the geographic site is divided to obtain the grid index corresponding to the geographic site; secondly, the candidate grid range around the site to be matched is determined in the grid index; wherein, the candidate grid range includes the candidate matching sites corresponding to the site to be matched; thirdly, the geographical location difference between each candidate matching site and the site to be matched is determined, and the candidate matching sites that meet the geographical distance condition are determined based on the geographical location difference to obtain the target matching site; fourthly, the spherical distance between the target matching site and the site to be matched is determined to obtain the target geographical distance; finally, the target matching site corresponding to the target geographical distance which is less than the preset spherical distance threshold is determined as the successfully matched site of the site to be matched.

[0046] In the above implementation, geographic sites are divided according to location information and a grid index is constructed. Candidate matching sites are extracted by determining the candidate grid range around the site to be matched within the grid index. This eliminates the need to indiscriminately traverse all geographic site data, reducing the number of sites involved in subsequent calculations, lowering computational complexity, and saving basic CPU and memory consumption.

[0047] By filtering target matching sites based on geographic location differences, complex spherical distance calculations are performed on these sites, and successful matches are determined based on thresholds. This layered filtering approach further reduces the number of complex and precise calculations, avoids a large number of invalid calculations, improves the processing performance of geographic site matching, shortens the matching response latency, and the computational load of the matching process no longer grows linearly with the total size of geographic site data, thus improving scalability and meeting the high efficiency and real-time requirements of large-scale geographic site data proximity matching.

[0048] In one optional implementation, the grid is divided based on the location information corresponding to the geographic site to obtain the grid index corresponding to the geographic site, specifically including the following steps: First, determine the grid longitude parameters and the latitude and longitude coordinates of each geographic station; Secondly, the latitude and longitude coordinates are processed based on the grid longitude parameters to obtain the grid cell coordinates of each geographic station; Finally, a hash mapping is performed based on the grid cell coordinates to obtain the grid index.

[0049] In the embodiments of this disclosure, all geographic sites can be traversed, and the grid cell coordinates of each geographic site can be determined based on the grid precision parameter and latitude and longitude coordinates. A smaller grid precision parameter results in a finer grid, higher retrieval accuracy, but also a larger index storage requirement. Those skilled in the art can set the grid precision parameter based on actual needs, which will not be elaborated upon here.

[0050] Here, the longitude coordinates of a geographic station can be divided by the grid precision parameter to obtain the abscissa of the grid cell coordinates of that geographic station; the latitude coordinates of a geographic station can be divided by the grid longitude parameter to obtain the ordinate of the grid cell coordinates of that geographic station.

[0051] The x-coordinate of the grid cell coordinates of the geographic site, grid x, must meet the following conditions: grid x=floor(longitude / δ); Where floor() is the floor function, longitude is the longitude value of the geographic station, and δ is the grid precision parameter.

[0052] The ordinate (grid y) of the grid cells for a geographic site must satisfy the following condition: grid y=floor(latitude / δ); Where floor() is the floor function, latitude is the latitude value of the geographic station, and δ is the grid precision parameter.

[0053] Here, after determining the latitude and longitude coordinates of each geographic station, the latitude and longitude coordinates of each geographic station can be stored in a hash mapping index with grid coordinates as the key and the list of geographic stations in the grid as the value, thus obtaining the grid index.

[0054] In the above implementation, the subsequent search problem is transformed from a full traversal to a local search, which reduces computational complexity. At the same time, the data scale can be evaluated at this stage, providing a basis for selecting the optimal parallel processing strategy.

[0055] In an optional implementation, determining the candidate grid range around the site to be matched by the grid index specifically includes the following steps: First, determine the target matching distance and the sites to be matched; Secondly, the number of extended grids is determined based on the target matching distance in the grid index; Finally, based on the number of expanded grids, the candidate grid range is obtained by expanding outward from the site to be matched.

[0056] In embodiments of this disclosure, a target matching distance can be set based on the site to be matched. The target matching distance indicates the maximum matching distance corresponding to the site to be matched.

[0057] Here, based on the target matching distance and with the site to be matched as the core, the number of extended grids containing candidate matching sites can be quickly determined to obtain the candidate grid range.

[0058] Here, the search radius can be determined based on the target matching distance to obtain the number of expanded grid cells. The search radius (search range) satisfies the following condition: search range=ceil[max distance / (δ×b)]; Here, ceil() is the floor function, max distance is the target matching distance, and b is a constant. b represents the ground distance (in meters) corresponding to a latitude, for example, b = 111000.

[0059] Here, the number of expanded grids can be determined based on the search radius (i.e., the search radius is defined as the number of expanded grids), and the candidate grid range can be determined based on the number of expanded grids. Here, all geographic stations within the candidate grid region can be extracted, and the extracted geographic stations are determined as candidate matching stations.

[0060] In an optional implementation, the geographical location difference between each candidate matching site and the site to be matched is determined, and candidate matching sites that meet the geographical distance condition are determined based on the geographical location difference to obtain the target matching site. The specific steps include the following: First, the geographic coordinates of each candidate matching site and the site to be matched in the grid index are used to determine the geographic location difference between each candidate matching site and the site to be matched; the geographic location difference includes the difference in longitude and the difference in latitude. Secondly, determine the latitude difference, and based on the target latitude difference and the latitude of each candidate matching station, determine the target longitude difference corresponding to each candidate matching station respectively; Secondly, based on the latitude difference of each candidate matching station and the longitude difference of the target, the geographical distance conditions corresponding to each candidate matching station are generated. Finally, based on the geographical location difference and geographical distance conditions of each candidate matching site, the candidate matching sites are filtered to obtain the target matching site.

[0061] In the embodiments of this disclosure, the longitude values ​​of each candidate matching station can be compared with the longitude value of the station to be matched to obtain the longitude difference between each candidate matching station and the station to be matched.

[0062] Here, the latitude values ​​of each candidate matching site can be compared with the latitude value of the site to be matched to obtain the latitude difference between each candidate matching site and the site to be matched.

[0063] Here, the latitudinal difference JD between the candidate matching site T and the site to be matched P meets the following condition: JD = |P.lat - T.lat|; where P.lat is the latitude value (i.e., latitude coordinate) of the site to be matched P, and T.lat is the latitude value of the candidate matching site T.

[0064] Here, the longitude difference WD between the candidate matching site T and the site to be matched P meets the following condition: WD = |P.lon - T.lon|; where P.lon is the longitude value (i.e., longitude coordinate) of the station P to be matched, and T.lon is the longitude value of the candidate matching station T.

[0065] Here, the latitude difference (i.e., the latitude difference threshold) can be determined based on the target matching distance mentioned above. The latitude difference maxlat diff satisfies the following condition: max lat diff = max distance / b; where max distance is the target matching distance and b is a constant.

[0066] Then, the target longitude difference corresponding to each candidate matching station can be determined based on the latitude difference. The target longitude difference max lon diff(i) corresponding to the i-th candidate matching station satisfies the following condition: max lon diff(i)=max distance / (b×cos(max(|P.lat|,|lat(i)|))); Where max distance is the target matching distance, P.lat is the longitude value of the station to be matched, and lat(i) is the longitude value of the i-th candidate matching station.

[0067] Then, the difference in longitude of the target and the difference in latitude of the candidate matching station can be determined as the geographical distance condition of the candidate matching station.

[0068] Then, candidate matching sites that meet the geographical distance criteria can be identified as target matching sites.

[0069] In the above implementation, the cosine calculation is performed by using the smaller of the absolute values ​​of the latitudes of each candidate matching site and the site to be matched. This ensures the conservatism of the estimation range and avoids missing any candidate matching sites that may be matched.

[0070] In an optional implementation, candidate matching sites are filtered based on the geographical location difference and geographical distance conditions to obtain the target matching site, specifically including the following steps: If the longitude difference and latitude difference in the geographical location difference corresponding to the candidate matching station are less than or equal to the target longitude difference and latitude difference, the candidate matching station is determined as the target matching station; otherwise, the candidate matching station is eliminated.

[0071] In the embodiments of this disclosure, the longitude difference and latitude difference in the geographical location difference corresponding to the candidate matching site can be compared with the target longitude difference and latitude difference to obtain the comparison result.

[0072] If, based on the comparison results, the longitude difference and latitude difference in the geographical location difference corresponding to the candidate matching station are both less than or equal to the target longitude difference and latitude difference, then the candidate matching station is determined as the target matching station.

[0073] That is, if |P.lat-lat(i)|≤max_lat_diff and |P.lon-lon(i)|≤max_lon_diff(i), the i-th candidate matching station is determined as the target matching station. Here, lat(i) is the latitude value of the i-th candidate matching station, and lon(i) is the longitude value of the i-th candidate matching station.

[0074] In an optional implementation, the spherical distance between the target matching site and the site to be matched is determined to obtain the target geographical distance, specifically including the following steps: First, based on the number of target matching sites, several sets of target matching sites are obtained; Secondly, the spherical distance between the target matching site and the site to be matched in each target matching site set is determined to obtain the target geographical distance.

[0075] In embodiments of this disclosure, a multi-level parallel processing architecture can be used to process the target matching site and determine the target geographical distance between the target matching site and the site to be matched.

[0076] Here, the target matching site set can be assigned to independent computing threads for concurrent execution.

[0077] Within each calculation thread, the standard spherical distance formula, namely the Haversine formula, can be invoked to calculate the distance to the target matching site and obtain the target geographical distance.

[0078] Here, the latitude and longitude coordinates of the site to be matched and the target site can be converted from degrees to radians; the Haversine formula can be used to calculate the spherical arc distance between the two sites; and then the arc distance can be converted into the actual ground distance in meters.

[0079] The target geographic distance must meet the following conditions: distance = 2 × R × artan2 (√a, √(1-a)); where R is the Earth's radius, R = 6371000 meters.

[0080] Where 'a' meets the following conditions: .

[0081] Based on the same inventive concept, this disclosure also provides a geographic site matching device. Since the principle of the device in this disclosure for solving the problem is similar to the geographic site matching method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0082] Reference Figure 2 The diagram shown is a schematic representation of a geographic site matching device provided in an embodiment of this disclosure, comprising: a segmentation module 21, a first determination module 22, a second determination module 23, a third determination module 24, and a fourth determination module 25; wherein: The partitioning module 21 is used to partition based on the location information corresponding to the geographic site to obtain the grid index corresponding to the geographic site. The first determining module 22 is used to determine a candidate grid range around the site to be matched in the grid index; wherein the candidate grid range includes candidate matching sites corresponding to the site to be matched; The second determining module 23 is used to determine the geographical location difference between each of the candidate matching sites and the site to be matched, and to determine the candidate matching sites that meet the geographical distance conditions based on the geographical location difference, so as to obtain the target matching site; The third determining module 24 is used to determine the spherical distance between the target matching site and the site to be matched, thereby obtaining the target geographical distance; The fourth determining module 25 is used to determine the target matching station corresponding to the target geographical distance less than the preset spherical distance threshold as the successfully matched station of the station to be matched.

[0083] This embodiment extracts candidate matching sites by dividing geographic sites according to their location information and constructing a grid index, and then determining the candidate grid range around the site to be matched within the grid index. This eliminates the need to indiscriminately traverse all geographic site data, reducing the number of sites involved in subsequent calculations, lowering computational complexity, and saving basic CPU and memory consumption.

[0084] By filtering target matching sites based on geographic location differences, complex spherical distance calculations are performed on these sites, and successful matches are determined based on thresholds. This layered filtering approach further reduces the number of complex and precise calculations, avoids a large number of invalid calculations, improves the processing performance of geographic site matching, shortens the matching response latency, and the computational load of the matching process no longer grows linearly with the total size of geographic site data, thus improving scalability and meeting the high efficiency and real-time requirements of large-scale geographic site data proximity matching.

[0085] Corresponding to Figure 1 In addition to the method for matching geographical sites in the data, this disclosure also provides an electronic device 300, such as... Figure 3 The diagram shown is a structural schematic of an electronic device 300 provided in an embodiment of this disclosure, including: The system includes a processor 31, a memory 32, and a bus 33. The memory 32 stores execution instructions and includes main memory 321 and external memory 322. The main memory 321, also called internal memory, temporarily stores the computational data in the processor 31, as well as data exchanged with external memory such as a hard disk. The processor 31 exchanges data with the external memory 322 through the main memory 321. When the electronic device 300 is running, the processor 31 communicates with the memory 32 through the bus 33, causing the processor 31 to execute the following instructions: Based on the location information corresponding to the geographic site, the grid index corresponding to the geographic site is obtained by dividing the area. The grid index determines the candidate grid range around the site to be matched; wherein, the candidate grid range includes the candidate matching sites corresponding to the site to be matched; Determine the geographical location difference between each of the candidate matching sites and the site to be matched, and determine the candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site; Determine the spherical distance between the target matching site and the site to be matched to obtain the target geographical distance; The target matching site corresponding to the target geographical distance that is less than the preset spherical distance threshold is determined as the successfully matched site of the site to be matched.

[0086] 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.

[0087] 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.

[0088] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0089] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0090] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0091] 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 may 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.

[0092] 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 therein.

Claims

1. A method for matching geographic sites, characterized in that, include: Based on the location information corresponding to the geographic site, the grid index corresponding to the geographic site is obtained by dividing the area. The grid index determines the candidate grid range around the site to be matched; wherein, the candidate grid range includes the candidate matching sites corresponding to the site to be matched; Determine the geographical location difference between each of the candidate matching sites and the site to be matched, and determine the candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site; Determine the spherical distance between the target matching site and the site to be matched to obtain the target geographical distance; The target matching site corresponding to the target geographical distance that is less than the preset spherical distance threshold is determined as the successfully matched site of the site to be matched.

2. The method as described in claim 1, characterized in that, The process of dividing the data based on the location information corresponding to each geographic site to obtain the grid index corresponding to that geographic site includes: Determine the grid longitude parameters and the latitude and longitude coordinates of each of the aforementioned geographic stations; The latitude and longitude coordinates are processed based on the grid longitude parameters to obtain the grid cell coordinates of each geographic station; The grid index is obtained by performing a hash mapping based on the grid cell coordinates.

3. The method as described in claim 1, characterized in that, The step of determining the candidate grid range around the site to be matched in the grid index includes: Determine the target matching distance and the sites to be matched; The number of extended grids is determined based on the target matching distance in the grid index; Based on the number of expanded grids, the candidate grid range is obtained by expanding outward from the site to be matched as the core.

4. The method as described in claim 1, characterized in that, The step of determining the geographical location difference between each of the candidate matching sites and the site to be matched, and determining the candidate matching sites that meet the geographical distance condition based on the geographical location difference to obtain the target matching site, includes: The geographic coordinates of each candidate matching site and the site to be matched in the grid index are used to determine the geographic location difference between each candidate matching site and the site to be matched; wherein, the geographic location difference includes longitude difference and latitude difference; Determine the latitude difference, and based on the latitude difference and the latitude of each candidate matching station, determine the target longitude difference corresponding to each candidate matching station; Based on the latitude difference and target longitude difference of each candidate matching station, the geographical distance conditions corresponding to each candidate matching station are generated. Based on the geographical location difference of each candidate matching site and the geographical distance condition, the candidate matching sites are filtered to obtain the target matching site.

5. The method as described in claim 4, characterized in that, The step of filtering the candidate matching sites based on the geographical location difference and geographical distance condition to obtain the target matching site includes: If the longitude difference and latitude difference in the geographical location difference corresponding to the candidate matching site are less than or equal to the target longitude difference and latitude difference, the candidate matching site is determined as the target matching site; otherwise, the candidate matching site is eliminated.

6. The method as described in claim 1, characterized in that, Determining the spherical distance between the target matching site and the site to be matched, to obtain the target geographical distance, includes: Based on the number of target matching sites, several sets of target matching sites are obtained; Simultaneously, the spherical distance between the target matching site and the site to be matched in each of the target matching site sets is determined to obtain the target geographical distance.

7. A geographic site matching device, characterized in that, include: The partitioning module is used to partition the data based on the location information corresponding to the geographic site, and obtain the grid index corresponding to the geographic site. The first determining module is configured to determine a candidate grid range around the site to be matched based on the grid index; wherein the candidate grid range includes candidate matching sites corresponding to the site to be matched; The second determining module is used to determine the geographical location difference between each of the candidate matching sites and the site to be matched, and to determine the candidate matching sites that meet the geographical distance conditions based on the geographical location difference, so as to obtain the target matching site; The third determining module is used to determine the spherical distance between the target matching site and the site to be matched, thereby obtaining the target geographical distance; The fourth determining module is used to determine the target matching station corresponding to the target geographical distance less than the preset spherical distance threshold as the successfully matched station of the station to be matched.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 6.