Geographic coordinate optimization method based on road constraint multi-source network geographic coding platform
By using a road-constrained multi-source network geocoding platform, and leveraging NFA word segmentation and Euclidean distance comparison, the problem of large output errors in geocoding platforms was solved, resulting in more accurate geographic coordinate services.
Patent Information
- Application Number
- CN202511368210.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-24
AI Technical Summary
Existing geocoding platforms suffer from significant errors in outputting geographic coordinates for the same text address due to differences in database sources and semantic similarity algorithms, thus failing to provide accurate geographic coordinate services.
By using a road-constrained multi-source network geocoding platform, word segmentation is performed using a nondeterministic finite automaton (NFA). Combined with regular expressions and a backtracking mechanism, the coding results of each geocoding platform are compared with the road network data. Euclidean distance and semantic consistency are used for comparison, weights are calculated, and the final coding result is determined.
It effectively reduces the geographic coordinate error output by multiple geocoding platforms and improves the accuracy of coding results.
Smart Images

Figure CN120850953B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of geocoding result data processing technology, specifically relating to a geographic coordinate optimization method based on a road-constrained multi-source network geocoding platform. Background Technology
[0002] Geocoding is a technology that converts a textual description of an address into geographic coordinates. Current online geocoding platforms (such as Baidu, Tencent, Gaode, and Sogou) all rely on this geocoding technology to provide geographic coordinate services.
[0003] When using the existing geocoding platforms mentioned above, for example, if you enter "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" into each of the above geocoding platforms, the geocoding platforms will use their respective semantic similarity algorithms to query the corresponding encoding results in their respective databases based on the entered text address "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province". The corresponding encoding results will then be fed back to the user, which are the geographical coordinates corresponding to the text address "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province".
[0004] Due to differences in the data sources within the databases of the various geocoding platforms, or variations in the semantic similarity algorithms used by each platform, the encoding results output by each geocoding platform differ. For example, for the same text address, geocoding platform K1 outputs encoding result P1, while geocoding platform K2 outputs encoding result P2. The geographic coordinates output by multiple geocoding platforms exhibit significant errors, with an average error exceeding 500 meters. This results in the inability to provide users with accurate geographic coordinate services, causing inconvenience, such as delivery personnel being unable to accurately reach the destination based on the geographic coordinates provided by a particular coding platform.
[0005] This solution proposes a geographic coordinate optimization method based on a road-constrained multi-source network geocoding platform. Without relying on a point of interest coordinate database, it reduces the geographic coordinate error of multiple geocoding platforms for the same text address, providing users with more accurate geographic coordinate services. Summary of the Invention
[0006] This invention proposes a geographic coordinate optimization method based on a road-constrained multi-source network geocoding platform to reduce the coding error of the output results of various geocoding platforms.
[0007] To address the above problems, the present invention proposes the following solution:
[0008] The geographic coordinate optimization method based on a road-constrained multi-source network geocoding platform includes the following steps:
[0009] S1: Users enter the text address into each geocoding platform. Each geocoding platform first converts the address into its own coordinate system, and then converts the address into a unified coordinate system.
[0010] S2: In the road network data, draw circles with radius R centered on the coding results output by each geocoding platform to obtain circle O; denote all road segments covered within circle O as the "candidate road segment set", calculate the Euclidean distance from the corresponding coding result to the midpoint of each road segment in the candidate road segment set, denote the road to which the road segment with the shortest Euclidean distance belongs as the road to which the coding result belongs, and obtain the name of the road to which each coding result belongs;
[0011] S3: Based on NFA, using regular expressions and the backtracking mechanism of NFA, the text address in step S1 is segmented to obtain the road name; NFA is a nondeterministic finite automaton.
[0012] S4: Compare the names of the roads to which each encoding result belongs in S2 with the names of the roads after word segmentation in S3 for semantic consistency. If they are semantically consistent, the comparison is successful; otherwise, the comparison fails. Based on the number of successful comparisons, obtain the final encoding result according to different situations.
[0013] Further, step S4 includes the following steps:
[0014] S4.1: When the number of successful alignments is 1, the encoding result of the unique successful alignment is taken as the final encoding result. X 终 , Y 终 Output.
[0015] S4.2: When the number of successful alignments is n , n Greater than or equal to 2, and n If the value is a positive integer, then proceed with the following steps:
[0016] S4.2.1: Successfully matched n Each encoded result is numbered, and the weight of each encoded result is calculated;
[0017] S4.2.2: Based on the weights obtained in S4.2.1, a weighted calculation is performed to obtain the final encoding result. X 终 , Y 终 ), and output.
[0018] S4.3: If the number of successful alignments is 0, proceed with the following steps:
[0019] S4.3.1: Set the endpoints of the road after word segmentation as follows: K 1. K 2. Constructed K 1. K 2 straight lines L Determine the positional relationship between each encoding result and the road segmented in S3; the positional relationship includes: located on a line segment K 1 K 2. Above, located on line segment K 1 K 2 on the extension line and not located on the straight line L Above; the judgment result is u x The encoding result is located on the line segment. K 1 K 2. u y The encoding result is located on the line segment. K 1 K On the extension of 2, u The two encoding results are not located on a straight line. L superior; u x +u y =u 1; u 1+ u 2= u ;
[0020] S4.3.2: Continue to judge u 2 not located on a straight line L The encoding result on the line L Does the foot of the perpendicular lie on the line segment? K 1 K 2. The judgment result is: u n The perpendicular coordinates of the encoded result lie on the line segment K 1 K 2. u m The perpendicular coordinates of the encoded result are not located on line segment K1K2; u 2= u n+ u m .
[0021] S4.3.3: Classify the encoding results from S4.3.1 and S4.3.2 according to the following rules:
[0022] 1) u y Located on line segment K 1 KThe encoding results on the extension line, and u m The foot of the perpendicular is not located on the line segment. K 1 K The coding results from the above two points are collectively referred to as the "road external coding result set";
[0023] 2) u n The foot of the perpendicular lies on line segment K 1 K The encoding results on 2 are denoted as the "road-in-road encoding result set";
[0024] 3) u x Located on line segment K 1 K The encoding results on 2 are denoted as "the encoding result set on the road".
[0025] S4.3.4: Based on the classification results in S4.3.3, perform different processing steps to determine the final encoding result. Further, step S4.3.4 includes the following steps:
[0026] S4.3.4.1: For the "Road Outside Coding Result Set", calculate the distance from each coding result in the "Road Outside Coding Result Set" to the endpoint. K 1 and K 2 Euclidean distance;
[0027] For the "road-within-the-road coding result set", calculate the line distance from each coding result in the "road-within-the-road coding result set". L The vertical distance;
[0028] For the "road coding result set", calculate the line segment for each coding result in the "road coding result set". K 1 K Euclidean distance between the two midpoints.
[0029] S4.3.4.2: Select the encoding result with the shortest distance in S4.3.4.1, and denote it as the encoding result ( X min, Y min );
[0030] If the encoding result ( X min, Y min ) belongs to the "road external coding result set", and its endpoint K The distance of 1 is less than the distance to the endpoint. K The distance is 2, then the endpoints K The coordinates of 1 are used as the final encoding result;
[0031] If the encoding result ( X min, Y min ) belongs to the "road external coding result set", and its endpoint K The distance of 2 is less than the distance to the endpoint. K A distance of 1 will be the endpoint K The coordinates of 2 are used as the final encoding result;
[0032] If the encoding result ( X min, Y min ) belongs to the "Road Within Coding Result Set", which will ( X min, Y min The coordinates of the foot of the perpendicular are used as the final encoding result;
[0033] If the encoding result ( X min, Y min This belongs to the "road coding result set", which includes line segments. K 1 K The coordinates of the midpoint of 2 are used as the final encoding result.
[0034] Furthermore, in steps S4.2.1 and S4.2.2, the weight of each encoding result is:
[0035]
[0036] In the formula, Indicates the first i The weights of each encoded result; D i In S2, the first i The Euclidean distance from each encoded result to the midpoint of the road segment within the circle; It is a constant;
[0037] The formula for the final weighted encoding result is:
[0038]
[0039] In the formula, ( X zi ,Y zi ) indicates the first i One encoding result; ( X 终 ,Y 终 ) represents the final encoding result.
[0040] Furthermore, step S4.3.1 includes the following steps:
[0041] S4.3.1.1: Set two endpoints K 1. K The coordinates of 2 are respectively: ( X K1 , Y K1 )and( X K2 , Y K2 Because the x-coordinates and y-coordinates of the two endpoints of a road cannot be equal, it is possible to construct a straight line with a slope. L expression:
[0042]
[0043] S4.3.1.2: In u In the encoding result, the first one is determined according to the following method. b Is the encoding result in a straight line? L superior:
[0044] For the b Each encoding result ( X zb , Y zb ), b ∈[1, u ],
[0045] When satisfied When, it indicates the first b The encoded result is not in a straight line. L Above; conversely, the next... b The encoding results are on a straight line. L superior;
[0046] S4.3.1.3: In u One located in a straight line L In the encoding results above, for the first s Each encoding result ( X zs , Y zs ), s ∈[1, u 1], when satisfied When, it indicates the first s The encoding result is located on the line segment. K 1 K 2. When not satisfied This indicates the first s The encoding result is located on the line segment. K 1 KOn the extension of 2.
[0047] Furthermore, step S4.3.2 includes the following steps:
[0048] S4.3.2.1: For u 2 not located on a straight line L The encoding results are calculated to the line. L The coordinates of the foot of the perpendicular;
[0049] set up u The second of the two encoding results c The encoding results are ( X zc , Y zc ), c ∈[1, u 2]; then it is parallel to the straight line L The coordinates of the foot of the perpendicular are:
[0050]
[0051] In the formula, ( X zc , Y zc ) indicates the first c One encoding result; ( X c,foot , Y c,foot ) indicates the first c The perpendicular coordinates of each encoded result;
[0052] S4.3.2.2: When satisfied When, it indicates the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Located on line segment K 1 K 2. Above; when not satisfied When, it indicates the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Not located on a line segment K 1 K 2.
[0053] The beneficial effects that can be achieved by adopting the above technical solutions are:
[0054] This scheme compares the encoding results from multiple geocoding platforms with the word segmentation results from NFA. Based on the number of successful comparisons, different cases are identified to obtain the final encoding result, which can improve the accuracy of the encoding result. Attached Figure Description
[0055] Figure 1 This is a flowchart of the method;
[0056] Figure 2 This is the logic diagram of this method;
[0057] Figure 3 This is a schematic diagram illustrating the division of road segments in road network data;
[0058] Figure 4 This is a schematic diagram of the final coding results when the number of successful comparisons is different; Figure 4 (a) in the diagram is a schematic of the encoding result when the number of successful alignments is 1; Figure 4 (b) in the diagram is a schematic diagram of the encoding result when the number of successful alignments is n, where n is greater than or equal to 2; Figure 4 (c) in the diagram is a schematic diagram of the encoding result when the number of successful alignments is 0;
[0059] Figure 5 This is a bar chart showing the error between the encoding results of different encoding platforms and the encoding results of this method and the actual encoding results. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] See Figure 1 and Figure 2 The geographic coordinate optimization method based on a road-constrained multi-source network geocoding platform includes the following steps:
[0062] S1: Users enter the text address into each geocoding platform. Each geocoding platform first converts the address into its own coordinate system, and then, based on the WanderGIS tool, converts the address into a unified coordinate system.
[0063] Specifically, the text address "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" is entered into various geocoding platforms, including but not limited to: Gaode, Baidu, Tencent, etc.
[0064] Each encoding platform calls its API interface to convert the text address into the encoding result in the coordinate system of each geocoding platform. Since the coordinate systems of each geocoding platform are different, such as Baidu Maps using the BD-09 coordinate system (Baidu encrypted coordinate system), and Gaode Maps and Tencent Maps using the GCJ-02 coordinate system (National Bureau of Surveying and Mapping coordinate system), it is necessary to use the WanderGIS coordinate conversion tool to convert the above encoding results to the WGS-84 coordinate system (internationally used GPS coordinate system).
[0065] Assuming there is a total u Each geocoding platform first generates its own coordinate system encoding result based on the text address. After coordinate system transformation using the WanderGIS coordinate transformation tool, a corresponding encoding result in a unified coordinate system is obtained. Let the encoding results be as follows: ( X z1 , Y z1 ), ( X z2 , Y z2 ), ……, ( X zu , Y zu ).
[0066] S2: In the road network data, draw circles with radius R, centered on the coding results output by each geocoding platform, to obtain circle O; denote all road segments covered within circle O as the "candidate road segment set", calculate the Euclidean distance from the corresponding coding result to the midpoint of each road segment in the candidate road segment set, denote the road to which the road segment with the shortest Euclidean distance belongs as the road to which the coding result belongs, and obtain the name of the road to which each coding result belongs.
[0067] like Figure 3 Suppose the encoding result of a certain geocoding platform is "( X z1 , Y z1 In road network data, with ( X z1 , Y z1 Let ) be the center and radius R (50m) be the radius of the circle. Let the circle O contain the following road segments: “Section A of Focheng West Road”, “Section C of Jiangjun Avenue”, “Section B of Focheng East Road” and “Section D of Chengxin Avenue”. These road segments are not complete roads, but only a section of the corresponding road.
[0068] Calculate the encoding result within circle O ( X z1 , Yz1 Let the Euclidean distances to the midpoints of each of the above road segments be D respectively. A D B D C and D D The encoding result ( X z1 , Y z1 Compare the Euclidean distances to the midpoints of each of the above road segments, and select the shortest Euclidean distance, i.e.: min{D A D B D C D D Let the shortest Euclidean distance be D. A The encoding result is ( X z1 , Y z1 ) belongs to D A The name of the road in question is: Focheng West Road.
[0069] The formula for calculating the Euclidean distance from the encoding result to the midpoint of each road segment is:
[0070]
[0071] In equation (1), ( X z1 , Y z1 ) represents the encoding result; X g,中 , Y g,中 ) indicates road segment g The midpoint coordinates, g ∈{A, B, C, D}; Dg Indicates the encoding result to the road segment g The Euclidean distance from the midpoint.
[0072] S3: Based on a nondeterministic finite automaton (NFA), using regular expressions and the backtracking mechanism of the NFA, the text address in step S1 is segmented to obtain the road name.
[0073] Specifically, the text "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" is input into NFA. NFA uses regular expressions to segment the text data, thus accurately extracting multiple words such as "Jiangsu Province", "Nanjing City", "Jiangning District", "Focheng West Road", and "No. 17". Among them, the obtained road name is "Focheng West Road".
[0074] S4: Compare the semantic consistency of the road names to which each encoded result belongs in S2 is located with the word-segmented road names in S3. If they are semantically consistent, the comparison is successful; otherwise, it fails. Based on the number of successful comparisons, obtain the final encoding result according to different scenarios. Specifically, this includes the following steps:
[0075] S4.1: Only one encoded result belongs to the road name, which is successfully matched with the road name after word segmentation in S3; that is, the number of successful matches is 1. The others... u- If the name of the road to which one encoded result belongs fails to match the names of roads after word segmentation in S3, the only successfully matched encoded result will be used as the final encoded result. X 终, Y 终 Output.
[0076] S4.2: The number of successful alignments is n , n Greater than or equal to 2, and n It must be a positive integer. The specific steps include:
[0077] S4.2.1: Successfully matched n Each encoded result is numbered. n ≤ u Calculate the weight of each encoding result.
[0078] The formula is:
[0079]
[0080] In equation (2), Indicates the first i The weights of each encoded result, i ∈[1, n ]; D i Indicates the first i The distance from the encoding result to the midpoint of the corresponding road segment within the circle in S2, taking the aforementioned S2 as an example, is the distance from the encoding result to the midpoint of the corresponding road segment within the circle in S2. i The Euclidean distance from the encoded result to the midpoint of a certain section of Focheng West Road. It is a constant. , used to prevent the denominator from being 0 in equation (2).
[0081] S4.2.2: Weighted average to obtain the final encoding result.
[0082] The formula is:
[0083]
[0084] In equation (3), ( X zi,Y zi ) indicates the first i One encoding result; ( X 终 ,Y 终 ) represents the final encoding result.
[0085] S4.3: The number of successful alignments is 0. This includes the following steps:
[0086] S4.3.1: Determine the positional relationship between each encoding result and the road segmentation results in S3. This includes the following steps:
[0087] S4.3.1.1: In the road network data, obtain the endpoints of the roads after word segmentation in S3 ( K 1. K 2) Coordinates, two endpoints ( K 1. K 2) The coordinates are denoted as: ( X K1, Y K1 )and( X K2, Y K2 ), based on endpoints K 1. K Use the coordinates of 2 to construct a straight line. L In reality, because the x-coordinates and y-coordinates of the two endpoints of a road cannot be equal, it is possible to construct a straight line with a slope. L expression.
[0088] straight line L The formula is:
[0089]
[0090] Equation (4) is a straight line L The expression;
[0091] S4.3.1.2: In u Among the encoded results, determine u Is the encoding result in a straight line? L Above; Assuming u One encoding result lies on a straight line L superior, u The two encoded results are not located on a straight line. L superior, u 1+ u 2= u .
[0092] Specifically, substituting each encoding result into equation (4), for the first... bEach encoding result ( X zb , Y zb ), b ∈[1, u If satisfied When, it indicates the first b The encoded result is not in a straight line. L Above. After continuously judging each encoding result using this formula, set... u One encoding result lies on a straight line L superior, u The two encoded results are not located on a straight line. L superior.
[0093] S4.3.1.3: Continue to judge u Is a coding result located on a line segment? K 1 K 2. Assumption u x The encoding result is located on the line segment. K 1 K 2. u y The encoding result is located on the line segment. K 1 K On the extension of 2, u x +u y =u 1.
[0094] for u One located in a straight line L The encoding result on the line, although it is located on the line L Above, but it may be located on a line segment. K 1 K 2, or possibly located on a line segment. K 1 K On the extension of line 2, it is necessary to distinguish between the two encoding results.
[0095] Will u 1. The encoding result is renumbered for... u The first in 1 s Each encoding result s ∈[1, u 1], determine whether it is in K 1. K The x-coordinate interval between two points, i.e., determining whether the encoding result lies within the line segment. K 1 K 2. Above;
[0096] When satisfied When, it indicates the first sThe encoding result is located on the line segment. K 1 K 2. Above; express X K1 and X K2 Take the smaller value; express X K1 and X K2 Take the larger value;
[0097] When the above expression is not satisfied, it indicates that the first... s The encoding result is located on the line segment. K 1 K On the extension of 2. After judging by the above formula, set u x The encoding result is located on the line segment. K 1 K 2. u y The encoding result is located on the line segment. K 1 K On the extension of 2.
[0098] S4.3.2: Continue to judge u Two encoding results that are not located on the line L, and their relationship with the line L. L Does the foot of the perpendicular lie on the line segment? K 1 K 2. Assumption u 2 not located on a straight line L In the encoding results above, u n The perpendicular coordinates of the encoded result lie on the line segment K 1 K 2. u m The perpendicular coordinates of the encoded result are not located on the line segment. K 1 K 2. u 2= u n +u m Specifically, it includes the following steps:
[0099] S4.3.2.1: Calculate the values of each encoding result to the straight line. L The coordinates of the foot of the perpendicular.
[0100] Will u The two encoding results are numbered, and the first number is set. c indivual( c ∈[1, u 2]) The encoding result is ( Xzc , Y zc ), according to the formula for the foot of the perpendicular, the encoding result ( X zc , Y zc ) and straight line L The coordinates of the foot of the perpendicular are:
[0101]
[0102] In equation (5), ( X zc , Y zc ) indicates the first c One encoding result; ( X c,foot , Y c,foot ) indicates the first c The perpendicular coordinates of each encoded result.
[0103] S4.3.2.2: Continue to judge u 2 not located on a straight line L The coordinates of the foot of the perpendicular from the encoded result on the line segment. K 1 K 2.
[0104] Due to the c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot It must lie on a straight line. L Above, so when judging the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Is it located on a line segment? K 1 K When it is 2, it is only necessary to determine the first one. c Is the x-coordinate of the perpendicular foot of each encoded result within... K 1. K 2. The x-coordinate interval between the two points.
[0105] That is, when the condition is met When, it indicates the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Located on line segment K 1 K 2. When the above formula is not satisfied, it indicates that the first... c The perpendicular coordinates of each encoded result (X c,foot , Y c,foot Not located on a line segment K 1 K 2.
[0106] S4.3.3: Classify the various encoding results.
[0107] Specifically, after operations S4.3.1 and S4.3.2, u Each encoded result is divided into: u y Located on line segment K 1 K 2. Encoding results on the extension line; u m The foot of the perpendicular is not located on the line segment. K 1 K 2. Encoding results; u n The foot of the perpendicular lies on line segment K 1 K The encoding result on 2; u x Located on line segment K 1 K The encoding result on 2.
[0108] The above encoding results are then categorized: u y Located on line segment K 1 K The encoding results on the extension line, and u m The foot of the perpendicular is not located on the line segment. K 1 K The two coding results are collectively referred to as the "Road External Coding Result Set". The "Road External Coding Result Set" contains a total of u y + u m Each encoding result.
[0109] Will u n The foot of the perpendicular lies on line segment K 1 K The encoding results on 2 are denoted as the "road-in-road encoding result set";
[0110] Will u x Located on line segment K 1 K The encoding results on 2 are denoted as "the encoding result set on the road".
[0111] S4.3.4: Based on the classification results in S4.3.3, determine the final coding result. This specifically includes the following steps:
[0112] S4.3.4.1: For the "Road Outside Coding Result Set", calculate the distance from each coding result in the "Road Outside Coding Result Set" to the endpoint. K 1 and K The Euclidean distance of 2 yields a total of 2*( u y + u m ( ) Euclidean distances.
[0113] For the "road-within-the-road coding result set", calculate the line distance from each coding result in the "road-within-the-road coding result set". L The vertical distance was obtained in total. u n A vertical distance.
[0114] For the "road coding result set", calculate the line segment for each coding result in the "road coding result set". K 1 K The Euclidean distance between the two midpoints is obtained. u x One European distance.
[0115] S4.3.4.2: In 2*( u y + u m )+ u n +u x Among the distances, select the encoding result with the shortest distance, and denote this encoding result as ( X min, Y min );
[0116] If the encoding result ( X min, Y min ) belongs to the "road external coding result set", and its endpoint K The distance of 1 is less than the distance to the endpoint. K The distance is 2, then the endpoints K The coordinates of 1 are used as the final encoding result;
[0117] If the encoding result ( X min, Y min ) belongs to the "road external coding result set", and its endpoint K The distance of 2 is less than the distance to the endpoint. KA distance of 1 will be the endpoint K The coordinates of 2 are used as the final encoding result;
[0118] If the encoding result ( X min, Y min ) belongs to the "Road Within Coding Result Set", which will ( X min, Y min The coordinates of the foot of the perpendicular on line L are used as the final encoding result;
[0119] If the encoding result ( X min, Y min This belongs to the "road coding result set", which includes line segments. K 1 K The coordinates of the midpoint of 2 are used as the final encoding result.
[0120] like Figure 4 The final encoding results are shown for different numbers of successful alignments. Figure 4 (a) in the diagram is a schematic of the encoding result when the number of successful alignments is 1; Figure 4 (b) in the diagram is a schematic diagram of the encoding result when the number of successful alignments is n, where n is greater than or equal to 2; Figure 4 (c) in the diagram is a schematic diagram of the encoding result when the number of successful alignments is 0.
[0121] Case Study:
[0122] To verify that this method can reduce the encoding errors of multiple encoding platforms, this example selects 2000 actual addresses and compares the encoding results with those of Baidu, Gaode, and Tencent encoding platforms. The number of errors in the encoding results is shown in [link to example]. Figure 5 .
[0123] from Figure 5 It can be seen that the error results of this optimization algorithm are mostly concentrated in the range of 0-99m, and the number is greater than that of the three encoding platforms. The number of errors decreases as the error range increases, and the number of errors greater than 600m is in the single digits. This indicates that this optimization algorithm can significantly reduce the large-range error greater than 600m.
[0124] Table 1 shows the error statistics of the encoding results of the three encoding platforms and the optimized algorithm.
[0125] Table 1. Errors between various encoding platforms and the optimized algorithm and real geographic coordinates.
[0126]
[0127] As can be seen from Table 1, the mean error, maximum error, and standard deviation of this scheme are all smaller than those of other platform algorithms. This indicates that the optimization algorithm of this scheme has the smallest error with the actual geographic coordinates. Therefore, the optimization algorithm of this scheme is beneficial to reducing geographic coordinate errors.
[0128] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for optimizing geographic coordinates based on road-constrained multi-source network geocoding platform, characterized in that, The method comprises the following steps: S1: a user enters a text address into each geographic coding platform, each geographic coding platform converts the text address into an encoding result in its own coordinate system, and then converts the encoding result in its own coordinate system into an encoding result in a unified coordinate system through a coordinate conversion tool; S2: in road network data, a circle O is obtained by taking the encoding result output by each geographic coding platform as the center and a radius R as the circle; all road segments covered in the circle O are recorded as a "candidate road segment set", the Euclidean distance of the corresponding encoding result to the midpoint of each road segment in the candidate road segment set is calculated, a road to which the road segment with the shortest Euclidean distance belongs is recorded as a road to which the encoding result belongs, and the name of the road to which each encoding result belongs is obtained; S3: based on an NFA, a regular expression and a backtracking mechanism of the NFA, the text address in step S1 is subjected to word segmentation processing to obtain a road name; the NFA is a non-deterministic finite automaton; S4: the name of the road to which each encoding result belongs in S2 is respectively compared with the name of the road after word segmentation in S3 for semantic consistency, and if the semantic consistency is successful, the comparison is successful, and if the semantic consistency is not successful, the comparison fails; according to the number of successful comparisons, the final encoding result is obtained according to different situations; S4.3: when the number of successful comparisons is 0, the following steps are performed: S4.1: When the number of comparison successes is 1, output the encoding result of the only comparison success as the final encoding result X 终 , Y 终 ) S4.2: When the number of successful alignments is n , n Greater than or equal to 2, and n If the value is a positive integer, then proceed with the following steps: S4.2.1: number the coding results that are successful in comparison n and calculate the weight of each coding result; S4.2.2: Based on the weights obtained in S4.2.1, a weighted calculation is performed to obtain the final encoding result. X 终 , Y 终 ), and output; S4.3.3: the encoding results in S4.3.1 and S4.3.2 are classified according to the following rules: S4.3.1: Set the endpoints of the road after word segmentation respectively as K 1、 K 2, K 1、 K 2, L and judge the positional relationship of each coding result with the road after word segmentation in S3; the positional relationship includes: located on line segment K 1 K 2, located on the extension line of line segment K 1 K 2 and not located on straight line L ; u x If one coding result is located on line segment K 1 K 2, u y If one coding result is located on the extension line of line segment K 1 K 2, u If two coding results are not located on straight line L ; u x +u y =u 1; u 1+ u 2= u ; S4.3.2: Continue judging u 2 non-located on a straight line L coding results, and whether the foot coordinates of the straight line L K1K2 are located on the line segment K 1 K 2; the judgment result is u n The foot coordinates of the coding result K 1 K 2, u m The foot coordinates of the coding result u 2= u n+ u m ; S4.3.4: according to the classification result in S4.3.3, different processing is performed to determine the final encoding result. 1) u y Located on line segment K 1 K The encoding results on the extension line, and u m The foot of the perpendicular is not located on the line segment. K 1 K The coding results from point 2 are collectively referred to as the "road external coding result set"; 2), the encoding result of the line segment u n with one foot on the line segment K 1 K 2 is recorded as "in-road encoding result set"; 3) to u x one encoding result located on the line segment K 1 K 2, denoted as "set of encoding results on the road"; S4.3.4 comprises the following steps:
2. The method for optimizing geocoordinates based on road constrained multi-source network geocoding platform according to claim 1, characterized in that, In steps S4.2.1 and S4.2.2, the weight of each encoding result is: S4.3.4.1: For the "off-road encoding result set", calculate the Euclidean distance of each encoding result in the "off-road encoding result set" to the end point K 1 and K 2, respectively; For the "in-road coding result set", the perpendicular distance of each coding result in the "in-road coding result set" to the straight line L is calculated respectively; For the "on-road coding result set", the Euclidean distance of each coding result in the "on-road coding result set" to the mid-point of the line segment K 1 K 2 is calculated respectively; S4.3.4.2: select the encoding result with the shortest distance in S4.3.4.1, and record it as the encoding result is X min, Y min ); If the encoding result ( X min, Y min ) belongs to the "road external coding result set", and its endpoint K The distance of 1 is less than the distance to the endpoint. K The distance is 2, then the endpoints K The coordinates of 1 are used as the final encoding result; If the encoding result (x, y) belongs to the "off-road encoding result set" and its distance to the endpoint X min, Y min 2 is smaller than the distance to the endpoint K 1, the coordinates of the endpoint K 2 are taken as the final encoding result. K 2 is smaller than the distance to the endpoint K 1, the coordinates of the endpoint K 2 are taken as the final encoding result. K 2 is smaller than the distance to the endpoint K 1, the coordinates of the endpoint K 2 are taken as the final encoding result. <000015 If the encoding result ( X min, Y min ) belongs to the "road-based coding result set", which will ( X min, Y min The coordinates of the foot of the perpendicular are used as the final encoding result; If the encoding result (x, y) belongs to the "on-road encoding result set", the midpoint coordinate of the line segment connecting the two points X min, Y min ) is taken as the final encoding result. K 1 K 2.
3. The method for optimizing geocoordinates based on road constrained multi-source network geocoding platform according to claim 2, characterized in that, The formula for obtaining the final encoding result by weighting is: ; wherein represents the weight of the i th encoding result; D i represents the Euclidean distance from the i th encoding result in S2 to the midpoint of the circular road segment; is a constant; S4.3.1 comprises the following steps: ; In the formula, X zi ,Y zi indicates the first i encoding result; ( X 终 ,Y 终 ) represents the final encoding result.
4. The method for optimizing geocoordinates based on road constrained multi-source network geocoding platform according to claim 3, characterized in that, S4.3.2 comprises the following steps: S4.3.1.1: Set two end points K 1、 K 2, respectively: X K1 , Y K1 and X K2 , Y K2 ; because the horizontal and vertical coordinates of the end points of the road cannot be equal, a straight line with a slope can be constructed L Expression: ; S4.3.1.2: In the case of the first coding result, it is determined whether the first coding result is on a straight line according to the following method. u b L In the case of the second coding result, it is determined whether the second coding result is on a straight line according to the following method. For the first b encoding result X zb , Y zb ), b ∈ [1, u ] When the condition is satisfied, it indicates that the first b encoding result is not on the straight line L ; otherwise, the first b encoding result is on the straight line L . S4.3.1.3: In u One located in a straight line L In the encoding results above, for the first s Each encoding result ( X zs , Y zs ), s ∈[1, u 1], when satisfied When, it indicates the first s The encoding result is located on the line segment. K 1 K 2. When not satisfied When, it indicates the first s The encoding result is located on the line segment. K 1 K On the extension of 2.
5. The method for optimizing geocoordinates based on road constrained multi-source network geocoding platform according to claim 4, characterized in that, S4.3.2.1: For each of the 2 non-collinear u encoding results, compute the foot-of-perpendicular coordinates of the respective encoding result to the line L S4.3.2.2: Compute the distance between the foot-of-perpendicular coordinates of the two encoding results to the line L S4.3.2.3: If the distance is smaller than a threshold value, then the two encoding results are considered to be Set u 2nd c encoding result is X zc , Y zc ), c ∈[1, u 2]; then the foot coordinates of the straight line L are: ; In the formula, ( X zc , Y zc ) indicates the first c One encoding result; ( X c,foot , Y c,foot ) indicates the first c The perpendicular coordinates of each encoded result; S4.3.2.2: When satisfied When, it indicates the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Located on line segment K 1 K 2. Above; when not satisfied When, it indicates the first c The perpendicular coordinates of each encoded result ( X c,foot , Y c,foot Not located on a line segment K 1 K 2.
Citation Information
Patent Citations
Geographic coordinate optimization method based on interest point constraint multi-source network geocoding platform
CN119669381A
High-positioning-precision vehicle adaptive navigation method and vehicle-mounted navigator
CN120252774A