CN112559661B - 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
CN112559661B
CN112559661B CN202011451676.4A CN202011451676A CN112559661B CN 112559661 B CN112559661 B CN 112559661B CN 202011451676 A CN202011451676 A CN 202011451676A CN 112559661 B CN112559661 B CN 112559661B
Authority
CN
China
Prior art keywords
information
urban
rural
address
village
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.)
Active
Application number
CN202011451676.4A
Other languages
Chinese (zh)
Other versions
CN112559661A (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

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

Abstract

The application discloses a method, a device and electronic equipment for retrieving address types, 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 classification information based on the search information to obtain an 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 retrieve the retrieval information 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, and can automatically obtain the retrieval result of the corresponding urban and rural type according to the address information.

Description

Method and device for retrieving address type and electronic equipment
Technical Field
The present application relates to the field of data processing, cloud computing, cloud platform, and intelligent transportation technologies in the field of computer technologies, 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, urban and rural classification information of addresses is very important for risk assessment and refined operation of enterprises. However, in the related art, urban and rural classification information of addresses is mostly obtained manually, and urban and rural type results are very dependent on subjective consciousness of a judgment person, so that accuracy of the results is low, time consumption is long, and labor cost is high.
Disclosure of Invention
A method, apparatus, electronic device, storage medium, and computer program product are provided for retrieving an address type.
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 classification information based on the search information to obtain an 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 first acquisition module is used for acquiring an address inquiry request, wherein the address inquiry request comprises address information to be inquired; the analysis module is used for analyzing the address information to obtain retrieval information corresponding to the address information; and the retrieval module is used for retrieving in the urban and rural classification information based on the retrieval information so as to obtain a 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 as described in the first aspect of the present application.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a 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, there is provided 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 as described in the first aspect of the present application.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is a flow diagram of a method of retrieving address types according to a first embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for retrieving an address type according to a second embodiment of the present application prior to obtaining an address query request;
fig. 3 is a flowchart of a method for retrieving an address type according to a third embodiment of the present application to obtain a retrieval result of an urban and rural type corresponding to address information;
fig. 4 is a flowchart of a method for retrieving an address type according to a fourth embodiment of the present application to obtain a retrieval result of an urban and rural type corresponding to address information;
fig. 5 is a flowchart of a method for retrieving an address type according to a fifth embodiment of the present application to obtain a retrieval result of an urban and rural type corresponding to address information;
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 an address type according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, processing, transformation, and transmission of Data, the primary purpose of which is to extract and derive Data that is valuable and meaningful to some particular person from a large, possibly unorganized, unintelligible amount of Data.
Cloud Computing (Cloud Computing) is one type of distributed Computing, and refers to decomposing a huge data Computing process program into numerous small programs through a network 'Cloud', then processing and analyzing the small programs through a system formed by a plurality of servers to obtain results, and returning the results to a user, so that processing of tens of thousands of data can be completed in a short time (a few seconds), and a powerful network service can be achieved.
The cloud 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 classes: a storage type cloud platform mainly used for data storage, a computing type cloud platform mainly used for data processing and a comprehensive cloud computing platform taking both computing and data storage processing into consideration.
The 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 connection among vehicles, roads and users, thereby ensuring safety, improving efficiency, improving environment and saving energy.
Fig. 1 is a flow chart of a method of retrieving an address type according to a first embodiment of the present application.
As shown in fig. 1, the method for retrieving an address type according to the first embodiment of the present application includes:
s101, acquiring an address query request, wherein the address query request comprises address information to be queried.
It should be noted that, the execution body of the address type retrieving method according to the embodiments 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 comprises, but is not limited to, a mobile phone, a computer, intelligent voice interaction equipment, intelligent household appliances, vehicle-mounted terminals and the like.
In the embodiment of the present application, taking the execution body as a cloud platform as an example, a method for retrieving an address type is described.
It can be understood that when an enterprise or a person wants to acquire a retrieval result of the urban and rural type corresponding to the address information, an address query request can be sent to the cloud platform, and the address query request includes the address information to be queried. 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 a user needs to fill in logistics information, the user needs to fill in an issue address and a receiving address, so that a logistics company can use the issue address and the receiving address as address information to be queried, generate an address query request according to the issue 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 "office building in city in certain province", the system can also be a 'cell in a city', a 'village in a city in a province', and the like.
S102, analyzing the address information to obtain retrieval information corresponding to the address information.
In the embodiment of the application, the type of the search information corresponding to the address information may be one or more, and each address information may correspond to one or more search information.
Optionally, the retrieval information includes, but is not limited to, a village-level administrative division name, first coordinate information, and the like.
The village-town level administrative division includes streets, towns, villages, nations, sappan wood, nations sappan wood, county jurisdictions, according to the regulations of the administrative division. It will be appreciated that the town level administrative division may also include other forms, such as, for example, a living commission, village, etc., without undue limitation.
The first coordinate information is coordinate information corresponding to the address information, including, but not limited to, latitude and longitude information corresponding to the address information.
And S103, searching in the urban and rural classification information based on the search information to obtain an urban and rural type search result corresponding to the address information.
In the embodiment of the application, urban and rural classification information can comprise three types of cities, towns and rural areas, and administrative division names and/or second coordinate information of each type. For example, city types may include Nanjing, nanjing Xuanwu, beijing lake regions, and the like.
Alternatively, the urban and rural classification information can be set according to actual conditions. For example, urban and rural classification information may be set according to regulations concerning administrative division and urban and rural classification.
In an embodiment of the present application, the search result may include a probability of an urban and rural type to which the address information corresponds. Wherein the urban and rural type probabilities comprise at least one of urban, rural and rural probabilities. For example, the retrieval result of the urban and rural type corresponding to the address information a may include 20% of the probability that the address information a belongs to the city, 50% of the probability that the address information a belongs to the town, and 30% of the probability that the address information a belongs to the rural area.
In summary, according to the method for searching the address type in the embodiment of the application, an address query request is acquired, wherein the address query request includes address information to be queried, the address information is analyzed to acquire search information corresponding to the address information, and then searching is performed in urban and rural classification information based on the search information to acquire a search result of the urban and rural type corresponding to the address information. Therefore, the method and the device can automatically acquire the corresponding urban and rural type search results according to the address information, and compared with the urban and rural type search results which are mostly acquired manually in the related technology, the method and the device are higher in accuracy, shorter in time consumption and lower in labor cost.
On the basis of any of the above embodiments, the search information may include a village-town administrative division name and/or first coordinate information, and the analyzing the address information in step S102 to obtain the search information corresponding to the address information may include two possible implementations as follows:
and in the mode 1, address analysis is carried out on the address information so as to obtain the village and town administrative division names corresponding to the address information.
Optionally, address resolution is performed on the address information to obtain a village-town administrative division name corresponding to the address information, which may include address resolution is performed on the address information, determining each level of administrative division information corresponding to the address information, and obtaining the village-town administrative division name from each level of administrative division information.
For example, the address information may be subjected to word segmentation processing to obtain each level of administrative division names corresponding to the address information, and semantic extraction may be performed on each level of administrative division names to extract village-town level administrative division names from each level of administrative division names.
For example, the address information a may be a word-cutting process may be performed on the address information a "the Wu Oumou street of the south-Beijing city of Jiangsu province", the word-cutting process result is "the Wu Oumou street of the south-Beijing city of Jiangsu province", wherein Jiangsu province is a provincial administrative district division name, the south-Beijing city is a regional administrative division name, the Xuanwu district is a county administrative division name, a certain street is a village administrative division name, and then the semantic extraction may be performed on the word-cutting process result "the Wu Oumou street of the south-Beijing city of Jiangsu province", so as to obtain the village administrative division name corresponding to the address information a as a certain street.
Mode 2, first coordinate information corresponding to the address information is acquired.
Optionally, a mapping relation or mapping table between the address information and the first coordinate information may be pre-established, and after the address information is obtained, the mapping relation or 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 resolution on the address information to acquire the village and town administrative division names corresponding to the address information or acquire the first coordinate information corresponding to the address information so as to acquire the retrieval information.
On the basis of any of the above embodiments, as shown in fig. 2, before the address query request is acquired 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 application, the national urban and rural classification codes refer to all urban and rural classification codes in the national range.
Alternatively, the national urban and rural classification code may be obtained according to the specifications of the relevant urban and rural classification code. For example, the national urban and rural classification codes may be acquired according to the regulations of the national statistical bureau regarding the urban and rural classification codes.
For example, the urban and rural classification codes may be set with reference to table 1.
TABLE 1 urban and rural Classification code
It may be understood that each urban and rural classification code may include one or more urban and rural names, and the urban and rural names included in each urban and rural classification code and the second coordinate information corresponding to each urban and rural name may be obtained.
S202, urban and rural classification information is generated by utilizing 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.
Alternatively, the urban and rural classification code, the urban and rural names and the second coordinate information included in the urban and rural classification code may be utilized to establish a mapping relation or a mapping table between the urban and rural classification code, the urban and rural names and the second coordinate information, and the mapping relation or the mapping table is used as the urban and rural classification information.
It can be understood that, because the number of urban and rural classification codes is large in the whole country, the generated urban and rural classification information has a large scale, so that the urban and rural classification information can be spatially divided based on a Kd-Tree (Kd-Tree) algorithm and second coordinate information to construct an urban and rural classification index library of the urban and rural classification information, millisecond-level query and search can be realized, the speed of querying and searching the urban and rural classification information can be effectively improved, and the time consumption of querying and searching is reduced.
Therefore, the method can generate urban and rural classification information according to the national urban and rural classification codes, and the urban and rural names and the second coordinate information included in each urban and rural classification 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 searching in the urban and rural classification information based on the searching information in step S103 to obtain the searching result of the urban and rural type corresponding to the address information may include the following three possible embodiments:
In mode 1, when the search information includes a village-town administrative division name, as shown in fig. 3, in step S103, based on the search information, searching is performed in the urban and rural classification information to obtain a search result of an urban and rural type corresponding to the address information, which may include:
s301, searching in urban and rural classification information based on the village and town administrative division names, and acquiring urban and rural classification codes contained in the village and town administrative division names in response to the village and town administrative division names in the urban and rural classification information.
In the embodiment of the present application, if the search information includes a village-level administrative division name, the search may be performed in the town-level administrative division information based on the village-level administrative division name.
It will be appreciated that the administrative division may vary and that the urban and rural classification information may not fully cover all of the current rural class division. The village-town administrative division name may or may not exist in the town classification information when the retrieval is performed in the town classification information based on the village-town administrative division name.
When the urban and rural classification information contains the urban and rural classification names, the urban and rural classification codes contained in the urban and rural classification names can be acquired in response to the existence of the urban and rural classification names.
S302, obtaining the probability of each urban and rural classification code contained in the urban and rural level administrative division names as a retrieval result corresponding to the address information.
It will be appreciated that the town level administrative division may include one or more categories of country classification codes.
Optionally, the obtaining of the probability of each urban and rural classification code contained in the urban and rural classification 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 urban and rural classification name and the number of all urban and rural classification codes contained in the urban and rural classification name, so as 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 urban and rural type probabilities comprise at least one of urban, rural and rural probabilities.
For example, the country-level administrative division name corresponding to the address information a includes 10 residents and 10 villages, the residents may be divided into city types, and the villages may be divided into rural types, and then the retrieval result of the city-country type corresponding to the address information a may include 50% of the probability that the address information a belongs to the city and 50% of the probability that the address information a belongs to the country.
Therefore, when the search information comprises the village-town administrative division names, the method can search in the urban and rural classification information based on the village-town administrative division names, and the urban and rural classification codes contained in the village-town administrative division names are acquired in response to the existence of the village-town administrative division names in the urban and rural classification information, and then the probability of each urban and rural classification code contained in the village-town administrative division names is acquired as a search result corresponding to the address information.
In mode 2, when the search information includes the first coordinate information, as shown in fig. 4, in step S103, searching is performed 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, which may include:
s401, searching in urban and rural classification information based on the first coordinate information, and acquiring second coordinate information with the distance from the first coordinate information being smaller than or equal to a preset distance.
The preset distance may be set according to practical situations, for example, may be set to 1 km.
It can be understood that the second coordinate information with the distance from the first coordinate information being smaller than or equal to the preset distance is obtained, that is, the second coordinate information with the closer distance from the first coordinate information is screened out from the urban and rural classification information.
It is understood that the number of second coordinate information may be one or more.
S402, acquiring urban and rural classification codes corresponding to the second coordinate information.
It can be understood that after the second coordinate information is acquired, the second coordinate information can be based on the second coordinate information to search in the urban and rural classification information so as to acquire the urban and rural classification code corresponding to the second coordinate information.
S403, obtaining the probability of each urban and rural classification code corresponding to the second coordinate information, and taking the probability as a retrieval result corresponding to the address information.
It may be understood that when the number of the second coordinate information is plural, each of the second coordinate information may correspond to one urban and rural classification code, and then the plural second coordinate information may correspond to the plural urban and rural classification codes.
Optionally, the probability of each urban and rural classification code corresponding to the second coordinate information is obtained and used as a search result corresponding to the address information, and 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 are counted to obtain the probability of each urban and rural classification code corresponding to the second coordinate information and used as a search 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 residents and 10 villages, the residents can be divided into city types, and the villages can be divided into rural types, and then the retrieval result of the urban and rural types corresponding to the address information a can include that the probability that the address information a belongs to the city is 50%, and the probability that the address information a belongs to the rural is 50%.
When the search information comprises first coordinate information, the method searches in urban and rural classification information based on the first coordinate information, acquires second coordinate information with a distance smaller than or equal to a preset distance between the first coordinate information, acquires urban and rural classification codes corresponding to the second coordinate information, and acquires the probability of each urban and rural classification code corresponding to the second coordinate information as a search result corresponding to the address information.
In the mode 3, when the search information includes the division name and the first coordinate information of the town administrative area, as shown in fig. 5, the searching in the town and country classification information based on the search information in step S103 to obtain the search result of the town and country type corresponding to the address information may include:
s501, searching in urban and rural classification information based on the classification names of the urban and rural administrative areas.
The relevant content of step S501 may be referred to the above embodiments, and will not be described herein.
S502, searching in the urban and rural classification information based on the first coordinate information in response to that the urban and rural classification information does not have the urban and rural classification name, and acquiring second coordinate information with the distance from the first coordinate information being smaller than or equal to the preset distance.
In the embodiment of the present application, if the search information includes a village-town administrative division name and first coordinate information, the search may be performed in the urban and rural classification information based on the village-town administrative division name.
When the urban and rural classification information includes the urban and rural administrative division name, the relevant content of the retrieval result of the urban and rural type corresponding to the address information may be referred to steps S301-S302 in the above embodiment, which is not described herein again.
When the village-town administrative division name does not exist in the urban and rural classified information, the village-town administrative division name can be responded to the fact that the village-town administrative division name does not exist in the urban and rural classified information, and then the second coordinate information with the distance smaller than or equal to the preset distance is obtained by searching in the urban and rural classified information based on the first coordinate information.
It can be understood that in the present application, when the town-level administrative division name does not exist in the town-level administrative division information, the retrieval result of the town type corresponding to the acquired address information may be acquired based on the first coordinate information.
S503, acquiring urban and rural classification codes corresponding to the second coordinate information.
S504, obtaining the probability of each urban and rural classification code corresponding to the second coordinate information as a retrieval result corresponding to the address information.
The relevant content of step S503 to step S504 can be referred to the above embodiment, and will not be described here again.
Therefore, when the search information comprises the village-town administrative division names and the first coordinate information, the method can search in the village-town classification information based on the village-town administrative division names, and the second coordinate information, of which the distance between the first coordinate information and the second coordinate information is smaller than or equal to the preset distance, is obtained in the village-town classification information based on the first coordinate information in response to the fact that the village-town administrative division names do not exist in the village-town classification information, the probability of each village-town classification code corresponding to the second coordinate information is obtained as a search 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 an address type according to an embodiment of the present application includes: a first acquisition 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 parsing module 602 is configured to parse the address information to obtain retrieval information corresponding to the address information;
and the retrieving module 603 is configured to perform a retrieval in the urban and rural classification information based on the retrieval information, so as to obtain a retrieval result of the urban and rural type corresponding to the address information.
In summary, the device for searching the address type acquires an address query request, where the address query request includes address information to be queried, analyzes the address information to acquire search information corresponding to the address information, and then searches in urban and rural classification information based on the search information to acquire a retrieval result of the urban and rural type corresponding to the address information. Therefore, the method and the device can automatically acquire the corresponding urban and rural type search results according to the address information, and compared with the urban and rural type search results which are mostly acquired manually in the related technology, the method and the device are higher in accuracy, shorter in time consumption and lower in labor cost.
Fig. 7 is a block diagram of an apparatus for retrieving an address type according to a second embodiment of the present application.
As shown in fig. 7, an apparatus 700 for retrieving an address type according to an embodiment of the present application includes: a first acquisition module 701, a parsing module 702, a retrieving module 703 and a second acquisition module 704.
Wherein the first acquisition module 701 has the same function and structure as the first acquisition module 601.
In one embodiment of the present application, the parsing module 702 includes: the resolving unit 7021 is used for performing address resolution on the address information to obtain village and town administrative division names corresponding to the address information; a first acquiring unit 7022, configured to acquire first coordinate information corresponding to the address information; wherein the search information comprises the village-town administrative division name and/or the first coordinate information.
In one embodiment of the present application, the parsing unit 7021 is specifically configured to: address analysis is carried out on the address information, and each level of administrative division information corresponding to the address information is determined; and acquiring the village and town administrative division names from the administrative division information of each level.
In one embodiment of the present application, the second obtaining module 704 includes: a second acquisition unit 7041 that acquires country-wide country classification codes, and country-wide names and second coordinate information included in each of the country-wide classification codes; and a generating unit 7042, configured to generate the urban and rural classification information by using the urban and rural classification code, and the urban and rural name and the second coordinate information included in the urban and rural classification code.
In one embodiment of the present application, the search information includes the village-town administrative division name, and the search module 703 is specifically configured to: searching in the urban and rural classification information based on the village and town level administrative division names, and acquiring urban and rural classification codes contained in the village and town level administrative division names in response to the existence of the village and town level administrative division names in the urban and rural classification information; and acquiring the probability of each urban and rural classification code contained in the village and town administrative division name as the retrieval result corresponding to the address information.
In one 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 classification information based on the first coordinate information, and acquiring the second coordinate information with the distance from the first coordinate information being smaller than or equal to a preset distance; acquiring urban and rural classification codes corresponding to the second coordinate information; and acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
In one embodiment of the present application, the search information includes the village-town administrative division name and the first coordinate information, and the search module 703 is specifically configured to: searching in the urban and rural classification information based on the village and town level administrative division names; responding to the fact that the village-town administrative division names do not exist in the urban and rural classification information, searching in the urban and rural classification information based on the first coordinate information, and acquiring the 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 classification codes corresponding to the second coordinate information; and acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
In one embodiment of the present application, the second obtaining module 704 is further configured to: and based on a Kd tree algorithm and the second coordinate information, carrying out space division on the urban and rural classification information to construct an urban and rural classification index base of the urban and rural classification information.
In summary, the device for searching the address type acquires an address query request, where the address query request includes address information to be queried, analyzes the address information to acquire search information corresponding to the address information, and then searches in urban and rural classification information based on the search information to acquire a retrieval result of the urban and rural type corresponding to the address information. Therefore, the method and the device can automatically acquire the corresponding urban and rural type search results according to the address information, and compared with the urban and rural type search results which are mostly acquired manually in the related technology, the method and the device are higher in accuracy, shorter in time consumption and lower in labor cost.
According to embodiments of the present application, there is also provided an electronic device, a readable storage medium and a computer program product.
As shown in fig. 8, is a block diagram of an electronic device according to a method of retrieving an address type 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 apparatuses, such as smart voice interaction devices, personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 8, the electronic device includes: one or more processors 801, memory 802, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. 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 executing within the electronic device, including instructions stored in or on 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, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 801 is illustrated in fig. 8.
Memory 802 is a non-transitory computer-readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the methods 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 an address type provided by the present application.
The memory 802 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first acquisition module 601, the parsing module 602, and the retrieval module 603 shown in fig. 6) corresponding to a method for retrieving an address type in an embodiment of the present application. 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.
Memory 802 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device of the method of retrieving the address type, and the like. In addition, 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, memory 802 may optionally include memory located remotely from processor 801, which may be connected to the electronic device for retrieving address types via a network. 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, memory 802, input devices 803, and output devices 804 may be connected by a bus or other means, for example 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 device for retrieving address type methods, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. input devices. The output device 804 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration 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 may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates 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 of retrieving an address type described in the above embodiments 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 the retrieval is carried out in urban and rural classification information based on the retrieval information to obtain a retrieval result of the urban and rural type corresponding to the address information. Therefore, the method and the device can automatically acquire the corresponding urban and rural type search results according to the address information, and compared with the urban and rural type search results which are mostly acquired manually in the related technology, the method and the device are higher in accuracy, shorter in time consumption and lower in labor cost.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (10)

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;
searching in urban and rural classification information based on the search information to obtain an urban and rural type search result corresponding to the address information; wherein,
the analyzing the address information to obtain the search information corresponding to the address information includes:
address analysis is carried out on the address information, and village and town administrative division names corresponding to the address information are obtained;
acquiring first coordinate information corresponding to the address information;
wherein the search information comprises the village-town administrative division name and/or the first coordinate information;
The search information comprises the village-town administrative division names, and the searching is carried out in the urban and rural classification information based on the search information to obtain the search result of the urban and rural type corresponding to the address information, and the method comprises the following steps:
searching in the urban and rural classification information based on the village and town level administrative division names, and acquiring urban and rural classification codes contained in the village and town level administrative division names in response to the existence of the village and town level administrative division names in the urban and rural classification information;
acquiring the probability of each urban and rural classification code contained in the village and town administrative division name as the retrieval result corresponding to the address information; or,
the search information includes the first coordinate information, and the searching is performed in urban and rural classification information based on the search information to obtain a search result of an urban and rural type corresponding to the address information, including:
retrieving from the urban and rural classification information based on the first coordinate information, and acquiring second coordinate information with a distance smaller than or equal to a preset distance from the first coordinate information;
acquiring urban and rural classification codes corresponding to the second coordinate information;
acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information; or,
The search information comprises the village-town administrative division name and the first coordinate information, and the searching is performed in the urban and rural classification information based on the search information to obtain a search result of an urban and rural type corresponding to the address information, and the method comprises the following steps:
searching in the urban and rural classification information based on the village and town level administrative division names;
responding to the fact that the village-town administrative division names do not exist in the urban and rural classification information, searching in the urban and rural classification information based on the first coordinate information, and 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 classification codes corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
2. The method for retrieving an address type according to claim 1, wherein the address resolving the address information to obtain a village-level administrative division name corresponding to the address information includes:
address analysis is carried out on the address information, and each level of administrative division information corresponding to the address information is determined;
And acquiring the village and town administrative division names from the administrative division information of each level.
3. The method of retrieving an address type of claim 1, wherein prior to the obtaining an address query request, further comprising:
acquiring national urban and rural classification codes, and urban and rural names and second coordinate information contained in each urban and rural classification code;
and generating the urban and rural classification information by using the urban and rural classification code, and the urban and rural names and the second coordinate information included in the urban and rural classification code.
4. A method of retrieving an address type according to claim 3, wherein the method further comprises:
and based on a Kd tree algorithm and the second coordinate information, carrying out space division on the urban and rural classification information to construct an urban and rural classification index base of the urban and rural classification information.
5. An apparatus for retrieving an address type, comprising:
the first acquisition module is used for acquiring an address inquiry request, wherein the address inquiry request comprises address information to be inquired;
the analysis module is used for analyzing the address information to obtain retrieval information corresponding to the address information;
the retrieval module is used for retrieving in urban and rural classification information based on the retrieval information so as to obtain a retrieval result of the urban and rural type corresponding to the address information; wherein,
The parsing module comprises:
the analyzing unit is used for carrying out address analysis on the address information and obtaining the village-level administrative division names corresponding to the address information;
the first acquisition unit is used for acquiring first coordinate information corresponding to the address information;
wherein the search information comprises the village-town administrative division name and/or the first coordinate information;
the search information comprises the village-town administrative division names, and the search module is specifically used for:
searching in the urban and rural classification information based on the village and town level administrative division names, and acquiring urban and rural classification codes contained in the village and town level administrative division names in response to the existence of the village and town level administrative division names in the urban and rural classification information;
acquiring the probability of each urban and rural classification code contained in the village and town administrative division name as the retrieval result corresponding to the address information; or,
the search information comprises the first coordinate information, and the search module is specifically configured to:
retrieving from the urban and rural classification information based on the first coordinate information, and acquiring second coordinate information with a distance smaller than or equal to a preset distance from the first coordinate information;
Acquiring urban and rural classification codes corresponding to the second coordinate information;
acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information; or,
the search information comprises the village-town administrative division name and the first coordinate information, and the search module is specifically configured to:
searching in the urban and rural classification information based on the village and town level administrative division names;
responding to the fact that the village-town administrative division names do not exist in the urban and rural classification information, searching in the urban and rural classification information based on the first coordinate information, and 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 classification codes corresponding to the second coordinate information;
and acquiring the probability of each urban and rural classification code corresponding to the second coordinate information as the retrieval result corresponding to the address information.
6. The device for retrieving an address type according to claim 5, wherein the parsing unit is specifically configured to:
address analysis is carried out on the address information, and each level of administrative division information corresponding to the address information is determined;
And acquiring the village and town administrative division names from the administrative division information of each level.
7. The apparatus for retrieving an address type as in claim 5, wherein the apparatus further comprises: a second acquisition module comprising:
the second acquisition unit acquires national urban and rural classification codes, and urban and rural names and second coordinate information contained in each urban and rural classification code;
and the generation unit is used for generating the urban and rural classification information by utilizing the urban and rural classification code, and the urban and rural name and the second coordinate information included in the urban and rural classification code.
8. The apparatus for retrieving an address type of claim 7, wherein the second acquisition module is further configured to:
and based on a Kd tree algorithm and the second coordinate information, carrying out space division on the urban and rural classification information to construct an urban and rural classification index base of the urban and rural classification information.
9. 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 of any of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of retrieving an address type of any one of claims 1-4.
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 CN112559661A (en) 2021-03-26
CN112559661B true 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN112559661A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US20210224821A1 (en) Land usage property identification method, apparatus, electronic device and storage medium
JP2021166098A (en) Retrieval word recommendation method and apparatus, target model training method and apparatus, electronic device, storage medium, and program
CN108694221B (en) Data real-time analysis method, module, equipment and device
CN108509569A (en) Generation method, device, electronic equipment and the storage medium of enterprise's portrait
CN111488740B (en) Causal relationship judging method and device, electronic equipment and storage medium
CN111460289B (en) News information pushing method and device
KR102601545B1 (en) Geographic position point ranking method, ranking model training method and corresponding device
CN114372133A (en) Query information question answering method, related device and computer program product
CN111767477B (en) Retrieval method, retrieval device, electronic equipment and storage medium
CN112101013A (en) Location extraction method, device, equipment and storage medium
CN110569370B (en) Knowledge graph construction method and device, electronic equipment and storage medium
EP3822818A1 (en) Method, apparatus, device and storage medium for intelligent response
CN113722600A (en) Data query method, device, equipment and product applied to big data
CN112559661B (en) Method and device for retrieving address type and electronic equipment
CN111966768B (en) Address description method, address description device, electronic equipment and storage medium
CN112328653B (en) Data identification method, device, electronic equipment and storage medium
US20220188292A1 (en) Data processing method, apparatus, electronic device and readable storage medium
CN111401051B (en) Express information analysis method and system
CN113255398B (en) Point of interest weight judging method, device, equipment and storage medium
CN114638308A (en) Method and device for acquiring object relationship, electronic equipment and storage medium
CN110474905B (en) Entity identification method and device, electronic equipment and storage medium
US20230086429A1 (en) Method of recognizing address, electronic device and storage medium
CN111782834A (en) Image retrieval method, device, equipment and computer readable storage medium
CN111737398A (en) Method and device for searching sensitive words in text, electronic equipment and storage medium
CN113221025B (en) Point-of-interest recall method, device, equipment and medium

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