WO2019179237A1 - Satellite-view electronic map acquisition method and device, apparatus, and storage medium - Google Patents

Satellite-view electronic map acquisition method and device, apparatus, and storage medium Download PDF

Info

Publication number
WO2019179237A1
WO2019179237A1 PCT/CN2019/073031 CN2019073031W WO2019179237A1 WO 2019179237 A1 WO2019179237 A1 WO 2019179237A1 CN 2019073031 W CN2019073031 W CN 2019073031W WO 2019179237 A1 WO2019179237 A1 WO 2019179237A1
Authority
WO
WIPO (PCT)
Prior art keywords
map
tile
real
identifier
level
Prior art date
Application number
PCT/CN2019/073031
Other languages
French (fr)
Chinese (zh)
Inventor
张文垂
杨欣
于欢
蒲伊娜
Original Assignee
杭州海康威视系统技术有限公司
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 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2019179237A1 publication Critical patent/WO2019179237A1/en

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • 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/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for acquiring a real-time electronic map.
  • an image of a real-time electronic map of a plurality of areas is stored in a server.
  • the terminal sends the area identifier of the real-est area to the server.
  • the server acquires map data of the real-life electronic map of the area according to the area identifier, and sends the map data to the terminal.
  • the terminal renders an image of the real-time electronic map based on the map data.
  • the process network that the terminal acquires the map data of the real-time electronic map from the server takes a long time, resulting in low acquisition efficiency.
  • the time required for the terminal to render the image is long, resulting in low efficiency of electronic map display.
  • the present application provides a method, device, device and storage medium for obtaining a real-time electronic map, which solves the problems of low acquisition efficiency and low display efficiency.
  • the technical solutions are as follows:
  • the embodiment of the present application provides a method for acquiring a real-time electronic map, where the method is applied to a terminal, including:
  • the determining, according to the map identifier and the visible area, the tile identifier of the at least one map tile to be displayed in the visible area including:
  • a base map model corresponding to the level of the real-life electronic map Determining, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, where the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to a map Tile
  • a tile identification of at least one of the map regions of the viewable area and the overlap region of the map area is determined.
  • the method before the determining the visible area in the current interface, the method further includes:
  • the step of determining the viewable area in the current interface is performed when it is detected that the current interface is zoomed or dragged.
  • the present application provides a method for obtaining a real-time electronic map, the method being applied to a server, including:
  • the map acquisition request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible area in the current interface;
  • the obtaining the map data of each map tile according to the map identifier and the tile identifier of each map tile includes:
  • the method before acquiring the map data of each map tile according to the storage file address, the offset address of each map tile, and the image size, the method further includes :
  • the map data of each map tile is stored according to a tile index corresponding to the real-life electronic map, an offset address of each map tile, and an image size.
  • the splitting the image corresponding to each level into multiple map tiles includes:
  • the base map model corresponding to the level is obtained, and according to the segmentation rule of the base map model, the image corresponding to the level is divided into multiple map tiles.
  • the present application provides an apparatus for acquiring a real-time electronic map, the apparatus being applied to a terminal, including:
  • a determining module configured to determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface
  • the determining module is further configured to determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
  • a first sending module configured to send a map obtaining request to the server, where the map obtaining request carries the map identifier and a tile identifier of each map tile;
  • a first receiving module configured to receive map data of each of the map tiles returned by the server
  • a rendering module configured to render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
  • the determining module is further configured to determine a level of the real-life electronic map; and determine, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map
  • the base map model includes a map area including a plurality of sub-areas, one sub-area corresponding to one map tile; mapping the visible area to the base map model; determining the visible area and A tile identifier of at least one of the map tiles in the overlap region of the map region.
  • the determining module is further configured to detect the current interface, and when it is detected that the current interface is zoomed or dragged, determine a visible area in the current interface.
  • the present application provides an apparatus for obtaining a real-time electronic map, the apparatus being applied to a server, including:
  • a second receiving module configured to receive a map obtaining request of the terminal, where the map obtaining request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible region of the current interface ;
  • An acquiring module configured to acquire, according to the map identifier and the tile identifier of each map tile, map data of each map tile;
  • a second sending module configured to return, to the terminal, map data of each map tile, so that the terminal renders a real-life electronic map corresponding to each map tile in the visible region.
  • the acquiring module is further configured to determine, according to the map identifier, a storage file address of the real-life electronic map, and determine, according to the tile identifier of each map tile, the Offset address and image size of the map tiles; acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
  • the device further includes:
  • a storage module configured to acquire an image of the real-time electronic map; determine, according to the image, an image corresponding to each of the plurality of levels; and divide the image corresponding to each level into a plurality of map tiles, And determining a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile; according to the tile index corresponding to the real-life electronic map, an offset address and an image of each map tile Size, storing the map data of each map tile.
  • the storage module is further configured to acquire, for each level, a base map model corresponding to the level, and cut an image corresponding to the level according to a splitting rule of the base map model. Divided into multiple map tiles.
  • the application provides a terminal, the terminal comprising one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, code set or instruction The set, the at least one instruction, the at least one piece of program, the set of codes, or the set of instructions being loaded and executed by the one or more processors to implement a method of acquiring a live electronic map as described above The action performed.
  • the application provides a server including one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, code set, or instruction The set, the at least one instruction, the at least one piece of program, the set of codes, or the set of instructions being loaded and executed by the one or more processors to implement a method of acquiring a live electronic map as described above The action performed.
  • the present application provides a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program
  • the set of codes or the set of instructions is loaded and executed by a processor to perform the operations performed in the method of acquiring a live electronic map as described above.
  • the present application provides a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program
  • the set of codes or the set of instructions is loaded by a processor and executed to perform the operations performed in the method of obtaining a live electronic map as described above.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application
  • FIG. 3 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application
  • FIG. 4 is a flowchart of a method for acquiring a real-time electronic map according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of a base map model provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of determining a tile identifier of a map tile according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for acquiring a real-time electronic map according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an apparatus for acquiring a real-time electronic map according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
  • the implementation environment includes: a terminal 101 and a server 102.
  • the terminal 101 and the server 102 are connected by a network.
  • the client is run in the terminal 101, based on which the client can log in to the server 102 to perform data interaction with the server 102 to use the map service provided by the server.
  • the map service is a service for displaying real-life electronic maps of the interior or local spatial geography of a building.
  • the map service can also be a service for displaying geographic maps of geographic locations.
  • the map service is not specifically limited.
  • the terminal 101 can be any terminal that installs the client.
  • the client can be a map application or a browser application.
  • the terminal 101 may be any device that installs the client, such as a mobile phone terminal, a PAD (Portable Android Device) terminal, or a computer terminal.
  • Server 102 is the backend server for the client.
  • the server 102 can be a map server or a browser server or the like.
  • the server 102 can be a server, or a server cluster composed of several servers, or a cloud computing server center.
  • the implementation environment may also include other terminals.
  • the other terminals are connected to the server 102 through a network, and the other terminals also run a client. Based on the client, the server 102 can be logged in, thereby uploading a real-life electronic map of the site to the server 102. Image.
  • the server 102 provides a map service to the terminal 101 based on the image of the real-time electronic map.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • the embodiment of the present application provides a method for acquiring a real-time electronic map, and the method is applied to a terminal.
  • the method includes:
  • Step 201 Determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface.
  • Step 202 Determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area.
  • Step 203 Send a map acquisition request to the server, where the map acquisition request carries the map identifier and the tile identifier of each map tile, and receives map data of each map tile returned by the server.
  • Step 204 Render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
  • the determining, by the map identifier and the visible area, the tile identifier of the at least one map tile to be displayed in the visible area including:
  • a base map model corresponding to the level of the real-life electronic map the base map model comprising a map area, the map area comprising a plurality of sub-areas, and one sub-area corresponding to a map tile;
  • a tile identifier of at least one map tile in the overlap region of the viewable area and the map region is determined.
  • the method before determining the visible area in the current interface, the method further includes:
  • the step of determining the viewable area in the current interface is performed when it is detected that the current interface is zoomed or dragged.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • the present application provides a method for obtaining a real-time electronic map, which is applied in a server.
  • the method includes:
  • Step 301 Receive a map acquisition request of the terminal, where the map acquisition request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible region in the current interface.
  • Step 302 Acquire map data of each map tile according to the map identifier and the tile identifier of each map tile.
  • Step 303 Return the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
  • the acquiring the map data of each map tile according to the map identifier and the tile identifier of each map tile includes:
  • the map data of each map tile is obtained according to the storage file address, the offset address of each map tile, and the image size.
  • the method before acquiring the map data of each map tile according to the storage file address, the offset address of each map tile, and the image size, the method further includes:
  • the map data of each map tile is stored according to a tile index corresponding to the real-life electronic map, an offset address of each map tile, and an image size.
  • the image corresponding to each level is divided into multiple map tiles, including:
  • the base map model corresponding to the level is obtained, and according to the segmentation rule of the base map model, the image corresponding to the level is divided into multiple map tiles.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • a strategy for storing a file index and a plurality of map tiles for a live view electronic map is adopted, which increases image reading efficiency and improves the response speed of the server for a large number of map tile requests. Therefore, before the terminal acquires the real-time electronic map from the server, the server divides and stores the entire image of the real-time electronic map.
  • the method includes:
  • Step 401 The server acquires an image of a real-time electronic map.
  • the real-life electronic map can be a real-life electronic map of any place; for example, the real-life electronic map is a real-life electronic map of a shopping mall, a real-life electronic map of an office building, a real-life electronic map of a residential building, and a real-life electronic map of a hotel.
  • the real-time electronic map is not specifically limited in the embodiment of the present application.
  • the image may be an original image of the real-time electronic map, or may be an image compressed by the real-time electronic map.
  • This image can be uploaded by other terminals. It can also be an image stored locally by the server.
  • the source of the image of the real-time electronic map is not specifically limited.
  • the step of the other terminal uploading the image of the real-time electronic map to the server may be: when other terminals upload a real-life electronic map showing a certain place to the server, the other terminal
  • the server sends a configuration request, and the configuration request carries an image of the real-time electronic map.
  • the step may be: the server receives the configuration request sent by the other terminal, and obtains an image of the real-time electronic map from the configuration request.
  • the server acquires the map identifier of the real-life electronic map, and associates and stores the image of the real-view electronic map and the map identifier.
  • the configuration request carries a map identifier of the real-life electronic map
  • the server acquires a map identifier of the real-life electronic map from the configuration request.
  • the server generates a map identifier of the real-world electronic map.
  • the other terminal may be a terminal that acquires the real-time electronic map in addition to the terminal that obtains the real-life electronic map.
  • the map identifier may be a map number, a map location, a map name, and the like.
  • the map identifier is not specifically limited in the embodiment of the present application.
  • the real-life electronic map is a map constructed inside the XXX hot pot restaurant, and the map identifier of the real-life electronic map may be a XXX hot pot restaurant.
  • the server when the server obtains the image of the real-time electronic map, the image may be directly segmented to obtain a plurality of map tiles.
  • the server may first scale the image to obtain multiple levels of images, and then slice the images of multiple levels to obtain multiple map tiles.
  • the subsequent terminal can obtain the map data of the map tile according to the level of the current interface, thereby improving the accuracy.
  • the server may acquire an image of a real-life electronic map, and may also acquire images of multiple real-time electronic maps.
  • the server acquires images of multiple real-life electronic maps, all or part of the real-time electronic map images in the images of the plurality of real-life electronic maps may be stored in the server or uploaded by other terminals.
  • Step 402 The server determines an image corresponding to each of the plurality of levels according to the image.
  • One level corresponds to one image
  • the server determines, according to the image, images corresponding to each of the plurality of levels by the following steps (1) to (2), including:
  • the server determines multiple levels.
  • the server determines the maximum level, and the integers between the largest level and the largest level are combined into multiple levels. For example, if the maximum level is 3, the server will make 1, 2, and 3 multiple levels.
  • the server can directly set a default maximum level.
  • the server can also determine the maximum level based on the image size of the image.
  • the step may be: the server determines the maximum level according to the image size and the preset resolution of the image by using the following formula 1.
  • L is the maximum level
  • picture ⁇ width1 is the width of the image
  • picture ⁇ height1 is the height of the image
  • x is the preset resolution.
  • the preset resolution may be set and changed as needed.
  • the preset resolution is not specifically limited; for example, the preset resolution may be 256 or 128 or the like.
  • the server can also set the real-life electronic maps of different regions to correspond to different maximum levels; for example, the maximum level of the real-life electronic map of the Beijing area is 3, and the maximum level of the real-life electronic map of Shanghai is 4.
  • the step of determining, by the server, the maximum level may be: determining, by the server, an area identifier of the real-life electronic map, and obtaining, according to the area identifier, a maximum level of the real-life electronic map from the correspondence between the area identifier and the maximum level.
  • the area identifier may be an area name, a location, or a number. In the embodiment of the present application, the area identifier is not specifically limited.
  • the server For each level, the server scales the image according to the level to obtain an image corresponding to the level.
  • the server performs a reduction process on the image of the real-time electronic map to obtain an image corresponding to each level.
  • this step may be: when the level is the maximum level L, the image corresponding to the level is the image of the real electronic map.
  • the server compresses the length and width of the image corresponding to the Lth level by half to obtain an image corresponding to the L-1 level.
  • the server compresses the length and width of the image corresponding to the L-1 level by half to obtain the L-th.
  • the server performs an enlargement process on the image of the real-time electronic map to obtain an image corresponding to each level.
  • the step may be: when the level is the first level, the image corresponding to the level is an image of the real electronic map.
  • the server doubles the length and width of the image corresponding to the first level to obtain an image corresponding to the second level.
  • the server doubles the length and width of the image corresponding to the second level to obtain an image corresponding to the third level, and so on, until an image corresponding to the maximum level L is obtained, and L images are obtained.
  • Step 403 The server divides the image corresponding to each level into a plurality of map tiles, and determines a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile.
  • this step can be implemented by the following steps (1) to (3), including:
  • the server divides the image corresponding to each level into multiple map tiles.
  • the server may divide the image corresponding to each level into multiple map tiles according to a segmentation rule.
  • the segmentation rule can be set and changed as needed.
  • the segmentation rule is not specifically limited; for example, the segmentation rule is a fixed number of segments or a fixed size segmentation.
  • the server divides the image corresponding to the hierarchy into the fixed number of map tiles according to the fixed number.
  • the size of each map tile may be the same or different. In the embodiment of the present application, the same size of each map tile is taken as an example for description.
  • the server divides the image corresponding to the hierarchy into a plurality of map tiles according to the fixed size, and the size of each map tile is equal to or smaller than the size. Fixed size.
  • the server may segment the image corresponding to each level by means of the base map model corresponding to the level.
  • the step may be: for each image corresponding to the hierarchy, the server determines a basemap model corresponding to the level of the real-life electronic map, where the basemap model includes multiple sub-regions, and the image corresponding to the hierarchy is The centered form is superimposed on the basemap model, and a plurality of map tiles of the image corresponding to the hierarchy are determined according to an overlapping area of the image corresponding to the hierarchy and the basemap model.
  • the server determines an overlapping area of the image corresponding to the hierarchy and the basemap model, and determines the plurality of sub-regions included in the overlapping area as the plurality of map tiles of the image corresponding to the level. Among them, one sub-area corresponds to one map tile. It should be noted that the image corresponding to the level may not completely overlap with the central area of the map tile.
  • the server may determine the complete sub-area included in the overlapping area as the plurality of map tiles of the image corresponding to the level, It is also possible to determine the complete sub-region and the incomplete sub-region included in the overlapping region as a plurality of map tiles of the image corresponding to the hierarchy.
  • the base map model corresponding to each level of each real-life electronic map may be stored in advance in the server; correspondingly, the step of determining, by the server, the base map model corresponding to the level of the real-life electronic map may be: the server according to the map of the real-life electronic map The identifier and the level, and the base map model corresponding to the level of the real-life electronic map is obtained from the correspondence between the map identifier, the level, and the base map model.
  • the basemap model may be a square or a rectangle. In the embodiment of the present application, the basemap model is not specifically limited.
  • the side length of the basemap model is Picture ⁇ width2 is the width of the image corresponding to the level of the real-time electronic map, and picture ⁇ height2 is the height of the image corresponding to the level of the real-time electronic map.
  • Each sub-region in the basemap model has the same size, both x*x.
  • x is the preset resolution.
  • the preset resolution may be 256 or 128; for example, when the preset resolution is 256, the size of each sub-area in the basemap model is 256*256.
  • the server After the server determines each map tile, it can also determine the identity of each map tile.
  • the identifier of the map tile may be a level corresponding to the map tile + an offset position of the map tile corresponding to the basemap model of the hierarchy.
  • the offset position includes the number of offset rows and the number of offset columns of the map tile in the basemap model corresponding to the hierarchy.
  • the number of offset lines is the deviation between the number of rows of the map tile and the specified number of rows.
  • the offset column number is the deviation between the number of columns of the map tile and the specified number of columns.
  • the specified number of rows can be any value; for example, the specified number of rows can be 0 or 1.
  • the number of specified columns can be any value, for example, the number of specified columns can also be 0 or 1.
  • the identifier of the map tile may be represented as levelp_m_n, where p is the level corresponding to the map tile, m is the number of offset rows of the map tile in the basemap model corresponding to the hierarchy, and n is the map tile. The number of offset columns in the basemap model for this level.
  • the image has a total of three levels, namely, level 1, level 2, and level 3.
  • the base map model corresponding to level 1 includes four sub-areas, and the image corresponding to level 1 is superimposed.
  • the server divides the image corresponding to level 1 into four map tiles, namely level1_0_0, level1_0_1, level1_1_0, and level1_1_1.
  • the server divides the image corresponding to level 2 into 8 map slices, which are level2_1_0, level2_1_1, level2_1_2, level2_1_3, level2_2_0, level2_2_1, level2_2_2, and level2_2_3.
  • the server divides the image corresponding to level 3 into 32 map slices, which are level3_2_0, level3_2_1, level3_2_2, level3_2_3, level3_2_4, level3_2_5, level3_2_6, level3_2_7, level3_3_0, level3_3_1, level3_3_2, level3_3_3, level3_3_4, level3_3_5, level3_3_6, level3_3_7, level3_4_0.
  • the server includes an image segmentation module.
  • the server may perform, by using the image segmentation module, splitting the image corresponding to each level into multiple map tiles. step.
  • the image segmentation module is not included in the server, and the step of dividing the image corresponding to each level into a plurality of map tiles is performed by the server-independent image segmentation device.
  • the step of the server dividing the image corresponding to each level into multiple map tiles may be: the server sends the image corresponding to each level to the image segmentation device.
  • the image segmentation device receives the image corresponding to each level sent by the server, and divides the image corresponding to each level into a plurality of map tiles, and returns multiple map tiles to the server.
  • the server receives a plurality of map tiles returned by the image segmentation device.
  • the process in which the image segmentation device divides the image corresponding to each level into a plurality of map tiles is the same as the process in which the server divides the image corresponding to each level into a plurality of map tiles. I will not repeat them here.
  • the server divides the image corresponding to each level into a plurality of map tiles
  • the tile data of each map tile is stored in the storage file.
  • the server sequentially stores the tile data of the map tile of each level according to the level.
  • the server determines the tile index corresponding to the real-life electronic map.
  • the server determines a storage location of the map tiles of all levels of the image, and determines the corresponding physical map corresponding to the image size of the image, the tile identifier of the map tile of all levels of the image, the tile image size, and the storage location.
  • Tile index The storage location of the map tile may be an offset address of the map tile in the storage file.
  • the tile index corresponding to the real electronic map is as follows:
  • pitcture.width1 is the width of the image
  • picture.height1 is the height of the image
  • level1_0_0 is the tile identifier of the map tile whose first layer offset position is 0_0
  • position(level 1_0_0) is the tile identifier is level1_0_0
  • the storage location of the map tile, length(level 1_0_0) is the length of the map tile whose tile is identified as level1_0_0.
  • levelL_m_n is the tile identifier of the map tile whose L-th layer offset position is m_n
  • position (levelL_m_n) is the storage location of the map tile whose tile identifier is levelL_m_n
  • length(levelL_m_n) is the map tile whose tile identifier is levelL_m_n The length of the piece.
  • the server determines the storage location of the Pth map tile: the server determines the space occupied by the tile index, the space length of the configuration information, and The total length of the space occupied by the first P-1 map tiles; the sum of the space occupied by the tile index, the space occupied by the configuration information, and the total length of the space occupied by the front P-1 map tiles as the first The storage location of P map tiles.
  • the storage location of the Pth map tile the length of the space occupied by the tile index + the length of the space occupied by the configuration information + the total length of the space occupied by the P-1 map tiles.
  • the space occupied by the tile index is used to store the tile index, and the space occupied by the tile index is generally expressed in bytes.
  • the length of the space occupied by the tile index can be calculated according to the size of the tile index. Of course, you can also set the length of the space occupied by the tile index to a fixed value. For example, the tile index can occupy a space of 3 or 4. When the tile index occupies a space length of 4, a 32-bit tile index can be stored in the 4 bytes.
  • the total length of the first P-1 map tiles is the space occupied by the first P-1 map tiles, and is generally expressed in bytes.
  • the length of the configuration information is also the length of the space occupied by the configuration information, and is generally expressed in bytes.
  • the length of the configuration information can be a default length or can be calculated by the server.
  • the step of determining the length of the configuration information by the server may be: the server uses the product of the length of the unit configuration information corresponding to each map tile and the total number of the map tiles as the configuration information. length.
  • the server determines the offset address and image size of each map tile.
  • the server determines the offset address of the map tile according to the identifier of the map tile.
  • the offset address of each map tile is determined according to the storage location of each map tile, and the identifier of each map tile is associated and stored. Offset address.
  • the determining, by the server according to the identifier of the map tile, the offset address of the map tile may be: the server corresponding to the identifier and the offset address according to the identifier of the map tile Get the offset address of the map tile in the relationship.
  • Step 404 The server stores map data of each map tile according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
  • the server stores the map data of each map tile and the tile index of the real-world electronic map into the storage file according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
  • the server may be in the form of Table 1 below.
  • the server maps the map data of each map tile according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
  • the steps of storing the tile index of the live electronic map into the storage file may be:
  • the server calculates the space length (in bytes) occupied by the tile index according to the tile index corresponding to the real map, and sequentially stores the space occupied by the tile index and the tile index in the storage file;
  • the offset address and image size of the map tiles are sequentially stored in the storage file for the map data of each map tile.
  • the tile index is after the space length occupied by the tile index
  • the map data of each map tile is after the tile index
  • each of the map tiles is sequentially stored in the order of the hierarchy and the map tiles in each hierarchy. Map data for map tiles.
  • the server first stores the space occupied by the tile index in the storage file, stores the tile index, and stores the map data of the first map tile of the first level.
  • the map data of the second map tile of the first level is stored, and the map data of the third map tile of the first level is stored until the map data of all the map tiles of the first level is stored.
  • the server then stores the map data of the first map tile of the second level, and stores the map data of the second map tile of the second level until the map data of all the map tiles of the second level is stored, and so on. Map data for all map tiles of all levels is stored.
  • the map tile level 1_0_0 represents a map tile whose tile identifier is level 1_0_0.
  • the map tile level1_0_1 represents a map tile whose tile identifier is level1_0_1;
  • the map tile levelL_m_n represents a map tile whose tile identifier is levelL_m_n.
  • the map data of each map tile can be stored in the server or in a server-independent storage device.
  • the server sends the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size to the storage device.
  • the map data of each map tile and the tile index of the real-world electronic map are stored by the storage device according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
  • the server may also associate the map identifier of the real-life electronic map with the storage file.
  • the address is stored so as to obtain the storage address of the storage file according to the map identifier when the map data of the real-time electronic map is uniquely owned.
  • a strategy for storing a file index and a plurality of map tiles for a live view electronic map is adopted, which increases image reading efficiency and improves the response speed of the server for a large number of map tile requests.
  • the server saves the file combination of multiple map tiles into one file, the read/write efficiency will be greatly improved, and the disk fragmentation is reduced, and the speed of reading, deleting and copying the map storage file is obviously improved.
  • the terminal can obtain the real-time electronic map by using the following process. Referring to FIG. 6, the method includes:
  • Step 601 The terminal acquires a map identifier of the real-life electronic map to be displayed in the current interface.
  • the terminal determines the map identifier of the real-life electronic map to be displayed in the current interface.
  • the terminal stores a correspondence between a URL (Uniform Resource Locator) of the current interface and a map identifier; correspondingly, the step may be: the terminal acquires a URL of the current interface, according to the The URL obtains the map identifier of the real-life electronic map from the correspondence between the URL and the map identifier.
  • URL Uniform Resource Locator
  • the user when the user searches for a real-life electronic map of a certain place in the map application of the terminal, the user inputs a map identifier of the real-time electronic map to be displayed.
  • the step may be: the terminal acquires the map identifier of the live electronic map to be displayed that is input.
  • Step 602 The terminal determines a visible area in the current interface.
  • the viewable area is an area in which the live electronic map is displayed. And, the size of the visible area is not greater than the size of the current interface.
  • the terminal determines the visible area in the current interface.
  • the visible area in the current interface may change. Therefore, before determining the visible area in the current interface, the terminal detects the current interface, and when detecting that the current interface is zoomed or dragged, the terminal determines the visible area in the current interface.
  • step 601 may be performed first, and then step 602 may be performed; step 602 may be performed first, and then step 601 is performed; in the embodiment of the present application, the order of execution of steps 601 and 602 is not specifically limited.
  • Step 603 The terminal determines, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area.
  • the terminal may be implemented by the following steps (1) to (4), including:
  • the terminal determines the level of the real-life electronic map to be displayed in the current interface.
  • the terminal determines the scaling of the current interface, and determines the level of the real-world electronic map according to the scaling.
  • the terminal stores the correspondence between the scaling and the level.
  • the step of determining, by the terminal, the level of the real-time electronic map according to the zoom ratio may be: the terminal acquiring, according to the zoom level, the level of the real-time electronic map from the correspondence between the zoom level and the level.
  • the terminal determines, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to one map tile. .
  • the correspondence between the map identifier, the level and the base map model is stored in the terminal.
  • the step of determining, by the terminal, the basemap model corresponding to the level of the real-life electronic map according to the level and the map identifier may be: the terminal corresponding to the map identifier, the level, and the basemap model according to the level and the map identifier
  • the base map model corresponding to the level of the real-life electronic map is determined in the relationship.
  • the terminal maps the visible area to the basemap model according to the location of the visible area at the current interface.
  • the terminal determines a tile identifier of at least one map tile in the visible area and the overlapping area of the map area.
  • the overlapping area includes at least one sub-area for displaying at least one map tile, and one map tile is displayed in one sub-area.
  • the terminal determines the number of the at least one sub-area as the tile identifier of the at least one map tile.
  • the overlapping area of the visible area and the map area includes six sub-areas, namely level3_2_1, level3_2_2, level3_2_3, level3_3_1, level3_3_2, and level3_3_3.
  • the terminal uses level3_2_1, level3_2_2, level3_2_3, level3_3_1, level3_3_2, and level3_3_3 as tile identifiers of multiple map tiles.
  • the server acquires the tile index of the real electronic map from the storage device.
  • the terminal may obtain a tile index from the server according to the map identifier, and then obtain a tile identifier of the at least one map tile from the tile index.
  • this step can be implemented by the following steps (A) to (C), including:
  • the terminal acquires a tile index of the real-time electronic map to be displayed from the server according to the map identifier of the real-life electronic map.
  • the terminal sends an index request, and the index request carries a map identifier of the real-time electronic map to be displayed.
  • the server receives the index request of the terminal, and obtains a tile index of the real-life electronic map to be displayed according to the map identifier of the real-time electronic map to be displayed, and sends the tile index to the terminal.
  • the terminal receives a tile index of the real-life electronic map to be displayed sent by the server.
  • the server After the server generates the tile index of the real-time electronic map, the server associates the map identifier and the tile index of the real-life electronic map.
  • the step of obtaining, by the server, the tile index of the real-life electronic map according to the map identifier of the real-life electronic map the server may obtain, according to the map identifier of the real-view electronic map, the corresponding relationship between the map identifier and the tile index Tile index of the real map.
  • the terminal determines a level of the real-life electronic map to be displayed in the current interface, and determines at least one map tile according to the level and the visible area of the real-time electronic map to be displayed.
  • This step is the same as the process of determining at least one map tile in the above steps (1) to (4).
  • the tile index includes a tile identifier of each map tile. After the terminal determines the map tile, the tile identifier of each map tile is obtained from the tile index.
  • Step 604 The terminal sends a map acquisition request to the server, where the map acquisition request carries the map identifier and the tile identifier of each map tile.
  • the map identifier can be a map number, and the tile identifier can be a tile number.
  • the map identifier and the tile identifier are not specifically limited.
  • Step 605 The server receives the map acquisition request of the terminal, and acquires map data of each map tile according to the map identifier and the tile identifier of each map tile.
  • the server acquires the map identifier and the tile identifier of each map tile from the map acquisition request, and then acquires map data of each map tile by the following steps (1) to (3).
  • the server acquires a storage file address of the real-life electronic map according to the map identifier.
  • the server After the server stores the map data of the real-time electronic map, the server stores the correspondence between the map identifier of the real-time electronic map and the storage file address.
  • the step may be: the server obtains the storage file address of the real-life electronic map from the correspondence between the map identifier and the storage file address according to the map identifier.
  • the server determines the offset address and image size of each map tile according to the tile identifier of each map tile.
  • the server stores a correspondence relationship between the tile identifier, the offset address, and the image size of each map tile.
  • the step may be: the server obtains the offset address and the image size of each map tile from the corresponding relationship between the tile identifier, the offset address, and the image size according to the tile identifier of each map tile.
  • the index of the real-time electronic map includes an offset address and an image size of each map tile.
  • the step may be: the server obtains an offset address and an image size of each map tile from the tile index of the real-time electronic map according to the tile identifier of each map tile.
  • the server acquires map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
  • the server acquires the storage file of the real-time electronic map according to the storage file address; and acquires map data of each tile map from the storage file according to the offset address and the image size of each map tile.
  • Step 606 The server sends map data of each map tile to the terminal.
  • Step 607 The terminal receives the map data of each map tile sent by the server, and renders the real-life electronic map corresponding to each map tile in the visible area of the current interface.
  • the terminal determines a display area of the map tile in the viewable area, and renders map data of the map tile in a display area of the map tile.
  • the terminal renders each map tile according to the above method to obtain a real-time electronic map.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map. Moreover, since the cleaning data of the map tile is reduced, the dependence of the terminal on the network bandwidth is reduced, the problem that the request waiting time is long in the weak network environment is solved, and the response speed and fluency of the real-life electronic map are increased.
  • An embodiment of the present application provides an apparatus for acquiring a real-time electronic map, where the apparatus is configured to perform the steps performed by the terminal in the method for acquiring a real-life electronic map.
  • the device includes:
  • a determining module 801 configured to determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface;
  • the determining module 801 is further configured to determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
  • a first sending module 802 configured to send a map obtaining request to the server, where the map obtaining request carries the map identifier and a tile identifier of each map tile;
  • a first receiving module 803, configured to receive map data of each map tile returned by the server
  • the rendering module 804 is configured to render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
  • the determining module 801 is further configured to determine a level of the real-life electronic map; and according to the level and the map identifier, determine a base map model corresponding to the level of the real-life electronic map, where the base map model includes a map area, the map area includes a plurality of sub-areas, one sub-area corresponding to one map tile; mapping the visible area to the base map model; determining at least one map in the overlapping area of the visible area and the map area Tile identification of tiles.
  • the determining module 801 is further configured to detect the current interface, and when it is detected that the current interface is zoomed or dragged, determine a visible area in the current interface.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • An embodiment of the present application provides an apparatus for acquiring a real-time electronic map, where the apparatus is configured to perform the steps performed by a server in the method for acquiring a real-life electronic map.
  • the device includes:
  • the second receiving module 901 is configured to receive a map obtaining request of the terminal, where the map obtaining request carries the map identifier of the real-life electronic map to be requested and the tile identifier of each map tile to be displayed in the visible area of the current interface. ;
  • the obtaining module 902 is configured to obtain map data of each map tile according to the map identifier and the tile identifier of each map tile.
  • the second sending module 903 is configured to return the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
  • the obtaining module 902 is further configured to determine, according to the map identifier, a storage file address of the real-world electronic map, and determine, according to the tile identifier of each map tile, each of the map tiles. Offset address and image size; acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
  • the device further includes:
  • a storage module configured to acquire an image of the real-time electronic map; determine, according to the image, an image corresponding to each of the plurality of levels; divide the image corresponding to each level into a plurality of map tiles, and determine the a tile index corresponding to the real electronic map, and an offset address and an image size of each map tile; storing each of the map indexes corresponding to the real map electronic map, the offset address of each map tile, and the image size Map data for map tiles.
  • the storage module is further configured to acquire, for each level, a base map model corresponding to the level, and divide the image corresponding to the level into multiple according to the cutting rule of the base map model. Map tiles.
  • the server divides the image of the real-time electronic map into a plurality of map tiles.
  • the terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
  • the device for obtaining the real-life electronic map provided by the above embodiment is only illustrated by the division of the above functional modules when acquiring the real-life electronic map. In actual applications, the functions may be assigned differently according to needs.
  • the function module is completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device for obtaining the real-time electronic map provided by the above embodiment is the same as the method for obtaining the real-time electronic map. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
  • FIG. 10 is a structural block diagram of a terminal 1000 provided by an exemplary embodiment of the present application.
  • the terminal 1000 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and a MP4 (Moving Picture Experts Group Audio Layer IV). Level 4) Player, laptop or desktop computer.
  • Terminal 1000 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
  • the terminal 1000 includes a processor 1001 and a memory 1002.
  • Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 1001 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 1001 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen.
  • the processor 1001 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 1002 can include one or more computer readable storage media, which can be non-transitory.
  • the memory 1002 may also include high speed random access memory, as well as non-volatile memory such as one or more magnetic disk storage devices, flash memory storage devices.
  • the non-transitory computer readable storage medium in the memory 1002 is configured to store at least one instruction for execution by the processor 1001 to implement the acquisition of the real world provided by the method embodiment of the present application. The method of electronic maps.
  • the terminal 1000 optionally further includes: a peripheral device interface 1003 and at least one peripheral device.
  • the processor 1001, the memory 1002, and the peripheral device interface 1003 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 1004, a touch display screen 1005, a camera 1006, an audio circuit 1007, a positioning component 1008, and a power source 1009.
  • the peripheral device interface 1003 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 1001 and the memory 1002.
  • processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 1001, memory 1002, and peripheral interface 1003 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 1004 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal.
  • the radio frequency circuit 1004 communicates with the communication network and other communication devices via electromagnetic signals.
  • the radio frequency circuit 1004 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 1004 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • the radio frequency circuit 1004 can communicate with other terminals via at least one wireless communication protocol.
  • the wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network.
  • the radio frequency circuit 1004 may further include an NFC (Near Field Communication) related circuit, which is not limited in this application.
  • the display screen 1005 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display screen 1005 is a touch display screen, display screen 1005 also has the ability to capture touch signals over the surface or surface of display screen 1005.
  • the touch signal can be input to the processor 1001 as a control signal for processing.
  • the display screen 1005 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 1005 may be one, and the front panel of the terminal 1000 is disposed; in other embodiments, the display screen 1005 may be at least two, respectively disposed on different surfaces of the terminal 1000 or in a folded design; In still other embodiments, the display screen 1005 can be a flexible display screen disposed on a curved surface or a folded surface of the terminal 1000. Even the display screen 1005 can be set as a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 1005 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera assembly 1006 is used to capture images or video.
  • camera assembly 1006 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 1006 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 1007 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing into the processor 1001 for processing, or input to the RF circuit 1004 for voice communication.
  • the microphones may be multiple, and are respectively disposed at different parts of the terminal 1000.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from the processor 1001 or the RF circuit 1004 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • the audio circuit 1007 can also include a headphone jack.
  • the positioning component 1008 is configured to locate the current geographic location of the terminal 1000 to implement navigation or LBS (Location Based Service).
  • the positioning component 1008 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
  • a power supply 1009 is used to power various components in the terminal 1000.
  • the power source 1009 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery can support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • terminal 1000 also includes one or more sensors 1010.
  • the one or more sensors 1010 include, but are not limited to, an acceleration sensor 1011, a gyro sensor 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015, and a proximity sensor 1016.
  • the acceleration sensor 1011 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 1000.
  • the acceleration sensor 1011 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 1001 can control the touch display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 1011.
  • the acceleration sensor 1011 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 1012 can detect the body direction and the rotation angle of the terminal 1000, and the gyro sensor 1012 can cooperate with the acceleration sensor 1011 to collect the 3D motion of the user to the terminal 1000. Based on the data collected by the gyro sensor 1012, the processor 1001 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • the pressure sensor 1013 may be disposed at a side border of the terminal 1000 and/or a lower layer of the touch display screen 1005.
  • the pressure sensor 1013 When the pressure sensor 1013 is disposed on the side frame of the terminal 1000, the user's holding signal to the terminal 1000 can be detected, and the processor 1001 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1013.
  • the operability control on the UI interface is controlled by the processor 1001 according to the user's pressure on the touch display screen 1005.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 1014 is configured to collect a fingerprint of the user, and the processor 1001 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 1001 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • the fingerprint sensor 1014 can be provided with the front, back or side of the terminal 1000. When the physical button or the manufacturer logo is set on the terminal 1000, the fingerprint sensor 1014 can be integrated with the physical button or the manufacturer logo.
  • Optical sensor 1015 is used to collect ambient light intensity.
  • the processor 1001 can control the display brightness of the touch display 1005 based on the ambient light intensity acquired by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1005 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is lowered.
  • the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 according to the ambient light intensity collected by the optical sensor 1015.
  • Proximity sensor 1016 also referred to as a distance sensor, is typically disposed on the front panel of terminal 1000.
  • the proximity sensor 1016 is used to collect the distance between the user and the front side of the terminal 1000.
  • the processor 1001 controls the touch display screen 1005 to switch from the bright screen state to the interest screen state; when the proximity sensor 1016 detects When the distance between the user and the front side of the terminal 1000 gradually becomes larger, the processor 1001 controls the touch display screen 1005 to switch from the information screen state to the bright screen state.
  • FIG. 8 does not constitute a limitation to the terminal 1000, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
  • FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
  • the server 1100 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 1101 and one. Or more than one memory 1102, wherein the memory 1102 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 1101 to implement the method for acquiring a real-life electronic map provided by the foregoing various method embodiments.
  • the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface for input and output.
  • the server may also include other components for implementing the functions of the device, and details are not described herein.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium is applied to a terminal, where the computer readable storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least An instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the operations performed by the terminal in the method of obtaining a live electronic map of the above-described embodiments.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium is applied to a terminal, where the computer readable storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least An instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by a processor to implement the operations performed by the server in the method of obtaining a live electronic map of the above-described embodiments.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)
  • Instructional Devices (AREA)

Abstract

The present application discloses a satellite-view electronic map acquisition method and device, an apparatus, and a storage medium, pertaining to the technical field of computers. The method comprises: determining a map identifier of a satellite-view electronic map to be displayed in a current interface, and determining a visible region in the current interface; determining, according to the map identifier and the visible region, a tile identifier of at least one map tile to be displayed in the visible region; sending a map acquisition request to a server, the map acquisition request carrying the map identifier and the tile identifier of each map tile; receiving map data of each map tile returned by the server; and rendering, in the visible region according to the map data of each map tile, a satellite-view electronic map corresponding to each map tile. In the embodiments of the present application, only map data of a map tile in a visible region is acquired, thereby reducing the amount of acquired map data and improving the efficiency of data acquisition and display.

Description

获取实景电子地图的方法、装置、设备和存储介质Method, device, device and storage medium for obtaining real-life electronic map
本申请要求于2018年03月22日提交、申请号为201810241135.5、发明名称为“获取实景电子地图的方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201810241135.5, entitled "Method, Apparatus, Apparatus, and Storage Medium for Acquiring Electronic Maps", which is filed on March 22, 2018, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及计算机技术领域,特别涉及一种获取实景电子地图的方法、装置、设备和存储介质。The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for acquiring a real-time electronic map.
背景技术Background technique
电子地图经过多年的发展,已经在人类生活中起到不可或缺的作用;并且随着用户需求的提升,地理位置电子地图已经不能满足用户的需求了。为了使得用户能够对于建筑物内部或者局部空间地理情况进行查看,终端需要获取建筑物内部或者局部空间地理的实景电子地图。After years of development, electronic maps have played an indispensable role in human life; and as user needs have increased, geographic maps have been unable to meet the needs of users. In order to enable the user to view the geography of the interior of the building or the local space, the terminal needs to obtain a real-time electronic map of the interior of the building or the local spatial geography.
目前,服务器中存储多个区域的实景电子地图的图像。当用户查看某个区域的实景电子地图时,终端向服务器发送实景区域的区域标识。服务器根据该区域标识,获取该区域的实景电子地图的地图数据,向终端发送该地图数据。终端基于该地图数据,渲染该实景电子地图的图像。Currently, an image of a real-time electronic map of a plurality of areas is stored in a server. When the user views the real-time electronic map of an area, the terminal sends the area identifier of the real-est area to the server. The server acquires map data of the real-life electronic map of the area according to the area identifier, and sends the map data to the terminal. The terminal renders an image of the real-time electronic map based on the map data.
在实现本申请的过程中,申请人发现现有技术至少存在以下问题:In the process of implementing the present application, the applicant found that the prior art has at least the following problems:
随着图像处理技术的发展,图像的分辨率越来越高。从而导致终端从服务器中获取该实景电子地图的地图数据的过程网络耗时长,导致获取效率低。并且,终端渲染该图像所需的时间较长,导致电子地图的展示效率低。With the development of image processing technology, the resolution of images is getting higher and higher. Therefore, the process network that the terminal acquires the map data of the real-time electronic map from the server takes a long time, resulting in low acquisition efficiency. Moreover, the time required for the terminal to render the image is long, resulting in low efficiency of electronic map display.
发明内容Summary of the invention
本申请提供了一种获取实景电子地图的方法、装置、设备和存储介质,解决了获取效率低以及展示效率低的问题。技术方案如下:The present application provides a method, device, device and storage medium for obtaining a real-time electronic map, which solves the problems of low acquisition efficiency and low display efficiency. The technical solutions are as follows:
一方面,本申请实施例提供了一种获取实景电子地图的方法,所述方法应用在终端中,包括:In one aspect, the embodiment of the present application provides a method for acquiring a real-time electronic map, where the method is applied to a terminal, including:
确定当前界面中待显示的实景电子地图的地图标识,以及确定所述当前界面中的可视区域;Determining a map identifier of a real-life electronic map to be displayed in the current interface, and determining a visible area in the current interface;
根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识;Determining, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
向服务器发送地图获取请求,所述地图获取请求携带所述地图标识和每个地图瓦片的瓦片标识,接收所述服务器返回的所述每个地图瓦片的地图数据;Sending a map acquisition request to the server, the map acquisition request carrying the map identifier and a tile identifier of each map tile, and receiving map data of each map tile returned by the server;
根据所述每个地图瓦片的地图数据,在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And realizing the real-time electronic map corresponding to each map tile in the visible area according to the map data of each map tile.
在一个可能的实现方式中,所述根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识,包括:In a possible implementation, the determining, according to the map identifier and the visible area, the tile identifier of the at least one map tile to be displayed in the visible area, including:
确定所述实景电子地图的层级;Determining a hierarchy of the real-life electronic map;
根据所述层级和所述地图标识,确定所述实景电子地图的所述层级对应的底图模型,所述底图模型包括地图区域,所述地图区域包括多个子区域,一个子区域对应一个地图瓦片;Determining, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, where the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to a map Tile
将所述可视区域映射到所述底图模型中;Mapping the viewable area to the basemap model;
确定所述可视区域和所述地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。A tile identification of at least one of the map regions of the viewable area and the overlap region of the map area is determined.
在一个可能的实现方式中,所述确定所述当前界面中的可视区域之前,所述方法还包括:In a possible implementation, before the determining the visible area in the current interface, the method further includes:
对所述当前界面进行检测;Testing the current interface;
当检测到所述当前界面被缩放或者拖动时,执行所述确定所述当前界面中的可视区域的步骤。The step of determining the viewable area in the current interface is performed when it is detected that the current interface is zoomed or dragged.
一方面,本申请提供了一种获取实景电子地图的方法,所述方法应用在服务器中,包括:In one aspect, the present application provides a method for obtaining a real-time electronic map, the method being applied to a server, including:
接收终端的地图获取请求,所述地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识;Receiving a map acquisition request of the terminal, where the map acquisition request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible area in the current interface;
根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据;Obtaining map data of each map tile according to the map identifier and the tile identifier of each map tile;
向所述终端返回所述每个地图瓦片的地图数据,以使所述终端在所述可视 区域中渲染所述每个地图瓦片对应的实景电子地图。Returning the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,所述根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据,包括:In a possible implementation, the obtaining the map data of each map tile according to the map identifier and the tile identifier of each map tile includes:
根据所述地图标识,确定所述实景电子地图的存储文件地址;Determining, according to the map identifier, a storage file address of the real-life electronic map;
根据所述每个地图瓦片的瓦片标识,确定所述每个地图瓦片的偏移地址和图像大小;Determining an offset address and an image size of each of the map tiles according to the tile identifier of each map tile;
根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据。And acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
在一个可能的实现方式中,所述根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据之前,所述方法还包括:In a possible implementation manner, before acquiring the map data of each map tile according to the storage file address, the offset address of each map tile, and the image size, the method further includes :
获取所述实景电子地图的图像;Obtaining an image of the real-life electronic map;
根据所述图像,确定多个层级中的每个层级对应的图像;Determining an image corresponding to each of the plurality of levels according to the image;
将所述每个层级对应的图像切分为多个地图瓦片,并确定所述实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;And dividing the image corresponding to each level into a plurality of map tiles, and determining a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile;
根据所述实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储所述每个地图瓦片的地图数据。The map data of each map tile is stored according to a tile index corresponding to the real-life electronic map, an offset address of each map tile, and an image size.
在一个可能的实现方式中,所述将所述每个层级对应的图像切分为多个地图瓦片,包括:In a possible implementation, the splitting the image corresponding to each level into multiple map tiles includes:
对于每个层级,获取所述层级对应的底图模型,根据所述底图模型的切分规则,将所述层级对应的图像切分为多个地图瓦片。For each level, the base map model corresponding to the level is obtained, and according to the segmentation rule of the base map model, the image corresponding to the level is divided into multiple map tiles.
一方面,本申请提供了一种获取实景电子地图的装置,所述装置应用在终端中,包括:In one aspect, the present application provides an apparatus for acquiring a real-time electronic map, the apparatus being applied to a terminal, including:
确定模块,用于确定当前界面中待显示的实景电子地图的地图标识,以及确定所述当前界面中的可视区域;a determining module, configured to determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface;
所述确定模块,还用于根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识;The determining module is further configured to determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
第一发送模块,用于向服务器发送地图获取请求,所述地图获取请求携带所述地图标识和每个地图瓦片的瓦片标识;a first sending module, configured to send a map obtaining request to the server, where the map obtaining request carries the map identifier and a tile identifier of each map tile;
第一接收模块,用于接收所述服务器返回的所述每个地图瓦片的地图数据;a first receiving module, configured to receive map data of each of the map tiles returned by the server;
渲染模块,用于根据所述每个地图瓦片的地图数据,在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And a rendering module, configured to render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,所述确定模块,还用于确定所述实景电子地图的层级;根据所述层级和所述地图标识,确定所述实景电子地图的所述层级对应的底图模型,所述底图模型包括地图区域,所述地图区域包括多个子区域,一个子区域对应一个地图瓦片;将所述可视区域映射到所述底图模型中;确定所述可视区域和所述地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。In a possible implementation manner, the determining module is further configured to determine a level of the real-life electronic map; and determine, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map The base map model includes a map area including a plurality of sub-areas, one sub-area corresponding to one map tile; mapping the visible area to the base map model; determining the visible area and A tile identifier of at least one of the map tiles in the overlap region of the map region.
在一个可能的实现方式中,所述确定模块,还用于对所述当前界面进行检测;当检测到所述当前界面被缩放或者拖动时,确定所述当前界面中的可视区域。In a possible implementation, the determining module is further configured to detect the current interface, and when it is detected that the current interface is zoomed or dragged, determine a visible area in the current interface.
一方面,本申请提供了一种获取实景电子地图的装置,所述装置应用在服务器中,包括:In one aspect, the present application provides an apparatus for obtaining a real-time electronic map, the apparatus being applied to a server, including:
第二接收模块,用于接收终端的地图获取请求,所述地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识;a second receiving module, configured to receive a map obtaining request of the terminal, where the map obtaining request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible region of the current interface ;
获取模块,用于根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据;An acquiring module, configured to acquire, according to the map identifier and the tile identifier of each map tile, map data of each map tile;
第二发送模块,用于向所述终端返回所述每个地图瓦片的地图数据,以使所述终端在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And a second sending module, configured to return, to the terminal, map data of each map tile, so that the terminal renders a real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,所述获取模块,还用于根据所述地图标识,确定所述实景电子地图的存储文件地址;根据所述每个地图瓦片的瓦片标识,确定所述每个地图瓦片的偏移地址和图像大小;根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据。In a possible implementation, the acquiring module is further configured to determine, according to the map identifier, a storage file address of the real-life electronic map, and determine, according to the tile identifier of each map tile, the Offset address and image size of the map tiles; acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
在一个可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
存储模块,用于获取所述实景电子地图的图像;根据所述图像,确定多个层级中的每个层级对应的图像;将所述每个层级对应的图像切分为多个地图瓦片,并确定所述实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;根据所述实景电子地图对应的瓦片索引、每个地图瓦片的偏移地 址和图像大小,存储所述每个地图瓦片的地图数据。a storage module, configured to acquire an image of the real-time electronic map; determine, according to the image, an image corresponding to each of the plurality of levels; and divide the image corresponding to each level into a plurality of map tiles, And determining a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile; according to the tile index corresponding to the real-life electronic map, an offset address and an image of each map tile Size, storing the map data of each map tile.
在一个可能的实现方式中,所述存储模块,还用于对于每个层级,获取所述层级对应的底图模型,根据所述底图模型的切分规则,将所述层级对应的图像切分为多个地图瓦片。In a possible implementation, the storage module is further configured to acquire, for each level, a base map model corresponding to the level, and cut an image corresponding to the level according to a splitting rule of the base map model. Divided into multiple map tiles.
一方面,本申请提供了一种终端,所述终端包括一个或多个处理器和一个或多个存储器,所述一个或多个存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由所述一个或多个处理器加载并执行以实现如上述所述的获取实景电子地图的方法中所执行的操作。In one aspect, the application provides a terminal, the terminal comprising one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, code set or instruction The set, the at least one instruction, the at least one piece of program, the set of codes, or the set of instructions being loaded and executed by the one or more processors to implement a method of acquiring a live electronic map as described above The action performed.
一方面,本申请提供了一种服务器,所述服务器包括一个或多个处理器和一个或多个存储器,所述一个或多个存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由所述一个或多个处理器加载并执行以实现如上述所述的获取实景电子地图的方法中所执行的操作。In one aspect, the application provides a server including one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, code set, or instruction The set, the at least one instruction, the at least one piece of program, the set of codes, or the set of instructions being loaded and executed by the one or more processors to implement a method of acquiring a live electronic map as described above The action performed.
一方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由处理器加载并执行以实现如上述所述的获取实景电子地图的方法中所执行的操作。In one aspect, the present application provides a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program The set of codes or the set of instructions is loaded and executed by a processor to perform the operations performed in the method of acquiring a live electronic map as described above.
一方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由处理器加载并执行以实现上述所述的获取实景电子地图的方法中所执行的操作。In one aspect, the present application provides a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program The set of codes or the set of instructions is loaded by a processor and executed to perform the operations performed in the method of obtaining a live electronic map as described above.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
附图说明DRAWINGS
图1是本申请实施例提供的一种实施环境的示意图;1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
图2是本申请实施例提供的一种获取实景电子地图的方法流程图;2 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application;
图3是本申请实施例提供的一种获取实景电子地图的方法流程图;3 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application;
图4是本申请实施例提供的一种获取实景电子地图的方法流程图;4 is a flowchart of a method for acquiring a real-time electronic map according to an embodiment of the present application;
图5是本申请实施例提供的一种构建底图模型的示意图;FIG. 5 is a schematic diagram of a base map model provided by an embodiment of the present application; FIG.
图6是本申请实施例提供的一种获取实景电子地图的方法流程图;FIG. 6 is a flowchart of a method for obtaining a real-time electronic map according to an embodiment of the present application;
图7是本申请实施例提供的一种确定地图瓦片的瓦片标识的示意图;FIG. 7 is a schematic diagram of determining a tile identifier of a map tile according to an embodiment of the present application;
图8是本申请实施例提供的一种获取实景电子地图的装置结构示意图;FIG. 8 is a schematic structural diagram of an apparatus for acquiring a real-time electronic map according to an embodiment of the present application;
图9是本申请实施例提供的一种获取实景电子地图的装置结构示意图;9 is a schematic structural diagram of an apparatus for acquiring a real-time electronic map according to an embodiment of the present application;
图10是本申请实施例提供的一种终端的结构示意图;FIG. 10 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure;
图11是本申请实施例提供的一种服务器的结构示意图。FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objects, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
本申请实施例提供了一种实施环境的示意图,参见图1,该实施环境包括:终端101和服务器102。终端101与服务器102之间通过网络连接。终端101中运行客户端,基于该客户端可以登录服务器102,从而与服务器102来进行数据交互,以使用服务器所提供的地图服务。该地图服务为展示建筑物内部或者局部空间地理情况的实景电子地图的服务。当然,该地图服务也可以为展示地理位置的地理位置电子地图的服务。在本申请实施例中,对该地图服务不作具体限定。The embodiment of the present application provides a schematic diagram of an implementation environment. Referring to FIG. 1, the implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 are connected by a network. The client is run in the terminal 101, based on which the client can log in to the server 102 to perform data interaction with the server 102 to use the map service provided by the server. The map service is a service for displaying real-life electronic maps of the interior or local spatial geography of a building. Of course, the map service can also be a service for displaying geographic maps of geographic locations. In the embodiment of the present application, the map service is not specifically limited.
终端101可以为安装该客户端的任一终端。该客户端可以为地图应用或者浏览器应用等。例如,终端101可以为手机终端、PAD(Portable Android Device,平板电脑)终端或者电脑终端等任一安装该客户端的设备。服务器102是该客户端的后台服务器。例如,该服务器102可以为地图服务器或者浏览器服务器等。并且,服务器102可以为一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务器中心。The terminal 101 can be any terminal that installs the client. The client can be a map application or a browser application. For example, the terminal 101 may be any device that installs the client, such as a mobile phone terminal, a PAD (Portable Android Device) terminal, or a computer terminal. Server 102 is the backend server for the client. For example, the server 102 can be a map server or a browser server or the like. And, the server 102 can be a server, or a server cluster composed of several servers, or a cloud computing server center.
该实施环境中还可以包括其他终端,其他终端与服务器102之间通过网络连接,其他终端中也运行客户端,基于该客户端可以登录服务器102,从而向服务器102上传某个场所的实景电子地图的图像。服务器102基于该实景电子地图的图像为终端101提供地图服务。The implementation environment may also include other terminals. The other terminals are connected to the server 102 through a network, and the other terminals also run a client. Based on the client, the server 102 can be logged in, thereby uploading a real-life electronic map of the site to the server 102. Image. The server 102 provides a map service to the terminal 101 based on the image of the real-time electronic map.
在现有技术中,终端获取实景电子地图时,直接从服务器中获取该实景电子地图的整个图像,并渲染整个图像。然而图像分辨率越来越高,从而导致实景电子地图的获取效率以及展示效率低。在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the prior art, when the terminal acquires the real-time electronic map, the entire image of the real-time electronic map is directly obtained from the server, and the entire image is rendered. However, the image resolution is getting higher and higher, which leads to the acquisition efficiency of the real-time electronic map and the low display efficiency. In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
本申请实施例提供了一种获取实景电子地图的方法,该方法应用在终端中,参见图2,该方法包括:The embodiment of the present application provides a method for acquiring a real-time electronic map, and the method is applied to a terminal. Referring to FIG. 2, the method includes:
步骤201:确定当前界面中待显示的实景电子地图的地图标识,以及确定该当前界面中的可视区域。Step 201: Determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface.
步骤202:根据该地图标识和该可视区域,确定该可视区域中待显示的至少一个地图瓦片的瓦片标识。Step 202: Determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area.
步骤203:向服务器发送地图获取请求,该地图获取请求携带该地图标识和每个地图瓦片的瓦片标识,接收该服务器返回的该每个地图瓦片的地图数据。Step 203: Send a map acquisition request to the server, where the map acquisition request carries the map identifier and the tile identifier of each map tile, and receives map data of each map tile returned by the server.
步骤204:根据该每个地图瓦片的地图数据,在该可视区域中渲染该每个地图瓦片对应的实景电子地图。Step 204: Render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,该根据该地图标识和该可视区域,确定该可视区域中待显示的至少一个地图瓦片的瓦片标识,包括:In a possible implementation, the determining, by the map identifier and the visible area, the tile identifier of the at least one map tile to be displayed in the visible area, including:
确定该实景电子地图的层级;Determining the level of the live electronic map;
根据该层级和该地图标识,确定该实景电子地图的该层级对应的底图模型,该底图模型包括地图区域,该地图区域包括多个子区域,一个子区域对应一个地图瓦片;Determining, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, the base map model comprising a map area, the map area comprising a plurality of sub-areas, and one sub-area corresponding to a map tile;
将该可视区域映射到该底图模型中;Mapping the viewable area to the basemap model;
确定该可视区域和该地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。A tile identifier of at least one map tile in the overlap region of the viewable area and the map region is determined.
在一个可能的实现方式中,该确定该当前界面中的可视区域之前,该方法还包括:In a possible implementation, before determining the visible area in the current interface, the method further includes:
对该当前界面进行检测;Detecting the current interface;
当检测到该当前界面被缩放或者拖动时,执行该确定该当前界面中的可视区域的步骤。The step of determining the viewable area in the current interface is performed when it is detected that the current interface is zoomed or dragged.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
本申请提供了一种获取实景电子地图的方法,该方法应用在服务器中,参见图3,该方法包括:The present application provides a method for obtaining a real-time electronic map, which is applied in a server. Referring to FIG. 3, the method includes:
步骤301:接收终端的地图获取请求,该地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识。Step 301: Receive a map acquisition request of the terminal, where the map acquisition request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible region in the current interface.
步骤302:根据该地图标识和该每个地图瓦片的瓦片标识,获取该每个地图瓦片的地图数据。Step 302: Acquire map data of each map tile according to the map identifier and the tile identifier of each map tile.
步骤303:向该终端返回该每个地图瓦片的地图数据,以使该终端在该可视区域中渲染该每个地图瓦片对应的实景电子地图。Step 303: Return the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,该根据该地图标识和该每个地图瓦片的瓦片标识,获取该每个地图瓦片的地图数据,包括:In a possible implementation, the acquiring the map data of each map tile according to the map identifier and the tile identifier of each map tile includes:
根据该地图标识,确定该实景电子地图的存储文件地址;Determining, according to the map identifier, a storage file address of the real-life electronic map;
根据该每个地图瓦片的瓦片标识,确定该每个地图瓦片的偏移地址和图像大小;Determining an offset address and an image size of each map tile according to the tile identifier of each map tile;
根据该存储文件地址、该每个地图瓦片的偏移地址和图像大小,获取该每个地图瓦片的地图数据。The map data of each map tile is obtained according to the storage file address, the offset address of each map tile, and the image size.
在一个可能的实现方式中,该根据该存储文件地址、该每个地图瓦片的偏移地址和图像大小,获取该每个地图瓦片的地图数据之前,该方法还包括:In a possible implementation, before acquiring the map data of each map tile according to the storage file address, the offset address of each map tile, and the image size, the method further includes:
获取该实景电子地图的图像;Obtaining an image of the real electronic map;
根据该图像,确定多个层级中的每个层级对应的图像;Determining an image corresponding to each of the plurality of levels according to the image;
将该每个层级对应的图像切分为多个地图瓦片,并确定该实景电子地图对 应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;Dividing the image corresponding to each level into a plurality of map tiles, and determining a tile index corresponding to the real-time electronic map, and an offset address and an image size of each map tile;
根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储该每个地图瓦片的地图数据。The map data of each map tile is stored according to a tile index corresponding to the real-life electronic map, an offset address of each map tile, and an image size.
在一个可能的实现方式中,该将该每个层级对应的图像切分为多个地图瓦片,包括:In a possible implementation manner, the image corresponding to each level is divided into multiple map tiles, including:
对于每个层级,获取该层级对应的底图模型,根据该底图模型的切分规则,将该层级对应的图像切分为多个地图瓦片。For each level, the base map model corresponding to the level is obtained, and according to the segmentation rule of the base map model, the image corresponding to the level is divided into multiple map tiles.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
在本申请实施例中,对实景电子地图采取一个存储文件存储瓦片索引和多张地图瓦片的策略,增加了图像读取效率,提高了服务器对于大量地图瓦片请求的响应速度。因此,终端从服务器中获取实景电子地图之前,服务器将该实景电子地图的整个图像进行切分并存储。参见图4,该方法包括:In the embodiment of the present application, a strategy for storing a file index and a plurality of map tiles for a live view electronic map is adopted, which increases image reading efficiency and improves the response speed of the server for a large number of map tile requests. Therefore, before the terminal acquires the real-time electronic map from the server, the server divides and stores the entire image of the real-time electronic map. Referring to Figure 4, the method includes:
步骤401:服务器获取实景电子地图的图像。Step 401: The server acquires an image of a real-time electronic map.
实景电子地图可以为任一场所的实景电子地图;例如,实景电子地图为商场的实景电子地图、写字楼的实景电子地图、居民楼的实景电子地图、酒店的实景电子地图等。在本申请实施例中对该实景电子地图不作具体限定。另外,该图像可以为该实景电子地图的原始图像,也可以为该实景电子地图压缩后的图像。The real-life electronic map can be a real-life electronic map of any place; for example, the real-life electronic map is a real-life electronic map of a shopping mall, a real-life electronic map of an office building, a real-life electronic map of a residential building, and a real-life electronic map of a hotel. The real-time electronic map is not specifically limited in the embodiment of the present application. In addition, the image may be an original image of the real-time electronic map, or may be an image compressed by the real-time electronic map.
该图像可以为其他终端上传的。也可以为服务器本地存储的图像。在本申请实施例中,对该实景电子地图的图像的来源不作具体限定。当该实景电子地图的图像为其他终端上传的图像时,其他终端向服务器中上传实景电子地图的图像的步骤可以为:当其他终端向服务器上传展示某个场所的实景电子地图时,其他终端向服务器发送配置请求,该配置请求中携带该实景电子地图的图像。相应的,本步骤可以为:服务器接收该其他终端发送的配置请求,从该配置请求中获取该实景电子地图的图像。This image can be uploaded by other terminals. It can also be an image stored locally by the server. In the embodiment of the present application, the source of the image of the real-time electronic map is not specifically limited. When the image of the real-life electronic map is an image uploaded by another terminal, the step of the other terminal uploading the image of the real-time electronic map to the server may be: when other terminals upload a real-life electronic map showing a certain place to the server, the other terminal The server sends a configuration request, and the configuration request carries an image of the real-time electronic map. Correspondingly, the step may be: the server receives the configuration request sent by the other terminal, and obtains an image of the real-time electronic map from the configuration request.
在本申请实施例中,服务器获取到该实景电子地图的图像之后,服务器获取该实景电子地图的地图标识,关联存储该实景电子地图的图像和地图标识。 在一个可能的实现方式中,该配置请求中携带该实景电子地图的地图标识,服务器从该配置请求中获取该实景电子地图的地图标识。在另一个可能的实现方式中,服务器生成该实景电子地图的地图标识。In the embodiment of the present application, after the server acquires the image of the real-life electronic map, the server acquires the map identifier of the real-life electronic map, and associates and stores the image of the real-view electronic map and the map identifier. In a possible implementation manner, the configuration request carries a map identifier of the real-life electronic map, and the server acquires a map identifier of the real-life electronic map from the configuration request. In another possible implementation, the server generates a map identifier of the real-world electronic map.
需要说明的是,其他终端为除该获取实景电子地图的终端,也可以为获取实景电子地图的终端。该地图标识可以为地图编号,地图位置、地图名称等。在本申请实施例中对该地图标识不作具体限定。例如,该实景电子地图为XXX火锅店内部构造的地图,则该实景电子地图的地图标识可以为XXX火锅店。It should be noted that the other terminal may be a terminal that acquires the real-time electronic map in addition to the terminal that obtains the real-life electronic map. The map identifier may be a map number, a map location, a map name, and the like. The map identifier is not specifically limited in the embodiment of the present application. For example, the real-life electronic map is a map constructed inside the XXX hot pot restaurant, and the map identifier of the real-life electronic map may be a XXX hot pot restaurant.
在本申请实施例中,服务器获取到该实景电子地图的图像时,可以直接对该图像进行切分,得到多个地图瓦片。当然,服务器也可以先对该图像进行缩放处理,得到多个层级的图像,然后对多个层级的图像进行切分,得到多个地图瓦片。后续终端可以根据当前界面的层级,获取地图瓦片的地图数据,从而提高了准确性。In the embodiment of the present application, when the server obtains the image of the real-time electronic map, the image may be directly segmented to obtain a plurality of map tiles. Of course, the server may first scale the image to obtain multiple levels of images, and then slice the images of multiple levels to obtain multiple map tiles. The subsequent terminal can obtain the map data of the map tile according to the level of the current interface, thereby improving the accuracy.
需要说明的一点是,在本步骤401中服务器可以获取一个实景电子地图的图像,也可以获取多个实景电子地图的图像。当服务器获取多个实景电子地图的图像时,多个实景电子地图的图像中的全部或者部分实景电子地图的图像可以为服务器中存储的,也可以由其他终端上传。It should be noted that in this step 401, the server may acquire an image of a real-life electronic map, and may also acquire images of multiple real-time electronic maps. When the server acquires images of multiple real-life electronic maps, all or part of the real-time electronic map images in the images of the plurality of real-life electronic maps may be stored in the server or uploaded by other terminals.
步骤402:服务器根据该图像,确定多个层级中的每个层级对应的图像。Step 402: The server determines an image corresponding to each of the plurality of levels according to the image.
一个层级对应一个图像,服务器根据该图像,通过以下步骤(1)至(2),确定多个层级中的每个层级对应的图像,包括:One level corresponds to one image, and the server determines, according to the image, images corresponding to each of the plurality of levels by the following steps (1) to (2), including:
(1):服务器确定多个层级。(1): The server determines multiple levels.
服务器确定最大层级,将1、最大层级以及1到最大层级之间的整数组成多个层级。例如,最大层级为3,则服务器将1、2、3组成多个层级。The server determines the maximum level, and the integers between the largest level and the largest level are combined into multiple levels. For example, if the maximum level is 3, the server will make 1, 2, and 3 multiple levels.
在本步骤中,服务器可以直接设置一个默认的最大层级。服务器也可以根据该图像的图像大小,确定最大层级。当服务器根据该图像的图像大小,确定最大层级时,本步骤可以为:服务器根据该图像的图像大小和预设分辨率,通过以下公式一确定最大层级。In this step, the server can directly set a default maximum level. The server can also determine the maximum level based on the image size of the image. When the server determines the maximum level according to the image size of the image, the step may be: the server determines the maximum level according to the image size and the preset resolution of the image by using the following formula 1.
公式一:
Figure PCTCN2019073031-appb-000001
Formula one:
Figure PCTCN2019073031-appb-000001
其中,L为该最大层级,picture·width1为该图像的宽度,picture·height1为该图像的高度,x为预设分辨率。预设分辨率可以根据需要进行设置并更改,在本申请实施例中,对预设分辨率不作具体限定;例如,预设分辨率可以为256或 者128等。Where L is the maximum level, picture·width1 is the width of the image, picture·height1 is the height of the image, and x is the preset resolution. The preset resolution may be set and changed as needed. In the embodiment of the present application, the preset resolution is not specifically limited; for example, the preset resolution may be 256 or 128 or the like.
需要说明的一点是,服务器还可以设置不同区域的实景电子地图对应不同的最大层级;例如,北京区域的实景电子地图的最大层级为3,而上海的实景电子地图的最大层级为4。相应的,服务器确定最大层级的步骤可以为:服务器确定该实景电子地图的区域标识,根据该区域标识,从区域标识和最大层级的对应关系中获取该实景电子地图的最大层级。其中,区域标识可以为区域名称、位置或者编号等,在本申请实施例中,对区域标识不作具体限定。It should be noted that the server can also set the real-life electronic maps of different regions to correspond to different maximum levels; for example, the maximum level of the real-life electronic map of the Beijing area is 3, and the maximum level of the real-life electronic map of Shanghai is 4. Correspondingly, the step of determining, by the server, the maximum level may be: determining, by the server, an area identifier of the real-life electronic map, and obtaining, according to the area identifier, a maximum level of the real-life electronic map from the correspondence between the area identifier and the maximum level. The area identifier may be an area name, a location, or a number. In the embodiment of the present application, the area identifier is not specifically limited.
(2):对于每个层级,服务器根据该层级,对该图像进行缩放处理,得到该层级对应的图像。(2): For each level, the server scales the image according to the level to obtain an image corresponding to the level.
在一种可能的实现方式中,服务器对该实景电子地图的图像进行缩小处理,得到每个层级对应的图像。相应的,本步骤可以为:当该层级为最大层级L时,该层级对应的图像即为该实景电子地图的图像。服务器将第L层级对应的图像的长和宽各压缩一半,得到第L-1层级对应的图像;同样,服务器将第L-1层级对应的图像的长和宽各压缩一半,得到第L-2层级对应的图像,以此类推,直到得到第一层级对应的图像为止,共得到L张图像。In a possible implementation manner, the server performs a reduction process on the image of the real-time electronic map to obtain an image corresponding to each level. Correspondingly, this step may be: when the level is the maximum level L, the image corresponding to the level is the image of the real electronic map. The server compresses the length and width of the image corresponding to the Lth level by half to obtain an image corresponding to the L-1 level. Similarly, the server compresses the length and width of the image corresponding to the L-1 level by half to obtain the L-th. The image corresponding to the 2 levels, and so on, until the image corresponding to the first level is obtained, a total of L images are obtained.
在另一种可能的实现方式中,服务器对该实景电子地图的图像进行放大处理,得到每个层级对应的图像。相应的,本步骤可以为:当该层级为第一层级时,该层级对应的图像即为该实景电子地图的图像。服务器将第一层级对应的图像的长和宽各放到两倍,得到第二层级对应的图像。同样,服务器将第二层级对应的图像的长和宽各放大两倍,得到第三层级对应的图像,以此类推,直到得到最大层级L对应的图像为止,得到L张图像。In another possible implementation manner, the server performs an enlargement process on the image of the real-time electronic map to obtain an image corresponding to each level. Correspondingly, the step may be: when the level is the first level, the image corresponding to the level is an image of the real electronic map. The server doubles the length and width of the image corresponding to the first level to obtain an image corresponding to the second level. Similarly, the server doubles the length and width of the image corresponding to the second level to obtain an image corresponding to the third level, and so on, until an image corresponding to the maximum level L is obtained, and L images are obtained.
步骤403:服务器将每个层级对应的图像切分为多个地图瓦片,并确定该实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小。Step 403: The server divides the image corresponding to each level into a plurality of map tiles, and determines a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile.
对于每个层级,该层级对应的多个地图瓦片组成该层级对应的图像。相应的,本步骤可以通过以下步骤(1)至(3)实现,包括:For each level, a plurality of map tiles corresponding to the level constitute an image corresponding to the level. Correspondingly, this step can be implemented by the following steps (1) to (3), including:
(1):服务器将每个层级对应的图像切分为多个地图瓦片。(1): The server divides the image corresponding to each level into multiple map tiles.
在一个可能的实现方式中,服务器可以按照切分规则,将每个层级对应的图像切分为多个地图瓦片。切分规则可以根据需要进行设置并更改,在本申请实施例中,对切分规则不作具体限定;例如,切分规则为固定数目切分或者固定尺寸切分等。当该切分规则为固定数目切分时,对于每个层级对应的图像, 服务器根据该固定数目,将该层级对应的图像切分为该固定数目个地图瓦片。其中,每个地图瓦片的大小可以相同,也可以不同;在本申请实施例中,以每个地图瓦片的大小相同为例进行说明。当切换规则为固定尺寸切分时,对于每个层级对应的图像,服务器按照该固定尺寸,将该层级对应的图像切分为多个地图瓦片,每个地图瓦片的大小等于或者小于该固定尺寸。In a possible implementation manner, the server may divide the image corresponding to each level into multiple map tiles according to a segmentation rule. The segmentation rule can be set and changed as needed. In the embodiment of the present application, the segmentation rule is not specifically limited; for example, the segmentation rule is a fixed number of segments or a fixed size segmentation. When the segmentation rule is a fixed number of segments, for each image corresponding to the hierarchy, the server divides the image corresponding to the hierarchy into the fixed number of map tiles according to the fixed number. The size of each map tile may be the same or different. In the embodiment of the present application, the same size of each map tile is taken as an example for description. When the switching rule is a fixed size segmentation, for each image corresponding to the hierarchy, the server divides the image corresponding to the hierarchy into a plurality of map tiles according to the fixed size, and the size of each map tile is equal to or smaller than the size. Fixed size.
在另一个可能的实现方式中,服务器可以借助于层级对应的底图模型,对每个层级对应的图像进行切分。相应的,本步骤可以为:对于每个层级对应的图像,服务器确定该实景电子地图的该层级对应的底图模型,其中,该底图模型中包括多个子区域,将该层级对应的图像以居中的形式叠加到该底图模型中,根据该层级对应的图像与该底图模型的重叠区域,确定该层级对应的图像的多个地图瓦片。In another possible implementation manner, the server may segment the image corresponding to each level by means of the base map model corresponding to the level. Correspondingly, the step may be: for each image corresponding to the hierarchy, the server determines a basemap model corresponding to the level of the real-life electronic map, where the basemap model includes multiple sub-regions, and the image corresponding to the hierarchy is The centered form is superimposed on the basemap model, and a plurality of map tiles of the image corresponding to the hierarchy are determined according to an overlapping area of the image corresponding to the hierarchy and the basemap model.
其中,服务器确定该层级对应的图像与该底图模型的重叠区域,将该重叠区域包括的多个子区域确定为该层级对应的图像的多个地图瓦片。其中,一个子区域对应一个地图瓦片。需要说明的是,该层级对应的图像与该地图瓦片的中心区域可能不完全重叠。因此,该重叠区域中包括的多个子区域中有完整的子区域和不完整的子区域,服务器可以将该重叠区域包括的完整的子区域确定为该层级对应的图像的多个地图瓦片,也可以将该重叠区域包括的完整的子区域和不完整的子区域均确定为该层级对应的图像的多个地图瓦片。The server determines an overlapping area of the image corresponding to the hierarchy and the basemap model, and determines the plurality of sub-regions included in the overlapping area as the plurality of map tiles of the image corresponding to the level. Among them, one sub-area corresponds to one map tile. It should be noted that the image corresponding to the level may not completely overlap with the central area of the map tile. Therefore, the plurality of sub-areas included in the overlapping area have a complete sub-area and an incomplete sub-area, and the server may determine the complete sub-area included in the overlapping area as the plurality of map tiles of the image corresponding to the level, It is also possible to determine the complete sub-region and the incomplete sub-region included in the overlapping region as a plurality of map tiles of the image corresponding to the hierarchy.
服务器中可以事先存储每个实景电子地图的每个层级对应的底图模型;相应的,服务器确定该实景电子地图的该层级对应的底图模型的步骤可以为:服务器根据该实景电子地图的地图标识和该层级,从地图标识、层级和底图模型的对应关系中获取该实景电子地图的该层级对应的底图模型。其中,底图模型可以为正方形,也可以为长方形,在本申请实施例中,对底图模型不作具体限定。当该底图模型为正方形时,该底图模型的边长为
Figure PCTCN2019073031-appb-000002
picture·width2为该实景电子地图的该层级对应的图像的宽度,picture·height2为该实景电子地图的该层级对应的图像的高度。该底图模型中的每个子区域的大小为相同,均为x*x。其中,x为预设分辨率。该预设分辨率可以为256或者128;例如,当该预设分辨率为256时,则该底图模型中的每个子区域的大小为256*256。
The base map model corresponding to each level of each real-life electronic map may be stored in advance in the server; correspondingly, the step of determining, by the server, the base map model corresponding to the level of the real-life electronic map may be: the server according to the map of the real-life electronic map The identifier and the level, and the base map model corresponding to the level of the real-life electronic map is obtained from the correspondence between the map identifier, the level, and the base map model. The basemap model may be a square or a rectangle. In the embodiment of the present application, the basemap model is not specifically limited. When the basemap model is a square, the side length of the basemap model is
Figure PCTCN2019073031-appb-000002
Picture·width2 is the width of the image corresponding to the level of the real-time electronic map, and picture·height2 is the height of the image corresponding to the level of the real-time electronic map. Each sub-region in the basemap model has the same size, both x*x. Where x is the preset resolution. The preset resolution may be 256 or 128; for example, when the preset resolution is 256, the size of each sub-area in the basemap model is 256*256.
服务器确定出每个地图瓦片后,还可以确定每个地图瓦片的标识。其中,地图瓦片的标识可以为该地图瓦片对应的层级+该地图瓦片在该层级对应的底 图模型的偏移位置。其中,偏移位置包括该地图瓦片在该层级对应的底图模型中的偏移行数和偏移列数。偏移行数为该地图瓦片的行数与指定行数之间的偏差。偏移列数为该地图瓦片的列数与指定列数之间的偏差。其中,指定行数可以为任一数值;例如,指定行数可以为0或者1。同样,指定列数也可以为任一数值,例如,指定列数也可以为0或者1。After the server determines each map tile, it can also determine the identity of each map tile. The identifier of the map tile may be a level corresponding to the map tile + an offset position of the map tile corresponding to the basemap model of the hierarchy. The offset position includes the number of offset rows and the number of offset columns of the map tile in the basemap model corresponding to the hierarchy. The number of offset lines is the deviation between the number of rows of the map tile and the specified number of rows. The offset column number is the deviation between the number of columns of the map tile and the specified number of columns. The specified number of rows can be any value; for example, the specified number of rows can be 0 or 1. Similarly, the number of specified columns can be any value, for example, the number of specified columns can also be 0 or 1.
例如,地图瓦片的标识可以表示为levelp_m_n,p为该地图瓦片对应的层级,m为该地图瓦片在该层级对应的底图模型中的偏移行数,n为该地图瓦片在该层级对应的底图模型中的偏移列数。For example, the identifier of the map tile may be represented as levelp_m_n, where p is the level corresponding to the map tile, m is the number of offset rows of the map tile in the basemap model corresponding to the hierarchy, and n is the map tile. The number of offset columns in the basemap model for this level.
例如,参见图5,L为3,则该图像一共有3个层级,分别为层级1、层级2和层级3,层级1对应的底图模型中包括4个子区域,将层级1对应的图像叠加到层级1对应的底图模型中,则服务器将该层级1对应的图像切分为4个地图瓦片,分别为level1_0_0、level1_0_1、level1_1_0和level1_1_1。同理,服务器将层级2对应的图像切分为8个地图切片,分别为level2_1_0、level2_1_1、level2_1_2、level2_1_3、level2_2_0、level2_2_1、level2_2_2和level2_2_3。服务器将层级3对应的图像切分为32个地图切片,分别为level3_2_0、level3_2_1、level3_2_2、level3_2_3、level3_2_4、level3_2_5、level3_2_6、level3_2_7、level3_3_0、level3_3_1、level3_3_2、level3_3_3、level3_3_4、level3_3_5、level3_3_6、level3_3_7、level3_4_0、level3_4_1、level3_4_2、level3_4_3、level3_4_4、level3_4_5、level3_4_6、level3_4_7、level3_5_0、level3_5_1、level3_5_2、level3_5_3、level3_5_4、level3_5_5、level3_5_6和level3_5_7。For example, referring to FIG. 5, when L is 3, the image has a total of three levels, namely, level 1, level 2, and level 3. The base map model corresponding to level 1 includes four sub-areas, and the image corresponding to level 1 is superimposed. To the basemap model corresponding to level 1, the server divides the image corresponding to level 1 into four map tiles, namely level1_0_0, level1_0_1, level1_1_0, and level1_1_1. Similarly, the server divides the image corresponding to level 2 into 8 map slices, which are level2_1_0, level2_1_1, level2_1_2, level2_1_3, level2_2_0, level2_2_1, level2_2_2, and level2_2_3. The server divides the image corresponding to level 3 into 32 map slices, which are level3_2_0, level3_2_1, level3_2_2, level3_2_3, level3_2_4, level3_2_5, level3_2_6, level3_2_7, level3_3_0, level3_3_1, level3_3_2, level3_3_3, level3_3_4, level3_3_5, level3_3_6, level3_3_7, level3_4_0. , level3_4_1, level3_4_2, level3_4_3, level3_4_4, level3_4_5, level3_4_6, level3_4_7, level3_5_0, level3_5_1, level3_5_2, level3_5_3, level3_5_4, level3_5_5, level3_5_6, and level3_5_7.
需要说明的一点是,在一个可能的实现方式中,服务器中包括图像切分模块,本步骤中服务器可以通过该图像切分模块执行将每个层级对应的图像切分为多个地图瓦片的步骤。在另一个可能的实现方式中,服务器中不包括图像切分模块,由独立于服务器的图像切分设备执行将每个层级对应的图像切分为多个地图瓦片的步骤。相应的,服务器将每个层级对应的图像切分为多个地图瓦片的操作的步骤可以为:服务器将每个层级对应的图像发送给图像切分设备。图像切分设备接收服务器发送的每个层级对应的图像,将每个层级对应的图像切分为多个地图瓦片,向服务器返回多个地图瓦片。服务器接收图像切分设备返回的多个地图瓦片。其中,图像切分设备将每个层级对应的图像切分为多个地图瓦片的过程和上述服务器将每个层级对应的图像切分为多个地图瓦片的过 程相同。在此不再赘述。It should be noted that, in a possible implementation manner, the server includes an image segmentation module. In this step, the server may perform, by using the image segmentation module, splitting the image corresponding to each level into multiple map tiles. step. In another possible implementation manner, the image segmentation module is not included in the server, and the step of dividing the image corresponding to each level into a plurality of map tiles is performed by the server-independent image segmentation device. Correspondingly, the step of the server dividing the image corresponding to each level into multiple map tiles may be: the server sends the image corresponding to each level to the image segmentation device. The image segmentation device receives the image corresponding to each level sent by the server, and divides the image corresponding to each level into a plurality of map tiles, and returns multiple map tiles to the server. The server receives a plurality of map tiles returned by the image segmentation device. The process in which the image segmentation device divides the image corresponding to each level into a plurality of map tiles is the same as the process in which the server divides the image corresponding to each level into a plurality of map tiles. I will not repeat them here.
需要说明的另一点是,服务器将每个层级对应的图像切分为多个地图瓦片之后,将每个地图瓦片的瓦片数据存储到存储文件中。并且,服务器在存储地图瓦片的瓦片数据时,按照层级,依次存储每个层级的地图瓦片的瓦片数据。Another point to be explained is that after the server divides the image corresponding to each level into a plurality of map tiles, the tile data of each map tile is stored in the storage file. Moreover, when storing the tile data of the map tile, the server sequentially stores the tile data of the map tile of each level according to the level.
(2):服务器确定该实景电子地图对应的瓦片索引。(2): The server determines the tile index corresponding to the real-life electronic map.
服务器确定该图像的所有层级的地图瓦片的存储位置,根据该图像的图像大小、该图像的所有层级的地图瓦片的瓦片标识、瓦片图像大小和存储位置,确定该实景电子地图对应的瓦片索引。其中,地图瓦片的存储位置可以为该地图瓦片在存储文件中的偏移地址。相应的,该实景电子地图对应的瓦片索引如下:The server determines a storage location of the map tiles of all levels of the image, and determines the corresponding physical map corresponding to the image size of the image, the tile identifier of the map tile of all levels of the image, the tile image size, and the storage location. Tile index. The storage location of the map tile may be an offset address of the map tile in the storage file. Correspondingly, the tile index corresponding to the real electronic map is as follows:
pitcture.width1*picture.height1,level1_0_0:position(level 1_0_0):length(level1_0_0),level1_0_1:position(level 1_0_1):length(level 1_0_1)…levelL_m_n:position(levelL_m_n):length(levelL_m_n)。Pitcture.width1*picture.height1,level1_0_0:position(level 1_0_0):length(level1_0_0),level1_0_1:position(level 1_0_1):length(level 1_0_1)...levelL_m_n:position(levelL_m_n):length(levelL_m_n).
其中,pitcture.width1为该图像的宽度,picture.height1为该图像的高度,level1_0_0为第1层偏移位置为0_0的地图瓦片的瓦片标识,position(level 1_0_0)为瓦片标识为level1_0_0的地图瓦片的存储位置,length(level 1_0_0)为瓦片标识为level1_0_0的地图瓦片的长度。levelL_m_n为第L层偏移位置为m_n的地图瓦片的瓦片标识,position(levelL_m_n)为瓦片标识为levelL_m_n的地图瓦片的存储位置,length(levelL_m_n)为瓦片标识为levelL_m_n的地图瓦片的长度。Where, pitcture.width1 is the width of the image, picture.height1 is the height of the image, level1_0_0 is the tile identifier of the map tile whose first layer offset position is 0_0, and position(level 1_0_0) is the tile identifier is level1_0_0 The storage location of the map tile, length(level 1_0_0) is the length of the map tile whose tile is identified as level1_0_0. levelL_m_n is the tile identifier of the map tile whose L-th layer offset position is m_n, position (levelL_m_n) is the storage location of the map tile whose tile identifier is levelL_m_n, and length(levelL_m_n) is the map tile whose tile identifier is levelL_m_n The length of the piece.
对于该实景电子地图包括的第P个地图瓦片,则服务器确定该第P个地图瓦片的存储位置的步骤可以为:服务器确定该瓦片索引所占空间长度、配置信息所占空间长度和前P-1个地图瓦片所占空间总长度;将该瓦片索引所占空间长度、该配置信息所占空间长度和前P-1个地图瓦片所占空间总长度之和作为该第P个地图瓦片的存储位置。例如,第P个地图瓦片的存储位置=该瓦片索引所占空间长度+该配置信息所占空间长度+前P-1个地图瓦片所占空间总长度。其中,瓦片索引所占空间用于存储瓦片索引,且瓦片索引所占空间长度,一般以字节数表示。瓦片索引所占空间长度可以根据瓦片索引的大小计算得到。当然,也可以设置瓦片索引所占空间长度为固定值。例如,瓦片索引所占空间长度可以为3或者4。当瓦片索引所占空间长度为4时,则该4个字节中可以存储32位 的瓦片索引。前P-1个地图瓦片的总长度为前P-1个地图瓦片所占的空间长度,一般也以字节数表示。配置信息的长度也为配置信息所占的空间长度,一般也以字节数表示。配置信息的长度可以为一个默认的长度,也可以由服务器进行计算得到。当该配置信息长度由服务器计算得到时,服务器确定该配置信息的长度的步骤可以为:服务器将每个地图瓦片对应的单位配置信息的长度和该地图瓦片的总数的乘积作为该配置信息的长度。其中,单位配置信息的长度可以根据需要进行设置并更改,在本申请实施例中,对单位配置信息的长度不作具体限定;例如,单位配置信息的长度可以为40或者30等。当该单位配置信息的长度为40,则该配置信息的长度=40*地图瓦片的总数。For the Pth map tile included in the real map, the server determines the storage location of the Pth map tile: the server determines the space occupied by the tile index, the space length of the configuration information, and The total length of the space occupied by the first P-1 map tiles; the sum of the space occupied by the tile index, the space occupied by the configuration information, and the total length of the space occupied by the front P-1 map tiles as the first The storage location of P map tiles. For example, the storage location of the Pth map tile = the length of the space occupied by the tile index + the length of the space occupied by the configuration information + the total length of the space occupied by the P-1 map tiles. The space occupied by the tile index is used to store the tile index, and the space occupied by the tile index is generally expressed in bytes. The length of the space occupied by the tile index can be calculated according to the size of the tile index. Of course, you can also set the length of the space occupied by the tile index to a fixed value. For example, the tile index can occupy a space of 3 or 4. When the tile index occupies a space length of 4, a 32-bit tile index can be stored in the 4 bytes. The total length of the first P-1 map tiles is the space occupied by the first P-1 map tiles, and is generally expressed in bytes. The length of the configuration information is also the length of the space occupied by the configuration information, and is generally expressed in bytes. The length of the configuration information can be a default length or can be calculated by the server. When the length of the configuration information is calculated by the server, the step of determining the length of the configuration information by the server may be: the server uses the product of the length of the unit configuration information corresponding to each map tile and the total number of the map tiles as the configuration information. length. The length of the unit configuration information may be set and changed according to requirements. In the embodiment of the present application, the length of the unit configuration information is not specifically limited; for example, the length of the unit configuration information may be 40 or 30. When the length of the unit configuration information is 40, the length of the configuration information = 40 * the total number of map tiles.
(3):服务器确定每个地图瓦片的偏移地址和图像大小。(3): The server determines the offset address and image size of each map tile.
对于每个地图瓦片,服务器根据该地图瓦片的标识,确定该地图瓦片的偏移地址。For each map tile, the server determines the offset address of the map tile according to the identifier of the map tile.
服务器在步骤(2)中确定出每个地图瓦片的存储位置之后,根据每个地图瓦片的存储位置,确定每个地图瓦片的偏移地址,关联存储每个地图瓦片的标识和偏移地址。相应的,对于每个地图瓦片,服务器根据该地图瓦片的标识,确定该地图瓦片的偏移地址的步骤可以为:服务器根据该地图瓦片的标识,从标识和偏移地址的对应关系中获取该地图瓦片的偏移地址。After the server determines the storage location of each map tile in step (2), the offset address of each map tile is determined according to the storage location of each map tile, and the identifier of each map tile is associated and stored. Offset address. Correspondingly, for each map tile, the determining, by the server according to the identifier of the map tile, the offset address of the map tile may be: the server corresponding to the identifier and the offset address according to the identifier of the map tile Get the offset address of the map tile in the relationship.
步骤404:服务器根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储每个地图瓦片的地图数据。Step 404: The server stores map data of each map tile according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
服务器根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,将每个地图瓦片的地图数据和该实景电子地图的瓦片索引存储到存储文件中。其中,服务器可以按照如下表1的形式,相应的,服务器根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,将每个地图瓦片的地图数据和该实景电子地图的瓦片索引存储到存储文件中的步骤可以为:The server stores the map data of each map tile and the tile index of the real-world electronic map into the storage file according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size. The server may be in the form of Table 1 below. Correspondingly, the server maps the map data of each map tile according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size. The steps of storing the tile index of the live electronic map into the storage file may be:
服务器根据该实景电子地图对应的瓦片索引,计算瓦片索引所占空间长度(以字节表示),将该瓦片索引所占空间长度和该瓦片索引依次存储在存储文件中;根据每个地图瓦片的偏移地址和图像大小,将每个地图瓦片的地图数据依次存储在该存储文件中。其中,该瓦片索引在该瓦片索引所占空间长度之后,每个地图瓦片的地图数据在该瓦片索引之后,且按照层级以及每个层级中的地 图瓦片的顺序依次存储每个地图瓦片的地图数据。The server calculates the space length (in bytes) occupied by the tile index according to the tile index corresponding to the real map, and sequentially stores the space occupied by the tile index and the tile index in the storage file; The offset address and image size of the map tiles are sequentially stored in the storage file for the map data of each map tile. Wherein, the tile index is after the space length occupied by the tile index, the map data of each map tile is after the tile index, and each of the map tiles is sequentially stored in the order of the hierarchy and the map tiles in each hierarchy. Map data for map tiles.
例如,参见如下表1所示,服务器在该存储文件中先存储该瓦片索引所占空间长度,再存入瓦片索引,再存入第一层级的第一个地图瓦片的地图数据,再存储第一层级的第二个地图瓦片的地图数据,再存储第一层级的第三个地图瓦片的地图数据,直到存储完第一层级的所有地图瓦片的地图数据。服务器再存储第二层级的第一个地图瓦片的地图数据,存储第二层级的第二个地图瓦片的地图数据,直到存储完第二层级的所有地图瓦片的地图数据,依次类推,直到存储完所有层级的所有地图瓦片的地图数据。For example, as shown in Table 1 below, the server first stores the space occupied by the tile index in the storage file, stores the tile index, and stores the map data of the first map tile of the first level. The map data of the second map tile of the first level is stored, and the map data of the third map tile of the first level is stored until the map data of all the map tiles of the first level is stored. The server then stores the map data of the first map tile of the second level, and stores the map data of the second map tile of the second level until the map data of all the map tiles of the second level is stored, and so on. Map data for all map tiles of all levels is stored.
表1Table 1
Figure PCTCN2019073031-appb-000003
Figure PCTCN2019073031-appb-000003
其中,地图瓦片level 1_0_0表示瓦片标识为level 1_0_0的地图瓦片。地图瓦片level1_0_1表示瓦片标识为level1_0_1的地图瓦片;地图瓦片levelL_m_n表示瓦片标识为levelL_m_n的地图瓦片。The map tile level 1_0_0 represents a map tile whose tile identifier is level 1_0_0. The map tile level1_0_1 represents a map tile whose tile identifier is level1_0_1; the map tile levelL_m_n represents a map tile whose tile identifier is levelL_m_n.
需要说明的一点是,每个地图瓦片的地图数据可以存储在服务器中,也可以存储在独立于服务器的存储设备中。当将每个地图瓦片的地图数据存储在独立于服务器的存储设备中时,服务器将该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小发送给存储设备,由存储设备根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储每个地图瓦片的地图数据和该实景电子地图的瓦片索引。It should be noted that the map data of each map tile can be stored in the server or in a server-independent storage device. When the map data of each map tile is stored in a server-independent storage device, the server sends the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size to the storage device. The map data of each map tile and the tile index of the real-world electronic map are stored by the storage device according to the tile index corresponding to the real-life electronic map, the offset address of each map tile, and the image size.
需要说明的另一点是,服务器将每个地图瓦片的地图数据和该实景电子地图的瓦片索引存储到存储文件中之后,服务器还可以关联存储该实景电子地图的地图标识和该存储文件的存储地址,以便于后续在独权该实景电子地图的地图数据时,根据该地图标识,获取该存储文件的存储地址。Another point to be noted is that after the server stores the map data of each map tile and the tile index of the real-view electronic map into the storage file, the server may also associate the map identifier of the real-life electronic map with the storage file. The address is stored so as to obtain the storage address of the storage file according to the map identifier when the map data of the real-time electronic map is uniquely owned.
在本申请实施例中,对实景电子地图采取一个存储文件存储瓦片索引和多张地图瓦片的策略,增加了图像读取效率,提高了服务器对于大量地图瓦片请求的响应速度。服务器将多个地图瓦片的文件组合存成一个文件,读写效率会有较大幅度的提高,并减少了磁盘碎片,对于地图存储文件读取、删除和拷贝速度都有明显的改善。In the embodiment of the present application, a strategy for storing a file index and a plurality of map tiles for a live view electronic map is adopted, which increases image reading efficiency and improves the response speed of the server for a large number of map tile requests. The server saves the file combination of multiple map tiles into one file, the read/write efficiency will be greatly improved, and the disk fragmentation is reduced, and the speed of reading, deleting and copying the map storage file is obviously improved.
服务器按照以上方法存储实景电子地图的地图数据之后,终端可以通过以下过程获取实景电子地图,参见图6,该方法包括:After the server stores the map data of the real-time electronic map according to the above method, the terminal can obtain the real-time electronic map by using the following process. Referring to FIG. 6, the method includes:
步骤601:终端获取当前界面中待显示的实景电子地图的地图标识。Step 601: The terminal acquires a map identifier of the real-life electronic map to be displayed in the current interface.
当终端预览实景电子地图页面时,终端确定当前界面中待显示的实景电子地图的地图标识。在一种可能的实现方式中,终端中存储当前界面的URL(Uniform Resource Locator,统一资源定位符)和地图标识的对应关系;相应的,本步骤可以为:终端获取当前界面的URL,根据该URL,从URL和地图标识的对应关系中获取该实景电子地图的地图标识。When the terminal previews the real-time electronic map page, the terminal determines the map identifier of the real-life electronic map to be displayed in the current interface. In a possible implementation manner, the terminal stores a correspondence between a URL (Uniform Resource Locator) of the current interface and a map identifier; correspondingly, the step may be: the terminal acquires a URL of the current interface, according to the The URL obtains the map identifier of the real-life electronic map from the correspondence between the URL and the map identifier.
在另一种可能的实现方式中,用户在终端的地图应用中搜索某个场所的实景电子地图时,用户输入待显示的实景电子地图的地图标识。相应的,本步骤可以为:终端获取被输入的待显示的实景电子地图的地图标识。In another possible implementation manner, when the user searches for a real-life electronic map of a certain place in the map application of the terminal, the user inputs a map identifier of the real-time electronic map to be displayed. Correspondingly, the step may be: the terminal acquires the map identifier of the live electronic map to be displayed that is input.
步骤602:终端确定当前界面中的可视区域。Step 602: The terminal determines a visible area in the current interface.
该可视区域为显示实景电子地图的区域。并且,该可视区域的大小不大于该当前界面的大小。在一种可能的实现方式中,当用户在终端中搜索某个场所的实景电子地图时,终端确定当前界面中的可视区域。在另一种可能的实现方式中,当终端的当前界面进行缩放处理或者拖动时,当前界面中的可视区域会发生改变。因此,终端在确定当前界面中的可视区域之前,终端对当前界面进行检测,当检测到当前界面被缩放或者拖动时,终端才确定当前界面中的可视区域。The viewable area is an area in which the live electronic map is displayed. And, the size of the visible area is not greater than the size of the current interface. In a possible implementation manner, when the user searches for a real-life electronic map of a certain place in the terminal, the terminal determines the visible area in the current interface. In another possible implementation manner, when the current interface of the terminal performs zoom processing or dragging, the visible area in the current interface may change. Therefore, before determining the visible area in the current interface, the terminal detects the current interface, and when detecting that the current interface is zoomed or dragged, the terminal determines the visible area in the current interface.
需要说明的一点是,可以先执行步骤601,再执行步骤602;也可以先执行步骤602,再执行步骤601;在本申请实施例中,对步骤601和602的执行顺序不作具体限定。It should be noted that step 601 may be performed first, and then step 602 may be performed; step 602 may be performed first, and then step 601 is performed; in the embodiment of the present application, the order of execution of steps 601 and 602 is not specifically limited.
步骤603:终端根据该地图标识和该可视区域,确定该可视区域中待显示的至少一个地图瓦片的瓦片标识。Step 603: The terminal determines, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area.
在一个可能的实现方式中,终端可以通过以下步骤(1)至(4)实现,包括:In a possible implementation manner, the terminal may be implemented by the following steps (1) to (4), including:
(1):终端确定当前界面中待显示的实景电子地图的层级。(1): The terminal determines the level of the real-life electronic map to be displayed in the current interface.
终端确定当前界面的缩放比例,根据该缩放比例,确定该实景电子地图的层级。其中,终端中存储缩放比例和层级的对应关系。相应的,终端根据该缩 放比例,确定该实景电子地图的层级的步骤可以为:终端根据该缩放级别,从缩放级别和层级的对应关系中获取该实景电子地图的层级。The terminal determines the scaling of the current interface, and determines the level of the real-world electronic map according to the scaling. The terminal stores the correspondence between the scaling and the level. Correspondingly, the step of determining, by the terminal, the level of the real-time electronic map according to the zoom ratio may be: the terminal acquiring, according to the zoom level, the level of the real-time electronic map from the correspondence between the zoom level and the level.
(2):终端根据该层级和该地图标识,确定该实景电子地图的该层级对应的底图模型,该底图模型包括地图区域,地图区域包括多个子区域,一个子区域对应一个地图瓦片。(2): the terminal determines, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to one map tile. .
终端中存储地图标识、层级与底图模型的对应关系。相应的,终端根据该层级和该地图标识,确定该实景电子地图的该层级对应的底图模型的步骤可以为:终端根据该层级和该地图标识,从地图标识、层级和底图模型的对应关系中确定该实景电子地图的该层级对应的底图模型。The correspondence between the map identifier, the level and the base map model is stored in the terminal. Correspondingly, the step of determining, by the terminal, the basemap model corresponding to the level of the real-life electronic map according to the level and the map identifier may be: the terminal corresponding to the map identifier, the level, and the basemap model according to the level and the map identifier The base map model corresponding to the level of the real-life electronic map is determined in the relationship.
(3):终端将该可视区域映射到该底图模型中。(3): The terminal maps the visible area to the base map model.
终端根据该可视区域在当前界面的位置,将该可视区域映射到该底图模型中。The terminal maps the visible area to the basemap model according to the location of the visible area at the current interface.
(4):终端确定该可视区域和该地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。(4): The terminal determines a tile identifier of at least one map tile in the visible area and the overlapping area of the map area.
该重叠区域中包括至少一个子区域,至少一个子区域用于显示至少一个地图瓦片,并且一个子区域中显示一个地图瓦片。终端将至少一个子区域的编号确定为至少一个地图瓦片的瓦片标识。The overlapping area includes at least one sub-area for displaying at least one map tile, and one map tile is displayed in one sub-area. The terminal determines the number of the at least one sub-area as the tile identifier of the at least one map tile.
例如,参见图7,该可视区域与该地图区域的重叠区域中包括6个子区域,分别为level3_2_1,level3_2_2,level3_2_3,level3_3_1,level3_3_2,level3_3_3。终端将level3_2_1,level3_2_2,level3_2_3,level3_3_1,level3_3_2,level3_3_3作为多个地图瓦片的瓦片标识。For example, referring to FIG. 7, the overlapping area of the visible area and the map area includes six sub-areas, namely level3_2_1, level3_2_2, level3_2_3, level3_3_1, level3_3_2, and level3_3_3. The terminal uses level3_2_1, level3_2_2, level3_2_3, level3_3_1, level3_3_2, and level3_3_3 as tile identifiers of multiple map tiles.
需要说明的是,当该实景电子地图的每个地图瓦片的瓦片数据存储在存储设备中时。当终端预览实景电子地图时,服务器从存储设备中获取该实景电子地图的瓦片索引。It should be noted that when the tile data of each map tile of the real-time electronic map is stored in the storage device. When the terminal previews the live electronic map, the server acquires the tile index of the real electronic map from the storage device.
在另一个可能的实现方式中,终端可以根据地图标识从服务器中获取瓦片索引,然后从瓦片索引中获取该至少一个地图瓦片的瓦片标识。相应的,本步骤可以通过以下步骤(A)至(C)实现,包括:In another possible implementation, the terminal may obtain a tile index from the server according to the map identifier, and then obtain a tile identifier of the at least one map tile from the tile index. Correspondingly, this step can be implemented by the following steps (A) to (C), including:
(A):终端根据该实景电子地图的地图标识,从服务器中获取待显示的实景电子地图的瓦片索引。(A): The terminal acquires a tile index of the real-time electronic map to be displayed from the server according to the map identifier of the real-life electronic map.
终端发送索引请求,该索引请求携带待显示的实景电子地图的地图标识。 服务器接收终端的索引请求,根据该待显示的实景电子地图的地图标识,获取该待显示的实景电子地图的瓦片索引,向终端发送该瓦片索引。终端接收服务器发送的该待显示的实景电子地图的瓦片索引。The terminal sends an index request, and the index request carries a map identifier of the real-time electronic map to be displayed. The server receives the index request of the terminal, and obtains a tile index of the real-life electronic map to be displayed according to the map identifier of the real-time electronic map to be displayed, and sends the tile index to the terminal. The terminal receives a tile index of the real-life electronic map to be displayed sent by the server.
服务器生成实景电子地图的瓦片索引之后,服务器关联存储该实景电子地图的地图标识和瓦片索引。相应的,服务器根据该实景电子地图的地图标识,获取该实景电子地图的瓦片索引的步骤可以为:服务器根据该实景电子地图的地图标识,从地图标识和瓦片索引的对应关系中获取该实景电子地图的瓦片索引。After the server generates the tile index of the real-time electronic map, the server associates the map identifier and the tile index of the real-life electronic map. Correspondingly, the step of obtaining, by the server, the tile index of the real-life electronic map according to the map identifier of the real-life electronic map, the server may obtain, according to the map identifier of the real-view electronic map, the corresponding relationship between the map identifier and the tile index Tile index of the real map.
(B):终端确定当前界面中待显示的实景电子地图的层级,根据该待显示的实景电子地图的层级和可视区域,确定至少一个地图瓦片。(B): The terminal determines a level of the real-life electronic map to be displayed in the current interface, and determines at least one map tile according to the level and the visible area of the real-time electronic map to be displayed.
本步骤和以上步骤(1)至(4)中的确定至少一个地图瓦片的过程相同。This step is the same as the process of determining at least one map tile in the above steps (1) to (4).
(C):终端从该瓦片索引中获取至少一个地图瓦片的瓦片标识。(C): The terminal acquires a tile identifier of at least one map tile from the tile index.
其中,瓦片索引中包括每个地图瓦片的瓦片标识,终端确定出地图瓦片之后,从该瓦片索引中获取每个地图瓦片的瓦片标识。The tile index includes a tile identifier of each map tile. After the terminal determines the map tile, the tile identifier of each map tile is obtained from the tile index.
步骤604:终端向服务器发送地图获取请求,该地图获取请求携带该地图标识和每个地图瓦片的瓦片标识。Step 604: The terminal sends a map acquisition request to the server, where the map acquisition request carries the map identifier and the tile identifier of each map tile.
地图标识可以为地图编号,瓦片标识可以为瓦片编号。在本申请实施例中,对地图标识和瓦片标识不作具体限定。The map identifier can be a map number, and the tile identifier can be a tile number. In the embodiment of the present application, the map identifier and the tile identifier are not specifically limited.
步骤605:服务器接收终端的该地图获取请求,根据该地图标识和每个地图瓦片的瓦片标识,获取每个地图瓦片的地图数据。Step 605: The server receives the map acquisition request of the terminal, and acquires map data of each map tile according to the map identifier and the tile identifier of each map tile.
服务器从该地图获取请求中获取该地图标识和每个地图瓦片的瓦片标识,然后通过以下步骤(1)至(3),获取每个地图瓦片的地图数据。The server acquires the map identifier and the tile identifier of each map tile from the map acquisition request, and then acquires map data of each map tile by the following steps (1) to (3).
(1):服务器根据该地图标识,获取该实景电子地图的存储文件地址。(1): The server acquires a storage file address of the real-life electronic map according to the map identifier.
服务器在存储该实景电子地图的地图数据之后,服务器存储该实景电子地图的地图标识和存储文件地址的对应关系。相应的,本步骤可以为:服务器根据该地图标识,从地图标识和存储文件地址的对应关系中获取该实景电子地图的存储文件地址。After the server stores the map data of the real-time electronic map, the server stores the correspondence between the map identifier of the real-time electronic map and the storage file address. Correspondingly, the step may be: the server obtains the storage file address of the real-life electronic map from the correspondence between the map identifier and the storage file address according to the map identifier.
(2):服务器根据每个地图瓦片的瓦片标识,确定每个地图瓦片的偏移地址和图像大小。(2): The server determines the offset address and image size of each map tile according to the tile identifier of each map tile.
在一个可能的实现方式中,服务器在存储该实景电子地图的地图数据之后, 服务器存储每个地图瓦片的瓦片标识、偏移地址和图像大小的对应关系。相应的,本步骤可以为:服务器根据每个地图瓦片的瓦片标识,从瓦片标识、偏移地址和图像大小的对应关系中获取每个地图瓦片的偏移地址和图像大小。In a possible implementation manner, after the server stores the map data of the real-time electronic map, the server stores a correspondence relationship between the tile identifier, the offset address, and the image size of each map tile. Correspondingly, the step may be: the server obtains the offset address and the image size of each map tile from the corresponding relationship between the tile identifier, the offset address, and the image size according to the tile identifier of each map tile.
在另一个可能的实现方式中,该实景电子地图的索引中包括每个地图瓦片的偏移地址和图像大小。相应的,本步骤可以为:服务器根据每个地图瓦片的瓦片标识,从该实景电子地图的瓦片索引中获取每个地图瓦片的偏移地址和图像大小。In another possible implementation manner, the index of the real-time electronic map includes an offset address and an image size of each map tile. Correspondingly, the step may be: the server obtains an offset address and an image size of each map tile from the tile index of the real-time electronic map according to the tile identifier of each map tile.
(3):服务器根据该存储文件地址、每个地图瓦片的偏移地址和图像大小,获取每个地图瓦片的地图数据。(3): The server acquires map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
服务器根据该存储文件地址,获取该实景电子地图的存储文件;根据每个地图瓦片的偏移地址和图像大小,从该存储文件中获取每个瓦片地图的地图数据。The server acquires the storage file of the real-time electronic map according to the storage file address; and acquires map data of each tile map from the storage file according to the offset address and the image size of each map tile.
步骤606:服务器向终端发送每个地图瓦片的地图数据。Step 606: The server sends map data of each map tile to the terminal.
步骤607:终端接收服务器发送的每个地图瓦片的地图数据,在当前界面的可视区域中渲染每个地图瓦片对应的实景电子地图。Step 607: The terminal receives the map data of each map tile sent by the server, and renders the real-life electronic map corresponding to each map tile in the visible area of the current interface.
对于每个地图瓦片,终端在该可视区域中确定该地图瓦片的显示区域,将该地图瓦片的地图数据渲染在该地图瓦片的显示区域中。终端按照上述方法将每个地图瓦片都进行渲染,得到实景电子地图。For each map tile, the terminal determines a display area of the map tile in the viewable area, and renders map data of the map tile in a display area of the map tile. The terminal renders each map tile according to the above method to obtain a real-time electronic map.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。并且,由于减少了地图瓦片的清洁数据,从而降低了终端对网络带宽的依赖,解决了弱网络环境下请求等待时长较长的问题,增加了实景电子地图的响应速度和流畅性。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map. Moreover, since the cleaning data of the map tile is reduced, the dependence of the terminal on the network bandwidth is reduced, the problem that the request waiting time is long in the weak network environment is solved, and the response speed and fluency of the real-life electronic map are increased.
本申请实施例提供了一种获取实景电子地图的装置,该装置用于执行上述获取实景电子地图的方法中终端执行的步骤。参见图8,该装置包括:An embodiment of the present application provides an apparatus for acquiring a real-time electronic map, where the apparatus is configured to perform the steps performed by the terminal in the method for acquiring a real-life electronic map. Referring to Figure 8, the device includes:
确定模块801,用于确定当前界面中待显示的实景电子地图的地图标识,以及确定该当前界面中的可视区域;a determining module 801, configured to determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface;
确定模块801,还用于根据该地图标识和该可视区域,确定该可视区域中待显示的至少一个地图瓦片的瓦片标识;The determining module 801 is further configured to determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
第一发送模块802,用于向服务器发送地图获取请求,该地图获取请求携带该地图标识和每个地图瓦片的瓦片标识;a first sending module 802, configured to send a map obtaining request to the server, where the map obtaining request carries the map identifier and a tile identifier of each map tile;
第一接收模块803,用于接收该服务器返回的该每个地图瓦片的地图数据;a first receiving module 803, configured to receive map data of each map tile returned by the server;
渲染模块804,用于根据该每个地图瓦片的地图数据,在该可视区域中渲染该每个地图瓦片对应的实景电子地图。The rendering module 804 is configured to render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,确定模块801,还用于确定该实景电子地图的层级;根据该层级和该地图标识,确定该实景电子地图的该层级对应的底图模型,该底图模型包括地图区域,该地图区域包括多个子区域,一个子区域对应一个地图瓦片;将该可视区域映射到该底图模型中;确定该可视区域和该地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。In a possible implementation manner, the determining module 801 is further configured to determine a level of the real-life electronic map; and according to the level and the map identifier, determine a base map model corresponding to the level of the real-life electronic map, where the base map model includes a map area, the map area includes a plurality of sub-areas, one sub-area corresponding to one map tile; mapping the visible area to the base map model; determining at least one map in the overlapping area of the visible area and the map area Tile identification of tiles.
在一个可能的实现方式中,确定模块801,还用于对该当前界面进行检测;当检测到该当前界面被缩放或者拖动时,确定该当前界面中的可视区域。In a possible implementation, the determining module 801 is further configured to detect the current interface, and when it is detected that the current interface is zoomed or dragged, determine a visible area in the current interface.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
本申请实施例提供了一种获取实景电子地图的装置,该装置用于执行上述获取实景电子地图的方法中服务器执行的步骤。参见图9,该装置包括:An embodiment of the present application provides an apparatus for acquiring a real-time electronic map, where the apparatus is configured to perform the steps performed by a server in the method for acquiring a real-life electronic map. Referring to Figure 9, the device includes:
第二接收模块901,用于接收终端的地图获取请求,该地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识;The second receiving module 901 is configured to receive a map obtaining request of the terminal, where the map obtaining request carries the map identifier of the real-life electronic map to be requested and the tile identifier of each map tile to be displayed in the visible area of the current interface. ;
获取模块902,用于根据该地图标识和该每个地图瓦片的瓦片标识,获取该每个地图瓦片的地图数据;The obtaining module 902 is configured to obtain map data of each map tile according to the map identifier and the tile identifier of each map tile.
第二发送模块903,用于向该终端返回该每个地图瓦片的地图数据,以使该终端在该可视区域中渲染该每个地图瓦片对应的实景电子地图。The second sending module 903 is configured to return the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
在一个可能的实现方式中,获取模块902,还用于根据该地图标识,确定该实景电子地图的存储文件地址;根据该每个地图瓦片的瓦片标识,确定该每个地图瓦片的偏移地址和图像大小;根据该存储文件地址、该每个地图瓦片的偏移地址和图像大小,获取该每个地图瓦片的地图数据。In a possible implementation, the obtaining module 902 is further configured to determine, according to the map identifier, a storage file address of the real-world electronic map, and determine, according to the tile identifier of each map tile, each of the map tiles. Offset address and image size; acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
在一个可能的实现方式中,该装置还包括:In a possible implementation manner, the device further includes:
存储模块,用于获取该实景电子地图的图像;根据该图像,确定多个层级中的每个层级对应的图像;将该每个层级对应的图像切分为多个地图瓦片,并确定该实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;根据该实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储该每个地图瓦片的地图数据。a storage module, configured to acquire an image of the real-time electronic map; determine, according to the image, an image corresponding to each of the plurality of levels; divide the image corresponding to each level into a plurality of map tiles, and determine the a tile index corresponding to the real electronic map, and an offset address and an image size of each map tile; storing each of the map indexes corresponding to the real map electronic map, the offset address of each map tile, and the image size Map data for map tiles.
在一个可能的实现方式中,该存储模块,还用于对于每个层级,获取该层级对应的底图模型,根据该底图模型的切分规则,将该层级对应的图像切分为多个地图瓦片。In a possible implementation manner, the storage module is further configured to acquire, for each level, a base map model corresponding to the level, and divide the image corresponding to the level into multiple according to the cutting rule of the base map model. Map tiles.
在本申请实施例中,服务器将实景电子地图的图像切分为多个地图瓦片。终端仅请求当前界面中的可视区域的地图瓦片,减少了地图瓦片的请求数量,提高了实景电子地图的获取效率以及展示效率。In the embodiment of the present application, the server divides the image of the real-time electronic map into a plurality of map tiles. The terminal only requests the map tile of the visible area in the current interface, reduces the number of requests for the map tile, and improves the acquisition efficiency and display efficiency of the real-life electronic map.
需要说明的是:上述实施例提供的获取实景电子地图的装置在获取实景电子地图时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的获取实景电子地图的装置与获取实景电子地图的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the device for obtaining the real-life electronic map provided by the above embodiment is only illustrated by the division of the above functional modules when acquiring the real-life electronic map. In actual applications, the functions may be assigned differently according to needs. The function module is completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for obtaining the real-time electronic map provided by the above embodiment is the same as the method for obtaining the real-time electronic map. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
图10示出了本申请一个示例性实施例提供的终端1000的结构框图。该终端1000可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端1000还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。FIG. 10 is a structural block diagram of a terminal 1000 provided by an exemplary embodiment of the present application. The terminal 1000 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and a MP4 (Moving Picture Experts Group Audio Layer IV). Level 4) Player, laptop or desktop computer. Terminal 1000 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
通常,终端1000包括有:处理器1001和存储器1002。Generally, the terminal 1000 includes a processor 1001 and a memory 1002.
处理器1001可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1001可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1001也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下 的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1001可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1001还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。 Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1001 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve. The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
存储器1002可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1002还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1002中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1001所执行以实现本申请中方法实施例提供的获取实景电子地图的方法。 Memory 1002 can include one or more computer readable storage media, which can be non-transitory. The memory 1002 may also include high speed random access memory, as well as non-volatile memory such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 1002 is configured to store at least one instruction for execution by the processor 1001 to implement the acquisition of the real world provided by the method embodiment of the present application. The method of electronic maps.
在一些实施例中,终端1000还可选包括有:外围设备接口1003和至少一个外围设备。处理器1001、存储器1002和外围设备接口1003之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1003相连。具体地,外围设备包括:射频电路1004、触摸显示屏1005、摄像头1006、音频电路1007、定位组件1008和电源1009中的至少一种。In some embodiments, the terminal 1000 optionally further includes: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002, and the peripheral device interface 1003 may be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1004, a touch display screen 1005, a camera 1006, an audio circuit 1007, a positioning component 1008, and a power source 1009.
外围设备接口1003可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器1001和存储器1002。在一些实施例中,处理器1001、存储器1002和外围设备接口1003被集成在同一芯片或电路板上;在一些其他实施例中,处理器1001、存储器1002和外围设备接口1003中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 1003 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 1001, memory 1002, and peripheral interface 1003 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路1004用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路1004通过电磁信号与通信网络以及其他通信设备进行通信。射频电路1004将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路1004包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路1004可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施 例中,射频电路1004还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 1004 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. The radio frequency circuit 1004 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 1004 can communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1004 may further include an NFC (Near Field Communication) related circuit, which is not limited in this application.
显示屏1005用于显示UI(UserInterface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1005是触摸显示屏时,显示屏1005还具有采集在显示屏1005的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1001进行处理。此时,显示屏1005还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1005可以为一个,设置终端1000的前面板;在另一些实施例中,显示屏1005可以为至少两个,分别设置在终端1000的不同表面或呈折叠设计;在再一些实施例中,显示屏1005可以是柔性显示屏,设置在终端1000的弯曲表面上或折叠面上。甚至,显示屏1005还可以设置成非矩形的不规则图形,也即异形屏。显示屏1005可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 1005 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When display screen 1005 is a touch display screen, display screen 1005 also has the ability to capture touch signals over the surface or surface of display screen 1005. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 1005 may be one, and the front panel of the terminal 1000 is disposed; in other embodiments, the display screen 1005 may be at least two, respectively disposed on different surfaces of the terminal 1000 or in a folded design; In still other embodiments, the display screen 1005 can be a flexible display screen disposed on a curved surface or a folded surface of the terminal 1000. Even the display screen 1005 can be set as a non-rectangular irregular pattern, that is, a profiled screen. The display screen 1005 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
摄像头组件1006用于采集图像或视频。可选地,摄像头组件1006包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件1006还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。 Camera assembly 1006 is used to capture images or video. Optionally, camera assembly 1006 includes a front camera and a rear camera. Usually, the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal. In some embodiments, the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions. In some embodiments, camera assembly 1006 can also include a flash. The flash can be a monochrome temperature flash or a two-color temperature flash. The two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
音频电路1007可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器1001进行处理,或者输入至射频电路1004以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端1000的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器1001或射频电路1004的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路1007 还可以包括耳机插孔。The audio circuit 1007 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing into the processor 1001 for processing, or input to the RF circuit 1004 for voice communication. For the purpose of stereo acquisition or noise reduction, the microphones may be multiple, and are respectively disposed at different parts of the terminal 1000. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is then used to convert electrical signals from the processor 1001 or the RF circuit 1004 into sound waves. The speaker can be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into human audible sound waves, but also the electrical signal can be converted into sound waves that are inaudible to humans for ranging and the like. In some embodiments, the audio circuit 1007 can also include a headphone jack.
定位组件1008用于定位终端1000的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件1008可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The positioning component 1008 is configured to locate the current geographic location of the terminal 1000 to implement navigation or LBS (Location Based Service). The positioning component 1008 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
电源1009用于为终端1000中的各个组件进行供电。电源1009可以是交流电、直流电、一次性电池或可充电电池。当电源1009包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。A power supply 1009 is used to power various components in the terminal 1000. The power source 1009 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 1009 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端1000还包括有一个或多个传感器1010。该一个或多个传感器1010包括但不限于:加速度传感器1011、陀螺仪传感器1012、压力传感器1013、指纹传感器1014、光学传感器1015以及接近传感器1016。In some embodiments, terminal 1000 also includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to, an acceleration sensor 1011, a gyro sensor 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015, and a proximity sensor 1016.
加速度传感器1011可以检测以终端1000建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器1011可以用于检测重力加速度在三个坐标轴上的分量。处理器1001可以根据加速度传感器1011采集的重力加速度信号,控制触摸显示屏1005以横向视图或纵向视图进行用户界面的显示。加速度传感器1011还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 1011 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 1000. For example, the acceleration sensor 1011 can be used to detect components of gravity acceleration on three coordinate axes. The processor 1001 can control the touch display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 can also be used for the acquisition of game or user motion data.
陀螺仪传感器1012可以检测终端1000的机体方向及转动角度,陀螺仪传感器1012可以与加速度传感器1011协同采集用户对终端1000的3D动作。处理器1001根据陀螺仪传感器1012采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 1012 can detect the body direction and the rotation angle of the terminal 1000, and the gyro sensor 1012 can cooperate with the acceleration sensor 1011 to collect the 3D motion of the user to the terminal 1000. Based on the data collected by the gyro sensor 1012, the processor 1001 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
压力传感器1013可以设置在终端1000的侧边框和/或触摸显示屏1005的下层。当压力传感器1013设置在终端1000的侧边框时,可以检测用户对终端1000的握持信号,由处理器1001根据压力传感器1013采集的握持信号进行左右手识别或快捷操作。当压力传感器1013设置在触摸显示屏1005的下层时,由处理器1001根据用户对触摸显示屏1005的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 1013 may be disposed at a side border of the terminal 1000 and/or a lower layer of the touch display screen 1005. When the pressure sensor 1013 is disposed on the side frame of the terminal 1000, the user's holding signal to the terminal 1000 can be detected, and the processor 1001 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1013. When the pressure sensor 1013 is disposed on the lower layer of the touch display screen 1005, the operability control on the UI interface is controlled by the processor 1001 according to the user's pressure on the touch display screen 1005. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器1014用于采集用户的指纹,由处理器1001根据指纹传感器1014 采集到的指纹识别用户的身份,或者,由指纹传感器1014根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器1001授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器1014可以被设置终端1000的正面、背面或侧面。当终端1000上设置有物理按键或厂商Logo时,指纹传感器1014可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 1014 is configured to collect a fingerprint of the user, and the processor 1001 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 1001 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like. The fingerprint sensor 1014 can be provided with the front, back or side of the terminal 1000. When the physical button or the manufacturer logo is set on the terminal 1000, the fingerprint sensor 1014 can be integrated with the physical button or the manufacturer logo.
光学传感器1015用于采集环境光强度。在一个实施例中,处理器1001可以根据光学传感器1015采集的环境光强度,控制触摸显示屏1005的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏1005的显示亮度;当环境光强度较低时,调低触摸显示屏1005的显示亮度。在另一个实施例中,处理器1001还可以根据光学传感器1015采集的环境光强度,动态调整摄像头组件1006的拍摄参数。Optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the touch display 1005 based on the ambient light intensity acquired by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1005 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is lowered. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 according to the ambient light intensity collected by the optical sensor 1015.
接近传感器1016,也称距离传感器,通常设置在终端1000的前面板。接近传感器1016用于采集用户与终端1000的正面之间的距离。在一个实施例中,当接近传感器1016检测到用户与终端1000的正面之间的距离逐渐变小时,由处理器1001控制触摸显示屏1005从亮屏状态切换为息屏状态;当接近传感器1016检测到用户与终端1000的正面之间的距离逐渐变大时,由处理器1001控制触摸显示屏1005从息屏状态切换为亮屏状态。Proximity sensor 1016, also referred to as a distance sensor, is typically disposed on the front panel of terminal 1000. The proximity sensor 1016 is used to collect the distance between the user and the front side of the terminal 1000. In one embodiment, when the proximity sensor 1016 detects that the distance between the user and the front side of the terminal 1000 is gradually decreasing, the processor 1001 controls the touch display screen 1005 to switch from the bright screen state to the interest screen state; when the proximity sensor 1016 detects When the distance between the user and the front side of the terminal 1000 gradually becomes larger, the processor 1001 controls the touch display screen 1005 to switch from the information screen state to the bright screen state.
本领域技术人员可以理解,图8中示出的结构并不构成对终端1000的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。It will be understood by those skilled in the art that the structure shown in FIG. 8 does not constitute a limitation to the terminal 1000, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
图11是本申请实施例提供的一种服务器的结构示意图,该服务器1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)1101和一个或一个以上的存储器1102,其中,所述存储器1102中存储有至少一条指令,所述至少一条指令由所述处理器1101加载并执行以实现上述各个方法实施例提供的获取实景电子地图的方法。当然,该服务器还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present application. The server 1100 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 1101 and one. Or more than one memory 1102, wherein the memory 1102 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 1101 to implement the method for acquiring a real-life electronic map provided by the foregoing various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface for input and output. The server may also include other components for implementing the functions of the device, and details are not described herein.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质应用于终端,该计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或该指令集由处理器加载并执行以实现上述实施例的获取实景电子地图的方法中终端所执行的操作。The embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium is applied to a terminal, where the computer readable storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least An instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the operations performed by the terminal in the method of obtaining a live electronic map of the above-described embodiments.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质应用于终端,该计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或该指令集由处理器加载并执行以实现上述实施例的获取实景电子地图的方法中服务器所执行的操作。The embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium is applied to a terminal, where the computer readable storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least An instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by a processor to implement the operations performed by the server in the method of obtaining a live electronic map of the above-described embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the protection of the present application. Within the scope.

Claims (17)

  1. 一种获取实景电子地图的方法,其特征在于,所述方法应用在终端中,包括:A method for obtaining a real-time electronic map, wherein the method is applied to a terminal, including:
    确定当前界面中待显示的实景电子地图的地图标识,以及确定所述当前界面中的可视区域;Determining a map identifier of a real-life electronic map to be displayed in the current interface, and determining a visible area in the current interface;
    根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识;Determining, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
    向服务器发送地图获取请求,所述地图获取请求携带所述地图标识和每个地图瓦片的瓦片标识,接收所述服务器返回的所述每个地图瓦片的地图数据;Sending a map acquisition request to the server, the map acquisition request carrying the map identifier and a tile identifier of each map tile, and receiving map data of each map tile returned by the server;
    根据所述每个地图瓦片的地图数据,在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And realizing the real-time electronic map corresponding to each map tile in the visible area according to the map data of each map tile.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识,包括:The method according to claim 1, wherein the determining the tile identifier of the at least one map tile to be displayed in the visible area according to the map identifier and the visible area comprises:
    确定所述实景电子地图的层级;Determining a hierarchy of the real-life electronic map;
    根据所述层级和所述地图标识,确定所述实景电子地图的所述层级对应的底图模型,所述底图模型包括地图区域,所述地图区域包括多个子区域,一个子区域对应一个地图瓦片;Determining, according to the level and the map identifier, a base map model corresponding to the level of the real-life electronic map, where the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to a map Tile
    将所述可视区域映射到所述底图模型中;Mapping the viewable area to the basemap model;
    确定所述可视区域和所述地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。A tile identification of at least one of the map regions of the viewable area and the overlap region of the map area is determined.
  3. 根据权利要求1所述的方法,其特征在于,所述确定所述当前界面中的可视区域之前,所述方法还包括:The method according to claim 1, wherein before the determining the visible area in the current interface, the method further comprises:
    对所述当前界面进行检测;Testing the current interface;
    当检测到所述当前界面被缩放或者拖动时,执行所述确定所述当前界面中的可视区域的步骤。The step of determining the viewable area in the current interface is performed when it is detected that the current interface is zoomed or dragged.
  4. 一种获取实景电子地图的方法,其特征在于,所述方法应用在服务器中,包括:A method for obtaining a real-time electronic map, wherein the method is applied to a server, including:
    接收终端的地图获取请求,所述地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识;Receiving a map acquisition request of the terminal, where the map acquisition request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible area in the current interface;
    根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据;Obtaining map data of each map tile according to the map identifier and the tile identifier of each map tile;
    向所述终端返回所述每个地图瓦片的地图数据,以使所述终端在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。Returning the map data of each map tile to the terminal, so that the terminal renders the real-life electronic map corresponding to each map tile in the visible region.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据,包括:The method according to claim 4, wherein the acquiring the map data of each map tile according to the map identifier and the tile identifier of each map tile comprises:
    根据所述地图标识,确定所述实景电子地图的存储文件地址;Determining, according to the map identifier, a storage file address of the real-life electronic map;
    根据所述每个地图瓦片的瓦片标识,确定所述每个地图瓦片的偏移地址和图像大小;Determining an offset address and an image size of each of the map tiles according to the tile identifier of each map tile;
    根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据。And acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and the image size.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据之前,所述方法还包括:The method according to claim 5, wherein the obtaining, before acquiring the map data of each map tile, according to the storage file address, the offset address of each map tile, and the image size, The method further includes:
    获取所述实景电子地图的图像;Obtaining an image of the real-life electronic map;
    根据所述图像,确定多个层级中的每个层级对应的图像;Determining an image corresponding to each of the plurality of levels according to the image;
    将所述每个层级对应的图像切分为多个地图瓦片,并确定所述实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;And dividing the image corresponding to each level into a plurality of map tiles, and determining a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile;
    根据所述实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储所述每个地图瓦片的地图数据。The map data of each map tile is stored according to a tile index corresponding to the real-life electronic map, an offset address of each map tile, and an image size.
  7. 根据权利要求6所述的方法,其特征在于,所述将所述每个层级对应的图像切分为多个地图瓦片,包括:The method according to claim 6, wherein the splitting the image corresponding to each level into a plurality of map tiles comprises:
    对于每个层级,获取所述层级对应的底图模型,根据所述底图模型的切分 规则,将所述层级对应的图像切分为多个地图瓦片。For each level, the base map model corresponding to the level is obtained, and according to the segmentation rule of the base map model, the image corresponding to the level is divided into multiple map tiles.
  8. 一种获取实景电子地图的装置,其特征在于,所述装置应用在终端中,包括:An apparatus for obtaining a real-time electronic map, wherein the apparatus is applied to a terminal, and includes:
    确定模块,用于确定当前界面中待显示的实景电子地图的地图标识,以及确定所述当前界面中的可视区域;a determining module, configured to determine a map identifier of a real-life electronic map to be displayed in the current interface, and determine a visible area in the current interface;
    所述确定模块,还用于根据所述地图标识和所述可视区域,确定所述可视区域中待显示的至少一个地图瓦片的瓦片标识;The determining module is further configured to determine, according to the map identifier and the visible area, a tile identifier of at least one map tile to be displayed in the visible area;
    第一发送模块,用于向服务器发送地图获取请求,所述地图获取请求携带所述地图标识和每个地图瓦片的瓦片标识;a first sending module, configured to send a map obtaining request to the server, where the map obtaining request carries the map identifier and a tile identifier of each map tile;
    第一接收模块,用于接收所述服务器返回的所述每个地图瓦片的地图数据;a first receiving module, configured to receive map data of each of the map tiles returned by the server;
    渲染模块,用于根据所述每个地图瓦片的地图数据,在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And a rendering module, configured to render, according to the map data of each map tile, a real-life electronic map corresponding to each map tile in the visible region.
  9. 根据权利要求8所述的装置,其特征在于,所述确定模块,还用于确定所述实景电子地图的层级;根据所述层级和所述地图标识,确定所述实景电子地图的所述层级对应的底图模型,所述底图模型包括地图区域,所述地图区域包括多个子区域,一个子区域对应一个地图瓦片;将所述可视区域映射到所述底图模型中;确定所述可视区域和所述地图区域的重叠区域中的至少一个地图瓦片的瓦片标识。The apparatus according to claim 8, wherein the determining module is further configured to determine a level of the real-life electronic map; and determine the level of the real-time electronic map according to the level and the map identifier Corresponding base map model, the base map model includes a map area, the map area includes a plurality of sub-areas, and one sub-area corresponds to one map tile; mapping the visible area to the base map model; determining A tile identifier of at least one map tile of the visible region and the overlapping region of the map region.
  10. 根据权利要求8所述的装置,其特征在于,所述确定模块,还用于对所述当前界面进行检测;当检测到所述当前界面被缩放或者拖动时,确定所述当前界面中的可视区域。The device according to claim 8, wherein the determining module is further configured to detect the current interface; when detecting that the current interface is zoomed or dragged, determining the current interface Visible area.
  11. 一种获取实景电子地图的装置,其特征在于,所述装置应用在服务器中,包括:An apparatus for obtaining a real-time electronic map, wherein the apparatus is applied to a server, and includes:
    第二接收模块,用于接收终端的地图获取请求,所述地图获取请求携带待请求的实景电子地图的地图标识和当前界面中可视区域中的待显示的每个地图瓦片的瓦片标识;a second receiving module, configured to receive a map obtaining request of the terminal, where the map obtaining request carries a map identifier of the real-life electronic map to be requested and a tile identifier of each map tile to be displayed in the visible region of the current interface ;
    获取模块,用于根据所述地图标识和所述每个地图瓦片的瓦片标识,获取所述每个地图瓦片的地图数据;An acquiring module, configured to acquire, according to the map identifier and the tile identifier of each map tile, map data of each map tile;
    第二发送模块,用于向所述终端返回所述每个地图瓦片的地图数据,以使所述终端在所述可视区域中渲染所述每个地图瓦片对应的实景电子地图。And a second sending module, configured to return, to the terminal, map data of each map tile, so that the terminal renders a real-life electronic map corresponding to each map tile in the visible region.
  12. 根据权利要求11所述的装置,其特征在于,所述获取模块,还用于根据所述地图标识,确定所述实景电子地图的存储文件地址;根据所述每个地图瓦片的瓦片标识,确定所述每个地图瓦片的偏移地址和图像大小;根据所述存储文件地址、所述每个地图瓦片的偏移地址和图像大小,获取所述每个地图瓦片的地图数据。The device according to claim 11, wherein the obtaining module is further configured to determine, according to the map identifier, a storage file address of the real-life electronic map; according to the tile identifier of each map tile Determining an offset address and an image size of each map tile; acquiring map data of each map tile according to the storage file address, the offset address of each map tile, and an image size .
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:The device of claim 12, wherein the device further comprises:
    存储模块,用于获取所述实景电子地图的图像;根据所述图像,确定多个层级中的每个层级对应的图像;将所述每个层级对应的图像切分为多个地图瓦片,并确定所述实景电子地图对应的瓦片索引、以及每个地图瓦片的偏移地址和图像大小;根据所述实景电子地图对应的瓦片索引、每个地图瓦片的偏移地址和图像大小,存储所述每个地图瓦片的地图数据。a storage module, configured to acquire an image of the real-time electronic map; determine, according to the image, an image corresponding to each of the plurality of levels; and divide the image corresponding to each level into a plurality of map tiles, And determining a tile index corresponding to the real-life electronic map, and an offset address and an image size of each map tile; according to the tile index corresponding to the real-life electronic map, an offset address and an image of each map tile Size, storing the map data of each map tile.
  14. 根据权利要求13所述的装置,其特征在于,The device of claim 13 wherein:
    所述存储模块,还用于对于每个层级,获取所述层级对应的底图模型,根据所述底图模型的切分规则,将所述层级对应的图像切分为多个地图瓦片。The storage module is further configured to acquire, for each level, a base map model corresponding to the level, and divide the image corresponding to the level into a plurality of map tiles according to a splitting rule of the base map model.
  15. 一种终端,其特征在于,所述终端包括一个或多个处理器和一个或多个存储器,所述一个或多个存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由所述处理器加载并执行以实现如权利要求1至3任一权利要求所述的获取实景电子地图的方法中所执行的操作。A terminal, comprising: one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, a code set or a set of instructions, Said at least one instruction, said at least one piece of program, said set of codes or said set of instructions being loaded by said processor and executed to implement a method of acquiring a real-time electronic map according to any of claims 1 to 3. The action taken.
  16. 一种服务器,其特征在于,所述服务器包括一个或多个处理器和一个或多个存储器,所述一个或多个存储器中存储有至少一条指令、至少一段程序、 代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由所述处理器加载并执行以实现如权利要求4至7任一权利要求所述的获取实景电子地图的方法中所执行的操作。A server, comprising: one or more processors and one or more memories, wherein the one or more memories store at least one instruction, at least one program, a code set or a set of instructions, Said at least one instruction, said at least one piece of program, said set of codes or said set of instructions being loaded by said processor and executed to implement a method for obtaining a real-time electronic map according to any of claims 4 to 7. The action taken.
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由处理器加载并执行以实现如权利要求1至3任一权利要求所述的获取实景电子地图的方法中所执行的操作,或,以实现如权利要求4至7任一权利要求所述的获取实景电子地图的方法中所执行的操作。A computer readable storage medium, wherein the computer readable storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least one instruction, the at least one program, the The code set or the set of instructions is loaded and executed by a processor to perform the operations performed in the method of acquiring a real-time electronic map according to any of claims 1 to 3, or to implement claims 4 to 7 The operations performed in the method of obtaining a live electronic map of any of the claims.
PCT/CN2019/073031 2018-03-22 2019-01-24 Satellite-view electronic map acquisition method and device, apparatus, and storage medium WO2019179237A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810241135.5 2018-03-22
CN201810241135.5A CN110309243A (en) 2018-03-22 2018-03-22 Obtain method, apparatus, equipment and the storage medium of outdoor scene electronic map

Publications (1)

Publication Number Publication Date
WO2019179237A1 true WO2019179237A1 (en) 2019-09-26

Family

ID=67988216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073031 WO2019179237A1 (en) 2018-03-22 2019-01-24 Satellite-view electronic map acquisition method and device, apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN110309243A (en)
WO (1) WO2019179237A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795019A (en) * 2019-10-23 2020-02-14 腾讯科技(深圳)有限公司 Key identification method and device of soft keyboard and storage medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990510B (en) * 2019-11-28 2024-04-09 北京世纪高通科技有限公司 Three-dimensional map generation method, terminal and server
CN111078918B (en) * 2019-12-04 2022-12-13 视联动力信息技术股份有限公司 Image processing method and device, electronic equipment and storage medium
CN113498474A (en) * 2020-01-21 2021-10-12 深圳元戎启行科技有限公司 High-precision map updating method and device, computer equipment and storage medium
CN111881230A (en) * 2020-06-17 2020-11-03 汉海信息技术(上海)有限公司 Rendering method and device for map area and electronic equipment
CN112330806B (en) * 2020-11-27 2022-11-01 成都紫瑞青云航空宇航技术有限公司 Visual synthesis method and system based on low-power-consumption hardware platform
CN112991808B (en) * 2020-12-29 2022-09-30 杭州海康威视数字技术股份有限公司 Parking space display method and device for parking area and electronic equipment
CN113051491B (en) * 2021-04-22 2023-12-15 北京百度网讯科技有限公司 Map data processing method, apparatus, storage medium, and program product
CN115451943B (en) * 2022-11-11 2023-09-15 阿里巴巴(中国)有限公司 Electronic map processing and navigation method, device, equipment and storage medium
CN115984119B (en) * 2023-03-20 2023-06-20 中科星图维天信(北京)科技有限公司 Meteorological data processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819530A (en) * 2011-06-10 2012-12-12 中兴通讯股份有限公司 Method and device for displaying electronic map
CN103699439A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Device and method for calculating tiles in electronic map visual area
CN105516311A (en) * 2015-12-09 2016-04-20 中国农业银行股份有限公司 Electronic map panorama acquisition method and system
CN105989130A (en) * 2015-02-16 2016-10-05 高德软件有限公司 Electronic map display method and device and electronic device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103187003B (en) * 2011-12-31 2015-08-05 北京图盟科技有限公司 A kind of access method of electronic chart, equipment and system
US9041736B2 (en) * 2012-06-05 2015-05-26 Apple Inc. Method, system and apparatus for rendering a map according to a stylesheet
US9201898B2 (en) * 2013-05-15 2015-12-01 Google Inc. Efficient fetching of map tile data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819530A (en) * 2011-06-10 2012-12-12 中兴通讯股份有限公司 Method and device for displaying electronic map
CN103699439A (en) * 2013-12-30 2014-04-02 北京奇虎科技有限公司 Device and method for calculating tiles in electronic map visual area
CN105989130A (en) * 2015-02-16 2016-10-05 高德软件有限公司 Electronic map display method and device and electronic device
CN105516311A (en) * 2015-12-09 2016-04-20 中国农业银行股份有限公司 Electronic map panorama acquisition method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795019A (en) * 2019-10-23 2020-02-14 腾讯科技(深圳)有限公司 Key identification method and device of soft keyboard and storage medium
CN110795019B (en) * 2019-10-23 2023-08-08 腾讯科技(深圳)有限公司 Key recognition method and device for soft keyboard and storage medium

Also Published As

Publication number Publication date
CN110309243A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
WO2019179237A1 (en) Satellite-view electronic map acquisition method and device, apparatus, and storage medium
JP7058842B2 (en) Markpoint location display method, electronic devices and computer readable storage media
JP7344974B2 (en) Multi-virtual character control method, device, and computer program
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN111324250B (en) Three-dimensional image adjusting method, device and equipment and readable storage medium
CN109948087B (en) Webpage resource obtaining method and device and terminal
CN108462818B (en) Electronic device and method for displaying 360-degree image in the same
WO2022134632A1 (en) Work processing method and apparatus
CN109886208B (en) Object detection method and device, computer equipment and storage medium
CN108920606B (en) Map data processing method, map data processing device, terminal equipment and storage medium
CN112565806B (en) Virtual gift giving method, device, computer equipment and medium
WO2019192061A1 (en) Method, device, computer readable storage medium for identifying and generating graphic code
CN111857793B (en) Training method, device, equipment and storage medium of network model
CN113160031B (en) Image processing method, device, electronic equipment and storage medium
CN110471614B (en) Method for storing data, method and device for detecting terminal
CN111385525A (en) Video monitoring method, device, terminal and system
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN112241987B (en) System, method, device and storage medium for determining defense area
CN112181915B (en) Method, device, terminal and storage medium for executing service
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN113301422B (en) Method, terminal and storage medium for acquiring video cover
WO2018192455A1 (en) Method and apparatus for generating subtitles
WO2021218926A1 (en) Image display method and apparatus, and computer device
CN111598981B (en) Character model display method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19770625

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19770625

Country of ref document: EP

Kind code of ref document: A1