CN112559661A - Method and device for retrieving address type and electronic equipment - Google Patents

Method and device for retrieving address type and electronic equipment Download PDF

Info

Publication number
CN112559661A
CN112559661A CN202011451676.4A CN202011451676A CN112559661A CN 112559661 A CN112559661 A CN 112559661A CN 202011451676 A CN202011451676 A CN 202011451676A CN 112559661 A CN112559661 A CN 112559661A
Authority
CN
China
Prior art keywords
information
urban
address
rural
retrieving
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.)
Granted
Application number
CN202011451676.4A
Other languages
Chinese (zh)
Other versions
CN112559661B (en
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011451676.4A priority Critical patent/CN112559661B/en
Publication of CN112559661A publication Critical patent/CN112559661A/en
Application granted granted Critical
Publication of CN112559661B publication Critical patent/CN112559661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/29Geographical information databases
    • 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
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Remote Sensing (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for retrieving address types and electronic equipment, and relates to the technical fields of data processing, cloud computing, cloud platforms and intelligent transportation. The specific implementation scheme is as follows: acquiring an address query request, wherein the address query request comprises address information to be queried; analyzing the address information to obtain retrieval information corresponding to the address information; and searching in the urban and rural classified information based on the search information to obtain the urban and rural type search result corresponding to the address information. The method can analyze the address information to obtain the retrieval information corresponding to the address information, then, based on the retrieval information, the retrieval is carried out in the urban and rural classified information to obtain the retrieval result of the urban and rural type corresponding to the address information, the retrieval result of the urban and rural type corresponding to the address information can be automatically obtained according to the address information, and compared with the prior art that the urban and rural type of the address is mostly obtained manually, the method is high in accuracy, short in time consumption and low in labor cost.

Description

Method and device for retrieving address type and electronic equipment
Technical Field
The present application relates to the technical field of data processing, cloud computing, cloud platforms, and intelligent transportation in the technical field of computers, and in particular, to a method, an apparatus, an electronic device, a storage medium, and a computer program product for retrieving an address type.
Background
At present, in the fields of finance, logistics and the like, the urban and rural classified information of addresses is very important for risk assessment and refined operation of enterprises. However, in the related art, the urban and rural classification information of the address is mostly obtained manually, the urban and rural type result is very dependent on the subjective consciousness of the judger, the accuracy of the result is low, the time consumption is long, and the labor cost is high.
Disclosure of Invention
A method, apparatus, electronic device, storage medium, and computer program product for retrieving an address type are provided.
According to a first aspect, there is provided a method of retrieving an address type, comprising: acquiring an address query request, wherein the address query request comprises address information to be queried; analyzing the address information to obtain retrieval information corresponding to the address information; and searching in the urban and rural classified information based on the search information to obtain the urban and rural type search result corresponding to the address information.
According to a second aspect, there is provided an apparatus for retrieving an address type, comprising: the device comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring an address query request, and the address query request comprises address information to be queried; the analysis module is used for analyzing the address information to acquire retrieval information corresponding to the address information; and the retrieval module is used for retrieving in the urban and rural classified information based on the retrieval information so as to obtain the retrieval result of the urban and rural type corresponding to the address information.
According to a third aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of retrieving an address type according to the first aspect of the present application.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of retrieving an address type as described in the first aspect of the present application.
According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the method of retrieving address types of the first aspect of the application.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a schematic flow chart diagram of a method for retrieving address types according to a first embodiment of the present application;
fig. 2 is a schematic flow chart of a method for retrieving address types according to a second embodiment of the present application before an address query request is obtained;
fig. 3 is a schematic flowchart of a retrieval result of an urban and rural category corresponding to address information obtained in a method for retrieving an address category according to a third embodiment of the present application;
fig. 4 is a schematic flowchart of a retrieval result of an urban and rural category corresponding to address information obtained in a method for retrieving an address category according to a fourth embodiment of the present application;
fig. 5 is a schematic flowchart of a retrieval result of an urban and rural category corresponding to address information obtained in a method for retrieving an address category according to a fifth embodiment of the present application;
FIG. 6 is a block diagram of an apparatus for retrieving address types according to a first embodiment of the present application;
FIG. 7 is a block diagram of an apparatus for retrieving address types according to a second embodiment of the present application;
fig. 8 is a block diagram of an electronic device for implementing a method of retrieving address types according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Data Processing (Data Processing) is the collection, storage, retrieval, manipulation, transformation and transmission of Data, the basic purpose of which is to extract and deduce from a large, possibly chaotic, unintelligible amount of Data that is valuable and meaningful to some specific person.
Cloud Computing (Cloud Computing) is one of distributed Computing, and means that a huge data Computing processing program is decomposed into countless small programs through a network Cloud, then, the small programs are processed and analyzed through a system consisting of a plurality of servers to obtain results, and the results are returned to a user, so that tens of thousands of data can be processed in a short time (several seconds), and strong network services can be achieved.
Cloud Computing Platform (Cloud Computing Platform) refers to a service based on hardware resources and software resources, providing Computing, networking, and storage capabilities. Cloud computing platforms can be divided into three categories: the cloud computing platform comprises a storage type cloud platform taking data storage as a main part, a computing type cloud platform taking data processing as a main part and a comprehensive cloud computing platform taking computing and data storage processing into consideration.
Intelligent transportation (Intelligent Traffic) is a comprehensive transportation system which effectively and comprehensively applies advanced scientific technologies (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operation research, artificial intelligence and the like) to transportation, service control and vehicle manufacturing, and strengthens the relation among vehicles, roads and users, thereby ensuring safety, improving efficiency, improving environment and saving energy.
Fig. 1 is a flowchart illustrating a method for retrieving address types according to a first embodiment of the present application.
As shown in fig. 1, a method for retrieving an address type according to a first embodiment of the present application includes:
s101, an address query request is obtained, wherein the address query request comprises address information to be queried.
It should be noted that the execution subject of the method for retrieving address types according to the embodiment of the present application may be a hardware device having data information processing capability and/or software necessary for driving the hardware device to operate. Alternatively, the execution body may include a workstation, a server, a computer, a user terminal and other intelligent devices. The user terminal includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent household appliance, a vehicle-mounted terminal, and the like.
In the embodiment of the present application, a method for retrieving an address type is described by taking an execution subject as a cloud platform as an example.
It is understood that when an enterprise or an individual wants to obtain a retrieval result of a town and country type corresponding to address information, an address query request including address information to be queried may be sent to the cloud platform. Further, the cloud platform may obtain an address query request, where the address query request includes address information to be queried.
For example, in a logistics transportation scenario, when filling in logistics information, a user often needs to fill in a delivery address and a receiving address, a logistics company may use both the delivery address and the receiving address as address information to be queried, generate an address query request according to the delivery address and the receiving address, and send the generated address query request to a cloud platform.
The method for retrieving the address type in the embodiment of the present application is not limited to the form, type, and the like of the address information. For example, the address information may be "an office building in a certain city and province", may also be "a cell in a certain city and city", may also be "a country in a certain city and province", and the like.
S102, analyzing the address information to obtain retrieval information corresponding to the address information.
In the embodiment of the present application, the type of the retrieval information corresponding to the address information may be one or more, and each address information may correspond to one or more retrieval information.
Optionally, the retrieval information includes, but is not limited to, country level administrative district division name, first coordinate information, and the like.
According to the regulations related to administrative divisions, township level administrative divisions include streets, towns, villages, nationalities, sappan wood, nationalities, counties and jurisdictions. It is understood that township administrative divisions may also include other forms, such as, for example, a residence commission, village, etc., and are not limited thereto.
It should be noted that the first coordinate information is coordinate information corresponding to the address information, and includes, but is not limited to, longitude and latitude information corresponding to the address information.
And S103, retrieving in the urban and rural classified information based on the retrieval information to obtain an urban and rural type retrieval result corresponding to the address information.
In an embodiment of the application, the urban and rural classification information may include three types of cities, towns and villages, and each type includes a division name of an administrative area and/or second coordinate information. For example, the city types may include Nanjing, Nanjing basalt, Beijing Haishen, and the like.
Optionally, the urban and rural classification information may be set according to actual conditions. For example, the urban and rural classification information may be set according to the regulations on the administrative district, urban and rural classification.
In an embodiment of the application, the retrieval result may include a probability of a town and country type corresponding to the address information. Wherein, the probability of the urban and rural type comprises at least one of the probabilities of cities, towns and villages. For example, the retrieval result of the town and country type corresponding to the address information a may include a probability that the address information a belongs to the city of 20%, a probability that the address information a belongs to the town of 50%, and a probability that the address information a belongs to the countryside of 30%.
To sum up, according to the method for retrieving the address type of the embodiment of the application, the address query request is obtained, wherein the address query request includes the address information to be queried, the address information is analyzed to obtain the retrieval information corresponding to the address information, and then based on the retrieval information, the retrieval is performed in the urban and rural classified information to obtain the retrieval result of the urban and rural type corresponding to the address information. Therefore, the retrieval result of the corresponding urban and rural type can be automatically acquired according to the address information, and compared with the urban and rural type in which the address is acquired manually mostly in the related art, the method and the device are high in accuracy, short in time consumption and low in labor cost.
On the basis of any of the above embodiments, the retrieval information may include a township administrative district division name and/or first coordinate information, and at this time, the address information is analyzed in step S102 to obtain the retrieval information corresponding to the address information, which may include the following two possible implementations:
and in the mode 1, address analysis is carried out on the address information so as to obtain the township administrative district division name corresponding to the address information.
Optionally, address resolution is performed on the address information to obtain the township administrative district division names corresponding to the address information, and the method may include performing address resolution on the address information, determining each level of administrative district division information corresponding to the address information, and obtaining the township administrative district division names from each level of administrative district division information.
For example, word segmentation processing may be performed on the address information to obtain each level of administrative district division name corresponding to the address information, and semantic extraction may be performed on each level of administrative district division name to extract a country-level administrative district division name from each level of administrative district division name.
For example, if the address information a is, the word segmentation processing may be performed on the address information a "a certain street of a basalt district in south beijing city of jiangsu province", and the word segmentation processing result is "a certain street of a basalt district in south beijing city of jiangsu province", where the jiangsu province is a division name of a province-level administrative district, the south beijing city is a division name of a ground-level administrative district, the basalt district is a division name of a county-level administrative district, and a certain street is a division name of a country-level administrative district, and then semantic extraction may be performed on the word segmentation processing result "a certain street of a basalt district in south beijing city of jiangsu province", and then the division name of the country-level administrative district corresponding to the address information a may be obtained as a certain street.
And 2, acquiring first coordinate information corresponding to the address information.
Optionally, a mapping relationship or a mapping table between the address information and the first coordinate information may be pre-established, and after the address information is obtained, the mapping relationship or the mapping table is queried, so that the first coordinate information corresponding to the address information may be obtained. It should be noted that the mapping relationship or the mapping table may be set according to actual situations.
Therefore, the method can perform address analysis on the address information to acquire the township administrative district division name corresponding to the address information or acquire the first coordinate information corresponding to the address information to acquire the retrieval information.
On the basis of any of the above embodiments, as shown in fig. 2, before acquiring the address query request in step S101, the method further includes:
s201, acquiring national urban and rural classification codes, and urban and rural names and second coordinate information included in each urban and rural classification code.
In the embodiment of the present application, the national urban and rural classification code refers to all urban and rural classification codes in the whole country.
Optionally, the national urban and rural classification code may be obtained according to the regulations related to the urban and rural classification code. For example, the national urban and rural classification code may be obtained according to the provisions of the national statistical institute for urban and rural classification codes.
For example, the town and country classification code may be set with reference to table 1.
TABLE 1 urban and rural Classification code
Figure BDA0002827271730000051
Figure BDA0002827271730000061
It is understood that each of the town and country classification codes may include one or more town and country names, and the town and country names included in each of the town and country classification codes may be obtained, and the second coordinate information corresponding to each of the town and country names may be obtained.
S202, the urban and rural classified information is generated by utilizing the urban and rural classified codes and the urban and rural names and the second coordinate information included in the urban and rural classified codes.
Optionally, the urban and rural classification codes, and the urban and rural names and the second coordinate information included in the urban and rural classification codes may be used to establish a mapping relationship or a mapping table among the urban and rural classification codes, the urban and rural names, and the second coordinate information, and the mapping relationship or the mapping table may be used as the urban and rural classification information.
It can be understood that, because the number of national urban and rural classified codes is large and the scale of the generated urban and rural classified information is large, the urban and rural classified information can be spatially divided based on a Kd Tree (Kd-Tree) algorithm and second coordinate information to construct an urban and rural classified index library of the urban and rural classified information, so that millisecond-level query and retrieval can be realized, the speed of querying and retrieving the urban and rural classified information can be effectively improved, and the time consumption of query and retrieval is reduced.
Therefore, the method can generate the urban and rural classified information according to the national urban and rural classified codes, and the urban and rural names and the second coordinate information included in each urban and rural classified code, and is used for acquiring the retrieval result of the urban and rural type corresponding to the address information.
On the basis of any of the above embodiments, the step S103 may perform a search in the urban and rural classification information based on the search information to obtain a search result of the urban and rural type corresponding to the address information, and include the following three possible implementation manners:
in the method 1, when the retrieval information includes township-level administrative district division names, as shown in fig. 3, in step S103, based on the retrieval information, the retrieving is performed in the urban and rural classification information to obtain a retrieval result of the urban and rural types corresponding to the address information, which may include:
s301, based on the township level administrative area division names, retrieving is carried out in the urban and rural classified information, and in response to the fact that the township level administrative area division names exist in the urban and rural classified information, urban and rural classification codes contained in the township level administrative area division names are obtained.
In the embodiment of the application, if the retrieval information includes the township level administrative district division name, the retrieval can be performed in the urban and rural classification information based on the township level administrative district division name.
It is understood that the administrative district division names may be changed, and the urban and rural classification information may not fully cover all the rural division names currently existing. Then, when searching in the classification information of urban and rural areas based on the division names of the township administrative districts, the division names of the township administrative districts may exist in the classification information of urban and rural areas, or the division names of the township administrative districts may not exist.
When the township administrative district division name exists in the urban and rural classified information, the urban and rural classified code contained in the township administrative district division name can be acquired in response to the township administrative district division name existing in the urban and rural classified information.
S302, obtaining the probability of each urban and rural classification code contained in the township administrative district division name as the retrieval result corresponding to the address information.
It is understood that the township district division name may include one or more kinds of urban and rural classification codes.
Optionally, the obtaining of the probability of each urban and rural classification code contained in the township level administrative area division name as the retrieval result corresponding to the address information may include counting the number of each urban and rural classification code contained in the township level administrative area division name and the number of all urban and rural classification codes contained in the township level administrative area division name to obtain the probability of the urban and rural type corresponding to the address information as the retrieval result corresponding to the address information. Wherein, the probability of the urban and rural type comprises at least one of the probabilities of cities, towns and villages.
For example, if the township administrative district division name corresponding to the address information a includes 10 living commissions and 10 villages, the living commissions may be divided into city types, and the villages may be divided into rural types, the result of searching for the urban and rural types corresponding to the address information a may include a probability that the address information a belongs to a city of 50% and a probability that the address information a belongs to a rural area of 50%.
Therefore, when the retrieval information comprises the township administrative district division name, the method can carry out retrieval in the urban and rural classified information based on the township administrative district division name, and in response to the existence of the township administrative district division name in the urban and rural classified information, the urban and rural classification codes contained in the township administrative district division name are obtained, and then the probability of each urban and rural classification code contained in the township administrative district division name is obtained as the retrieval result corresponding to the address information.
In the method 2, when the search information includes the first coordinate information, as shown in fig. 4, the step S103 searches the town-country classification information based on the search information to obtain a search result of the town-country type corresponding to the address information, which may include:
s401, based on the first coordinate information, searching in the urban and rural classified information, and acquiring second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance.
The preset distance may be set according to actual conditions, for example, may be set to 1 km.
It can be understood that the second coordinate information having a distance less than or equal to the preset distance from the first coordinate information is obtained, that is, the second coordinate information closer to the first coordinate information is screened from the urban and rural classification information.
It is to be understood that the number of the second coordinate information may be one or more.
S402, acquiring the urban and rural classification code corresponding to the second coordinate information.
It is to be understood that, after the second coordinate information is obtained, the second coordinate information may be retrieved from the town category information based on the second coordinate information to obtain a town category code corresponding to the second coordinate information.
And S403, acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as a retrieval result corresponding to the address information.
It can be understood that, when the number of the second coordinate information is plural, each second coordinate information may correspond to one town and country classification code, and the plural second coordinate information may correspond to plural town and country classification codes.
Optionally, the obtaining of the probability of each urban and rural classification code corresponding to the second coordinate information may include, as the retrieval result corresponding to the address information, counting the number of each urban and rural classification code corresponding to the second coordinate information and the number of all urban and rural classification codes corresponding to the second coordinate information to obtain the probability of each urban and rural classification code corresponding to the second coordinate information, as the retrieval result corresponding to the address information.
For example, the second coordinate information corresponding to the address information a is 20, the 20 second coordinate information corresponds to 10 living commissions and 10 villages, the living commissions can be divided into city types, the villages can be divided into rural types, and the retrieval result of the urban and rural type corresponding to the address information a may include a probability that the address information a belongs to the city of 50% and a probability that the address information a belongs to the rural area of 50%.
Therefore, when the retrieval information comprises the first coordinate information, based on the first coordinate information, retrieving in the urban and rural classified information, acquiring second coordinate information with the distance between the second coordinate information and the first coordinate information being smaller than or equal to a preset distance, acquiring urban and rural classified codes corresponding to the second coordinate information, and acquiring the probability of each type of urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
In the method 3, when the retrieval information includes the township-level administrative district division name and the first coordinate information, as shown in fig. 5, in step S103, based on the retrieval information, the retrieving is performed in the town and country classification information to obtain a retrieval result of the town and country type corresponding to the address information, which may include:
and S501, searching in the urban and rural classified information based on the township administrative district division names.
For the related content of step S501, refer to the above embodiments, and the description is omitted here.
And S502, in response to the fact that no township level administrative area division name exists in the urban and rural classified information, retrieving the urban and rural classified information based on the first coordinate information, and acquiring second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance.
In the embodiment of the application, if the retrieval information includes the township administrative district division name and the first coordinate information, the retrieval can be performed in the urban and rural classified information based on the township administrative district division name.
When the township classification information includes the township-level administrative division name, the steps S301 to S302 in the above embodiment may be referred to for obtaining the relevant content of the retrieval result of the township type corresponding to the address information, which is not described herein again.
When the township administrative district division name does not exist in the urban and rural classified information, then based on the first coordinate information, retrieval is carried out in the urban and rural classified information, and second coordinate information, of which the distance from the first coordinate information is smaller than or equal to a preset distance, is obtained.
It can be understood that, in the present application, when the township classification information does not include the township level administrative area division name, the retrieval result of the township type corresponding to the address information may be obtained based on the first coordinate information.
And S503, acquiring the urban and rural classification code corresponding to the second coordinate information.
And S504, acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as a retrieval result corresponding to the address information.
The relevant contents of step S503 to step S504 can be referred to the above embodiments, and are not described herein again.
Therefore, when the retrieval information comprises the township level administrative area division name and the first coordinate information, the method can be used for retrieving in the urban and rural classified information based on the township level administrative area division name, and in response to the fact that the township level administrative area division name does not exist in the urban and rural classified information, the method can be used for retrieving in the urban and rural classified information based on the first coordinate information, obtaining second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance, obtaining an urban and rural classification code corresponding to the second coordinate information, and obtaining the probability of each type of urban and rural classification code corresponding to the second coordinate information to serve as a retrieval result corresponding to the address information.
Fig. 6 is a block diagram of an apparatus for retrieving an address type according to a first embodiment of the present application.
As shown in fig. 6, an apparatus 600 for retrieving address types according to an embodiment of the present application includes: a first obtaining module 601, a parsing module 602, and a retrieving module 603.
A first obtaining module 601, configured to obtain an address query request, where the address query request includes address information to be queried;
the analyzing module 602 is configured to analyze the address information to obtain retrieval information corresponding to the address information;
the retrieval module 603 is configured to perform retrieval in the urban and rural classified information based on the retrieval information to obtain a retrieval result of the urban and rural type corresponding to the address information.
To sum up, the apparatus for retrieving address types in the embodiments of the present application obtains an address query request, where the address query request includes address information to be queried, analyzes the address information to obtain retrieval information corresponding to the address information, and then retrieves, based on the retrieval information, from the urban and rural classified information to obtain an urban and rural type retrieval result corresponding to the address information. Therefore, the retrieval result of the corresponding urban and rural type can be automatically acquired according to the address information, and compared with the urban and rural type in which the address is acquired manually mostly in the related art, the method and the device are high in accuracy, short in time consumption and low in labor cost.
Fig. 7 is a block diagram of an apparatus for retrieving address types according to a second embodiment of the present application.
As shown in fig. 7, an apparatus 700 for retrieving address types according to an embodiment of the present application includes: a first obtaining module 701, an analyzing module 702, a retrieving module 703 and a second obtaining module 704.
The first obtaining module 701 and the first obtaining module 601 have the same function and structure.
In an embodiment of the present application, the parsing module 702 includes: an analyzing unit 7021, configured to perform address analysis on the address information to obtain a township administrative area division name corresponding to the address information; a first obtaining unit 7022, configured to obtain first coordinate information corresponding to the address information; wherein the retrieval information includes the township-level administrative district division name and/or the first coordinate information.
In an embodiment of the present application, the parsing unit 7021 is specifically configured to: performing address analysis on the address information, and determining each level of administrative region division information corresponding to the address information; and acquiring the division names of the township administrative districts from the division information of the administrative districts at all levels.
In one embodiment of the present application, the second obtaining module 704 includes: a second obtaining unit 7041, configured to obtain national urban and rural category codes, and an urban and rural name and second coordinate information included in each urban and rural category code; a generating unit 7042, configured to generate the urban and rural classification information by using the urban and rural classification codes and the urban and rural names and the second coordinate information included in the urban and rural classification codes.
In an embodiment of the application, the retrieval information includes the country level administrative district division name, and the retrieval module 703 is specifically configured to: retrieving in the urban and rural classified information based on the township administrative district division names, and acquiring urban and rural classification codes contained in the township administrative district division names in response to the existence of the township administrative district division names in the urban and rural classified information; and acquiring the probability of each urban and rural classification code contained in the township administrative district division name as the retrieval result corresponding to the address information.
In an embodiment of the present application, the search information includes the first coordinate information, and the search module 703 is specifically configured to: retrieving in the urban and rural classified information based on the first coordinate information, and acquiring second coordinate information of which the distance from the first coordinate information is smaller than or equal to a preset distance; acquiring a town and country classification code corresponding to the second coordinate information; and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
In an embodiment of the application, the retrieval information includes the township administrative district division name and the first coordinate information, and the retrieval module 703 is specifically configured to: retrieving in the urban and rural classified information based on the township administrative district division name; in response to the fact that the township classification information does not contain the township level administrative area division name, retrieving in the township classification information based on the first coordinate information, and acquiring second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance; acquiring a town and country classification code corresponding to the second coordinate information; and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
In an embodiment of the present application, the second obtaining module 704 is further configured to: and carrying out space division on the urban and rural classified information based on the Kd tree algorithm and the second coordinate information so as to construct an urban and rural classified index library of the urban and rural classified information.
To sum up, the apparatus for retrieving address types in the embodiments of the present application obtains an address query request, where the address query request includes address information to be queried, analyzes the address information to obtain retrieval information corresponding to the address information, and then retrieves, based on the retrieval information, from the urban and rural classified information to obtain an urban and rural type retrieval result corresponding to the address information. Therefore, the retrieval result of the corresponding urban and rural type can be automatically acquired according to the address information, and compared with the urban and rural type in which the address is acquired manually mostly in the related art, the method and the device are high in accuracy, short in time consumption and low in labor cost.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a readable storage medium, and a computer program product.
Fig. 8 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as smart voice interaction devices, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 8, the electronic apparatus includes: one or more processors 801, memory 802, and interfaces for connecting the various components, including a high speed interface and a low speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor 801 may process instructions for execution within the electronic device, including instructions stored in or on a memory to display graphical information of a GUI on an external input/output device (such as a display device coupled to an interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 8 illustrates an example of a processor 801.
The memory 802 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of retrieving address types provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of retrieving address types provided herein.
The memory 802, as a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for retrieving address types in the embodiments of the present application (for example, the first obtaining module 601, the parsing module 602, and the retrieving module 603 shown in fig. 6). The processor 801 executes various functional applications of the server and data processing, i.e., implements the method of retrieving address types in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 802.
The memory 802 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the method of retrieving the address type, and the like. Further, the memory 802 may include high speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 802 optionally includes memory located remotely from the processor 801, which may be connected over a network to the electronics of the method of retrieving address types. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of retrieving an address type may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803, and the output device 804 may be connected by a bus or other means, and are exemplified by a bus in fig. 8.
The input device 803 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus for the method of retrieving the address type, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 804 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to an embodiment of the present application, there is also provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method for retrieving address types according to the above-mentioned embodiment of the present application.
According to the technical scheme of the embodiment of the application, the address query request is obtained, wherein the address query request comprises address information to be queried, the address information is analyzed to obtain retrieval information corresponding to the address information, and then based on the retrieval information, retrieval is carried out in urban and rural classified information to obtain an urban and rural type retrieval result corresponding to the address information. Therefore, the retrieval result of the corresponding urban and rural type can be automatically acquired according to the address information, and compared with the urban and rural type in which the address is acquired manually mostly in the related art, the method and the device are high in accuracy, short in time consumption and low in labor cost.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (19)

1. A method of retrieving an address type, comprising:
acquiring an address query request, wherein the address query request comprises address information to be queried;
analyzing the address information to obtain retrieval information corresponding to the address information;
and searching in the urban and rural classified information based on the search information to obtain the urban and rural type search result corresponding to the address information.
2. The method for retrieving the address type according to claim 1, wherein the parsing the address information to obtain the retrieval information corresponding to the address information comprises:
performing address resolution on the address information to obtain a township administrative district division name corresponding to the address information;
acquiring first coordinate information corresponding to the address information;
wherein the retrieval information includes the township-level administrative district division name and/or the first coordinate information.
3. The method for retrieving the address type according to claim 2, wherein the performing address resolution on the address information to obtain the township administrative district division name corresponding to the address information includes:
performing address analysis on the address information, and determining each level of administrative region division information corresponding to the address information;
and acquiring the division names of the township administrative districts from the division information of the administrative districts at all levels.
4. The method for retrieving address types as claimed in claim 2, wherein the obtaining the address query request is preceded by:
acquiring national urban and rural classification codes, and urban and rural names and second coordinate information included by each urban and rural classification code;
and generating the urban and rural classified information by utilizing the urban and rural classified codes and the urban and rural names and second coordinate information included by the urban and rural classified codes.
5. The method for retrieving address types according to claim 4, wherein the retrieval information includes the township-level administrative division names, and the retrieving in the urban and rural classification information based on the retrieval information to obtain the retrieval result of the urban and rural type corresponding to the address information includes:
retrieving in the urban and rural classified information based on the township administrative district division names, and acquiring urban and rural classification codes contained in the township administrative district division names in response to the existence of the township administrative district division names in the urban and rural classified information;
and acquiring the probability of each urban and rural classification code contained in the township administrative district division name as the retrieval result corresponding to the address information.
6. The method for retrieving address types according to claim 4, wherein the retrieval information includes the first coordinate information, and the retrieving in the urban and rural classification information based on the retrieval information to obtain the retrieval result of the urban and rural type corresponding to the address information includes:
retrieving in the urban and rural classified information based on the first coordinate information, and acquiring second coordinate information of which the distance from the first coordinate information is smaller than or equal to a preset distance;
acquiring a town and country classification code corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
7. The method for retrieving address types according to claim 4, wherein the retrieval information includes the township-level administrative division name and the first coordinate information, and the retrieving is performed in the urban and rural classification information based on the retrieval information to obtain the retrieval result of the urban and rural type corresponding to the address information, including:
retrieving in the urban and rural classified information based on the township administrative district division name;
in response to the fact that the township classification information does not contain the township level administrative area division name, retrieving in the township classification information based on the first coordinate information, and acquiring second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance;
acquiring a town and country classification code corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
8. The method of retrieving an address type according to any of claims 4-7, wherein the method further comprises:
and carrying out space division on the urban and rural classified information based on the Kd tree algorithm and the second coordinate information so as to construct an urban and rural classified index library of the urban and rural classified information.
9. An apparatus for retrieving an address type, comprising:
the device comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring an address query request, and the address query request comprises address information to be queried;
the analysis module is used for analyzing the address information to acquire retrieval information corresponding to the address information;
and the retrieval module is used for retrieving in the urban and rural classified information based on the retrieval information so as to obtain the retrieval result of the urban and rural type corresponding to the address information.
10. The apparatus for retrieving address types as claimed in claim 9, wherein the parsing module comprises:
the analyzing unit is used for carrying out address analysis on the address information and acquiring the township administrative area division name corresponding to the address information;
the first acquisition unit is used for acquiring first coordinate information corresponding to the address information;
wherein the retrieval information includes the township-level administrative district division name and/or the first coordinate information.
11. The apparatus for retrieving an address type according to claim 10, wherein the parsing unit is specifically configured to:
performing address analysis on the address information, and determining each level of administrative region division information corresponding to the address information;
and acquiring the division names of the township administrative districts from the division information of the administrative districts at all levels.
12. The apparatus for retrieving an address type of claim 10, wherein the apparatus further comprises: a second acquisition module comprising:
the second acquisition unit is used for acquiring national urban and rural classification codes and urban and rural names and second coordinate information included by each urban and rural classification code;
and the generating unit is used for generating the urban and rural classified information by utilizing the urban and rural classified codes and the urban and rural names and the second coordinate information included by the urban and rural classified codes.
13. The apparatus for retrieving an address type according to claim 12, wherein the retrieval information includes the township administrative district division name, and the retrieval module is specifically configured to:
retrieving in the urban and rural classified information based on the township administrative district division names, and acquiring urban and rural classification codes contained in the township administrative district division names in response to the existence of the township administrative district division names in the urban and rural classified information;
and acquiring the probability of each urban and rural classification code contained in the township administrative district division name as the retrieval result corresponding to the address information.
14. The apparatus for retrieving an address type according to claim 12, wherein the retrieval information includes the first coordinate information, and the retrieval module is specifically configured to:
retrieving in the urban and rural classified information based on the first coordinate information, and acquiring second coordinate information of which the distance from the first coordinate information is smaller than or equal to a preset distance;
acquiring a town and country classification code corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
15. The apparatus for retrieving an address type according to claim 12, wherein the retrieval information includes the township administrative district division name and the first coordinate information, and the retrieval module is specifically configured to:
retrieving in the urban and rural classified information based on the township administrative district division name;
in response to the fact that the township classification information does not contain the township level administrative area division name, retrieving in the township classification information based on the first coordinate information, and acquiring second coordinate information, wherein the distance between the second coordinate information and the first coordinate information is smaller than or equal to a preset distance;
acquiring a town and country classification code corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classified code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
16. The apparatus for retrieving an address type as claimed in any one of claims 12-15, wherein the second obtaining module is further configured to:
and carrying out space division on the urban and rural classified information based on the Kd tree algorithm and the second coordinate information so as to construct an urban and rural classified index library of the urban and rural classified information.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of retrieving an address type of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of retrieving an address type of any one of claims 1-8.
19. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the method of retrieving an address type of any one of claims 1-8.
CN202011451676.4A 2020-12-09 2020-12-09 Method and device for retrieving address type and electronic equipment Active CN112559661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011451676.4A CN112559661B (en) 2020-12-09 2020-12-09 Method and device for retrieving address type and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011451676.4A CN112559661B (en) 2020-12-09 2020-12-09 Method and device for retrieving address type and electronic equipment

Publications (2)

Publication Number Publication Date
CN112559661A true CN112559661A (en) 2021-03-26
CN112559661B CN112559661B (en) 2024-03-01

Family

ID=75061815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011451676.4A Active CN112559661B (en) 2020-12-09 2020-12-09 Method and device for retrieving address type and electronic equipment

Country Status (1)

Country Link
CN (1) CN112559661B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100023425A1 (en) * 2008-07-25 2010-01-28 Vizio, Inc System, Method and Apparatus for Geographical Restriction of Offers for Sale
TW201346855A (en) * 2012-05-04 2013-11-16 Summit Education Assessment Technologies Corp Operation method of examination learning platform
CN107688891A (en) * 2017-07-28 2018-02-13 平安科技(深圳)有限公司 Administrative division verification method, device, server and storage medium
CN110569322A (en) * 2019-07-26 2019-12-13 苏宁云计算有限公司 Address information analysis method, device and system and data acquisition method
CN111159974A (en) * 2019-12-30 2020-05-15 北京明略软件系统有限公司 Address information standardization method and device, storage medium and electronic equipment
CN111914557A (en) * 2020-07-31 2020-11-10 上海燕汐软件信息科技有限公司 Address resolution method, device, equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100023425A1 (en) * 2008-07-25 2010-01-28 Vizio, Inc System, Method and Apparatus for Geographical Restriction of Offers for Sale
TW201346855A (en) * 2012-05-04 2013-11-16 Summit Education Assessment Technologies Corp Operation method of examination learning platform
CN107688891A (en) * 2017-07-28 2018-02-13 平安科技(深圳)有限公司 Administrative division verification method, device, server and storage medium
CN110569322A (en) * 2019-07-26 2019-12-13 苏宁云计算有限公司 Address information analysis method, device and system and data acquisition method
CN111159974A (en) * 2019-12-30 2020-05-15 北京明略软件系统有限公司 Address information standardization method and device, storage medium and electronic equipment
CN111914557A (en) * 2020-07-31 2020-11-10 上海燕汐软件信息科技有限公司 Address resolution method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112559661B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
KR102557613B1 (en) Query method, apparatus, electronic device and storage medium
CN104462113A (en) Search method and device and electronic equipment
CN111782977A (en) Interest point processing method, device, equipment and computer readable storage medium
CN112269789A (en) Method and device for storing data and method and device for reading data
US20210209160A1 (en) Method and apparatus for identifying map region words
CN110569370A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN111767477A (en) Retrieval method, retrieval device, electronic equipment and storage medium
EP3822818A1 (en) Method, apparatus, device and storage medium for intelligent response
CN107506399B (en) Method, system, device and storage medium for fast segmentation of data unit
CN112559661B (en) Method and device for retrieving address type and electronic equipment
US20220188292A1 (en) Data processing method, apparatus, electronic device and readable storage medium
CN111401051B (en) Express information analysis method and system
CN110474905B (en) Entity identification method and device, electronic equipment and storage medium
CN112328653A (en) Data identification method and device, electronic equipment and storage medium
CN113656731A (en) Advertisement page processing method and device, electronic equipment and storage medium
CN113722580A (en) Address information processing method and device, electronic equipment and computer readable medium
CN112231336A (en) Method, device, storage medium and electronic equipment for identifying user
CN112507249A (en) Method and device for generating interest points, electronic equipment and storage medium
CN113255398A (en) Interest point duplicate determination method, device, equipment and storage medium
EP4187431A1 (en) Address identification method and apparatus, electronic device, and storage medium
CN111966768B (en) Address description method, address description device, electronic equipment and storage medium
CN113761909B (en) Address identification method and device
US11683656B2 (en) Recommendation of region of interest
CN111767478B (en) Association relation construction method, device, equipment and storage medium
CN112860813B (en) Method and device for retrieving information

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
GR01 Patent grant
GR01 Patent grant