Method for dynamically screening network points based on longitude and latitude

By creating a five-level address library table and a physical address library table, and using the Haversine algorithm to calculate the distance between users and outlets, the problem of inefficient dynamic screening of outlets in the existing technology is solved, and efficient and real-time outlet filtering function is realized, which is suitable for a variety of scenarios.

CN119557513APending Publication Date: 2025-03-04OUYE LIANJIN RENEWABLE RESOURCES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411698663.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The prior art lacks efficient and integrated solutions for dynamically screening outlets, especially in latitude and longitude-based distance calculation and screening processes.

Method used

By creating a five-level address library table and a physical address library table, and using the Haversine algorithm to calculate the distance between users and outlets, a method of dynamically filtering outlets is realized.

Benefits of technology

This method improves the ability to filter out users' designated outlets, meets the real-time and fast computing needs of mid-range distances, and is suitable for batch screening and computing and mobile computing scenarios, improving universality and real-time service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557513A_ABST
    Figure CN119557513A_ABST
Patent Text Reader

Abstract

The invention discloses a method for dynamically screening network points based on longitude and latitude, and belongs to the field of general methods for carrying out distance measurement and data screening on massive geographic longitude and latitude data sets. A five-level address library table and a physical address library table are created according to an actual address, longitude and latitude position information of a user is obtained based on a mobile device or a PC terminal positioning function, and finally the five-level address library table and the physical address library table are read and screened according to the user information. According to the method, the distance between the website and the user is obtained through the screened table information and the user information according to an algorithm, the website name and the distance are provided for the user, and therefore efficient and dynamic screening of the physical website is achieved, calculation is conducted through a Haversine algorithm function, real-time and rapid calculation of the distance in the middle section is ensured, and the real-time dynamic screening of the physical website is achieved. The method can meet the working requirements of batch screening calculation and mobile calculation scenes, supports the coverage of the whole business scene, and improves the universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of geographical longitude and latitude data screening, and in particular to a method for dynamically screening network points based on longitude and latitude. Background Art

[0002] At present, there are various relatively mature single technologies and tools that can realize address collection, address database storage and latitude and longitude-based ranging methods. These technologies and tools are widely used in many heterogeneous technology product fields such as geographic information systems (GIS), database management, API services and front-end development.

[0003] The core elements of dynamic screening of physical outlets include geographic location data, user's current location, screening conditions and algorithm implementation, where each geographic outlet has its unique latitude and longitude coordinates, which are usually stored in a database; user devices (such as smartphones) can usually provide users with real-time latitude and longitude location information; in addition to distance, screening conditions can also include outlets' working hours, available services and customer reviews, etc.; dynamic screening requires efficient algorithms to calculate distances and quickly filter out qualified results. Although there are relatively mature technical components, there is a lack of efficient and integrated solutions. Summary of the invention

[0004] The purpose of the present invention is to provide a method for dynamically screening network points based on longitude and latitude to solve the shortcomings of the prior art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for dynamically screening network points based on longitude and latitude, comprising the following steps:

[0007] S1: Create a five-level address library table and a physical address library table according to the actual address;

[0008] S2: Obtain the user's longitude and latitude location information based on the positioning function of the mobile device or PC;

[0009] S3: Read and filter the five-level address library table and physical address library table in S1 according to the user information in S2, use the filtered table information and the user information in S2 to obtain the distance between the network point and the user according to the algorithm, and provide the network point name and distance to the user.

[0010] Furthermore, the information recorded in the five-level address database table in S1 includes: the unique ID of the address record, the level of the address, the address name, the ID of the parent address, latitude information, longitude information, creation time and update time.

[0011] Furthermore, the information recorded in the physical address library table in S1 includes: the unique ID of the address record, the address name, the street name, the city, the province, the country, the postal code, the latitude information, the longitude information, the detailed address information, the creation time and the update time.

[0012] Furthermore, the steps to implement S3 are as follows:

[0013] S301: Read the five-level address table and the physical address table in S1 according to the user's latitude and longitude location information in S2, and filter out all form information that has records and meets the conditions;

[0014] S302: Read the first line from the form information of S301, and extract the address name, the value of the latitude information, and the value of the longitude information from the first line of records;

[0015] S303: passing the value of the latitude information and the longitude information in S302 and the longitude and latitude position information of the user in S2 to the Haversine algorithm function, and calculating the distance between the network point address and the user;

[0016] S304: storing the address name in S302 and the distance result value calculated in S303 into a result data array;

[0017] S305: Determine whether there is a next line of the form information filtered in S301. If so, read the next line and repeat S302, S303 and S304 in sequence. If not, end the loop.

[0018] S306: Output a result array storing the network point names and distance result values, and the user obtains all network point address names and the actual distances between all network point addresses and the user according to the result array.

[0019] Furthermore, the Haversine algorithm function formula of S303 is as follows:

[0020]

[0021] dR·c

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] 1. The present invention realizes the design of standard productized data structure by creating five-level address library table and physical address library table according to the actual address, wherein when the business attributes of a specific scenario are expanded, the contents of the five-level address library table and the physical address library table can be appropriately adjusted and expanded according to the actual application scenario, so as to meet the adaptation of general scenarios, facilitate productized design, and have the ability to provide services externally; at the same time, the five-level address library table can preliminarily locate the location of the user's target location, and can preliminarily lock the range in the physical address library table of the user's specified location, thereby improving the ability to screen out the user's specified outlets.

[0024] 2. The present invention calculates the distance between the user and the network point address through the Haversine algorithm. Since this algorithm is suitable for general geographic applications with medium distances and does not require extremely high precision but requires real-time and fast calculation, compared with the traditional high-precision Vincenty algorithm that requires the WGS84 earth model, it ensures real-time and fast calculation at medium distances, and can meet the work needs in batch screening calculations and mobile computing scenarios; at the same time, with the assistance of Internet technology and the Haversine algorithm, the service model is transformed into online real-time user services, and supports coverage of all business scenarios, thereby improving universality. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The figure is a flowchart of the network point screening according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] To resolve the issue, see Figure 1 This patent specifically proposes a method for dynamically screening network points based on longitude and latitude, which mainly includes the following steps:

[0028] S1: Create a five-level address library table and a physical address library table according to the actual address;

[0029] S2: Obtain the user's longitude and latitude location information based on the positioning function of the mobile device or PC, and obtain the location name information;

[0030] S3: Read and filter the five-level address library table and physical address library table in S1 according to the user information in S2, use the filtered table information and the user information in S2 to obtain the distance between the network point and the user according to the algorithm, and provide the network point name and distance to the user.

[0031] As can be seen from Table 1 below, the information recorded in the five-level address library table in S1 includes: the unique ID of the address record, the level of the address, the address name, the ID of the parent address, latitude information, longitude information, creation time and update time. At the same time, the five-level address library table can further expand the fields according to actual needs, such as adding address codes, notes and other information.

[0032] Table 1

[0033]

[0034] As can be seen from Table 2 below, the information recorded in the physical address library table in S1 includes: the unique ID of the address record, address name, street name, city, province, country, postal code, latitude information, longitude information, detailed address information, creation time and update time. At the same time, it can be appropriately adjusted and expanded according to the actual application scenario. For example, if you need to associate with a specific user or business object, you can add a foreign key field. If you need to support address classification, you can add a classification field, etc.

[0035] Table 2

[0036]

[0037]

[0038] The steps to implement S3 are as follows:

[0039] S301: According to the user's longitude and latitude location information in S2, first read the five-level address library table in S1, parse and return the JSON data set, and then open the physical address library table according to the fields related to the location information such as province, city, district, county, community, etc., and filter out all the form information that has records and meets the conditions according to the conditions such as province, city, district, county, community, etc.;

[0040] S302: Read the first line from the form information of S301, and extract the address name, the value of the latitude information, and the value of the longitude information from the first line of records;

[0041] S303: passing the value of the latitude information and the longitude information in S302 and the longitude and latitude position information of the user in S2 to the Haversine algorithm function, and calculating the distance between the network point address and the user;

[0042] S304: storing the address name in S302 and the distance result value calculated in S303 into a result data array;

[0043] S305: Determine whether there is a next line of the form information filtered in S301. If so, read the next line and repeat S302, S303 and S304 in sequence. If not, end the loop.

[0044] S306: Output a result array storing the network point names and distance result values, and the user obtains all network point address names and the actual distances between all network point addresses and the user according to the result array.

[0045] The Haversine algorithm function formula of S303 is as follows:

[0046]

[0047] dR·c

[0048] Where φ1 and φ2 are the latitudes of point 1 and 2 respectively (in radians), Δφ is the difference in latitude between point 1 and point 2 (in radians), Δλ is the difference in longitude between point 1 and point 2 (in radians), R is the radius of the Earth, which has an average value of about 6371 km (for more precise results, the average radius under the WGS84 standard can be used), and d is the great circle distance between the two points.

[0049] The calculation steps of the Haversine algorithm function in S303 are as follows:

[0050] S303-1, converting the values ​​of the latitude information and the longitude information in S302 and the longitude and latitude position information of the user in S2 from degrees to radians;

[0051] S303-2, using the above formula to calculate a, c and d respectively, d is the distance between the user and the pointed address;

[0052] In order to further better explain the embodiments of the present invention, the present invention is further described below with reference to a specific example:

[0053] As shown in Tables 3 and 4 below, the five-level address library table and the physical address library table can be obtained respectively, wherein Table 3 is a sample record of actual partial addresses in the jurisdiction of Ma'anshan City, Anhui Province, and Table 4 is a sample record of a simulated general physical address library table;

[0054] Table 3

[0055]

[0056]

[0057] Table 4

[0058]

[0059]

[0060] For example, a user specifies a recycling station network address at point A through a mobile device. According to the fields related to the location information such as province, city, district, county, and community, all physical address library table information with records and meeting the conditions is first screened out to obtain Table 4. Then, according to the latitude and longitude location information of point A and the latitude and longitude information values ​​of each recycling station network in Table 4, the Haversine algorithm function is used to calculate the distance between point A and each recycling station network in Table 4, and the network name and the calculated distance result value are stored in the result array. Finally, the result array storing the network name and the distance result value is output. The user can obtain the address names of all network points and the actual distances between all network address and the user according to the result array, thereby realizing efficient dynamic screening of physical network points.

[0061] To summarize: first, create a five-level address library table and a physical address library table based on the actual address, then obtain the user's longitude and latitude location information based on the positioning function of the mobile device or PC, and finally read and filter the five-level address library table and the physical address library table based on the user information. Use the filtered table information and user information to obtain the distance between the network point and the user according to the algorithm, and provide the user with the network point name and distance, thereby realizing efficient dynamic screening of physical network points, which can meet different scenarios and improve universality.

[0062] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for dynamically screening network points based on longitude and latitude, characterized in that: The following steps are involved: S1: Create a five-level address library table and a physical address library table according to the actual address; S2: Obtain the user's longitude and latitude location information based on the positioning function of the mobile device or PC; S3: Read and filter the five-level address library table and physical address library table in S1 according to the user information in S2, use the filtered table information and the user information in S2 to obtain the distance between the network point and the user according to the algorithm, and provide the network point name and distance to the user.

2. A method for dynamically screening network points based on longitude and latitude as claimed in claim 1, characterized in that: The information recorded in the five-level address database table in S1 includes: the unique ID of the address record, the level of the address, the address name, the ID of the parent address, latitude information, longitude information, creation time and update time.

3. A method for dynamically screening network points based on longitude and latitude as claimed in claim 1, characterized in that: The information recorded in the physical address database table in S1 includes: the unique ID of the address record, address name, street name, city, province, country, postal code, latitude information, longitude information, detailed address information, creation time and update time.

4. A method for dynamically screening network points based on longitude and latitude as claimed in claim 1, characterized in that: The steps to implement S3 are as follows: S301: Read the five-level address table and the physical address table in S1 according to the user's latitude and longitude location information in S2, and filter out all form information that has records and meets the conditions; S302: Read the first line from the form information of S301, and extract the address name, the value of the latitude information, and the value of the longitude information from the first line of records; S303: passing the value of the latitude information and the longitude information in S302 and the longitude and latitude position information of the user in S2 to the Haversine algorithm function, and calculating the distance between the network point address and the user; S304: storing the address name in S302 and the distance result value calculated in S303 into a result data array; S305: Determine whether there is a next line of the form information filtered in S301. If so, read the next line and repeat S302, S303 and S304 in sequence. If not, end the loop. S306: Output a result array storing the network point names and distance result values, and the user obtains all network point address names and the actual distances between all network point addresses and the user according to the result array.

5. A method for dynamically screening network points based on longitude and latitude as claimed in claim 4, characterized in that: The Haversine algorithm function formula of S303 is as follows: dR·c.