A method for completing address division information based on administrative division boundaries

By organizing administrative division boundary data and building an Elasticsearch index, the problems of incomplete address data and lagging division updates were solved, achieving efficient and accurate address division information supplementation and supporting the standardized management of smart cities.

CN120723852BActive Publication Date: 2025-12-02NANJING QILIANG INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511235165.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-12-02
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing technologies suffer from incomplete and non-standard address data, low spatial computation efficiency, lagging zoning updates, insufficient text matching accuracy, and missing multi-level zoning associations, making it difficult to support high-precision positioning requirements.

Method used

By organizing the boundary data of the five levels of administrative divisions across the country, generating spatial surfaces, cleaning massive amounts of address data, constructing an Elasticsearch index and a database of detailed address attributes, and using spatial functions and text matching algorithms, the five-level administrative division information of addresses can be completed.

Benefits of technology

Significantly improves the accuracy and efficiency of address division completion, dynamically updates division information, optimizes multi-level division associations, supports high-precision positioning, builds a standardized address management system, and supports smart city construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723852B_ABST
    Figure CN120723852B_ABST
Patent Text Reader

Abstract

This invention provides a method for completing address demarcation information based on administrative division boundaries, belonging to the technical field of address information completion or correction. The technical solution includes: organizing boundary data into five levels of national administrative divisions and generating spatial surfaces; supplementing addresses with complete five-level demarcation information through spatial point-surface calculations; constructing a standard address index and address information database; utilizing the Elasticsearch engine for efficient matching; and optimizing query results through weight analysis and similarity calculations; preprocessing the original addresses, including demarcation information extraction, redundant information filtering, and special character processing; and ensuring information timeliness by combining dynamic configuration and the latest demarcation data. Beneficial effects: This invention, by combining spatial technology with text analysis, significantly improves the accuracy and efficiency of address demarcation information completion, effectively solving the problems of incomplete and non-standard address data, and providing reliable technical support for smart city construction and data standardization management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of address information completion or correction technology. Specifically, it relates to a method and system for constructing a standard address index library using administrative division boundaries and spatial fencing technology, performing address matching analysis based on the library, supplementing information such as the administrative division to which the address belongs, and standardizing the address into a national standard level 5 address. Background Technology

[0002] With the rapid development of social informatization, a large amount of address data in various industries lacks management. The main pain points are incomplete address data, inability to guarantee authenticity and timeliness, and a lack of standardized address collection, making it impossible to standardize address information from the source. In the context of national digital transformation, addresses, as indispensable basic geographic information and public information, serve as a crucial bridge connecting various types of social information. Every address should conform to the national five-level administrative division standards and be geographically verifiable. As a necessary geospatial data resource and strategic basic information resource in the process of modern social development, addresses have become an important component of building the spatiotemporal framework of smart cities and a bridge for the organization, association, and sharing of social big data.

[0003] Geofencing is a location-based spatial technology that uses latitude and longitude to determine the positional relationship between a target point and different geofences. It integrates boundary data from five levels of administrative divisions—province, city, district / county, township / street, and village / community—into a spatial geofence, forming a spatial area. Address data is then parsed into a point in space. Through spatial point-to-area calculations, the area to which each point belongs is determined, thus deriving the administrative division attribute corresponding to each point.

[0004] The existing technology also has the following technical problems: low spatial computing efficiency: traditional point-to-surface computing requires real-time processing of the relationship between massive addresses and administrative boundaries, and the response speed is difficult to meet the needs of large-scale applications; lagging administrative division updates: administrative division adjustments (such as county-to-district conversion) cause old addresses to be unable to match the latest spatial fences, and timely maintenance relies on manual intervention; insufficient text matching accuracy: redundant information in non-standard addresses (such as "high-tech development zone"), special symbols and dialect expressions interfere with the extraction of core administrative divisions; lack of multi-level administrative division association: there is a lack of a standardized mechanism to dynamically associate landmark information such as road numbers and POIs with five levels of administrative divisions, which makes it difficult to support the needs of high-precision positioning. Summary of the Invention

[0005] To address the technical problems existing in the prior art, this invention provides a method for completing address division information based on administrative division boundaries. The purpose is to provide a method that, based on a standard address database, matches the target address with a set of relevant standard addresses by parsing the original address and configuring a custom division, and then accurately obtains the division information of the target address by analyzing the weight of each result.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A method for completing address division information based on administrative boundaries, comprising the following steps:

[0008] S1. Organize the boundary data of the five levels of administrative divisions across the country and import them into the spatial database to generate spatial surfaces;

[0009] S2. Clean up massive amounts of raw address data and import it into a spatial database to generate spatial point data;

[0010] S3. Utilize the Elasticsearch engine to build a national address information index and establish a national address information database to store detailed address attributes;

[0011] S4. Process and match the original address;

[0012] S5. The analysis results complete the address division information.

[0013] Further, step S1 specifically includes:

[0014] S11. Organize the boundary data for each of the five levels of administrative divisions in the country:

[0015] The boundary data is imported into the spatial database to generate a spatial surface. Each individual in each level of the administrative division corresponds to a surface in space. Similarly, each surface also has the corresponding attributes of province, city, district / county, township / street, village / neighborhood committee.

[0016] Further, step S2 includes:

[0017] S21. Clean up the massive amounts of addresses from sources such as the Internet and the Ministry of Civil Affairs:

[0018] The attributes of these original addresses include: type, place name, detailed address, and latitude and longitude information. Latitude and longitude are the most commonly used features for defining spatial location, and the source data used in this invention to construct the standard address database all contain latitude and longitude information.

[0019] Cleaning process:

[0020] 1. First, filter out redundant addresses by type;

[0021] 2. Remove duplicate data. The criteria for duplicates are that the place names and addresses are the same and the spatial distance is less than 300 meters.

[0022] 3. Filter out illegal characters and special characters;

[0023] 4. Standardize full-width and half-width characters.

[0024] Furthermore, step S2 also includes:

[0025] S22. Import the cleaned data into the spatial database and generate spatial point data:

[0026] Based on the latitude and longitude information of each data point, corresponding spatial point data is generated. After all spatial points are generated, spatial functions are used to calculate the positional relationship between each spatial point and the spatial surface in S1. Each spatial point must belong to a certain spatial surface. When a point belongs to a certain fifth-level zoning surface, the fifth-level zoning information of that point can be obtained. Using this method, the fifth-level zoning information of all addresses can be completed.

[0027] Further, step S3 includes:

[0028] S31. Using the Elasticsearch engine for address matching search:

[0029] The address data, after being supplemented with administrative division information, is grouped by province, with each province serving as an index. The standard addresses are then parsed and segmented according to the following index format and imported into the corresponding province's index database, forming a national address information index database. The index attributes include: standard address, administrative division group, road number, POI information, and mapping key. For example, "No. 25, Qinglong Road, Tangqiao Town, Zhangjiagang City, Suzhou City, Jiangsu Province" needs to be parsed and segmented into the following index format:

[0030] Table 1 Index Format Table

[0031]

[0032] The purpose of the index in this step is to maintain efficient and accurate matching for massive amounts of data. The matching result does not obtain detailed attributes of the address, but rather a mapping key value.

[0033] Furthermore, step S3 also includes:

[0034] S32. Added storage for detailed address attributes in the national address information database:

[0035] Since maintaining and updating address information is not a strong point of the index, this invention adds a national address information database to the architecture to store detailed address attributes for flexible future maintenance. Each province is represented by a separate data table, and each table's attributes include: a key value (with a one-to-one mapping to the aforementioned key values), administrative division information, administrative division code, latitude and longitude information, postal code, whether it is agricultural, and any other attributes of the address. By matching an address with the address index and mapping it to the address information database, the standard administrative division can be supplemented, and other detailed attributes can be obtained.

[0036] Furthermore, step S3 also includes:

[0037] S33. Query the corresponding index using province information:

[0038] The system extracts potential administrative division information from the original address. If third-level or higher administrative division information exists, the province to which the address belongs can be deduced, and the corresponding index can be queried using this province information. If the original address does not contain third-level or higher administrative division information, the default province and city / district divisions are supplemented by reading the configuration file. This system synchronizes with the latest annual administrative division information from the National Bureau of Statistics and the Ministry of Civil Affairs. If the address contains outdated administrative division information, such as "Lishui County, Nanjing City," it needs to be replaced with "Lishui District, Nanjing City." The processed administrative division information will be used as one of the index query conditions.

[0039] Specifically: First, the latest administrative division information from the National Bureau of Statistics and the Ministry of Civil Affairs was processed. Based on different levels of administrative divisions and whether or not a suffix was present, it was divided into the following four categories:

[0040] 1. First-level administrative divisions, second-level administrative divisions. First-level administrative divisions have no suffix, and second-level administrative divisions have no suffix.

[0041] 2. Three-tiered administrative divisions;

[0042] 3. Third-level administrative divisions have no suffix;

[0043] 4. Fourth-level administrative divisions.

[0044] Taking "Jiangsu Province" as an example:

[0045] Table 2. Fourth-level administrative divisions (Jiangsu Province)

[0046]

[0047] All national administrative divisions from level one to four are loaded into four sets. The original address is segmented character by character, starting from the first character, and the segmented content is then matched and verified against these four sets. Based on the characteristics of address information and feedback from market practice, this invention summarizes the following matching and verification logic:

[0048] When the segmented content matches a certain set, it can be defined as a suspected segment (hereinafter referred to as A). It needs to be judged comprehensively by combining the last two characters of the suspected segment (hereinafter referred to as B and C):

[0049] 1. When A hits set 1, if B is a suffix keyword for a region, and A+B also belongs to set 1, set 2, or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; otherwise, A is a valid region of set 1.

[0050] 2. When A hits set 2, if B belongs to the road and bridge suffix keyword, then A is a non-division; otherwise, A is a valid division of set 2.

[0051] 3. When A hits set 3, if B is a suffix keyword for a region, and A+B also belongs to set 2 or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; if set 2 already has a valid region, then A is not a region; otherwise, A is a valid region of set 3.

[0052] 4. If A hits set 4, then A is a valid partition of set 4.

[0053] Once all characters in the address have been segmented and matched, the zone information in the address can be obtained.

[0054] Further, step S4 includes:

[0055] S41. Filter special characters from the original address:

[0056] Full-width numbers and symbols will be unified into half-width data symbols. Symbols useless for address lookups will be deleted, as detailed in Table 3.

[0057] Table 3. Symbols not useful for address lookup

[0058]

[0059] S42. Preprocess the original address content:

[0060] First, regular expressions are used to remove house numbers, building numbers, unit numbers, and room numbers from the address. Next, a pre-organized configuration file is loaded. This file records common redundant information in addresses, such as "High-tech Development Zone" and "Industrial Concentration Zone." Removing this redundant information reduces interference in index queries and improves the hit rate of core address information.

[0061] S43, Address Matching:

[0062] The zoning information extracted from S33 is used as the query constraint in Elasticsearch, and the processed source address is used as the object of the fuzzy search. An index query is executed to extract the 50 addresses with the highest similarity from the address index as the matching results.

[0063] Further, step S5 includes:

[0064] S51. Matching Result Analysis:

[0065] Based on the analysis of standard addresses, a complete address is divided into 13 categories. Taking a total score of 100 as an example, different weight ratios are assigned to each category according to its importance, as shown in Tables 4 and 5:

[0066] Table 4 Classification Weight Ratio Table 1

[0067]

[0068] Table 5. Classification Weight Ratio Table 2

[0069]

[0070] In this section, A to E represent the administrative divisions, F to G represent road numbers, H represents place names and landmarks, and I to M represent supplementary information for detailed addresses.

[0071] The purpose of this invention is to supplement the five-level regional information of the input address. When the weight interval value is greater than 80, the five-level regional information of the matching address and the input address will definitely be consistent. Therefore, A~H are the key analysis objects, and I~M are the secondary supplementary analysis objects.

[0072] S52. Perform matching analysis of administrative division information:

[0073] According to the instructions for creating the standard address index, each address contains district group information, so a matching query can obtain the district information for that address. The extracted source address district information is compared with the matched district group information. Here, a point deduction system is used: when the districts match, no points are deducted; when there are inconsistent districts, the corresponding weighted points are deducted.

[0074] Furthermore, step S5 also includes:

[0075] S53. Split the matching address:

[0076] Remove the district information from the address, leaving only the detailed address portion. Analyze the detailed address using regular expressions. When the address contains road number information, compare the proximity of the road numbers and assign different weights to each, thus sorting the addresses from nearest to farthest.

[0077] The specific operating steps are as follows:

[0078] 1. Use regular expressions to obtain the road numbers from the input address and the matched address respectively.

[0079] 2. By segmenting the words and using the area group information, remove the area information from the matched address, and segment the detailed address into [Road Information] + [Road Number] + [Other Information] based on the road number.

[0080] 3. Use string search to determine if the input address contains the same road information.

[0081] 4. When the [Road Information] matches, subtract the obtained road numbers and take the absolute value.

[0082] 5. When the absolute value is less than or equal to 100, the corresponding score is calculated using the decreasing formula: a×(1-b%), where a is the upper limit of the road number's weighting and b is the absolute value of the difference between the road numbers.

[0083] 6. When the absolute value is greater than 100 and less than or equal to 200, no points are added or deducted; when the absolute value is greater than 200, the corresponding points are calculated and deducted according to the incremental formula: a×(b / c), where a is the upper limit of the road number deduction weight, b is the absolute value of the difference between road numbers, and c is the difference coefficient of house number (the default value is set to 2000).

[0084] Furthermore, step S5 also includes:

[0085] S54. Determine the area information of the address:

[0086] The road number calculations described above have already sorted the road numbers from nearest to furthest. However, if multiple matching addresses have the same road number or the same neighborhood name, further determination of the address's district information is required.

[0087] The specific operating steps are as follows:

[0088] 1. Use regular expressions to obtain the region information from the input address and the matched address respectively.

[0089] 2. Using the segmentation group information, remove the segmentation information from the matching address and the region information from the previous step to ensure that the remaining details of the [input address] and [matching address] are consistent. If they are inconsistent, there is no need to continue comparing regions.

[0090] 3. Convert the extracted area information, converting Chinese numerals (e.g., Zone 3) into Arabic numerals.

[0091] 4. Subtract the absolute values ​​of the regions and sort them from smallest to largest. When a matching address with the same region is found, increase the corresponding weight score; otherwise, no score is added.

[0092] Furthermore, step S5 also includes:

[0093] S55. Calculate the corresponding score based on the weighting ratio:

[0094] After analyzing the district, road number, and area information in the address, the remaining detailed addresses, as well as the addresses that were determined not to contain road number information in the above steps, need to be scored by obtaining text similarity and combining it with weight ratios.

[0095] First, a detailed address has the following characteristics:

[0096] 1. The address content is of moderate length, usually between 5 and 30 characters.

[0097] 2. Address information differs from ordinary everyday statements; it does not contain negation words or other words that would reverse the meaning.

[0098] Based on the above characteristics, this invention employs the Levenstein similarity algorithm to calculate the similarity value. This algorithm, also known as the Levenstein distance, typically describes the minimum number of editing operations required to transform one string into another. These operations include replacing one character with another, inserting a character, and deleting a character.

[0099] The core formula is:

[0100]

[0101] The input address and the matched address are fed into the algorithm for calculation to obtain a similarity score.

[0102] Add the scores from the three steps above to obtain the score for each matching address. Sort the scores from highest to lowest and output them.

[0103] The beneficial effects of this invention are:

[0104] Compared with existing technologies, the address division information completion method based on administrative division boundaries described in this invention has the following technical features and beneficial effects:

[0105] (1) Significantly improves the accuracy and efficiency of address area completion.

[0106] Spatial computing efficiency: By pre-generating five-level administrative division spatial surface and address spatial point data, spatial functions are used to realize batch calculation of point-surface attribution relationships, and the five-level division information of all addresses is completed, avoiding the performance bottleneck of real-time calculation;

[0107] Text matching accuracy: Combining the fuzzy query and weighted scoring system of the Elasticsearch index, the 50 most similar results are extracted from massive data. The matching accuracy is quantified by comparing the regional information and the Levenstein similarity algorithm through a deduction system, ensuring that the five-level regional divisions are completely consistent when the weight is >80.

[0108] (2) Effectively solves the problem of incomplete and non-standard address data

[0109] Dynamically updated administrative division information: Synchronizes the latest administrative division data from the National Bureau of Statistics and the Ministry of Civil Affairs, automatically replaces old administrative division names, and solves the matching failure problem caused by administrative division adjustments.

[0110] Intelligent filtering of redundant interference: Irrelevant information such as house numbers and building numbers are deleted using regular expressions, and redundant words such as "high-tech development zone" and "industrial concentration zone" are filtered by loading configuration files to reduce index query noise.

[0111] Eliminate the influence of special characters: unify full-width and half-width characters, delete special characters, and avoid non-text characters interfering with the extraction of core regions.

[0112] (4) Optimize the correlation between multi-level zoning and spatial positioning accuracy

[0113] Structured address hierarchy: The address is broken down into 13 categories and assigned different weights, with priority given to matching categories A to H (five-level zone + road) to support high-precision positioning requirements.

[0114] Spatial proximity quantification: By calculating the difference in road numbers and converting area information, addresses are sorted from nearest to farthest.

[0115] (4) Supporting smart city and data standardization management

[0116] Construct a standardized address database: Establish a national address information database to store detailed data such as latitude and longitude, postal code, and agricultural attributes. Map key values ​​to link the index database and attribute database to form a complete standardized address management system.

[0117] Provides a reliable technical foundation: It provides standardized five-level address data for the spatiotemporal framework of smart city construction, solving the pain points of address authenticity and timeliness. Attached Figure Description

[0118] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0119] Figure 1 This is a flowchart of the address division information completion method and system based on administrative division boundaries in this invention;

[0120] Figure 2 This is a flowchart illustrating the construction process of the standard index library and standard address library of this invention;

[0121] Figure 3 This is a flowchart illustrating the address matching and result analysis based on an index and address database of the present invention.

[0122] Figure 4 This is a schematic diagram of the process of splitting the matching address in step S53 of an embodiment of the present invention;

[0123] Figure 5 This is a schematic diagram of the process for determining the area information of the address in step S54 of an embodiment of the present invention. Detailed Implementation

[0124] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The following description, in conjunction with the accompanying drawings... Figure 1 - Appendix Figure 5 The method for completing address division information based on administrative division boundaries is further explained.

[0125] like Figure 1 As shown, this invention provides a method and system for completing address division information based on administrative division boundaries. Figure 1 As shown, step S1 involves organizing the national five-level administrative division boundary data and importing it into a spatial database to generate spatial surfaces; as... Figure 2 As shown, step S3 utilizes the Elasticsearch engine to build a nationwide address information index and establishes a nationwide address information database to store detailed address attributes; as... Figure 3 As shown, steps S4 and S5 process and match the original address, and the analysis results complete the address zone information. This invention, through parsing the original address and custom zone configuration, matches the relevant standard address result set of the target address, and then, through weight analysis of each result, accurately obtains the zone information of the target address.

[0126] like Figure 1 As shown, the present invention provides a method and system for completing address division information based on administrative division boundaries, including:

[0127] S1. Organize the boundary data of the five levels of administrative divisions across the country and import them into the spatial database to generate spatial surfaces;

[0128] S2. Clean up massive amounts of raw address data and import it into a spatial database to generate spatial point data;

[0129] S3. Utilize the Elasticsearch engine to build a national address information index and establish a national address information database to store detailed address attributes;

[0130] S4. Process and match the original address;

[0131] S5. The analysis results complete the address division information.

[0132] In a specific implementation, as a preferred embodiment of the present invention, step S1 specifically includes:

[0133] S11. Organize the boundary data for each of the five levels of administrative divisions in the country:

[0134] The boundary data is imported into the spatial database to generate a spatial surface. Each individual in each level of the administrative division corresponds to a surface in space. Similarly, each surface also has the corresponding attributes of province, city, district / county, township / street, village / neighborhood committee.

[0135] In a specific implementation, as a preferred embodiment of the present invention, step S2 includes:

[0136] S21. Clean up the massive amounts of addresses from sources such as the Internet and the Ministry of Civil Affairs:

[0137] The attributes of these original addresses include: type, place name, detailed address, and latitude and longitude information. Latitude and longitude are the most commonly used features for defining spatial location, and the source data used in this invention to construct the standard address database all contain latitude and longitude information.

[0138] Cleaning process:

[0139] 1. First, filter out redundant addresses by type.

[0140] 2. Remove duplicate data. The criteria for duplicates are identical place names and addresses with a spatial distance of less than 300 meters.

[0141] 3. Filter out illegal characters and special characters.

[0142] 4. Standardize full-width and half-width characters.

[0143] In a specific implementation, as a preferred embodiment of the present invention, step S2 further includes:

[0144] S22. Import the cleaned data into the spatial database and generate spatial point data:

[0145] Based on the latitude and longitude information of each data point, corresponding spatial point data is generated. After all spatial points are generated, spatial functions are used to calculate the positional relationship between each spatial point and the spatial surface in S1. Each spatial point must belong to a certain spatial surface. When a point belongs to a certain fifth-level zoning surface, the fifth-level zoning information of that point can be obtained. Using this method, the fifth-level zoning information of all addresses can be completed.

[0146] In a specific implementation, as a preferred embodiment of the present invention, step S3 includes:

[0147] S31. Using the Elasticsearch engine for address matching search:

[0148] The address data, after being supplemented with administrative division information, is grouped by province, with each province serving as an index. The standard addresses are then parsed and segmented according to the following index format and imported into the corresponding province's index database, forming a national address information index database. The index attributes include: standard address, administrative division group, road number, POI information, and mapping key. For example, "No. 25, Qinglong Road, Tangqiao Town, Zhangjiagang City, Suzhou City, Jiangsu Province" needs to be parsed and segmented into the index format shown in Table 1.

[0149] The purpose of the index in this step is to maintain efficient and accurate matching for massive amounts of data. The matching result does not obtain detailed attributes of the address, but rather a mapping key value.

[0150] In a specific implementation, as a preferred embodiment of the present invention, step S3 further includes:

[0151] S32. Added storage for detailed address attributes in the national address information database:

[0152] Since maintaining and updating address information is not a strong point of the index, this invention adds a national address information database to the architecture to store detailed address attributes for flexible future maintenance. Each province is represented by a separate data table, and each table's attributes include: a key value (with a one-to-one mapping to the aforementioned key values), administrative division information, administrative division code, latitude and longitude information, postal code, whether it is agricultural, and any other attributes of the address. By matching an address with the address index and mapping it to the address information database, the standard administrative division can be supplemented, and other detailed attributes can be obtained.

[0153] In a specific implementation, as a preferred embodiment of the present invention, step S3 further includes:

[0154] S33. Query the corresponding index using province information:

[0155] The system extracts potential administrative division information from the original address. If third-level or higher administrative division information exists, the province to which the address belongs can be deduced, and the corresponding index can be queried using this province information. If the original address does not contain third-level or higher administrative division information, the default province and city / district divisions are supplemented by reading the configuration file. This system synchronizes with the latest annual administrative division information from the National Bureau of Statistics and the Ministry of Civil Affairs. If the address contains outdated administrative division information, such as "Lishui County, Nanjing City," it needs to be replaced with "Lishui District, Nanjing City." The processed administrative division information will be used as one of the index query conditions.

[0156] Specifically: First, the latest administrative division information from the National Bureau of Statistics and the Ministry of Civil Affairs was processed. Based on different levels of administrative divisions and whether or not a suffix was present, it was divided into the following four categories:

[0157] 1. First-level administrative divisions, second-level administrative divisions. First-level administrative divisions have no suffix, and second-level administrative divisions have no suffix.

[0158] 2. Three-tiered administrative divisions;

[0159] 3. Third-level administrative divisions have no suffix;

[0160] 4. Fourth-level administrative divisions.

[0161] Taking "Jiangsu Province" as an example, as shown in Table 2.

[0162] All national administrative divisions from level one to four are loaded into four sets. The original address is segmented character by character, starting from the first character, and the segmented content is then matched and verified against these four sets. Based on the characteristics of address information and feedback from market practice, this invention summarizes the following matching and verification logic:

[0163] When the segmented content matches a certain set, it can be defined as a suspected segment (hereinafter referred to as A). It needs to be judged comprehensively by combining the last two characters of the suspected segment (hereinafter referred to as B and C):

[0164] 1. When A hits set 1, if B is a suffix keyword for a region, and A+B also belongs to set 1, set 2, or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; otherwise, A is a valid region of set 1.

[0165] 2. When A hits set 2, if B belongs to the road and bridge suffix keyword, then A is a non-division; otherwise, A is a valid division of set 2.

[0166] 3. When A hits set 3, if B is a suffix keyword for a region, and A+B also belongs to set 2 or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; if set 2 already has a valid region, then A is not a region; otherwise, A is a valid region of set 3.

[0167] 4. If A hits set 4, then A is a valid partition of set 4.

[0168] Once all characters in the address have been segmented and matched, the zone information in the address can be obtained.

[0169] In a specific implementation, as a preferred embodiment of the present invention, step S4 includes:

[0170] S41. Filter special characters from the original address:

[0171] Full-width numbers and symbols will be standardized to half-width data symbols. Symbols that are not useful for address lookups will be deleted, as detailed in Table 3.

[0172] S42. Preprocess the original address content:

[0173] First, regular expressions are used to remove house numbers, building numbers, unit numbers, and room numbers from the address. Next, a pre-organized configuration file is loaded. This file records common redundant information in addresses, such as "High-tech Development Zone" and "Industrial Concentration Zone." Removing this redundant information reduces interference in index queries and improves the hit rate of core address information.

[0174] S43, Address Matching:

[0175] The zoning information extracted from S33 is used as the query constraint in Elasticsearch, and the processed source address is used as the object of the fuzzy search. An index query is executed to extract the 50 addresses with the highest similarity from the address index as the matching results.

[0176] In a specific implementation, as a preferred embodiment of the present invention, step S5 includes:

[0177] S51. Matching Result Analysis:

[0178] Based on the analysis of standard addresses, a complete address is divided into 13 categories. Taking a total score of 100 as an example, different weight ratios are assigned to each category according to its importance, as shown in Tables 4 and 5.

[0179] In this section, A to E represent the administrative divisions, F to G represent road numbers, H represents place names and landmarks, and I to M represent supplementary information for detailed addresses.

[0180] The purpose of this invention is to supplement the five-level regional information of the input address. When the weight interval value is greater than 80, the five-level regional information of the matching address and the input address will definitely be consistent. Therefore, A~H are the key analysis objects, and I~M are the secondary supplementary analysis objects.

[0181] S52. Perform matching analysis of administrative division information:

[0182] According to the instructions for creating the standard address index, each address contains district group information, so a matching query can obtain the district information for that address. The extracted source address district information is compared with the matched district group information. Here, a point deduction system is used: when the districts match, no points are deducted; when there are inconsistent districts, the corresponding weighted points are deducted.

[0183] In a specific implementation, as a preferred embodiment of the present invention, step S5 further includes:

[0184] S53. Split the matching address:

[0185] Remove the district information from the address, leaving only the detailed address. Analyze the detailed address using regular expressions. When the address contains road number information, compare the proximity of the road numbers and assign different weights to each, thus sorting the addresses from nearest to farthest. Figure 4 As shown.

[0186] The specific operating steps are as follows:

[0187] 1. Use regular expressions to obtain the road numbers from the input address and the matched address respectively.

[0188] 2. By segmenting the words and using the area group information, remove the area information from the matched address, and segment the detailed address into [Road Information] + [Road Number] + [Other Information] based on the road number.

[0189] 3. Use string search to determine if the input address contains the same road information.

[0190] 4. When the [Road Information] matches, subtract the obtained road numbers and take the absolute value.

[0191] 5. When the absolute value is less than or equal to 100, the corresponding score is calculated using the decreasing formula: a×(1-b%), where a is the upper limit of the road number's weighting and b is the absolute value of the difference between the road numbers.

[0192] 6. When the absolute value is greater than 100 and less than or equal to 200, no points are added or deducted; when the absolute value is greater than 200, the corresponding points are calculated and deducted according to the incremental formula: a×(b / c), where a is the upper limit of the road number deduction weight, b is the absolute value of the difference between road numbers, and c is the difference coefficient of house number (the default value is set to 2000).

[0193] In a specific implementation, as a preferred embodiment of the present invention, step S5 further includes:

[0194] S54. Determine the area information of the address:

[0195] The road number calculations described above have already sorted the roads from nearest to furthest. However, if multiple matching addresses have the same road number or the same neighborhood name, further analysis of the address's district information is needed, such as... Figure 5 As shown.

[0196] The specific operating steps are as follows:

[0197] 1. Use regular expressions to obtain the region information from the input address and the matched address respectively.

[0198] 2. Using the segmentation group information, remove the segmentation information from the matching address and the region information from the previous step to ensure that the remaining details of the [input address] and [matching address] are consistent. If they are inconsistent, there is no need to continue comparing regions.

[0199] 3. Convert the extracted area information, converting Chinese numerals (e.g., Zone 3) into Arabic numerals.

[0200] 4. Subtract the absolute values ​​of the regions and sort them from smallest to largest. When a matching address with the same region is found, increase the corresponding weight score; otherwise, no score is added.

[0201] In a specific implementation, as a preferred embodiment of the present invention, step S5 further includes:

[0202] S55. Calculate the corresponding score based on the weighting ratio:

[0203] After analyzing the district, road number, and area information in the address, the remaining detailed addresses, as well as the addresses that were determined not to contain road number information in the above steps, need to be scored by obtaining text similarity and combining it with weight ratios.

[0204] First, a detailed address has the following characteristics:

[0205] 1. The address content is of moderate length, usually between 5 and 30 characters.

[0206] 2. Address information differs from ordinary everyday statements; it does not contain negation words or other words that would reverse the meaning.

[0207] Based on the above characteristics, this invention employs the Levenstein similarity algorithm to calculate the similarity value. This algorithm, also known as the Levenstein distance, typically describes the minimum number of editing operations required to transform one string into another. These operations include replacing one character with another, inserting a character, and deleting a character.

[0208] The core formula is:

[0209]

[0210] The input address and the matched address are fed into the algorithm for calculation to obtain a similarity score.

[0211] The scores from the above three steps are added together to obtain the score for each matching address. The scores are then sorted from highest to lowest and output. The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in this invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of this invention.

Claims

1. A method for completing address division information based on administrative division boundaries, characterized in that, The steps are as follows: S1. Organize the boundary data of the five levels of administrative divisions across the country and import them into the spatial database to generate spatial surfaces; S2. Clean the original address data and import it into the spatial database to generate spatial point data; S3. Use the Elasticsearch engine to build a national address information index and establish a national address information database to store detailed address attributes; Step S3 specifically includes the following steps: S31. Use the Elasticsearch engine to perform address matching searches; S32. Added storage for detailed address attributes in the national address information database; S33. Query the corresponding index using province information: Extract the administrative division information contained in the original address. If there is administrative division information of level three or above, the province information to which the address belongs can be deduced. The corresponding index can then be queried using the province information. If the original address does not contain third-level or higher administrative division information, the default province and city administrative divisions will be supplemented by reading the configuration file. If the original address contains old administrative division information, it needs to be replaced with the latest administrative division information. The processed administrative division information will then be used as one of the index query conditions. The specific steps are as follows: First, the latest administrative division information is processed and divided into the following four categories based on different levels of administrative divisions and whether or not they have a suffix:

1. First-level administrative divisions, second-level administrative divisions. First-level administrative divisions have no suffix, and second-level administrative divisions have no suffix.

2. Three-tiered administrative divisions; 3. Third-level administrative divisions have no suffix; 4. Fourth-level administrative divisions; Load all national administrative divisions from level one to level four into four sets; segment the original address character by character, starting from the first character and dividing it into sentences; match and verify the segmented content in the above four sets; execute the following matching and verification logic: When the segmented content matches a certain set, it is defined as a suspected segment, designated as A. This needs to be combined with the last two characters of the suspected segment, which are defined as B and C respectively, for a comprehensive judgment.

1. When A hits set 1, if B is a suffix keyword for a region, and A+B also belongs to set 1, set 2, or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; otherwise, A is a valid region of set 1.

2. When A hits set 2, if B belongs to the road and bridge suffix keyword, then A is a non-district; otherwise, A is a valid district of set 2.

3. When A matches set 3, if B is a suffix keyword for a region, and A+B also belongs to set 2 or set 4, then A is not a region; if B is a suffix keyword for road and bridge, then A is not a region; if A+B+C belongs to set 4, then A is not a region; if B+C is a suffix keyword for a region, then A is not a region; if a valid region already exists in set 2, then A is not a region; otherwise, A is a valid region in set 3.

4. If A hits set 4, then A is a valid partition of set 4; Once all characters in the address have been segmented and matched, the zone information in the address can be obtained. S4. Process and match the original address; S5. The analysis results complete the address division information.

2. The address division information completion method based on administrative division boundaries according to claim 1, characterized in that, Step S1 includes the following specific steps: S11. Organize the boundary data for each of the five levels of administrative divisions in the country: The boundary data is imported into the spatial database to generate a spatial surface. Each individual in each level of the administrative division corresponds to a surface in space, and each surface also has corresponding attributes such as province, city, district / county, township / street, village / neighborhood committee.

3. The method for completing address division information based on administrative division boundaries according to claim 1, characterized in that, Step S2 includes: S21. Clean up addresses from internet sources: The attributes of the original address mentioned above include: type, place name, detailed address, and latitude and longitude information; The cleaning process steps are as follows:

1. First, filter redundant addresses by type; 2. Perform a deduplication operation on the data. The criteria for deduplication are that the place names and addresses are the same and the spatial distance is less than 300 meters.

3. Filter illegal characters and special symbols; 4. Standardize full-width and half-width characters; S22. Import the cleaned data into the spatial database and generate spatial point data: Based on the latitude and longitude information of each data point, corresponding spatial point data is generated. After all spatial points are generated, the positional relationship between each spatial point and the spatial surface in step S1 is calculated using spatial functions. When a point belongs to a certain level 5 zoning surface, the level 5 zoning information of that point can be obtained; thus, the level 5 zoning information of all addresses can be completed.

4. The method for completing address division information based on administrative division boundaries according to claim 1, characterized in that, Step S31 includes: The address data with supplemented administrative division information is grouped by province, with each province serving as an index. The standard addresses are then parsed and segmented according to the following index format and imported into the corresponding province's index database to form a national address information index database. The attributes of the index format include: standard address, administrative division group, road number, POI information, and mapping key.

5. The method for completing address division information based on administrative division boundaries according to claim 1, characterized in that, Step S32 includes: The architecture is enhanced by adding a national address information database to store detailed address attributes; each province is represented by a data table, and the attributes of each table include: the mapping key, administrative division information, administrative division code, latitude and longitude information, postal code, and whether it is related to agriculture; an address can be supplemented with standard administrative divisions and other detailed attributes by matching it with the address index and mapping it with the address information database.

6. The method for completing address division information based on administrative division boundaries according to claim 1, characterized in that, Step S4 includes: S41. Filter special characters from the original address: Unify full-width numbers and symbols into half-width data symbols; delete symbols that are useless for address lookups; S42. Preprocess the original address content: First, use regular expressions to remove the house number, building number, unit number, and room number from the address; Next, load the organized configuration file and remove redundant information from the file record address; S43, Address Matching: The zoning information extracted in step S33 is used as the query constraint for Elasticsearch, and the processed source address is used as the object of fuzzy query; the index database query is executed to extract the most similar addresses from the address index database as the matching results.

7. The method for completing address division information based on administrative division boundaries according to claim 1, characterized in that, Step S5 includes: S51. Matching Result Analysis: Based on the analysis of standard addresses, a complete address is divided into 13 categories, with a total score of 100. Each category is assigned a different weight according to its importance, as follows: Province A: Weight is 18, range is 0 to 18; City B: Weighting is 15, with a range of 18 to 33; District / County C: Weight 12, range 32-45; Township D: Weight is 9, range is 45-54; E-Village: Weight is 6, range is 54-60; Road F: Weight is 6, range is 60-66; Road number G: weight 6, range 66-72; H place name: weight 10, range 72-82; Zone I: Weight is 4, range is 82-86; Building J: Weight is 4, range is 86-90; K-unit: weight 4, range 90-94; Floor L: Weight 3, range 94-97; Room M: Weight 3, range 97-100; Among them, A to E are the administrative divisions, F to G are the road number information, H is the place name and landmark information, and I to M are the detailed address supplementary information; When the weight interval value is greater than 80, the five-level zone division of the matching address and the input address is consistent; S52, perform zone information matching analysis: According to the instructions for creating the standard address index database, each address contains district group information, and a matching query can obtain the district information of the address. The extracted source address district information is compared with the matched district group information, and a point deduction system is adopted. When the districts are consistent, no points are deducted; when there are inconsistent districts, the corresponding weighted points are deducted.

8. The method for completing address division information based on administrative division boundaries according to claim 7, characterized in that, Step S5 further includes: S53. Split the matching address: Remove the district information from the address and keep the detailed address part; analyze the detailed address using regular expressions. When the address contains road number information, compare the proximity of the road number information and add different weight scores to sort the addresses from near to far. The specific operating steps are as follows:

1. Use regular expressions to obtain the road numbers from the input address and the matched address respectively; 2. By segmenting the words and using the area group information, remove the area information from the matched address, and segment the detailed address into [Road Information] + [Road Number] + [Other Information] based on the road number; 3. Use string search to determine if the [input address] contains the same [road information]; 4. When the [Road Information] matches, subtract the obtained road numbers and take the absolute value; 5. When the absolute value is less than or equal to 100, the corresponding score is calculated using the decreasing formula: a×(1-b%), where a is the upper limit of the road number's weighting and b is the absolute value of the difference between the road numbers.

6. When the absolute value is greater than 100 and less than or equal to 200, no points are added or deducted; when the absolute value is greater than 200, the corresponding points are calculated and deducted according to the incremental formula: a×(b / c), where a is the upper limit of the road number deduction weight, b is the absolute value of the difference between road numbers, and c is the difference coefficient of house number. The default value is set to 2000.

9. The method for completing address division information based on administrative division boundaries according to claim 8, characterized in that, Step S5 further includes: S54. Determine the area information of the address: When multiple matching addresses have the same road number or the same neighborhood name, further determination of the address's district information is needed. The specific operating steps are as follows:

1. Use regular expressions to obtain the region information from the input address and the matched address respectively; 2. Using the segmentation information, remove the segmentation information from the matching address and the area information from the previous step to ensure that the remaining details of the [input address] and [matching address] are consistent; if they are inconsistent, there is no need to continue comparing areas.

3. Convert the extracted area information, converting Chinese numerals into Arabic numerals; 4. Subtract the absolute values ​​of the regions and sort them from smallest to largest; when a matching address with the same region is found, increase the corresponding weight score; if no matching address is found, no score is added. S55. Calculate the corresponding score based on the weighting ratio: By obtaining text similarity and combining it with weight ratios, the corresponding scores are calculated. The Levenstein similarity algorithm is used to calculate similarity values ​​by replacing one character with another, inserting one character, and deleting one character. The core formula is: The input address and the matched address are fed into the algorithm for calculation to obtain a similarity score; Add the scores from the three steps above to get the score for each matching address, sort them from highest to lowest score, and output them.

Citation Information

Patent Citations

  • Method, device and equipment for address division completion and readable medium

    CN119202115A