CN112749169A - Address tree construction method, address planning specification method, device and electronic equipment - Google Patents

Address tree construction method, address planning specification method, device and electronic equipment Download PDF

Info

Publication number
CN112749169A
CN112749169A CN202110076721.0A CN202110076721A CN112749169A CN 112749169 A CN112749169 A CN 112749169A CN 202110076721 A CN202110076721 A CN 202110076721A CN 112749169 A CN112749169 A CN 112749169A
Authority
CN
China
Prior art keywords
address
data
administrative
level
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110076721.0A
Other languages
Chinese (zh)
Inventor
虞开稳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Minglue Zhaohui Technology Co Ltd
Original Assignee
Beijing Minglue Zhaohui Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Minglue Zhaohui Technology Co Ltd filed Critical Beijing Minglue Zhaohui Technology Co Ltd
Priority to CN202110076721.0A priority Critical patent/CN112749169A/en
Publication of CN112749169A publication Critical patent/CN112749169A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The application provides an address tree construction method, an address specification device and electronic equipment, wherein the address tree construction method comprises the following steps: acquiring address data; analyzing the address data according to an administrative level; and stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap, so as to obtain the address tree. Storing data in a key value pair mode by utilizing a basic data structure HashMap, storing address data of all levels, and finally obtaining a multiple nested HashMap Chinese address tree result set based on national administrative division data and address alias data by nesting the analyzed address data according to the administrative level, namely the nested HashMap of one level and one level. Multiple HashMap is used for multiple nesting, addresses of all levels are obtained, the address tree capable of correcting address aliases is obtained, the storage range of the Chinese address tree is enlarged, the address query capability is expanded from the first three levels of addresses to any detailed address levels of countryside, street and the like, and rapid address positioning is facilitated.

Description

Address tree construction method, address planning specification method, device and electronic equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to an address tree construction method, an address specification method, an address tree construction device, and an electronic device.
Background
With the development of digital cities and the upgrading of the logistics distribution industry, more and more services need to be performed on definite and effective addresses. The geographic information based on the longitude and the latitude has wide data sources and uneven data quality, and because the nationwide place names are more and the calling methods of various place names are more diversified, particularly the calling methods of various village and town roads have no specific obvious identification keywords of villages, towns or roads and the like, the geographic information brings much inconvenience to the industries such as banks, expressages and the like in the service development process.
Therefore, how to normalize the address becomes a technical problem to be solved urgently.
Disclosure of Invention
The application provides an address tree construction method, an address normalization device and electronic equipment, and aims to at least solve the technical problem of how to normalize an address in the related art.
According to an aspect of an embodiment of the present application, there is provided an address tree construction method, including: acquiring address data; analyzing the address data according to an administrative level; and stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap, so as to obtain the address tree.
Optionally, the performing, based on hashmap, a stacking multiple nesting on the address data according to an administrative level to obtain an address tree includes: sequentially taking the address data of the previous administrative level as key information of the next administrative level administered by the address data of the previous administrative level, and taking the address data of the next administrative level as value information of the address data of the previous administrative level; and parallelly splicing the key information of the same administrative level to obtain the address tree.
Optionally, the address data comprises administrative region data and address alias data; the analyzing the address data according to the administrative level comprises: performing administrative level division on the address data; storing address data with upper and lower administrative levels in a key value pair, wherein the data address of each administrative level in the key value pair comprises administrative division data and address alias data corresponding to the current address data.
According to another aspect of the embodiments of the present application, there is provided an address specification method, including: acquiring the address tree construction method of any one of the above embodiments to construct an address tree; acquiring address data to be normalized; and carrying out normalization processing on the address data to be normalized based on the address tree to obtain a normalized address.
Optionally, the normalizing the address in the address tree includes: obtaining basic address data in the address data to be normalized based on a pattern matching algorithm; performing maximum forward matching on the basic address data based on the address tree to obtain upper N-level address data in the basic address data, wherein N is a positive integer greater than or equal to 1; and supplementing the upper N-level address data based on an address supplementing algorithm.
Optionally, the supplementing the upper N-level address data based on the address supplementing algorithm includes: performing word segmentation on the basic address data; matching is carried out in sequence according to the number of levels of the administrative levels of the address tree; and when the address data which is not the highest level is matched, sequentially supplementing the upper-level address data of the currently matched address data according to the address administration level in the address tree.
Optionally, the address data to be normalized includes administrative division data and address abbreviation data and/or address alias data corresponding to the administrative division data; the normalizing the address data to be normalized based on the address tree further comprises: carrying out standardized processing on the address abbreviation data and/or the address alias data according to the administrative division data; detecting repeated address elements in the normalized address data; and removing the duplicate of the address data after the specification according to the re-read address elements.
According to another aspect of the embodiments of the present application, there is also provided an address tree construction apparatus, including: the acquisition module is used for acquiring address data; the analysis module is used for analyzing the address data according to an administrative level; and the construction module is used for stacking and nesting the administrative division data according to the administrative level based on the hashmap to obtain the address tree.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, after the address data is obtained, the national administrative division data and the address alias data are analyzed, the data are stored in a key-value pair mode by using a basic data structure HashMap, the address data of each level are stored, and finally, a multi-nested HashMap Chinese address tree result set based on the national administrative division data and the address alias data is obtained by nesting the analyzed address data according to the HashMap of each level of the administrative level. Multiple HashMaps are used for multiple nesting, addresses of all levels are obtained, the address tree capable of correcting address aliases is obtained, the storage range of the Chinese address tree is enlarged, the address query capability is expanded from the first three levels to any detailed address levels of countryside, street and the like, and the quick address positioning is facilitated.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of an alternative address tree constructed hardware environment according to embodiments of the present invention;
FIG. 2 is a flow diagram illustrating an alternative address tree construction according to an embodiment of the present application;
FIG. 3 is a schematic diagram of address tree logic according to an embodiment of the present application;
FIG. 4 is a flow diagram illustrating an address specification method according to an embodiment of the present application;
FIG. 5 is a block diagram of an address tree construction apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The current processing method is to construct an address tree from address data, sort and adjust each group of addresses with the same father node in the original address tree to obtain a second address tree; obtaining the prefix of the brother node name as the name of a new node, inserting the new node into the second address tree, adjusting the name of the brother node with the same node name prefix to obtain a third address tree, and finally obtaining a maintained address element relationship table; or the existing address data characteristics are obtained from various databases such as a common word database, a road database, an interest point database, a keyword database and the like, and the address data is compared and corrected in various processing modules.
The various methods described above have several problems: 1. the chinese address tree has limited processing power. Only the first three levels of addresses can be processed (the first three levels of addresses are province-city-county/district), real addresses are often obtained from a quick delivery list through scanning or are filled in by customers in an electronic list (the first three levels of addresses in a general electronic list can be selected, and detailed addresses at the back can be manually filled), and complex key information of the addresses is often behind the first three levels of addresses; 2. the lack of standardized method for national address, many processing methods are difficult to process to specific village, road, street and even cell level address, and further difficult to correct the address with various error expression modes.
According to an aspect of an embodiment of the present application, there is provided an address tree construction method. Alternatively, in this embodiment, the above address tree construction method may be applied to a hardware environment as shown in fig. 1.
According to an aspect of an embodiment of the present application, there is provided an address tree construction method. Alternatively, in this embodiment, the above address tree construction method may be applied to a hardware environment formed by the terminal 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal 102 through a network, which may be used to provide services for the terminal or a client installed on the terminal, may be provided with a database on the server or independent from the server, may be used to provide data storage services for the server 104, and may also be used to handle cloud services, and the network includes but is not limited to: the terminal 102 is not limited to a PC, a mobile phone, a tablet computer, etc. the terminal may be a wide area network, a metropolitan area network, or a local area network. The address tree construction method of the embodiment of the present application may be executed by the server 104, or may be executed by the terminal 102, or may be executed by both the server 104 and the terminal 102. The terminal 102 may execute the address tree construction method according to the embodiment of the present application, or may execute the address tree construction method by a client installed thereon.
Taking the address tree construction method in the present embodiment executed by the terminal 102 and/or the server 104 as an example, fig. 2 is a schematic flow chart of an optional address tree construction method according to the present embodiment, and as shown in fig. 2, the flow of the method may include the following steps:
step S202, address data is obtained;
step S204, analyzing the address data according to administrative levels;
and S206, stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap to obtain an address tree.
After the address data is obtained through the steps S202 to S206, the national administrative division data and the address alias data are analyzed, the data is stored in the form of key value pairs by using the HashMap of the basic data structure, the address data of each level is stored, and the multiple nested HashMap Chinese address tree result set based on the national administrative division data and the address alias data is finally obtained by nesting the analyzed address data according to the nested HashMap of each level of the administrative level. Multiple HashMap is used for multiple nesting, addresses of all levels are obtained, the address tree capable of correcting address aliases is obtained, the storage range of the Chinese address tree is enlarged, the address query capability is expanded from the first three levels of addresses to any detailed address levels of countryside, street and the like, and rapid address positioning is facilitated.
In the technical solution of step S202, as an exemplary embodiment, the address data may be national administrative division data and address abbreviation or address alias data of regional administrative data for each region, for example, "south of the river" is administrative division data, that is, a formal address name, in this embodiment, alias data such as "south of the river" or "yu" needs to be acquired, for example, "north of the river" is administrative division data, that is, a formal address name, in this embodiment, alias data such as "north of the river", "wing", or "direct" needs to be acquired, and in this embodiment, alias or abbreviation of occurrence of national administrative division data may be acquired.
In the technical solution of step S204, the address data is analyzed according to administrative levels, and as an exemplary embodiment, administrative level division is performed on the address data; storing address data with upper and lower administrative levels in a key value pair, wherein the data address of each administrative level in the key value pair comprises administrative division data and address alias data corresponding to the current address data. As an exemplary embodiment, the value information value obtained by the key information key stores various levels of address data, for example, see fig. 3, when key ═ henan, hou, value ═ zheng, luyang city, and so on, when key ═ zheng or key ═ zheng, hou, zhong county, zhong muu, etc.
In the technical solution of step S206, the administrative division data is subjected to stacking multiple nesting according to the administrative level based on hashmap, so as to obtain an address tree. Specifically, the Map interface based on the Hash table is realized, data are stored in a key value pair mode, and a multi-nested HashMap Chinese address tree result set based on national administrative division data and address alias data is finally obtained through the first-level and first-level nested HashMap of the HashMap. For example, referring to fig. 3, the address data of the previous administrative level is sequentially used as the key information of the next administrative level administered by the address data of the previous administrative level, and the address data of the next administrative level is used as the value information of the address data of the previous administrative level; and parallelly splicing the key information of the same administrative level to obtain the address tree. Specifically, for example, when the query key is the result of "zheng zhou city", a new HashMap result with various districts and counties as keys and various towns and street offices as value is obtained, the query result is continued downwards, the key values of each level are spliced, and then more detailed address data can be obtained.
According to another aspect of the embodiments of the present application, there is also provided an address normalization method, as shown in fig. 4, the address normalization method may include:
s402, an address tree is obtained, and the address tree is constructed based on the address tree construction method described in the above embodiment.
S404, address data to be normalized is obtained.
S406, normalizing the address data to be normalized based on the address tree to obtain a normalized address.
Through the steps S402 to S406, address data are checked from national administrative division data and address alias data, then a Chinese address tree is constructed based on a HashMap data structure, normalization processing is carried out on address data to be normalized based on the address tree, and finally an effective address is obtained. By combining the address tree, the level and the accuracy of the effective address after the address data is normalized are improved, alias normalization steps are added, the flexibility of address normalization is improved, the address error correction capability is improved, the validity and the normalization of the address data are improved by the address supplement step in the normalization method, and reliable and effective address basic data are provided for the development of subsequent services.
As an exemplary embodiment, normalizing an address may include performing address information supplementation on current address data to be normalized, illustratively, all corresponding address information of administrative levels may be completely supplemented for the current address data with the specification, and illustratively, basic address data in the address data to be normalized is obtained based on a pattern matching algorithm; performing maximum forward matching on the basic address data based on the address tree to obtain upper N-level address data in the basic address data, wherein N is a positive integer greater than or equal to 1; and supplementing the upper N-level address data based on an address supplementing algorithm. Specifically, data such as a road number and a house number in the address data can be obtained according to a pattern matching algorithm, and then the maximum forward matching is performed on the address data based on the address tree, that is, the addresses are gradually compared downwards from the province and city region of the address tree, and the addresses are firstly matched and firstly reserved, so that the address data of the first three levels are obtained. And supplementing the addresses of the first three levels according to the address supplementing algorithm. Specifically, the address supplement algorithm may include word segmentation on the basic address data; matching is carried out in sequence according to the number of levels of the administrative levels of the address tree; and when the address data which is not the highest level is matched, sequentially supplementing the upper-level address data of the currently matched address data according to the address administration level in the address tree. After obtaining the address data to be normalized, illustratively, the address data to be normalized may be "Tanjin street" or "Beijing Tanjin" to wait for the normalized address data, the present address data to be normalized can be participled, in particular, the address element identification can be carried out on the address data to be normalized, dividing according to different address elements, if the number of the divided address elements is larger than a preset value, it can be considered that the address data to be normalized at present does not need to be supplemented, if the number of the divided address elements is less than the preset value, the address data to be normalized at present needs to be supplemented, after word segmentation is carried out to obtain at least one address element, matching can be carried out in sequence according to the levels of the administrative levels of the address tree, if the address data of the highest administrative level is matched, for example, address data of an administrative level of Beijing may be matched after word segmentation. When address data of a non-highest level is matched, for example, address data of an intermediate level is matched, the address data of an upper level or an upper N level is supplemented. As an example, according to the number of levels constructed by the address tree, according to the address level of the current address data to be normalized, if there is no address with the same name level, the address with any previous level can be supplemented indiscriminately, for example, the current beijing city township street can be supplemented directly if there is no street with the same name in the address tree.
As an exemplary embodiment, normalizing the address may include performing address information deduplication on current address data to be normalized, where the address data to be normalized includes administrative division data and address abbreviation data and/or address alias data corresponding to the administrative division data, and performing normalization processing on the address abbreviation data and/or address alias data according to the administrative division data; detecting repeated address elements in the normalized address data; and removing the duplicate of the address data after the specification according to the re-read address elements. For example, the security city of Anhui province is the alias of the security city, and the security city has duplication, so that the standard address data of the security city of Anhui province is obtained by removing the duplication. The address deduplication step improves the accuracy and the simplicity of address data, and provides reliable and effective address basic data for the development of subsequent services.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided an address tree construction apparatus for implementing the above address tree construction method. Fig. 5 is a schematic diagram of an alternative address tree building apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus may include:
an obtaining module 502, configured to obtain address data;
an analysis module 504, configured to analyze the address data according to an administrative level;
and the building module 506 is configured to stack multiple nesting of the administrative division data according to the administrative level based on the hashmap to obtain an address tree.
It should be noted that the obtaining module 502 in this embodiment may be configured to execute the step S202, the parsing module 504 in this embodiment may be configured to execute the step S204, and the constructing module 506 in this embodiment may be configured to execute the step S206.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to yet another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above address tree construction and/or address specification method, which may be a server, a terminal, or a combination thereof.
Fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present invention, as shown in fig. 6, including a processor 602, a communication interface 604, a memory 606, and a communication bus 608, where the processor 602, the communication interface 604, and the memory 606 communicate with each other through the communication bus 608, where,
a memory 606 for storing computer programs;
the processor 602, when executing the computer program stored in the memory 606, implements the following steps:
s1, acquiring address data;
s2, analyzing the address data according to the administrative level;
and S3, stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap, and an address tree is obtained.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, as shown in fig. 6, the memory 602 may include, but is not limited to, the obtaining module 502, the parsing module 504, and the building module 506 in the address tree building apparatus. In addition, other module units in the above address tree building apparatus may also be included, but are not limited to this, and are not described in detail in this example.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the device implementing the address tree construction method and/or the address specification method may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Alternatively, in the present embodiment, the storage medium may be used for a program code of the address tree construction method and/or the address specification method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, acquiring address data;
s2, analyzing the address data according to the administrative level;
and S3, stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap, and an address tree is obtained.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. An address tree construction method, comprising:
acquiring address data;
analyzing the address data according to an administrative level;
and stacking and multiple nesting are carried out on the administrative division data according to the administrative levels based on the hashmap, so as to obtain the address tree.
2. The method for constructing an address tree according to claim 1, wherein the step of performing a cascading multiple nesting on the address data according to an administrative level based on a hashmap to obtain the address tree comprises the steps of:
sequentially taking the address data of the previous administrative level as key information of the next administrative level administered by the address data of the previous administrative level, and taking the address data of the next administrative level as value information of the address data of the previous administrative level;
and parallelly splicing the key information of the same administrative level to obtain the address tree.
3. The address tree construction method according to claim 1, wherein the address data includes administrative division data and address alias data;
the analyzing the address data according to the administrative level comprises:
performing administrative level division on the address data;
storing address data with upper and lower administrative levels in a key value pair, wherein the data address of each administrative level in the key value pair comprises administrative division data and address alias data corresponding to the current address data.
4. An address specification method, comprising:
acquiring an address tree constructed based on the address tree construction method of any one of claims 1 to 3;
acquiring address data to be normalized;
and carrying out normalization processing on the address data to be normalized based on the address tree to obtain a normalized address.
5. The address specification method of claim 4, wherein the normalizing the addresses in the address tree comprises:
obtaining basic address data in the address data to be normalized based on a pattern matching algorithm;
performing maximum forward matching on the basic address data based on the address tree to obtain upper N-level address data in the basic address data, wherein N is a positive integer greater than or equal to 1;
and supplementing the upper N-level address data based on an address supplementing algorithm.
6. The address specification method of claim 5, wherein the supplementing upper N-level address data based on an address supplementation algorithm comprises:
performing word segmentation on the basic address data;
matching is carried out in sequence according to the number of levels of the administrative levels of the address tree;
and when the address data which is not the highest level is matched, sequentially supplementing the upper-level address data of the currently matched address data according to the address administration level in the address tree.
7. The address specification method according to claim 5, wherein the address data to be specified includes administrative division data and address abbreviation data and/or address alias data corresponding to the administrative division data;
the normalizing the address data to be normalized based on the address tree further comprises:
carrying out standardized processing on the address abbreviation data and/or the address alias data according to the administrative division data;
detecting repeated address elements in the normalized address data;
and removing the duplicate of the address data after the specification according to the re-read address elements.
8. An address tree construction apparatus, comprising:
the acquisition module is used for acquiring address data;
the analysis module is used for analyzing the address data according to an administrative level;
and the construction module is used for stacking and nesting the administrative division data according to the administrative level based on the hashmap to obtain the address tree.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor is configured to execute the steps of the address tree construction method according to any one of claims 1 to 3 and/or the steps of the address specification method according to any one of claims 4 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of the address tree construction method according to any one of claims 1 to 3 and/or the steps of the address specification method according to any one of claims 4 to 7 when the computer program is executed.
CN202110076721.0A 2021-01-20 2021-01-20 Address tree construction method, address planning specification method, device and electronic equipment Pending CN112749169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110076721.0A CN112749169A (en) 2021-01-20 2021-01-20 Address tree construction method, address planning specification method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110076721.0A CN112749169A (en) 2021-01-20 2021-01-20 Address tree construction method, address planning specification method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112749169A true CN112749169A (en) 2021-05-04

Family

ID=75652671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110076721.0A Pending CN112749169A (en) 2021-01-20 2021-01-20 Address tree construction method, address planning specification method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112749169A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704574A (en) * 2021-08-27 2021-11-26 北京市律典通科技有限公司 Address standardization method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704574A (en) * 2021-08-27 2021-11-26 北京市律典通科技有限公司 Address standardization method and device
CN113704574B (en) * 2021-08-27 2024-02-09 北京市律典通科技有限公司 Address standardization method and device

Similar Documents

Publication Publication Date Title
CN109995884B (en) Method and apparatus for determining precise geographic location
CN101355595B (en) Method and apparatus for locating physical location of IP address
CN113412608B (en) Content pushing method and device, server and storage medium
CN114422267B (en) Flow detection method, device, equipment and medium
CN110704564A (en) Address error correction method and device
CN112632213A (en) Address information standardization method and device, electronic equipment and storage medium
CN115292344A (en) Data dictionary construction method and device, electronic equipment and storage medium
CN103324749B (en) A kind of spatialization parsing based on received text address and method for correcting error
CN112749169A (en) Address tree construction method, address planning specification method, device and electronic equipment
CN110909110B (en) Address standardization method and device, storage medium and processor
CN109614327B (en) Method and apparatus for outputting information
CN110737820A (en) Method and apparatus for generating event information
CN109104297B (en) Business process processing method and device
CN114840634B (en) Information storage method and device, electronic equipment and computer readable medium
CN110020040B (en) Method, device and system for querying data
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN114048797A (en) Method, device, medium and electronic equipment for determining address similarity
CN111367634A (en) Information processing method, information processing device and terminal equipment
CN110879835A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN116186093B (en) Address information processing method, address information processing device, electronic equipment and computer readable medium
CN111475742A (en) Address extraction method and device
CN111784239B (en) Method and device for determining dispatch network point, electronic equipment and storage medium
CN110647623A (en) Method and device for updating information
US11232135B2 (en) Methods and system of using N-gram analysis to discover points of interest in a given geographic region
CN113065071B (en) Product information recommendation method and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination