CN113656446A - Method and device for improving accuracy of geocoding - Google Patents
Method and device for improving accuracy of geocoding Download PDFInfo
- Publication number
- CN113656446A CN113656446A CN202111013122.0A CN202111013122A CN113656446A CN 113656446 A CN113656446 A CN 113656446A CN 202111013122 A CN202111013122 A CN 202111013122A CN 113656446 A CN113656446 A CN 113656446A
- Authority
- CN
- China
- Prior art keywords
- coordinates
- query
- returning
- address
- hit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 4
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a method and a device for improving accuracy of geocoding, wherein the method comprises the steps of obtaining a query request of a query address; obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning. The invention can comprehensively calculate the geocoding of a plurality of maps and obtain a result with higher accuracy.
Description
Technical Field
The invention belongs to the technical field of maps, and particularly relates to a method and a device for improving accuracy of geocoding.
Background
Geocoding is the process of identifying geographic coordinates from other geographic data, such as street addresses or zip codes. When the geographic coordinates of physical data points (e.g., home addresses) are known, various attributes of each data point may be displayed on a geographic map containing the data point. The geographical pattern display of the attribute may show regional variations of the attribute. Briefly, geocoding converts a textual description of an address into a coordinate in a coordinate system.
In the related art, due to the fact that the address input by the user is wrong, too late, inaccurate and the like, the geocoding result of many servers, such as a Baidu map/a Goodpasture map/Tencent map and the like, may be different from the expectation of the user, and the map service itself cannot detect the difference.
Disclosure of Invention
In view of the above, the present invention is to overcome the defects in the prior art, and provide a method and an apparatus for improving the accuracy of geocoding, so as to solve the problems of error, outdated and inaccuracy existing when a user inputs an address in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme: a method of improving geocoding accuracy, comprising:
acquiring a query request for querying an address;
obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
Further, the determining the number of coordinates obtained in the parallel call interface and determining the coordinates according to the number of coordinates includes:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
Further, the parallel call interface includes:
baidu maps, Gaode maps, Tencent maps, and address books.
Further, the cache server adopts a Redis server;
the correction library adopts a Mysql server;
the address book adopts a Mysql table.
Further, before obtaining the coordinates of the query address in the cache server according to the query request, the method further includes:
clearing the special character in the query request.
The embodiment of the present application provides a device for improving accuracy of geocoding, including:
the acquisition module is used for acquiring a query request of a query address;
the query module is used for acquiring the coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
Further, the determining the number of coordinates obtained in the parallel call interface and determining the coordinates according to the number of coordinates includes:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
By adopting the technical scheme, the invention can achieve the following beneficial effects:
the invention provides a method and a device for improving accuracy of geocoding, wherein the method comprises the steps of obtaining a query request of a query address; obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning. The invention can comprehensively calculate the geocoding of a plurality of maps and obtain a result with higher accuracy.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating the steps of the method for improving accuracy of geocoding according to the present invention;
FIG. 2 is a schematic flow chart illustrating a method for improving accuracy of geocoding according to the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for improving accuracy of geocoding according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
A specific method and apparatus for improving accuracy of geocoding provided in the embodiments of the present application is described below with reference to the accompanying drawings.
As shown in fig. 1, the method for improving accuracy of geocoding provided in the embodiment of the present application includes:
s101, acquiring a query request for querying an address;
s102, obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
The working principle of the method for improving the accuracy of the geocoding is as follows: referring to fig. 2, the query request for obtaining the query address obtains the coordinates of the query address in the cache server according to the query request, and if the query address is hit, the coordinates are returned; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
The judging the number of the coordinates acquired from the parallel calling interface and determining the coordinates according to the number of the coordinates includes:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
Preferably, the parallel call interface includes:
baidu maps, Gaode maps, Tencent maps, and address books.
Preferably, the cache server adopts a Redis server;
the correction library adopts a Mysql server;
the address book adopts a Mysql table.
Preferably, before obtaining the coordinates of the query address in the cache server according to the query request, the method further includes:
clearing the special character in the query request.
Specifically, as a specific implementation manner, a query request of a query address is obtained, and special characters in the query request are cleared;
inquiring the coordinates of the address from the cache server, if the address is hit, directly returning the coordinates, and if not, entering the next step;
inquiring coordinates of the address from the correction library, if the coordinates are hit, directly returning the coordinates, and if not, entering the next step;
inquiring results in parallel from a Baidu map, a Gauder map, an Tencent map and an address book, and then entering the next step;
if the address book is hit, directly returning the coordinates, otherwise, entering the next step;
judging the number of coordinates returned from the Baidu map, the Gade map and the Tencent map,
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, taking out 1 coordinate according to the priority and returning;
if the number is larger than 2, 2 coordinates closest to the coordinate are calculated, and 1 coordinate is taken out from the 2 coordinates according to the priority and returned.
As shown in fig. 3, an apparatus for improving accuracy of geocoding according to an embodiment of the present application includes:
an obtaining module 301, configured to obtain a query request for querying an address;
the query module 302 is configured to obtain coordinates of a query address in the cache server according to the query request, and return the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
Preferably, the determining the number of coordinates obtained in the parallel call interface and determining the coordinates according to the number of coordinates includes:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
The embodiment of the application provides computer equipment, which comprises a processor and a memory connected with the processor;
the memory is used for storing computer program, and the computer program is used for executing
Acquiring a query request for querying an address;
obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates and returning;
the processor is used to call and execute the computer program in the memory.
In summary, the present invention provides a method and an apparatus for improving accuracy of geocoding, where the method includes obtaining a query request for querying an address; obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning. The invention can comprehensively calculate the geocoding of a plurality of maps and obtain a result with higher accuracy.
It is to be understood that the embodiments of the method provided above correspond to the embodiments of the apparatus described above, and the corresponding specific contents may be referred to each other, which is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (7)
1. A method for increasing geocoding accuracy, comprising:
acquiring a query request for querying an address;
obtaining coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
2. The method of claim 1, wherein the determining the number of coordinates obtained in the parallel call interface and determining the coordinates according to the number of coordinates comprises:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
3. The method of claim 1 or 2, wherein the parallel call interface comprises:
baidu maps, Gaode maps, Tencent maps, and address books.
4. The method of claim 3,
the cache server adopts a Redis server;
the correction library adopts a Mysql server;
the address book adopts a Mysql table.
5. The method according to claim 1, further comprising, before obtaining coordinates of the query address in the cache server according to the query request:
clearing the special character in the query request.
6. An apparatus for improving accuracy of geocoding, comprising:
the acquisition module is used for acquiring a query request of a query address;
the query module is used for acquiring the coordinates of the query address in the cache server according to the query request, and returning the coordinates if the query address is hit; if not, continuously acquiring the coordinates of the query address from the correction library, returning the coordinates if the coordinates are hit, otherwise, continuously querying from a preset parallel calling interface, returning the coordinates if the coordinates are hit in the address book, otherwise, judging the number of the coordinates acquired from the query condition, determining the coordinates according to the number of the coordinates, and returning.
7. The apparatus of claim 6, wherein the determining the number of coordinates obtained in the parallel call interface and determining the coordinates according to the number of coordinates comprises:
if the number is 0, returning failure;
if the number is 1, returning the coordinate;
if the number is 2, determining 1 coordinate according to a preset priority order;
if the number is larger than 2, 2 coordinates with the nearest distance are calculated, and then 1 coordinate is determined from the 2 coordinates according to the priority order.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111013122.0A CN113656446A (en) | 2021-08-31 | 2021-08-31 | Method and device for improving accuracy of geocoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111013122.0A CN113656446A (en) | 2021-08-31 | 2021-08-31 | Method and device for improving accuracy of geocoding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113656446A true CN113656446A (en) | 2021-11-16 |
Family
ID=78482550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111013122.0A Pending CN113656446A (en) | 2021-08-31 | 2021-08-31 | Method and device for improving accuracy of geocoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113656446A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116842120A (en) * | 2023-07-04 | 2023-10-03 | 广东星云开物科技股份有限公司 | Address information acquisition system, device, storage medium and method for equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996248A (en) * | 2010-11-10 | 2011-03-30 | 百度在线网络技术(北京)有限公司 | Address lookup method and device |
CN102804181A (en) * | 2009-10-28 | 2012-11-28 | 谷歌公司 | Navigation queries |
CN105976301A (en) * | 2016-07-26 | 2016-09-28 | 上海海豆信息科技有限公司 | Logistics map building method based on information extraction system |
US10119825B1 (en) * | 2017-08-30 | 2018-11-06 | Pitney Bowes Inc. | System and method for geocoding positional accuracy |
CN109471909A (en) * | 2018-09-25 | 2019-03-15 | 中国平安人寿保险股份有限公司 | The method, apparatus and computer readable storage medium of address location |
CN109800280A (en) * | 2019-01-16 | 2019-05-24 | 北京神州泰岳软件股份有限公司 | Address matching method and device |
CN110750602A (en) * | 2018-07-06 | 2020-02-04 | 北京京东尚科信息技术有限公司 | Method and device for determining site to which order address belongs |
CN111401051A (en) * | 2020-04-08 | 2020-07-10 | 上海东普信息科技有限公司 | Express delivery information analysis method and system |
-
2021
- 2021-08-31 CN CN202111013122.0A patent/CN113656446A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102804181A (en) * | 2009-10-28 | 2012-11-28 | 谷歌公司 | Navigation queries |
CN101996248A (en) * | 2010-11-10 | 2011-03-30 | 百度在线网络技术(北京)有限公司 | Address lookup method and device |
CN105976301A (en) * | 2016-07-26 | 2016-09-28 | 上海海豆信息科技有限公司 | Logistics map building method based on information extraction system |
US10119825B1 (en) * | 2017-08-30 | 2018-11-06 | Pitney Bowes Inc. | System and method for geocoding positional accuracy |
CN110750602A (en) * | 2018-07-06 | 2020-02-04 | 北京京东尚科信息技术有限公司 | Method and device for determining site to which order address belongs |
CN109471909A (en) * | 2018-09-25 | 2019-03-15 | 中国平安人寿保险股份有限公司 | The method, apparatus and computer readable storage medium of address location |
CN109800280A (en) * | 2019-01-16 | 2019-05-24 | 北京神州泰岳软件股份有限公司 | Address matching method and device |
CN111401051A (en) * | 2020-04-08 | 2020-07-10 | 上海东普信息科技有限公司 | Express delivery information analysis method and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116842120A (en) * | 2023-07-04 | 2023-10-03 | 广东星云开物科技股份有限公司 | Address information acquisition system, device, storage medium and method for equipment |
CN116842120B (en) * | 2023-07-04 | 2024-04-19 | 广东星云开物科技股份有限公司 | Address information acquisition system, device, storage medium and method for equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109729131B (en) | Application request processing method and device and router | |
CN107092544B (en) | Monitoring method and device | |
JP6870466B2 (en) | Control programs, control methods, controls, and database servers | |
CN105100050A (en) | User permission management method and system | |
US9787557B2 (en) | Determining semantic place names from location reports | |
CN110888866A (en) | Data expansion method and device, data processing equipment and storage medium | |
CN110737747A (en) | data operation method, device and system | |
CN113656446A (en) | Method and device for improving accuracy of geocoding | |
US11693892B2 (en) | Determining data structures for spatial data based on spatial data statistics | |
CN104270471A (en) | Method, device and system for achieving new function reminding | |
US20170344641A1 (en) | Dynamic search system for real-time dynamic search and reporting | |
CN110928895B (en) | Data query and data table establishment method, device and equipment | |
US9449110B2 (en) | Geotiles for finding relevant results from a geographically distributed set | |
CN103049525B (en) | A kind of for providing the method and apparatus of object-related information | |
CN114357318A (en) | Multi-dimensional track data display method and device and electronic equipment | |
CN111127065B (en) | User job site acquisition method and device | |
CN104156364A (en) | Display method and device of map search result | |
CN112836472A (en) | Address annotation method, device, equipment and storage medium | |
CN113723405A (en) | Method and device for determining area outline and electronic equipment | |
CN113269484A (en) | Data reading method and device | |
CN112434237A (en) | Page loading method and device, electronic equipment and storage medium | |
CN112948517A (en) | Area position calibration method and device and electronic equipment | |
CN106443732B (en) | Path diagram drawing method and system based on GPS | |
CN109769202A (en) | Localization method and device, storage medium, the server of data on flows | |
CN110990471A (en) | Data processing method and device for vehicle dealership |
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 |