Geocoding error identification method based on external semantic and spatial consistency constraints
By using a geocoding error identification method based on external semantic and spatial consistency constraints, and leveraging the semantic similarity and spatial location of road network data and POI points, the high cost and accuracy issues of geocoding error identification in existing technologies are resolved, achieving efficient and accurate error identification results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies are costly or produce inaccurate results when identifying geocoding errors, making it difficult to effectively assess and identify errors in coded coordinates, especially when real coordinates are lacking and the data volume is large, making it impossible to achieve efficient and accurate error identification.
A geocoding error identification method based on external semantic and spatial consistency constraints is adopted. The address type is determined by word segmentation, and the error value of the coding coordinates is calculated by combining road network data and POI spatial clustering. The coding error is identified by using road network distance and semantic similarity and spatial location of POI points.
It significantly improves the accuracy and interpretability of error identification, is suitable for large-scale data scenarios lacking real coordinates, and the identification error is consistent with the actual error distribution, with high accuracy, making it suitable for map navigation and location services.
Smart Images

Figure CN121479361B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of geocoding, and particularly relates to a geocoding error identification method based on external semantics and spatial consistency constraints. BACKGROUND
[0002] Geocoding is a core technology for converting a text address into a geographic coordinate, which has now been deeply integrated into daily life - from ordering takeout, calling a ride-hailing car to receiving and sending express, all of which rely on this technology to associate an address with a spatial location. It is also the underlying support for map navigation and various location services, ensuring that textual address information can be accurately mapped to a specific point on an electronic map. However, whether using Baidu, Gaode or other commercial platforms, the encoded coordinates often have large or small errors. Such errors can affect the efficiency of delivery personnel and the use of address data by researchers. For industries that rely on accurate locations, how to evaluate and identify these errors has become a difficult problem to be solved.
[0003] Currently, there are two main ways to evaluate the errors of these coordinates.
[0004] The first is to "check with standard answers". That is, using the high-precision address library measured by the government or the "true coordinates" collected by manually carrying GPS devices in the field as the standard to verify the errors of commercial coding. Although this method is direct, it is extremely costly and difficult for most ordinary users and enterprises to obtain "standard answers", and even involves confidential data, making it impossible to popularize and promote.
[0005] The second is to "calculate by theory". This method does not pursue true coordinates, but tries to estimate the possible range of errors by analyzing the fuzziness of the input address and the stability of the coding algorithm itself. However, the problem is that the fuzziness of the address and the error characteristics of the algorithm are not constant, and will change dynamically due to differences in regions, platforms and even algorithm versions, resulting in a large deviation between the calculated results and the actual values.
[0006] For users who use geocoding data, there is only the input address and the coordinates returned by the platform, which may or may not be accurate. Therefore, there is an urgent need for a geocoding error identification method based on external semantics and spatial consistency constraints, which combines external semantics and spatial consistency constraints to identify coding coordinate errors. SUMMARY
[0007] The application proposes a geocoding error identification method based on external semantics and spatial consistency constraints, which is based on external semantics and spatial consistency constraints and used to identify errors in encoded coordinates after a geocoding platform performs a geocoding operation on a text address.
[0008] To achieve the above objectives, the present invention proposes the following technical content:
[0009] A geocoding error identification method based on external semantic and spatial consistency constraints includes the following steps:
[0010] S1: Segment any text address and determine whether the text address belongs to a complete road address or a missing road address;
[0011] S2: Encode the text address in S1 using a geocoding platform to obtain the encoded coordinates of the text address; input the encoded coordinates into the road network data, calculate the shortest distance between each road in the road network data and the encoded coordinates, sort them according to the shortest distance, and take the top three roads with the smallest distance to form a road set R;
[0012] S3: When the address type of the text address in S1 is a road missing address, the average of the shortest distances from the encoded coordinates of the text address to each road in the road set R is used as the error of the encoded coordinates of the text address.
[0013] S4: When the address type of the text address in S1 is a complete road address, determine whether the text address belongs to a failed match address or a road matching address;
[0014] S5: For addresses that fail to match, obtain the error value of their encoded coordinates in two cases;
[0015] The first case is a locally mismatched address: In the entire road network database, a road matching the "road segment" of the text address can be found, denoted as... R c Then the error value of the encoded coordinates of the text address is: the distance from the encoded coordinates of the text address to the road. R c The shortest distance;
[0016] The second case is the global mismatch address: If no road matching the "road segment" of the text address is found in the entire road network database, then the error value corresponding to the encoded coordinates of the text address is the average of the shortest distances from the encoded coordinates of the text address to each road in the road set R.
[0017] S6: For road-matching addresses, infer the error value through POI spatial clustering.
[0018] Further, step S4 includes the following steps:
[0019] S4.1: Calculate the text similarity between the "road segment" of this text address and the text of each road in the road set R; the formula is:
[0020]
[0021] In the formula, sim i The "road segment" representing the text address in S1 is related to the road segment in road set R. i One road R i Semantic similarity between them; street The "road segment" represents the text address in S1; LCS (*,*) represents calculating the length of the longest common subsequence between two strings; len (*) indicates that the length of the string is calculated;
[0022] S4.2: When the semantic similarity between the "road segment" of the text address in S1 and the three roads in the road set R is less than the set threshold. If the text address matches successfully, it is considered a failed match address; otherwise, it is considered a road matching address.
[0023] Further, step S6 includes the following steps:
[0024] S6.1: Find the road in the road set R that has the highest semantic similarity to the "road segment" of the text address in S1, and denote it as R. * ;
[0025] S6.2: Searching for R in the reference POI library * The semantic similarity of the "building segment" to the address matching the road is greater than or equal to a set threshold. For each POI, construct a semantic sample set based on the same road and proximity, using the following formula:
[0026]
[0027] In the formula, S This represents a set of semantically similar samples along the same road. P This indicates that all points of interest in the POI database are referenced. Indicate points of interest P k "Road segment" after word segmentation; Indicates the intersection operation; Building This refers to the "building segment" after word segmentation of the road-matching address; Indicate points of interest P k "Building segment" after word segmentation;
[0028] S6.3: Statistical Sets S The number of points of interest (POIs) is used to calculate the error of the road matching address, specifically including the following cases:
[0029] The first case: when the setS When the number of points of interest in the set is greater than or equal to 3, the set... S DBSCAN clustering is performed on the points of interest in the data; the centroid coordinates of the largest cluster are used as reference coordinates. x ref , y ref ), calculate reference coordinates ( x ref , y ref The Euclidean distance between the road and the coded coordinates of the road matching address is used as the error value of the coded coordinates of the road matching address.
[0030] The second case: when the set S When the number of points of interest in a given set is greater than or equal to 1 and less than or equal to 2, a set is obtained. S The average coordinates of all points of interest are calculated, and the Euclidean distance between the average coordinates and the coded coordinates of the road matching address is used as the error value of the coded coordinates of the road matching address.
[0031] The third case: when the set S When the number of points of interest is 0, determine the encoding coordinates of the road matching address to R. * Is the foot of the perpendicular located at R? * Above, if the foot is on R * Then, the encoded coordinates of the road matching address are mapped to R. * The vertical distance is used as the error value for the road matching address coding coordinates; if the foot of the perpendicular is not in R * If there is no perpendicular foot, then the encoded coordinates of the road matching address are mapped to R. * The distance from the midpoint is used as the error value for the road matching address coding coordinates.
[0032] Furthermore, in step S6.3, the basic parameters of DBSCAN clustering are set as follows: neighborhood radius ε = 100m, minimum number of points min_samples = 2.
[0033] Furthermore, in step S6.2, Set to 0.8.
[0034] The beneficial effects that can be achieved by adopting the above technologies are:
[0035] For a semantically complete text address, this solution uses the semantic association and spatial distance between the text address and roads and reference POIs as constraints to maintain textual consistency between the road field in the text address and the real roads in the road network. Any deviation from this consistency can be regarded as a potential geocoding error. By using independent data, the accuracy and interpretability of error identification are significantly improved. It is suitable for typical application scenarios with a lack of real coordinates, large data scale, and black box coding platform. Attached Figure Description
[0036] Figure 1 This is a flowchart of the steps of this method;
[0037] Figure 2 This is the logical flowchart of this method;
[0038] Figure 3 This is the error identification map after DBSCAN clustering when there are more than 3 POI points in set S;
[0039] Figure 4 This is a distribution chart of the number of actual errors and recognition errors;
[0040] Figure 5 It is a quantity distribution chart obtained by subtracting the identification error from the actual error and taking the absolute value. Detailed Implementation
[0041] 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.
[0042] like Figure 1 and Figure 2 As shown, the geocoding error identification method based on external semantic and spatial consistency constraints specifically includes the following steps:
[0043] S1: Segment any text address and determine whether the text address belongs to a complete road address or a missing road address;
[0044] Specifically, the text address is segmented using a bidirectional long short-term memory network and a conditional random field. If the segmented word contains a "road word", the text address is a complete road address; otherwise, it is a missing road address.
[0045] For example:
[0046] If the text address is: No. xxx, Jinyinglou, Tianyuan East Road, Jiangning District, Nanjing City, the segmented words will be: "Nanjing City", "Jiangning District", "Tianyuan East Road", and "No. xxx, Jinyinglou". Since the segmented words contain the "Tianyuan East Road" segment, the text address is a complete road address.
[0047] If the text address is: No. xxx, Jinyinglou, Jiangning District, Nanjing City, the segmented words will be: "Nanjing City", "Jiangning District", and "No. xxx, Jinyinglou". Since the segmented words do not contain the "road segment", the text address is a road-deficient address.
[0048] S2: Encode the text address in S1 using a geocoding platform to obtain the encoded coordinates of the text address; input the encoded coordinates into the road network data, calculate the shortest distance between each road in the road network data and the encoded coordinates, sort the shortest distances from smallest to largest, and take the top three roads with the smallest distances to form a road set R.
[0049] S3: When the address type of the text address in S1 is a road-missing address, the average of the shortest distances from the encoded coordinates of the text address to all roads in the road set R is used as the encoded coordinate error of the text address; the formula is:
[0050]
[0051] In equation (1), D i Represents the road set R of the first i One road R i The shortest distance to the encoded coordinates of the text address. i ∈[1,3], and is an integer; K This represents the error value of the encoded coordinates of the text address.
[0052] When the address type of the text address in S1 is a complete road address, proceed to the next step.
[0053] S4: When the address type of the text address in S1 is a complete road address, determine whether the text address belongs to a failed match address or a road matching address. Specifically, this includes the following steps:
[0054] S4.1: Calculate the text similarity between the "road segment" of this text address and the text of each road in the road set R. The formula is:
[0055]
[0056] In equation (2), sim i This indicates that the "road segment" of the text address is related to the first road segment in road set R.i One road R i Semantic similarity between them; LCS (*,*) represents calculating the length of the longest common subsequence between two strings; len (*) indicates that the length of the string is calculated; street This refers to the "road segment" of the text address.
[0057] S4.2: When the semantic similarity between the "road segment" of the text address and the three roads in the road set R is less than the set threshold. If the text address matches successfully, it is considered a failed match address; otherwise, it is considered a road matching address.
[0058] S5: For addresses that fail to match, obtain the error value of their encoded coordinates in two cases.
[0059] The first case is a locally mismatched address: In the entire road network database, a road matching the "road segment" of the text address can be found, denoted as... R c Then the error value of the encoded coordinates of the text address is: the distance from the encoded coordinates of the text address to the road. R c The shortest distance. Based on the uniqueness of road network data, when a road in the road network data matches the "road segment" of a text address, R c There is only one.
[0060] The second case is the global mismatch address: If no road matching the “road segment” of the text address is found in the entire road network database, the error value corresponding to the encoded coordinates of the text address is: the average of the shortest distances from the encoded coordinates of the text address to each road in the road set R is used as the error of the encoded coordinates of the text address; that is, the corresponding error value is obtained through equation (1).
[0061] S6: For road-matching addresses, infer the error value through POI spatial clustering. This includes the following steps:
[0062] S6.1: Using equation (2), find the road in the road set R that has the highest semantic similarity to the "road segment" of the text address in S1, and denote it as... R * .
[0063] S6.2: Searching for R in the reference POI database * The semantic similarity of building segments to road-matching addresses is greater than or equal to a set threshold. For each POI, construct a semantic sample set based on the same road and proximity, using the following formula:
[0064]
[0065] In the formula, S This represents a set of semantic samples related to the same road. P This indicates that all points of interest in the POI database are referenced. Indicate points of interest P k "Road segment" after word segmentation; This represents the intersection operation, meaning that both conditions are satisfied; Building This refers to the "building segment" after word segmentation of the road-matching address; Indicate points of interest P k "Building segment" after word segmentation; This indicates the set threshold value, preferably 0.8;
[0066] S6.3: Statistical Sets S The number of points of interest (POIs) is used to calculate the error of the road matching address. This includes the following specific cases:
[0067] The first case: when the set S When the number of points of interest in the set is greater than or equal to 3, the set... S DBSCAN clustering is performed on the points of interest (POIs) in the dataset. (DBSCAN is insensitive to noise points and does not require a pre-defined cluster shape, effectively filtering out abnormal POIs that may have positioning errors, making it suitable for complex POI distribution patterns in urban environments.) The basic parameters for DBSCAN clustering are set as follows: neighborhood radius ε = 100m, minimum number of points min_samples = 2. The centroid coordinates of the largest cluster are used as reference coordinates. x ref , y ref ), calculate reference coordinates ( x ref , y ref The Euclidean distance between the road and the coded coordinates of the matching address is used as the error value for the coded coordinates of the road matching address. The formula is:
[0068]
[0069] In the formula, K This represents the error value of the encoded coordinates; x ref , y ref ) represents the reference coordinates; x,y ) represents the coded coordinates of the road-matching address; Figure 3 The text shows when the set SThe error value of the encoded coordinates when the number of points of interest is greater than or equal to 3.
[0070] The second case: when the set S When the number of points of interest in a given set is greater than or equal to 1 and less than or equal to 2, a set is obtained. S The average coordinates of all points of interest are used to calculate the Euclidean distance between the average coordinates and the coded coordinates of the road-matching address. This distance is taken as the error value of the coded coordinates of the road-matching address. The formula is:
[0071]
[0072] In the formula, Represents a set S The average coordinates of all points of interest; m This represents the number of points of interest in set S; g Represents a set S The Middle g Points of interest. If the set S If the number of points of interest is 1, then the average coordinates are the coordinates of the unique point of interest. K Indicates the error value; x,y ) represents the coded coordinates of the road-matching address;
[0073] The third case: when the set S When the number of points of interest is 0, determine the encoding coordinates of the road matching address to R. * Is the foot of the perpendicular located at R? * Above, if the foot is on R * Then, the encoded coordinates of the road matching address are mapped to R. * The vertical distance is used as the error value for the road matching address coding coordinates; if the foot of the perpendicular is not in R * If there is no perpendicular foot, then the encoded coordinates of the road matching address are mapped to R. * The distance from the midpoint is used as the error value for the road matching address coding coordinates.
[0074] Calculation example:
[0075] To verify the feasibility of this scheme, a preliminary experiment was conducted using 5119 POI address records. These addresses came from four districts in Nanjing, Jiangsu Province (Xuanwu, Gulou, Qinhuai, and Jianye). Each address had a complete hierarchical structure of city-district-street-house number, and also included actual WGS84 coordinates as well as encoded coordinates obtained using a network encoding platform. The experimental data is shown in Table 1.
[0076] Table 1 Experimental address data
[0077] Nanjing Qinhuai District Xianhe Street aaa Nanjing Qinhuai District Yanling Lane bbb Nanjing Gulou District Hunan Road Lion Bridge cc …… Nanjing Xuanwu District Zhujiang Road East Big Screen dd Nanjing Xuanwu District Longpan Road xx Building xx
[0078] Calculate the true error for each POI address, where the true error is the distance between the WGS84 coordinates of each POI address and the encoded coordinates obtained by the network encoding platform;
[0079] The identification error is the error obtained after processing by this solution.
[0080] For the 5119 POI addresses, the relevant data on their actual error and identification error are shown in Table 2.
[0081] Table 2. Statistics of True Error and Recognition Error Results
[0082]
[0083] The data in Table 2 shows that:
[0084] From the perspective of quartiles, the actual error distribution is basically consistent with the error distribution of the error identified by this scheme, which indicates that this scheme can reflect the error distribution pattern relatively objectively.
[0085] Looking at the mean and standard deviation of the errors: the mean error of the identified error by this method is 0.17 km, while the mean error of the actual error is 0.14 km, a difference of only 0.03 km (approximately 30 meters). This indicates that there is only a negligible slight deviation between the estimated and actual error values provided by this method. The standard deviation of the identified error differs from the standard deviation of the actual error by only 0.03 km, confirming that the method's ability to characterize the degree of error dispersion is almost identical to the actual error distribution, demonstrating its robustness in capturing error fluctuations.
[0086] Figure 4 The distribution charts for the various error types are shown. Overall, the two types of errors exhibit a relatively consistent trend in their distribution patterns. True errors are mainly concentrated in the low error range, with approximately 62% of address samples having errors in the zero range. Correspondingly, the proportion of errors identified by this method in the zero range is approximately 50%, also constituting the main distribution component. As the error range increases, the number of samples for both types of errors shows a significant decreasing trend. In the 0-0.2 km range, the rate of decrease in the number of samples for true errors and identification errors is relatively similar, and their distribution trends are basically consistent. In the error range greater than 0.5 km, the number of samples for identification errors is slightly higher than that for true errors, indicating that the identification performance of both methods for errors greater than 0.5 km is not significantly different.
[0087] Figure 5The method involves subtracting the identification error from the actual error and taking the absolute value. For 5119 POI addresses, statistical analysis shows that the largest number of errors have a difference of 0, and 4251 errors have a difference within 300m, accounting for 83% of the total data. This indicates that the scheme has a significant effect on the identification of the overall data's encoding coordinate error and has high accuracy.
[0088] 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 geocoding error identification method based on external semantic and spatial consistency constraints, characterized in that, Includes the following steps: S1: Segment any text address and determine whether the text address belongs to a complete road address or a missing road address; S2: Encode the text address in S1 using a geocoding platform to obtain the encoded coordinates of the text address; input the encoded coordinates into the road network data, calculate the shortest distance between each road in the road network data and the encoded coordinates, sort them according to the shortest distance, and take the top three roads with the smallest distance to form a road set R; S3: When the address type of the text address in S1 is a road missing address, the average of the shortest distances from the encoded coordinates of the text address to each road in the road set R is used as the error of the encoded coordinates of the text address. S4: When the address type of the text address in S1 is a complete road address, determine whether the text address belongs to a failed match address or a road matching address; S5: For addresses that fail to match, obtain the error value of their encoded coordinates in two cases; The first case is a locally mismatched address: In the entire road network database, a road matching the "road segment" of the text address can be found, denoted as... R c Then the error value of the encoded coordinates of the text address is: the distance from the encoded coordinates of the text address to the road. R c The shortest distance; The second case is the global mismatch address: If no road matching the "road segment" of the text address is found in the entire road network database, then the error value corresponding to the encoded coordinates of the text address is the average of the shortest distances from the encoded coordinates of the text address to each road in the road set R. S6: For road-matching addresses, infer the error value through POI spatial clustering.
2. The geocoding error identification method based on external semantic and spatial consistency constraints according to claim 1, characterized in that, Step S4 includes the following steps: S4.1: Calculate the text similarity between the "road segment" of this text address and the text of each road in the road set R; the formula is: ; In the formula, sim i The "road segment" representing the text address in S1 is related to the road segment in road set R. i One road R i Semantic similarity between them; street The "road segment" represents the text address in S1; LCS (*,*) represents calculating the length of the longest common subsequence between two strings; len (*) indicates that the length of the string is calculated; S4.2: When the semantic similarity between the "road segment" of the text address in S1 and the three roads in the road set R is less than the set threshold. If the text address matches successfully, it is considered a failed match address; otherwise, it is considered a road matching address.
3. The geocoding error identification method based on external semantic and spatial consistency constraints according to claim 2, characterized in that, Step S6 includes the following steps: S6.1: Find the road in the road set R that has the highest semantic similarity to the "road segment" of the text address in S1, and denote it as R. * ; S6.2: Searching for R in the reference POI library * The semantic similarity of the "building segment" to the address matching the road is greater than or equal to a set threshold. For each POI, construct a semantic sample set based on the same road and proximity, using the following formula: ; In the formula, S This represents a set of semantic samples related to the same road. P This indicates that all points of interest in the POI database are referenced. Indicate points of interest P k "Road segment" after word segmentation; Indicates the intersection operation; Building This refers to the "building segment" after word segmentation of the road-matching address; Indicate points of interest P k After word segmentation, "building segment"; S6.3: Statistical Sets S The number of points of interest (POIs) is used to calculate the error of the road matching address, specifically including the following cases: The first case: when the set S When the number of points of interest in the set is greater than or equal to 3, the set... S DBSCAN clustering is performed on the points of interest in the data; the centroid coordinates of the largest cluster are used as reference coordinates. x ref , y ref ), calculate reference coordinates ( x ref , y ref The Euclidean distance between the road and the coded coordinates of the road matching address is used as the error value of the coded coordinates of the road matching address. The second case: when the set S When the number of points of interest in a given set is greater than or equal to 1 and less than or equal to 2, a set is obtained. S The average coordinates of all points of interest are used to calculate the Euclidean distance between the average coordinates and the coded coordinates of the road matching address, which is used as the error value of the coded coordinates of the road matching address. The third case: when the set S When the number of points of interest is 0, determine the encoding coordinates of the road matching address to R. * Is the foot of the perpendicular located at R? * Above, if the foot is on R * Then, the encoded coordinates of the road matching address are mapped to R. * The vertical distance is used as the error value for the road matching address coding coordinates; if the foot of the perpendicular is not in R * If there is no perpendicular foot, then the encoded coordinates of the road matching address are mapped to R. * The distance from the midpoint is used as the error value for the road matching address coding coordinates.
4. The geocoding error identification method based on external semantic and spatial consistency constraints according to claim 3, characterized in that, In step S6.3, the basic parameters of DBSCAN clustering are set as follows: neighborhood radius ε = 100m, minimum number of points min_samples = 2.
5. The geocoding error identification method based on external semantic and spatial consistency constraints according to claim 3, characterized in that, In step S6.2, Set to 0.8.
Citation Information
Patent Citations
Address matching analysis method and system based on weighted clustering
CN115630047A
Geocoding calculation method and device based on big data
CN121009152A