CN113094454A - Map data searching method and device - Google Patents

Map data searching method and device Download PDF

Info

Publication number
CN113094454A
CN113094454A CN202110199026.3A CN202110199026A CN113094454A CN 113094454 A CN113094454 A CN 113094454A CN 202110199026 A CN202110199026 A CN 202110199026A CN 113094454 A CN113094454 A CN 113094454A
Authority
CN
China
Prior art keywords
map
screen
user terminal
map grid
grid block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110199026.3A
Other languages
Chinese (zh)
Inventor
唐笑龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Beijing Fangjianghu 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 Fangjianghu Technology Co Ltd filed Critical Beijing Fangjianghu Technology Co Ltd
Priority to CN202110199026.3A priority Critical patent/CN113094454A/en
Publication of CN113094454A publication Critical patent/CN113094454A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/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/23Updating
    • G06F16/2393Updating materialised views
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Computational Linguistics (AREA)
  • Remote Sensing (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Instructional Devices (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a map data searching method and a map data searching device, wherein the method comprises the following steps: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; determining a longitude range and a latitude range which are displayed by taking the request address as a center according to the screen size of the user terminal and the map scale; acquiring a map grid block set covering a screen when the request address is used as a center for displaying; the map grid block set comprises at least one map grid block, the map grid blocks and the contained address information are stored in a one-to-one correspondence mode, and the geographical adjacent relation of each map grid block is known; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation. The map data searching method and the map data searching device do not need to calculate the longitude and latitude interval of the map required to be displayed by the terminal according to the map searching request every time, and greatly improve the processing speed of map data searching.

Description

Map data searching method and device
Technical Field
The invention relates to the technical field of computers, in particular to a map data searching method and device.
Background
In the current business scene, the house property data search based on the geographic position is based on the range search of longitude and latitude. Each time a user moves a map, a new set of longitude and latitude < longitude a, latitude b > and < longitude a ', latitude b' are generated (for example, an area surrounded by the longitude and latitude of the upper left corner and the longitude and latitude of the lower right corner of the area), the traditional cache scheme is that a search condition is key ═ a, b, a ', b'), a search result is value, and a storage relationship pair < key, value >. However, due to the inexplicability of the longitude and latitude, the user almost generates unrepeated longitude and latitude every time the user moves, so that the cache hit rate of the simple < key, value > structure is extremely low, the server needs to be requested again to acquire the house property data meeting the conditions every time, and thus, not only is the waste of server resources, but also the user experience is influenced due to the time consumption of the re-request.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a map data searching method and device.
The invention provides a map data searching method, which comprises the following steps: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
According to the map data searching method provided by the invention, the obtaining of the map grid block set covering the screen when the request address is used as the center display according to the longitude range and the latitude range specifically comprises the following steps: acquiring the map grid block where the request address is located, judging whether the map grid block can cover a screen of the user terminal when the map grid block is displayed by taking the request address as a center, and if so, forming a map grid block set by the map grid block where the request address is located; if not, expanding the map grid blocks according to the geographical adjacent relation until the map grid block where the request address is located and the expanded map grid blocks cover the screen of the user terminal when the map grid blocks are displayed by taking the request address as the center, and forming the map grid block set by the map grid block where the request address is located and the expanded map grid blocks; and the longitude and latitude range of each map grid block is known.
According to the map data searching method provided by the invention, the longitude and latitude spans of the map grid blocks are the same.
According to a map data searching method provided by the present invention, before receiving map search request information sent by a user terminal, the method further comprises: and carrying out geographical position coding on the map grid blocks, carrying out geographical position coding on the address information by adopting the same coding mode, clustering the address information with the same coding serial number, and correspondingly storing the address information with the same coding serial number and the map grid blocks with the same coding serial number.
According to the map data searching method provided by the invention, the map grid blocks and the contained address information are stored in the cache in a one-to-one correspondence manner.
According to the map data searching method provided by the invention, the method further comprises the following steps: receiving a first editing operation of zooming in or zooming out a map, and acquiring an updated map scale according to the first editing operation; updating a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the screen size of the user terminal and the updated map scale; updating a map grid block set covering a screen when the request address is used as the center to be displayed according to the updated longitude range and the updated latitude range; and pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
According to the map data searching method provided by the invention, the method further comprises the following steps: receiving a second editing operation of translating the map, and acquiring the updated request address according to the second editing operation; wherein the updated request address is an address currently moved to the center of the screen; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal with the updated request address as the center according to the screen size of the user terminal and the map scale; acquiring a map grid block set covering a screen when the updated request address is used as the center for displaying according to the longitude range and the latitude range; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal according to the geographical adjacent relation by taking the updated request address as a center.
The present invention also provides a map data search apparatus, comprising: a map search request information receiving module for: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; the screen latitude and longitude display range determining module is used for: determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; a map grid block set acquisition module configured to: acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; a map display module to: and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the map data searching method.
The present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the map data search method as described in any one of the above.
According to the map data searching method and device, the map grid block set covering the screen is obtained according to the longitude range and the latitude range which can be displayed on the screen, the request address is used as the center for displaying, the map longitude and latitude range which needs to be displayed by the terminal does not need to be calculated according to the map searching request every time, the consumption of service resources is reduced, and the processing speed of map data searching is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a map data search method provided by the present invention;
FIG. 2 is an exemplary diagram illustrating a segmentation recall of a geographical location room source search grid in the map data search method according to the present invention;
FIG. 3 is a second schematic flowchart of a map data searching method according to the present invention;
FIG. 4 is a schematic structural diagram of a map data search device provided in the present invention;
FIG. 5 is a second schematic structural diagram of a map data search device according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The map data search method and apparatus of the present invention are described below with reference to fig. 1 to 6.
Fig. 1 is a schematic flow chart of a map data search method according to the present invention. As shown in fig. 1, the method includes:
step 101, receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information.
The map data searching method provided by the invention can be realized at a server side. Firstly, a server receives map search request information sent by a user terminal, and acquires a request address according to the map search request information. The map search request information is, for example, an address of a certain house source, a name of a certain house source, etc., as long as the request address can be determined.
And step 102, determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the screen size of the user terminal and the map scale.
Information of the screen size and the map scale of the user terminal may be carried in the map search request information. And the server determines the longitude range and the latitude range which can be displayed by the screen of the user terminal by taking the request address as the center according to the size of the screen of the user terminal and the map scale. For example, if the size of the user screen is m and the map scale is ρ, the geographical range searched by the user is m/ρ. This geographical range can be expressed as how large a longitude span is and how large a latitude span is. By taking the request address of the user terminal as the center of the screen display and the geographical range as the display range of the screen, the longitude range and the latitude range which can be displayed by the screen of the user terminal by taking the request address as the center can be determined.
103, acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known.
Acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the set of map grid blocks may include one or more map grid blocks. The map grid blocks are pre-divided map grid areas, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known. All other map grid blocks adjacent to a certain map grid block can be obtained according to the certain map grid block. The map grid block may be a rectangular map area.
And 104, pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
And pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation. The request address must be contained in a certain geo-grid block of the set of geo-grid blocks. When displaying, the request address is used as the center for displaying; in addition, the geographical adjacency of each geogrid block in the set of geogrid blocks should be displayed.
It will be appreciated that the set of map grid blocks covering the screen must be exactly the same as the geographic area of the screen to be displayed, and may be larger than the geographic area of the screen to be displayed. But the map at the edge of the screen can be displayed certainly due to the size of the screen.
According to the map data searching method provided by the invention, the map grid block set covering the screen is obtained according to the longitude range and the latitude range which can be displayed by the screen and is displayed by taking the request address as the center, the map longitude and latitude range required to be displayed by the terminal does not need to be calculated according to the map searching request every time, the consumption of service resources is reduced, and the processing speed of map data searching is greatly improved.
According to the map data searching method provided by the invention, the obtaining of the map grid block set covering the screen when the request address is used as the center display according to the longitude range and the latitude range specifically comprises the following steps: acquiring the map grid block where the request address is located, judging whether the map grid block can cover a screen of the user terminal when the map grid block is displayed by taking the request address as a center, and if so, forming a map grid block set by the map grid block where the request address is located; if not, expanding the map grid blocks according to the geographical adjacent relation until the map grid block where the request address is located and the expanded map grid blocks cover the screen of the user terminal when the map grid blocks are displayed by taking the request address as the center, and forming the map grid block set by the map grid block where the request address is located and the expanded map grid blocks; and the longitude and latitude range of each map grid block is known.
When a map grid block set covering a screen when a request address is displayed by taking the request address as a center is obtained according to a longitude range and a latitude range, firstly, a map grid block where the request address is located is obtained, and whether the map grid block can cover the screen of the user terminal is judged. If the map grid block where the request address is located can cover the screen of the user terminal, only one map grid block needs to be displayed on the screen of the user terminal. That is, the map grid block set only includes the map grid block where the request address is located.
If the map grid block of the request address can not cover the screen of the user terminal, the map grid block needs to be expanded according to the geographical adjacent relation until the map grid block of the request address and the expanded map grid block cover the screen of the user terminal. And the map grid block where the request address is located and the expanded map grid block form a map grid block set.
When the map grid blocks are expanded according to the geographical adjacent relation, the longitude range and the latitude range formed by the determined map grid blocks are compared with the longitude range and the latitude range which can be displayed by taking the request address as the center on the screen to determine the expanded position. The map grid block where the request address is located can be expanded by the surrounding map grid blocks, and then the surrounding map grid blocks can be expanded in a recursive mode. When each map grid block is processed, whether the boundary of the map grid block has an adjacent map grid block or whether the boundary reaches or exceeds a longitude range and a latitude range which can be displayed by taking the request address as the center of the screen is judged, and if not, the map grid block is expanded in the corresponding direction. Until the longitude range and the latitude range which can be displayed by taking the request address as the center are covered by a set consisting of the map grid block where the request address is located and the expanded map grid blocks.
According to the map data searching method provided by the invention, when the map grid block where the request address is located cannot cover the screen of the user terminal when the map grid block is displayed by taking the request address as the center, the map grid block is expanded according to the geographical adjacent relation, so that the acquisition of the map grid block set which can cover the screen of the user terminal is effectively realized.
According to the map data searching method provided by the invention, the longitude and latitude spans of the map grid blocks are the same.
The map data are subjected to rasterization division and are stored in advance, and the sizes of all map grid blocks can be the same during division, namely the longitude and latitude spans of all the map grid blocks are the same. In this way, when the map grid block is expanded, the number of the map grid blocks of which the longitude direction and the latitude direction need to be expanded can be quickly known by the longitude and latitude of the map grid block in which the request address is located and the longitude range and the latitude range when the screen is displayed with the request address as the center. Then, according to the adjacent relation of the map grid blocks, the map grid block set can be rapidly acquired.
The map data searching method provided by the invention is beneficial to quickly acquiring the map grid block set by enabling the longitude and latitude spans of all the map grid blocks to be the same, thereby further improving the map data searching speed.
According to a map data searching method provided by the present invention, before receiving map search request information sent by a user terminal, the method further comprises: and carrying out geographical position coding on the map grid blocks, carrying out geographical position coding on the address information by adopting the same coding mode, clustering the address information with the same coding serial number, and correspondingly storing the address information with the same coding serial number and the map grid blocks with the same coding serial number.
The map grid block and the contained address information have the same coding sequence number. The encoding sequence number may reflect a geographical location, and thus the encoding method is a geographical location encoding, for example, one encoding method that may be adopted is as follows:
1. and calculating the interval segment where the longitude and the latitude are located in a cyclic binary search mode, wherein the code splicing 0 is positioned in the left interval, and the code splicing 1 is positioned in the right interval to obtain a longitude code codex and a latitude code codey.
2. And coding and recombining the codex and the codey in a mode of circularly taking each bit of the codex and the codey for coding and recombining into a new coded code.
3. This code is subjected to base64 encoding to obtain the final area code.
geocode (x, y) ═ area code. geocode (x, y) indicates the code number of the longitude and latitude (x, y).
The coding is characterized in that:
the more the number of digits of the area code, the smaller the range of the represented area and the higher the precision.
The area code has the characteristic of prefix similarity, and the prefix similarity of the areas which are closer is higher.
3. The area code of the surrounding 8 cell blocks can be easily calculated by the number of blocks divided by the region.
By utilizing the characteristic, the accuracy range of a proper map unit block can be selected to generate the area code, then the geographical position range searched by the user is covered by the unit block, and the minimum unit block { area code1, …, area code eN } which can be covered just is selected, so that the method is equivalent to recall the house source data under N unit blocks.
Fig. 2 is an exemplary diagram of a geographic location room source search grid segmentation recall in the map data search method provided by the present invention. As shown in FIG. 2, the data for 9 geogrids a 1-a 9 are recalled.
The area code may be referred to as a code number. The address information is encoded in the same encoding mode, and the corresponding area code can be obtained in the same way. The identical area code of the address information of the area code of the geography grid block indicates that the geography grid block contains the address information. The identical area codes of two pieces of address information indicate that the two pieces of address information belong to the same geography grid block. Therefore, the address information with the same code number is clustered and stored corresponding to the map grid block with the same code number. Thus, the address information contained in the geo-grid block can be acquired after the geo-grid block is acquired. Of course, which address information is coded can be performed according to application requirements, and if the acquisition of the house source information is concerned relatively, each set of house source can be coded by traversing the house sources.
The map data searching method provided by the invention adopts the same geographical position codes to the map grid blocks and the address information and correspondingly stores the same geographical position codes, thereby providing a premise for displaying the request address by using the map grid blocks.
According to the map data searching method provided by the invention, the map grid blocks and the contained address information are stored in the cache in a one-to-one correspondence manner.
Because the efficiency of reading speed in the cache is higher, the map data searching method provided by the invention further improves the efficiency of map searching by storing the map grid blocks and the contained address information in the cache in a one-to-one correspondence manner.
According to the map data searching method provided by the invention, the method further comprises the following steps: receiving a first editing operation of zooming in or zooming out a map, and acquiring an updated map scale according to the first editing operation; updating a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the screen size of the user terminal and the updated map scale; updating a map grid block set covering a screen when the request address is used as the center to be displayed according to the updated longitude range and the updated latitude range; and pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
When viewing map data, a user is likely to perform an editing operation on the map, such as zooming in or out the map. If the user zooms in or out of the map, the map scale may change. At this time, upon receiving a first editing operation to enlarge or reduce the map, an updated map scale is acquired according to the first editing operation. As the map scale is updated, the displayed latitude and longitude range of the screen also changes. Therefore, the longitude range and the latitude range which can be displayed by the screen of the user terminal with the request address as the center are updated according to the screen size of the user terminal and the updated map scale. The set of map grid blocks that overlay the screen when displayed centered on the requested address is then updated according to the updated longitude and latitude ranges. Updating the set of map grid blocks covering the screen when displayed with the request address as the center according to the updated longitude range and latitude range is similar to the method adopted in the above example, and is not described here again. And pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
According to the map data searching method provided by the invention, the updated map scale is obtained according to the first editing operation after the first editing operation of enlarging or reducing the map is received, the longitude range and the latitude range which can be displayed by the screen of the user terminal with the request address as the center are updated, the map grid block set is updated and displayed, and the flexibility of map data searching is obviously improved.
According to the map data searching method provided by the invention, the method further comprises the following steps: receiving a second editing operation of translating the map, and acquiring the updated request address according to the second editing operation; wherein the updated request address is an address currently moved to the center of the screen; acquiring a map grid block set covering a screen when the updated request address is used as the center for displaying according to the longitude range and the latitude range; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal according to the geographical adjacent relation by taking the updated request address as a center.
When the user views the map data, the user is likely to perform editing operation on the map, such as panning the map. If the user translates the map, the map display center changes, but the map scale is not changed. And determining the longitude range and the latitude range which can be displayed by the screen of the user terminal by taking the updated request address as the center according to the screen size of the user terminal and the map scale.
Then, a set of map grid blocks covering the screen when displayed centering on the updated request address is acquired according to the longitude range and the latitude range. The method for obtaining the set of map grid blocks covering the screen when displaying with the updated request address as the center according to the latitude and longitude ranges is similar to the method adopted in the above example, and is not repeated here. And pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the updated request address as a center according to the geographical adjacent relation.
According to the map data searching method provided by the invention, the second editing operation of translating the map is received, the updated request address is obtained according to the second editing operation, the longitude range and the latitude range which can be displayed by taking the updated request address as the center of the screen of the user terminal are updated, the map grid block set is updated and displayed, and the flexibility of map data searching is obviously improved.
Fig. 3 is a second schematic flow chart of the map data searching method provided by the present invention. Aiming at the problem of low hit rate of traditional cache for searching geographic positions, the invention provides a cache scheme of real estate data in a map scene.
1) The property data has longitude and latitude attributes, and is a binary relation < a, b >.
2) When the user searches through the map, the area does not exceed the size of the screen used by the user.
3) And performing rasterization segmentation on the plane map, averagely dividing the plane map into N equal parts, wherein each area can not exceed the geographical position area s represented by a screen when a user searches for a house source.
4) And carrying out geographical position coding on each equal area, and converting the two-dimensional codes into one-dimensional codes.
5) Therefore, the rasterized and segmented regions have enumerability, the property data searched from each region can be cached, the cache structure is < area code, value >, the area code is the coding sequence number of the rasterized and segmented map block, and the value is all the property data under the map block.
As shown in fig. 3, in the offline stage, each set of house sources is traversed, then the geographical position coding is performed on each set of house sources, then clustering is performed according to the area code, and the data is stored into the cache pool in the form of < area code x, value x >. When a user searches online, receiving a user search request and acquiring a request address, calculating the latitude and longitude range required to be displayed on a screen, then calculating the area code to which a central point (request address) belongs, calculating an area code set capable of covering the area shown by the screen, and displaying the house source search result set on a user terminal. Since the cell block area code is enumerable, the room source data { value1, …, value N } recalled by the cell block can be buffered or the data is preheated in advance to obtain the binary relation pair of < area code1, value1> … < area code eN, value N >, so that the buffered data is obtained only for a new group of area codes even if the user moves the map again.
The map data searching method provided by the invention is based on a new cache scheme, solves the problem of low cache hit rate caused by non-enumeration of longitude and latitude, and reduces the consumption of service resources, thereby accelerating the searching response speed and improving the overall user experience.
The following describes a map data search device according to the present invention, and the map data search device described below and the map data search method described above may be referred to in correspondence with each other.
Fig. 4 is a schematic structural diagram of a map data search device according to the present invention. As shown in fig. 4, the apparatus includes a map search request information receiving module 10, a screen latitude and longitude display range determining module 20, a map grid block set obtaining module 30, and a map display module 40, wherein: the map search request information receiving module 10 is configured to: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; the screen latitude and longitude display range determination module 20 is configured to: determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; the map grid block set obtaining module 30 is configured to: acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; the map display module 40 is configured to: and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
The map data searching device provided by the invention obtains the map grid block set covering the screen according to the longitude range and the latitude range which can be displayed by the screen, and displays the map grid block set by taking the request address as the center, so that the map longitude and latitude range required to be displayed by the terminal does not need to be calculated according to the map searching request every time, the consumption of service resources is reduced, and the processing speed of map data searching is greatly improved.
According to the map data search device provided by the present invention, the map grid block set obtaining module 30, when being configured to obtain the map grid block set covering the screen when being displayed with the request address as the center according to the longitude range and the latitude range, is specifically configured to: acquiring the map grid block where the request address is located, judging whether the map grid block can cover a screen of the user terminal when the map grid block is displayed by taking the request address as a center, and if so, forming a map grid block set by the map grid block where the request address is located; if not, expanding the map grid blocks according to the geographical adjacent relation until the map grid block where the request address is located and the expanded map grid blocks cover the screen of the user terminal when the map grid blocks are displayed by taking the request address as the center, and forming the map grid block set by the map grid block where the request address is located and the expanded map grid blocks; and the longitude and latitude range of each map grid block is known.
The map data searching device provided by the invention expands the map grid blocks according to the geographical adjacent relation when the map grid block where the request address is positioned can not cover the screen of the user terminal when the map grid block is displayed by taking the request address as the center, thereby effectively realizing the acquisition of the map grid block set which can cover the screen of the user terminal.
According to the map data searching device provided by the invention, the longitude and latitude spans of the map grid blocks are the same.
The map data searching device provided by the invention is beneficial to quickly acquiring the map grid block set by enabling the longitude and latitude spans of all the map grid blocks to be the same, thereby further improving the map data searching speed.
According to the map data searching device provided by the invention, the device further comprises an encoding module, wherein the encoding module is used for carrying out geographical position encoding on the map grid blocks before the map search request information receiving module 10 receives the map search request information sent by the user terminal, carrying out geographical position encoding on the address information by adopting the same encoding mode, clustering the address information with the same encoding serial number, and correspondingly storing the address information with the same encoding serial number with the map grid blocks with the same encoding serial number.
The map data searching device provided by the invention adopts the same geographical position codes to map grid blocks and address information and correspondingly stores the same geographical position codes, thereby providing a premise for displaying request addresses by using the map grid blocks.
According to the map data searching device provided by the invention, the map grid blocks and the contained address information are stored in the cache in a one-to-one correspondence manner.
The map data searching device provided by the invention further improves the efficiency of map searching by storing the map grid blocks and the contained address information in the cache in a one-to-one correspondence manner.
According to the map data searching device provided by the invention, the device further comprises a first editing response module, wherein the first editing response module is used for: receiving a first editing operation of zooming in or zooming out a map, and acquiring an updated map scale according to the first editing operation; updating a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the screen size of the user terminal and the updated map scale; updating a map grid block set covering a screen when the request address is used as the center to be displayed according to the updated longitude range and the updated latitude range; and pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
The map data searching device provided by the invention obtains the updated map scale according to the first editing operation after receiving the first editing operation of enlarging or reducing the map, updates the longitude range and the latitude range which can be displayed by taking the request address as the center on the screen of the user terminal, updates the map grid block set and display, and obviously improves the flexibility of map data searching.
According to the map data searching device provided by the invention, the device further comprises a second editing response module, and the second editing response module is used for: receiving a second editing operation of translating the map, and acquiring the updated request address according to the second editing operation; wherein the updated request address is an address currently moved to the center of the screen; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal with the updated request address as the center according to the screen size of the user terminal and the map scale; acquiring a map grid block set covering a screen when the updated request address is used as the center for displaying according to the longitude range and the latitude range; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal according to the geographical adjacent relation by taking the updated request address as a center.
According to the map data searching device provided by the invention, the second editing operation of translating the map is received, the updated request address is obtained according to the second editing operation, the longitude range and the latitude range which can be displayed by taking the updated request address as the center of the screen of the user terminal are updated, the map grid block set is updated and the map grid block is displayed, and the flexibility of map data searching is obviously improved.
Fig. 5 is a second schematic structural diagram of the map data search device provided by the present invention. As shown in fig. 5, the apparatus includes a house source system, a coding module, an index module, and a search module, where the coding module obtains house source information from the house source system and codes the house source, and then constructs an index corresponding to the house source and the geography grid block through the index module. After the index is built, query and feedback can be carried out according to the map search information input by the user.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a map data search method comprising: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a map data search method provided by the above methods, the method comprising: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided map data search method, the method including: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information; determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale; acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known; and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1.A map data search method is characterized by comprising the following steps:
receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information;
determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale;
acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known;
and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
2. The method according to claim 1, wherein the obtaining a set of map grid blocks covering a screen when displayed with the request address as a center according to the longitude range and the latitude range specifically comprises:
acquiring the map grid block where the request address is located, judging whether the map grid block can cover a screen of the user terminal when the map grid block is displayed by taking the request address as a center, and if so, forming a map grid block set by the map grid block where the request address is located; if not, expanding the map grid blocks according to the geographical adjacent relation until the map grid block where the request address is located and the expanded map grid blocks cover the screen of the user terminal when the map grid blocks are displayed by taking the request address as the center, and forming the map grid block set by the map grid block where the request address is located and the expanded map grid blocks; and the longitude and latitude range of each map grid block is known.
3. The map data search method according to claim 2, wherein the longitude and latitude spans of the respective map grid blocks are the same.
4. The map data search method according to claim 1, wherein before receiving the map search request information transmitted from the user terminal, the method further comprises:
and carrying out geographical position coding on the map grid blocks, carrying out geographical position coding on the address information by adopting the same coding mode, clustering the address information with the same coding serial number, and correspondingly storing the address information with the same coding serial number and the map grid blocks with the same coding serial number.
5. The map data search method according to claim 1, wherein the map grid blocks are stored in a cache in one-to-one correspondence with the included address information.
6. The map data search method according to claim 1, characterized in that the method further comprises:
receiving a first editing operation of zooming in or zooming out a map, and acquiring an updated map scale according to the first editing operation;
updating a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the screen size of the user terminal and the updated map scale;
updating a map grid block set covering a screen when the request address is used as the center to be displayed according to the updated longitude range and the updated latitude range;
and pushing the updated map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
7. The map data search method according to claim 1, characterized in that the method further comprises:
receiving a second editing operation of translating the map, and acquiring the updated request address according to the second editing operation; wherein the updated request address is an address currently moved to the center of the screen;
determining a longitude range and a latitude range which can be displayed by the screen of the user terminal with the updated request address as the center according to the screen size of the user terminal and the map scale;
acquiring a map grid block set covering a screen when the updated request address is used as the center for displaying according to the longitude range and the latitude range;
and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal according to the geographical adjacent relation by taking the updated request address as a center.
8. A map data search apparatus, characterized by comprising:
a map search request information receiving module for: receiving map search request information sent by a user terminal, and acquiring a request address according to the map search request information;
the screen latitude and longitude display range determining module is used for: determining a longitude range and a latitude range which can be displayed by the screen of the user terminal by taking the request address as a center according to the size of the screen of the user terminal and a map scale;
a map grid block set acquisition module configured to: acquiring a map grid block set covering a screen when the request address is used as the center for displaying according to the longitude range and the latitude range; the map grid block set comprises at least one map grid block, the map grid blocks are stored in one-to-one correspondence with the contained address information, and the geographical adjacent relation of each map grid block is known;
a map display module to: and pushing the map grid block set to the user terminal, and displaying on a screen of the user terminal by taking the request address as a center according to the geographical adjacent relation.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the map data search method according to any one of claims 1 to 7 are implemented when the processor executes the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the map data search method according to any one of claims 1 to 7.
CN202110199026.3A 2021-02-22 2021-02-22 Map data searching method and device Pending CN113094454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110199026.3A CN113094454A (en) 2021-02-22 2021-02-22 Map data searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110199026.3A CN113094454A (en) 2021-02-22 2021-02-22 Map data searching method and device

Publications (1)

Publication Number Publication Date
CN113094454A true CN113094454A (en) 2021-07-09

Family

ID=76666438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110199026.3A Pending CN113094454A (en) 2021-02-22 2021-02-22 Map data searching method and device

Country Status (1)

Country Link
CN (1) CN113094454A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375868A (en) * 2022-10-25 2022-11-22 阿里巴巴(中国)有限公司 Map display method, remote sensing map display method, computing device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102054388A (en) * 2009-11-03 2011-05-11 厦门雅迅网络股份有限公司 Method for receiving and displaying map
US20150052106A1 (en) * 1999-07-22 2015-02-19 Tavusi Data Solutions Llc Graphic-information flow method and system for visually analyzing patterns and relationships
CN106250062A (en) * 2016-08-15 2016-12-21 成都天奥信息科技有限公司 Electronic chart realization method and system based on browser
CN108052642A (en) * 2017-12-22 2018-05-18 重庆邮电大学 Electronic Chart Display method based on tile technology
WO2018093619A1 (en) * 2016-11-21 2018-05-24 Google Llc Systems and methods for dynamically providing scale information on a digital map
CN109063193A (en) * 2018-08-29 2018-12-21 中国科学院地理科学与资源研究所 A kind of thematic maps recommends the method and device of display

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150052106A1 (en) * 1999-07-22 2015-02-19 Tavusi Data Solutions Llc Graphic-information flow method and system for visually analyzing patterns and relationships
CN102054388A (en) * 2009-11-03 2011-05-11 厦门雅迅网络股份有限公司 Method for receiving and displaying map
CN106250062A (en) * 2016-08-15 2016-12-21 成都天奥信息科技有限公司 Electronic chart realization method and system based on browser
WO2018093619A1 (en) * 2016-11-21 2018-05-24 Google Llc Systems and methods for dynamically providing scale information on a digital map
CN108052642A (en) * 2017-12-22 2018-05-18 重庆邮电大学 Electronic Chart Display method based on tile technology
CN109063193A (en) * 2018-08-29 2018-12-21 中国科学院地理科学与资源研究所 A kind of thematic maps recommends the method and device of display

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
RENZEHELLO: "Geohash", 《HTTPS://WWW.JIANSHU.COM/P/1ECF03293B9A》 *
庞小平等: "《遥感制图与应用》", 30 June 2016, 北京:测绘出版社 *
武芳等: "《地图设计与制图综合》", 31 December 2018, 北京:测绘出版社 *
黄利民等: "屏幕地图无极缩放模式与实现", 《测绘标准化》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375868A (en) * 2022-10-25 2022-11-22 阿里巴巴(中国)有限公司 Map display method, remote sensing map display method, computing device and storage medium
CN115375868B (en) * 2022-10-25 2023-02-17 阿里巴巴(中国)有限公司 Map display method, remote sensing map display method, computing device and storage medium

Similar Documents

Publication Publication Date Title
CN110008293B (en) Geographic position query method and device
KR20100068468A (en) Method, apparatus and computer program product for performing a visual search using grid-based feature organization
CN108628811B (en) Address text matching method and device
CN110222775B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN112233240B (en) Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment
US20200193372A1 (en) Information processing method and apparatus
CN110019575A (en) The method and apparatus that geographical address is standardized
CN112069285B (en) Map generation method and device based on three-dimensional high-precision map slice and electronic equipment
CN110020086B (en) User portrait query method and device
US20180197302A1 (en) Method and apparatus for determining to-be-superimposed area of image, superimposing image and presenting picture
CN111090712A (en) Data processing method, device and equipment and computer storage medium
CN111815738B (en) Method and device for constructing map
CN111274341A (en) Site selection method and device for network points
CN108009205B (en) Search result caching method based on position, search method, client and system
CN110209748B (en) Method and apparatus for indexing geofences
CN113347276B (en) Mobile access system based on GIS
CN113094454A (en) Map data searching method and device
CN110737820B (en) Method and apparatus for generating event information
CN109302449B (en) Data writing method, data reading device and server
CN110020150B (en) Information recommendation method and device
CN110266834B (en) Area searching method and device based on internet protocol address
CN107657474B (en) Method for determining business circle boundary and server
CN113157695B (en) Data processing method and device, readable medium and electronic equipment
CN113763514B (en) Method, device and system for generating stroke order animation and electronic equipment
CN116843891A (en) Graphic outline detection method, device, storage medium, equipment and program product

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210811

Address after: 100085 Floor 101 102-1, No. 35 Building, No. 2 Hospital, Xierqi West Road, Haidian District, Beijing

Applicant after: Seashell Housing (Beijing) Technology Co.,Ltd.

Address before: 101309 room 24, 62 Farm Road, Erjie village, Yangzhen, Shunyi District, Beijing

Applicant before: Beijing fangjianghu Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210709