A method for optimizing encoding results based on an address distribution density encoding platform
By using a method based on CRF and building vector layers, the coding results of the geocoding platform are optimized, solving the problem of inaccurate coding results in existing technologies and achieving higher accuracy.
Patent Information
- Application Number
- CN202511331323.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing geocoding platforms are not accurate enough in generating coding results by average interpolation when matching addresses, especially in cities with uneven building distribution, which can easily lead to the output coding results deviating from the actual location.
By performing word segmentation using CRF, we find two house numbers that are the closest in the point of interest address database and have the same parity (one larger and one smaller). We then combine this with the building vector layer to calculate the address distribution density and the number of building surface units, thereby optimizing the encoding results.
It improves the accuracy of coding results, especially in cases of uneven building distribution, and reduces errors in coding results, particularly extreme and general errors.
Smart Images

Figure CN120832864B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of geocoding result data processing technology, specifically relating to a coding result optimization method based on address distribution density coding 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 technology to provide geographic coordinate services.
[0003] When an address text is input into the encoding platform, if no corresponding encoding result is found in the platform's database, it will select the two closest encoding results with the same parity and a difference in house number (one larger than the other). The platform will then generate the corresponding encoding result through average interpolation. For example, assuming the address text is "No. 18, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province," and the platform does not find a matching encoding result in the database, it will first select the two closest even-numbered house numbers: "No. 14, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" and "No. 20, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province." Next, the distance between the two numbers will be divided equally (since No. 14 and No. 20 differ by 6 house numbers, they will be divided into 6 equal parts, each corresponding to a one-house-number interval). Finally, through interpolation, it will estimate that "No. 18, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" is located at the end of the 4th equal part, and the encoding result at that position will be output.
[0004] However, this method of interpolating by equally dividing the distance between the two closest encoding results is not accurate. This is because the distribution of buildings in a city is uneven. For example, "No. 18, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province" may actually be closer to No. 14 and farther from No. 20. Relying solely on equally divided interpolation will cause the output encoding result to deviate from the true location. Summary of the Invention
[0005] This invention proposes a method for optimizing encoding results based on an address distribution density encoding platform, which is used to improve the accuracy of encoding results.
[0006] To achieve the above objectives, the present invention proposes the following technical content:
[0007] An optimization method for encoding results based on an address distribution density encoding platform includes the following steps:
[0008] S1: Using CRF, the text address of the input encoding platform is segmented to obtain the segmentation result;
[0009] S2: Based on the word segmentation results, find the two house numbers in the interest point address database that are closest in size, have the same parity, and are one larger than the other, and obtain the coordinates of the two house numbers, denoted as follows:A ( X A , Y A )and B ( X B , Y B );
[0010] S3: Will A ( X A , Y A )and B ( X B , Y B Import the data into the building vector layer and determine its relationship with the data. A ( X A , Y A )and B ( X B , Y B The closest building surface units are denoted as the first building surface unit and the second building surface unit, respectively.
[0011] S4: In the building vector layer, connect the geometric centers of the first building surface unit and the second building surface unit to form a line segment. L ; Get line segments L Number of intersecting building surface units N ; Calculate the address distribution density using the word segmentation results in S1 and the two house numbers obtained in S2. r ;
[0012] S5: Based on address distribution density r Sum and line segment L Number of intersecting building surface units N Calculate the surface element index P According to the index P Along the line L Find and obtain the optimal building surface element, and output the geometric center coordinates of the optimal building surface element as the final encoding result.
[0013] Further, step S3 includes the following steps:
[0014] S3.1: respectively with A ( X A , Y A )andB ( X B , Y B Draw circles with center R and radius R, denoted as circle O1 and circle O2 respectively;
[0015] S3.2: If circle O1 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set A; if circle O2 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set B.
[0016] S3.3: Calculation A ( X A , Y A ) Calculate the Euclidean distances to the midpoints of all edges of all building surface elements in set A, and obtain the building surface element corresponding to the edge with the shortest distance, denoted as the first building surface element; calculate B ( X B , Y B ) Take the Euclidean distances to the midpoints of all edges of all building surface units in set B, and obtain the building surface unit corresponding to the edge with the smallest distance, which is denoted as the second building surface unit.
[0017] Furthermore, the address distribution density in step S4 r The calculation formula is:
[0018]
[0019] In the formula, Vx The address to be matched is the address in the text address in step S1; V 1 represents the house number with the smaller value found in S2; V 2 represents the house number with the larger value found in S2.
[0020] Further, step S5 includes the following steps:
[0021] S5.1: Index P The calculation formula is:
[0022]
[0023] In the formula, N Represents line segment L The number of intersecting building surface units, Indicates rounding down;
[0024] S5.2: Starting from the first building surface unit, along the line segment LTraverse the building surface units in the direction of the second building surface unit. When traversing to the first... P When dealing with a building surface unit, the geometric center coordinates of that building surface unit are used as the final encoding result.
[0025] Furthermore, in step S3.1, the value of R is 50m.
[0026] The beneficial effects that can be achieved by adopting the above technical solutions are:
[0027] Based on the uneven distribution of buildings, this solution first finds two house numbers in the point of interest address database that are closest to the word segmentation result, have the same parity, and are one larger and one smaller, and then obtains their corresponding coordinates. A ( X A , Y A )and B ( X B , Y B Based on building vector layers, A ( X A , Y A )and B ( X B , Y B This process yields the first building surface element and the second building surface element, and further, line segments. L Address distribution density was proposed. r By combining the building vector layer, the number of rubber elements for line segment L and building surface units is obtained, and the index is calculated. P Finally, through the index P Finally, the final encoding result is obtained, and the accuracy of the encoding result is improved compared with the original uniform interpolation. Attached Figure Description
[0028] Figure 1 This is the overall flowchart of this method;
[0029] Figure 2 This is the building surface element diagram of this method. Detailed Implementation
[0030] 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.
[0031] like Figure 1 As shown, a method for optimizing the encoding results of an encoding platform based on address distribution density includes the following steps:
[0032] S1: Using CRF (Conditional Random Field), the text address of the input encoding platform is segmented to obtain the segmentation result.
[0033] Specifically, for example, if the text address is: No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province, the word segmentation result will be "Jiangsu Province", "Nanjing City", "Jiangning District", "Focheng West Road" and "No. 17".
[0034] S2: Based on the word segmentation results, find the two house numbers in the Point of Interest (POI) database that are closest in size, have the same parity, and are one larger than the other, and obtain the coordinates of the two house numbers, denoted as follows: A ( X A , Y A )and B ( X B , Y B ).
[0035] Specifically, since there is no corresponding address in the POI database for "No. 17, Focheng West Road, Jiangning District, Nanjing City, Jiangsu Province", the database is used to find two addresses that are closest in number, both odd, and one larger than the other, let's say "No. 13, Jiangning District, Nanjing City, Jiangsu Province" and "No. 19, Jiangning District, Nanjing City, Jiangsu Province". Based on these two addresses, the POI database outputs the coordinates corresponding to the two addresses, i.e. A ( X A , Y A )and B ( X B , Y B ).
[0036] S3: Will A ( X A , YA )and B ( X B , Y B Import the data into the building vector layer and determine its relationship with the data. A ( X A , Y A )and B ( X B , Y B The nearest building surface unit; such as Figure 2 As shown.
[0037] In a building vector layer, each building surface unit is a polygon, which may have three sides or five sides. A building surface unit is defined as an independent spatial unit in a geographic information system, bounded by the actual outline of the building.
[0038] S3 specifically includes the following steps:
[0039] S3.1: respectively with A ( X A , Y A )and B ( X B , Y B Draw circles with center 0 and radius 50m, denoted as circle O1 and circle O2 respectively.
[0040] S3.2: If circle O1 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set A; if circle O2 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set B.
[0041] Specifically, assuming that circle O1 encompasses the entirety of building surface unit B1, a part of building surface unit B2, ..., a part of building surface unit Bn, then building surface unit B1, building surface unit B2, ..., building surface unit Bn are included in set A.
[0042] Assuming that circle O2 encompasses the entirety of building surface unit C1, a part of building surface unit C2, ..., a part of building surface unit Cm, then building surface unit C1, building surface unit C2, ..., building surface unit Cn are included in set B.
[0043] The presence of identical building surface elements in sets A and B does not affect the overall design.
[0044] S3.3: Calculation A ( X A , Y A ) Calculate the Euclidean distances to the midpoints of all edges of all building surface elements in set A, and obtain the building surface element corresponding to the edge with the shortest distance, denoted as the first building surface element; calculate B ( X B , Y B The Euclidean distances to the midpoints of all edges of all building surface elements in set B are calculated, and the building surface element corresponding to the edge with the smallest distance is denoted as the second building surface element. The specific steps include:
[0045] S3.3.1: Assume that all building surface elements in set A have a total of S1 edges; set the... j Strip edge ( j The coordinates of the midpoint of ∈[1, S1] are ( X j,mid ,Y j,mid ),but A ( X A , Y A ) to the j Midpoint of the edge ( X j,mid ,Y j,mid The Euclidean distance is:
[0046]
[0047] In equation (1), D j express A ( X A , Y A ) to set A, number j Midpoint of the edge ( X j,mid , Y j,mid The Euclidean distance.
[0048] S3.3.2: In set A, filter out those that match... A ( X A , Y AFind the edge with the shortest distance and obtain the corresponding building surface unit, which is denoted as the first building surface unit.
[0049] The formula is:
[0050]
[0051] In equation (2), min(*) represents taking the minimum value.
[0052] Assuming that after the calculations in steps S3.3.1 and S3.3.2, A ( X A , Y A ) to the j The Euclidean distance to the midpoint of each edge is the shortest, and the th edge... j If the building surface element corresponding to the strip edge is building surface element B1, then building surface element B1 is the first building surface element.
[0053] S3.3.3: Assume that all building surface elements in set B have a total of S2 edges; set the... k Strip edge ( k The coordinates of the midpoint of (∈[1, S2]) are ( X k,mid ,Y k,mid ),but B ( X B , Y B ) to the k Midpoint of the edge ( X k,mid ,Y k,mid The Euclidean distance is:
[0054]
[0055] In equation (3), D k express B ( X B , Y B ) to set B, number k Midpoint of the edge ( X k,mid , Y k,mid The Euclidean distance.
[0056] S3.3.4: In set B, select those that match... B ( X B , YB Find the edge with the shortest distance and obtain the corresponding building surface unit, which is denoted as the second building surface unit.
[0057] The formula is:
[0058]
[0059] In equation (4), min(*) represents taking the minimum value.
[0060] Assuming that after calculations in steps S3.3.3 and S3.3.4, B ( X B , Y B ) to the k The Euclidean distance to the midpoint of each edge is the shortest, and the th edge... k If the building surface element corresponding to the strip edge is building surface element C1, then building surface element C1 is the second building surface element.
[0061] when A ( X A , Y A )and B ( X B , Y B If the distance to the same building surface unit is the shortest, then the building surface unit is both the first building surface unit and the second building surface unit.
[0062] S4: In the building vector layer, connect the geometric centers of the first building surface unit and the second building surface unit to form a line segment. L Get the line segment L Number of intersecting building surface units N ; Calculate the address distribution density using the word segmentation results in S1 and the two house numbers obtained in S2. r ;
[0063] Specifically, let's assume that the smaller house number is set as... V 1. Set the larger house number as V 2. Address distribution density r The calculation formula is:
[0064]
[0065] In equation (5), r Indicates address distribution density; Vx The address to be matched is the address "17" in the text address "No. 17, Jiangning District, Nanjing City, Jiangsu Province" in step S1.V 1 represents the house number with the smaller value found in S2; V 2 represents the house number with the larger value found in S2, i.e. V 1 refers to "number 13" as an example in step S2; V 2 refers to "No. 19" as an example in step S2.
[0066] when A ( X A , Y A )and B ( X B , Y B When the distance to the same building surface unit is the shortest, then the line segment... L The number of building surface units intersecting line segment L does not exist. N The default value is 0.
[0067] S5: Based on address distribution density r Sum and line segment L Number of intersecting building surface units N Calculate the surface element index P According to the index P Along the line L Find and obtain the optimal building surface element, and output the geometric center coordinates of the optimal building surface element as the final encoding result. Specifically, this includes the following steps:
[0068] S5.1: Calculate the index P .
[0069] The formula is:
[0070]
[0071] In equation (6), N Represents line segment L The number of intersecting building surface units. This indicates rounding down to the nearest integer.
[0072] S5.2: Starting from the first building surface unit, along the line segment L Traverse the building surface units in the direction of the second building surface unit. When traversing to the first... P When dealing with a building surface unit, the geometric center coordinates of that building surface unit are used as the final encoding result.
[0073] For example, the result obtained from equation (6) is: ;Depend on Figure 2 It can be seen that the line segment L If the number of intersections with the building surface unit is 2, then Therefore, the first building surface unit is taken as the starting point, and the first building surface unit traversed is... Figure 2 For building surface elements with a centrally shaded oblique line, the geometric center of that building surface element is used as the final encoding result.
[0074] Calculation example:
[0075] Existing encoding methods are mainly point matching interpolation and line matching interpolation.
[0076] Example of point matching interpolation: Suppose the text address is "17". The two closest addresses that are both odd numbers and have different sizes are "13" and "19". Divide the line segment formed by the two endpoints of "13" and "19" into 6 equal parts. "17" is located at the 4th division point traversed from "13". The coordinates of this position are obtained as the final encoding result output.
[0077] Example of line matching interpolation: Suppose the text address is "17", the road corresponding to "17" is denoted as road Z, and the house numbers at the two ends of road Z are assumed to be "1" and "100". Then the road is divided into 100 equal parts. "17" is located at the 17th division point traversed from "1". The coordinates of this position are obtained as the final encoding result output.
[0078] The encoding results of the existing encoding method and the encoding method of this scheme are compared, and the results are shown in Table 1.
[0079] Table 1 Comparison of the accuracy of encoding results of various algorithms
[0080]
[0081] An experiment was conducted on 7250 address information datasets containing accurate geographic coordinates. The results are shown in Table 1. As can be seen from the data in Table 1, the standard deviation and mean of this proposed method are both smaller than those of the other two methods, indicating that this method is superior in accuracy. Furthermore, particularly regarding extreme errors, such as errors greater than 500m, this proposed method accounts for only 2.50% of the data, far less than the other two methods, demonstrating a better suppression effect on extreme errors, i.e., errors of 500m. For general errors, i.e., errors greater than 100m and 150m, this proposed method also has a larger data proportion compared to the other two methods, indicating that its accuracy remains relatively high for general errors.
[0082] 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 encoding results based on an address distribution density encoding platform, characterized in that, Includes the following steps: S1: Using CRF, the text address of the input encoding platform is segmented to obtain the segmentation result; S2: Based on the word segmentation results, find the two house numbers in the interest point address database that are closest in size, have the same parity, and are one larger than the other, and obtain the coordinates corresponding to the two house numbers, denoted as follows: A ( X A , Y A )and B ( X B , Y B ); S3: Will A ( X A , Y A )and B ( X B , Y B Import the data into the building vector layer and determine its relationship with the data. A ( X A , Y A )and B ( X B , Y B The closest building surface units are denoted as the first building surface unit and the second building surface unit, respectively. S4: In the building vector layer, connect the geometric centers of the first building surface unit and the second building surface unit to form a line segment. L ; Get line segments L Number of intersecting building surface units N ; Calculate the address distribution density using the word segmentation results in S1 and the two house numbers obtained in S2. r ; S5: Based on address distribution density r Sum and line segment L Number of intersecting building surface units N Calculate the surface element index P According to the index P Along the line L Find and obtain the optimal building surface element, and output the geometric center coordinates of the optimal building surface element as the final encoding result.
2. The method for optimizing encoding results based on an address distribution density encoding platform according to claim 1, characterized in that, Step S3 includes the following steps: S3.1: respectively with A ( X A , Y A )and B ( X B , Y B Draw circles with center R and radius R, denoted as circle O1 and circle O2 respectively; S3.2: If circle O1 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set A; if circle O2 encompasses a part or the whole of any building surface unit, then that building surface unit is included in set B. S3.3: Calculation A ( X A , Y A ) Calculate the Euclidean distances to the midpoints of all edges of all building surface elements in set A, and obtain the building surface element corresponding to the edge with the shortest distance, denoted as the first building surface element; calculate B ( X B , Y B ) Take the Euclidean distances to the midpoints of all edges of all building surface units in set B, and obtain the building surface unit corresponding to the edge with the smallest distance, which is denoted as the second building surface unit.
3. The method for optimizing encoding results based on an address distribution density encoding platform according to claim 1, characterized in that, Address distribution density in step S4 r The calculation formula is: ; In the formula, Vx The address to be matched is the address number in the text address in step S1; V 1 represents the house number with the smaller value found in S2; V 2 represents the house number with the larger value found in S2.
4. The method for optimizing the encoding result of an encoding platform based on address distribution density according to claim 3, characterized in that, Step S5 includes the following steps: S5.1: Index P The calculation formula is: ; In the formula, N Represents line segment L The number of intersecting building surface units, Indicates rounding down; S5.2: Starting from the first building surface unit, along the line segment L Traverse the building surface units in the direction of the second building surface unit. When traversing to the first... P When dealing with a building surface unit, the geometric center coordinates of that building surface unit are used as the final encoding result.
5. The method for optimizing encoding results based on an address distribution density encoding platform according to claim 2, characterized in that, In step S3.1, the value of R is 50m.
Citation Information
Patent Citations
Geocoding method and system, terminal and storage medium
CN112256817A
Standard address and building association matching method and device
CN113361233A