Online geo-fencing address matching method
Through the online geofence address matching method, the combination of multiple algorithms is used to solve the problems of inefficient and insufficient accuracy of traditional manual judgments, and efficient and accurate address matching is achieved. It is suitable for online registration system for admission, reducing labor costs and Adaptable.
Patent Information
- Application Number
- CN202410974754.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional manual judgment of the school area where students’ homes or property addresses belong is inefficient and error-prone, and cannot meet the needs of large-scale online registration.
The online geofence address matching method is adopted to convert the address into latitude and longitude coordinates through the address resolution service, and the spatial analysis algorithm combined with ray intersection algorithm, convex optimization algorithm, plane scanning algorithm and Voronoi graph algorithm are used to automatically determine whether the address is located in the school. In the closed area of the map.
It improves the accuracy and efficiency of address matching, reduces labor costs, ensures the accuracy of zoning schools, and has strong adaptability and scalability, and is suitable for online admission registration system.
Smart Images

Figure CN118939674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application of geographic information systems, and in particular to a method for online geographic fence address matching. Background Art
[0002] Online enrollment has become a common process. To ensure that students are assigned to the corresponding schools according to their residential areas, the system needs to accurately determine the school zoning area to which the student's household registration address or property address belongs. Each school usually corresponds to a closed area on a map, which may vary due to administrative divisions, distribution of educational resources and other factors. How to accurately determine whether the address is located within the closed area of a school's map based on the provided household registration address or property address. Traditional manual judgment methods are not only inefficient, but also prone to errors and cannot meet the needs of large-scale online enrollment. Some areas also use online registration systems, and users use the system to upload registration materials, but the registration system mainly collects student information, and the subsequent school zoning process still relies on manual labor, which manually reviews student information and performs school zoning. Summary of the invention
[0003] The purpose of the present invention is to provide an online geo-fence address matching method, which utilizes automated, high-precision address matching technology to improve the efficiency and accuracy of school zoning.
[0004] To achieve the above object, the present invention adopts the following technical solution:
[0005] The method of online geo-fence address matching comprises the following steps,
[0006] S1: Map data preparation, collecting and organizing the map closed area data of each school in the corresponding administrative area;
[0007] S2: Address resolution and conversion. When the registration system matches the household registration address or property address, the registration system converts the household registration address or property address into the corresponding longitude and latitude coordinates through the address resolution service.
[0008] S3: Matching the address with the area. After obtaining the longitude and latitude coordinates of the address, the registration system compares it with the closed areas on the maps of each school to determine whether the address is located within the closed area of a certain school.
[0009] Furthermore, in step S1, the data is GIS-based vector data or raster data, using Shapefile or GeoJSON general GIS data format.
[0010] Furthermore, in step S2, the address resolution service utilizes Google Maps or Baidu Maps.
[0011] Furthermore, in step S3, a spatial analysis algorithm combining a ray intersection algorithm, a convex optimization algorithm, a plane scanning algorithm, and a Voronoi diagram algorithm is used.
[0012] Furthermore, for a certain registered residence address or real estate address, the ray intersection algorithm is preferentially used. If it can be determined that the registered residence address or real estate address is located within a certain school area, no other algorithms are executed.
[0013] Furthermore, the ray intersection algorithm takes the household registration address or property address converted into a coordinate point as the starting point, emits a ray from the starting point in any direction, and calculates the number of intersections between the ray and the school area boundary. If the number of intersections between the ray and the area boundary is an odd number, the starting point is within the area; if it is an even number or there is no intersection, the starting point is outside the area.
[0014] Further, after executing the ray intersection algorithm, if it is not possible to determine in which school zone a household registration address or property address is located, the convex optimization algorithm is executed;
[0015] The specific steps of the convex optimization algorithm are: set the school area as a polygon, determine the number of intersections between the line connecting the coordinate point of the household registration address or property address and a vertex of the polygon and the edge of the polygon; if the line does not intersect with any edge of the polygon, the coordinate point is inside the polygon.
[0016] Further, after executing the convex optimization algorithm, if it is not possible to determine in which school area a household registration address or property address is located, a plane scanning algorithm is executed;
[0017] The specific steps of the plane scanning algorithm are: first, sort all the geometric objects of the polygon according to their x-coordinates; second, initialize an active state list to record the state of the geometric objects at the current scan line position; then simulate a scan line perpendicular to the x-axis from left to right through the entire plane, and update the active state list as the scan line moves. When the scan line encounters the endpoint of a geometric object, the active state list is updated according to the interaction between the geometric objects; after the scan is completed, the final result is output according to the content of the active state list.
[0018] Further, after executing the plane scanning algorithm, if it is still not possible to determine in which school area a household registration address or property address is located, the Voronoi diagram algorithm is executed;
[0019] The specific steps of the Voronoi diagram algorithm are as follows: first, a set of seed points are selected according to the location of the school; second, a Voronoi diagram is generated based on the seed points, in which each seed point corresponds to a polygonal area, and any point in the area is closer to the seed point than to other seed points; finally, the Voronoi diagram is used to divide the area and determine the school district boundaries, thereby determining in which school area the household registration address or property address is located.
[0020] Beneficial effects of the present invention:
[0021] (1) The online geo-fence address matching method provided by the present invention can greatly improve the accuracy and efficiency of address matching in the online enrollment registration system by combining multiple algorithms, and provide better services for students and schools. It optimizes the user experience, reduces labor costs, and ensures the accuracy of the zoned schools.
[0022] (2) The technical solution of the present invention is not only applicable to the current online enrollment registration system, but also has strong adaptability and scalability. With the adjustment of the school enrollment area or the establishment of a new school, the system can be used to conveniently update the map data and algorithm model to adapt to new needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a logical step diagram of the method for online geo-fence address matching of the present invention;
[0024] Figure 2 It is a schematic diagram of the application of various algorithms in the online geo-fence address matching method of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying 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 belong to the scope of protection of the present invention.
[0026] Embodiments of the present invention:
[0027] In this embodiment, the online geo-fence address matching method is applied in the online registration system, and the collected information such as student addresses is processed and divided into districts in combination with the school enrollment range to improve the efficiency of online registration. The online registration system usually refers to primary school enrollment registration, with counties as administrative units or prefecture-level cities as administrative units for centralized registration and school zoning. The online geo-fence address matching method solves the problem of automatically matching the household registration address or property address in the registration information with the school zoning area. In actual operation, only the property address can be used for comparison. Under normal circumstances, if the house and household are consistent, the household registration address and the property address are the same; in addition, it also applies to those who hold a temporary residence permit and meet the online registration requirements.
[0028] like Figure 1-Figure 2 As shown, the method for online geo-fence address matching includes the following steps:
[0029] S1: Map data preparation: collect and organize the map closed area data of each school in the corresponding administrative area.
[0030] The data is GIS-based vector data or raster data, using Shapefile or GeoJSON universal GIS data format. Through map editing tools, the closed area of the school can be drawn or modified on the map. The data of the closed area describes the area range in two-dimensional space and has clear geographic coordinates and shapes.
[0031] S2: Address resolution and conversion. After the registration system matches the property address, the registration system converts the property address into corresponding longitude and latitude coordinates through the address resolution service.
[0032] The address resolution service uses the address resolution API provided by modern map services, such as Google Maps or Baidu Maps, to ensure the accuracy and real-time nature of address conversion.
[0033] S3: Matching the address with the area. After obtaining the longitude and latitude coordinates of the address, the registration system compares it with the closed area on the map of each school to determine whether the address is located within the closed area of a certain school. To improve efficiency, if the administrative unit is a prefecture-level city, it can be further divided according to the administrative districts under its jurisdiction. It only needs to be compared with the school area of the administrative district to which the property address belongs.
[0034] This step is to use a spatial analysis algorithm that combines ray intersection algorithm, convex optimization algorithm, plane scanning algorithm, and Voronoi diagram algorithm.
[0035] For a certain property address, the ray intersection algorithm is used first to judge. If it can be judged that the property address is located in a certain school area, the result is output and the property address is divided into the corresponding school. Therefore, no other algorithms are executed. Next, another property address is matched in the same way.
[0036] The ray intersection algorithm starts from the property address converted into a coordinate point, and emits a ray from the starting point in any direction to calculate the number of intersections between the ray and the school area boundary. If the number of intersections between the ray and the area boundary is an odd number, the starting point is within the area; if it is an even number or there is no intersection, the starting point is outside the area. An example is as follows:
[0037] The coordinates of address A are (x1, y1). The area of school B is a polygon, and its boundary is defined by a series of vertices (vx1, vy1), (vx2, vy2), ..., (vxn, vyn). Draw a ray from (x1, y1) (for example, y = mx + c, where m is a large positive number and c is the y-intercept). Traverse all the edges of school B and check the intersection of the ray with each edge. If the number of intersections is an odd number, then address A is inside school B.
[0038] For conventional school areas with relatively regular and clear boundaries, the above-mentioned ray intersection algorithm can be used to determine whether a property address is located in a certain school area. However, in practice, there are several school areas with adjacent boundaries that are difficult to distinguish, or some school areas have irregular boundaries, which may result in more than one school being matched for a certain property address (equivalent to no successful match). Therefore, the present invention also designs other algorithms for coordination.
[0039] When the ray intersection algorithm is executed and it is not possible to determine in which school zone a household registration address or property address is located, the convex optimization algorithm is executed.
[0040] The specific steps of the convex optimization algorithm are: set the school area as a polygon, determine the number of intersections between the line connecting the coordinate point of the property address and a vertex of the polygon and the edge of the polygon. If the line does not intersect with any edge of the polygon, the coordinate point is located inside the polygon. In this method, when judging whether there are intersecting edges, the edge where the vertex is located is excluded. Of course, it may also be located at other vertices of the polygon, which may result in the result of the judgment being located at the junction of two adjacent polygons. If it cannot be judged, continue to execute the following algorithm; if it is successfully judged that the property address is located in a certain school area, then end.
[0041] After executing the convex optimization algorithm, if it is still not possible to determine in which school area the above property address is located, the plane scanning algorithm is executed.
[0042] The specific steps of the plane scanning algorithm are as follows: first, sort all the geometric objects (such as line segments) of the polygon corresponding to the school area according to their x-coordinates; second, initialize an active state list to record the state of the geometric objects at the current scan line position; then simulate a scan line perpendicular to the x-axis from left to right across the entire plane, and update the active state list as the scan line moves. When the scan line encounters the endpoint of a geometric object, the active state list is updated according to the interaction between the geometric objects; after the scan is completed, the final result is output according to the content of the active state list. An example is as follows:
[0043] A simple polygonal area defined by vertices (0,0), (2,0), (2,2), and (0,2). The address point to be determined is (1,1).
[0044] Event queue: [(0,0),(0,2),(1,1),(2,0),(2,2)] (sorted by y coordinate)
[0045] Scanning process:
[0046] When scanning to (0,0), add the line segment [(0,0), (2,0)] to BST;
[0047] When scanning to (0,2), add the line segment [(0,2), (2,2)] to BST;
[0048] When scanning to (1,1), check the line segments in the BST and find that (1,1) is inside the two line segments, so (1,1) is inside the polygon.
[0049] Subsequent scans no longer affect the judgment result of (1,1).
[0050] Output result: The address (1,1) is within the school polygon area.
[0051] Furthermore, after executing the plane scanning algorithm, if it is still not possible to determine in which school area the above-mentioned property address is located, the Voronoi diagram algorithm is executed.
[0052] The specific steps of the Voronoi diagram algorithm are as follows: First, a set of seed points are selected according to the location of the school; second, a Voronoi diagram is generated based on the seed points. Each seed point in the diagram corresponds to a polygonal area, and any point in the area is closer to the seed point than to other seed points; finally, the Voronoi diagram is used to divide the area and determine the school district boundary, thereby determining which school area the property address is located in. If the address successfully matches the closed area of a school, the system will display the name of the school and related information.
[0053] The online geo-fence address matching method provided by the present invention can greatly improve the accuracy and efficiency of address matching in the online enrollment registration system, and provide better services for students and schools. Ensuring the accuracy of zoned schools is of great significance for protecting students' educational rights and interests and maintaining educational equity.
[0054] The solution of the present invention is not only applicable to the current online enrollment registration system, but also has strong adaptability and scalability. With the adjustment of the school enrollment area or the establishment of a new school, the system can easily update the map data and algorithm model to adapt to new needs.
Claims
1. Online geo-fence address matching method, Features: The following steps are included: S1: Map data preparation, collecting and organizing the map closed area data of each school in the corresponding administrative area; S2: Address resolution and conversion. When the registration system matches the household registration address or property address, the registration system converts the household registration address or property address into the corresponding longitude and latitude coordinates through the address resolution service. S3: Matching the address with the area. After obtaining the longitude and latitude coordinates of the address, the registration system compares it with the closed areas on the maps of each school to determine whether the address is located within the closed area of a certain school.
2. The method for online geo-fence address matching according to claim 1, Features: In step S1, the data is GIS-based vector data or raster data, using Shapefile or GeoJSON general GIS data format.
3. The method for online geo-fence address matching according to claim 1, Features: In step S2, the address resolution service utilizes Google Maps or Baidu Maps.
4. The method for online geo-fence address matching according to claim 1, Features: In step S3, a spatial analysis algorithm combining a ray intersection algorithm, a convex optimization algorithm, a plane scanning algorithm, and a Voronoi diagram algorithm is used.
5. The method for online geo-fence address matching according to claim 4, Features: For a certain registered residence address or real estate address, the ray intersection algorithm is used first. If it can be determined that the registered residence address or real estate address is located within a certain school area, no other algorithms will be executed.
6. The method for online geo-fence address matching according to claim 5, Features: The ray intersection algorithm is to use the household registration address or property address converted into a coordinate point as the starting point, emit a ray from the starting point in any direction, and calculate the number of intersections between the ray and the school area boundary. If the number of intersections between the ray and the area boundary is an odd number, the starting point is within the area; if it is an even number or there is no intersection, the starting point is outside the area.
7. The method for online geo-fence address matching according to claim 6, Features: When the ray intersection algorithm is executed and it is not possible to determine in which school zone a household registration address or property address is located, the convex optimization algorithm is executed; The specific steps of the convex optimization algorithm are: set the school area as a polygon, determine the number of intersections between the line connecting the coordinate point of the household registration address or property address and a vertex of the polygon and the edge of the polygon; if the line does not intersect with any edge of the polygon, the coordinate point is inside the polygon.
8. The method for online geo-fence address matching according to claim 7, Features: When the convex optimization algorithm is executed and it is not possible to determine in which school area a household registration address or property address is located, the plane scanning algorithm is executed; The specific steps of the plane scanning algorithm are: first, sort all the geometric objects of the polygon according to their x-coordinates; second, initialize an active state list to record the state of the geometric objects at the current scan line position; then simulate a scan line perpendicular to the x-axis from left to right through the entire plane, and update the active state list as the scan line moves. When the scan line encounters the endpoint of a geometric object, the active state list is updated according to the interaction between the geometric objects; after the scan is completed, the final result is output according to the content of the active state list.
9. The method for online geo-fence address matching according to claim 8, Features: After executing the plane scanning algorithm, if it is still not possible to determine which school area a household registration address or property address is located in, the Voronoi diagram algorithm is executed; The specific steps of the Voronoi diagram algorithm are as follows: first, a set of seed points are selected according to the location of the school; second, a Voronoi diagram is generated based on the seed points, in which each seed point corresponds to a polygonal area, and any point in the area is closer to the seed point than to other seed points; finally, the Voronoi diagram is used to divide the area and determine the school district boundaries, thereby determining in which school area the household registration address or property address is located.
Citation Information
Patent Citations
Method for analyzing nearby school-entering condition of school students in region
CN112579863A
Target address determination method and device, equipment and storage medium
CN116628113A
Cited By
Medical institution name matching method, system and device and storage medium
CN120687595A
A medical institution name matching method, system, device and storage medium
CN120687595B
