Map downloading method, device, computer equipment and computer readable storage medium

By receiving the boundary information of the terminal device, it determines the starting download level of the map and generates a download script, and directly reads and sends the tiles, which solves the problem of high server processing pressure, avoids downtime, and improves map download efficiency.

CN114691909BActive Publication Date: 2024-10-15GUANGZHOU XAIRCRAFT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210345344.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-10-15
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the existing technology, the server needs to retrieve a large amount of map data to satisfy the download request of the terminal device, which causes excessive processing pressure on the server and may lead to downtime.

Method used

By receiving the boundary information sent by the terminal device, the starting download level of the target map is determined, and a download script is generated to indicate the starting tile position, reducing the need for the server to traverse the download level, and directly reading and sending the starting tile and associated tiles. piece.

Benefits of technology

It reduces server processing pressure, avoids downtime caused by excessive processing pressure, and improves map download efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691909B_ABST
    Figure CN114691909B_ABST
Patent Text Reader

Abstract

The present application provides a map downloading method, device, computer equipment and computer-readable storage medium, which belongs to the field of computer technology. The method includes: receiving a first download request sent by a terminal device; acquiring the target map according to the boundary information, and determining the starting download level of the target map; generating at least one download script according to the position information of each starting tile of the target map in the starting download level, and sending the download script to the terminal device; receiving a second download request sent by the terminal device; reading the starting tile and the associated tile according to the position information of the starting tile and the position information of the associated tile, and sending the starting tile and the associated tile to the terminal device. The present application can achieve the effect of reducing the processing pressure of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a map downloading method, device, computer equipment and computer-readable storage medium. Background Art

[0002] With the development of science and technology, people have obtained a lot of geographic information and used it to draw various maps. These maps can be downloaded through various applications and used for navigation, which brings great convenience to people.

[0003] In the related technology, generally, these maps are stored in a server. When an application on a terminal device needs to download a map, the terminal device will send a request to the server, and the server will retrieve all the map data stored in the database, determine the map tile information corresponding to the map that the application needs to download, and send the corresponding map tile information to the terminal device.

[0004] However, in this solution, the server needs to retrieve all the map data stored in the database. If the server stores a lot of map data, the workload of the server in retrieving the map data will be greatly increased. Therefore, this solution has the problem of high processing pressure on the server. Summary of the invention

[0005] The purpose of this application is to provide a map downloading method, device, computer equipment and computer-readable storage medium, which can reduce the processing pressure of the server.

[0006] The embodiment of the present application is implemented as follows:

[0007] In a first aspect of an embodiment of the present application, a map downloading method is provided, which is applied to a server, and the method includes:

[0008] Receiving a first download request sent by a terminal device, wherein the first download request includes boundary information of a target map to be downloaded;

[0009] According to the boundary information, the target map is acquired, and a starting downloading level of the target map is determined, wherein the starting downloading level includes the target map and each starting tile of the target map;

[0010] Generate at least one download script according to the position information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device, wherein the download script is used to indicate the position information of each starting tile in the starting download layer;

[0011] receiving a second download request sent by the terminal device, wherein the second download request includes: location information of the starting tile and location information of associated tiles in an associated downloading layer, wherein the associated downloading layer is a downloading layer other than the starting downloading layer, and the associated tiles are tiles of the target map in the associated downloading layer;

[0012] The starting tile and the associated tiles are read according to the position information of the starting tile and the position information of the associated tiles, and the starting tile and the associated tiles are sent to the terminal device.

[0013] Optionally, determining the starting download level of the target map includes:

[0014] The starting downloading level is determined according to the number of tile levels of the target map.

[0015] Optionally, determining the starting download level of the target map includes:

[0016] If the map area indicated by the boundary information is less than or equal to the preset area, any level in the tile level of the target map is used as the starting download level;

[0017] If the map area indicated by the boundary information is larger than the preset area, multiple optional levels are determined according to the tile level of the target map, and the starting download level is selected from the multiple optional levels according to the number of tiles in each optional level of the target map.

[0018] Optionally, generating at least one download script according to the position information of each starting tile of the target map in the starting download level includes:

[0019] Dividing the starting tiles into at least one tile group according to the number of starting tiles of the target map;

[0020] According to the position information of the starting tile in each tile group, the download script corresponding to each tile group is generated respectively.

[0021] Optionally, generating the download scripts corresponding to each tile group respectively according to the position information of the starting tile in each tile group includes:

[0022] Generate the initial script corresponding to each tile group respectively;

[0023] The position information of the starting tile in the tile group in the starting downloading layer and the layer identifier of the starting downloading layer are written into the initial script corresponding to each tile group to obtain the download script corresponding to each tile group.

[0024] Optionally, before receiving the first download request sent by the terminal device, the method further includes:

[0025] The map is sliced ​​according to a preset tile model to obtain multiple download levels and tiles of the map in each download level.

[0026] A second aspect of the embodiments of the present application provides a map downloading method, which is applied to a terminal device, and the method includes:

[0027] Sending a first download request to a server, wherein the first download request includes boundary information of a target map to be downloaded, wherein the boundary information is obtained based on a trigger operation of a user;

[0028] receiving at least one download script sent by the server, wherein the download script is used to indicate the position information of each starting tile in the starting download level of the target map, and the starting tile is a tile of the target map in the starting download level;

[0029] Determine, according to the at least one download script, location information of an associated tile in an associated download level, wherein the associated download level is a download level other than the starting download level, and the associated tile is a tile of the target map in the associated download level;

[0030] generating a second download request according to the position information of each starting tile and the position information of each associated tile, and sending the second download request to the server;

[0031] The starting tile and the associated tiles sent by the server are received, and the target map is generated and output according to the starting tile and the associated tiles.

[0032] Optionally, determining the location information of the associated tile in the associated download level according to the at least one download script includes:

[0033] According to the at least one download script, obtain the level identifier of the starting download level and the position information of each starting tile, and determine the position of the starting download level in the download level;

[0034] According to the position information of each of the starting tiles and the position of the starting downloading level in the downloading level, the position information of each of the associated tiles in each of the associated downloading levels is determined.

[0035] Optionally, the position information of each of the starting tiles includes row and column information of each of the starting tiles in the starting downloading level; the position information of each of the associated tiles includes row and column information of each of the associated tiles in each of the associated downloading levels;

[0036] The determining, according to the position information of each of the starting tiles and the position of the starting downloading level in the downloading level, the position information of each of the associated tiles in each of the associated downloading levels comprises:

[0037] Obtaining an associated tile recursive algorithm according to a preset tile model;

[0038] The row and column information of each of the starting tiles and the position of the starting download level in the download level are input into the associated tile recursive algorithm, and the row and column information of each of the associated tiles in each of the associated download levels is calculated in sequence.

[0039] Optionally, generating and outputting the target map according to the starting tile and the associated tiles includes:

[0040] splicing the starting tiles according to the position information of the starting tiles, generating and outputting the target map of the starting download level;

[0041] The associated tiles belonging to the same associated download level are spliced ​​according to the position information of the associated tiles, and the target map of each associated download level is generated and output.

[0042] According to a third aspect of the embodiments of the present application, a map downloading device is provided, which is applied to a server, and the device includes:

[0043] A first receiving module, used for receiving a first download request sent by a terminal device;

[0044] An acquisition and determination module, used to acquire the target map according to the boundary information, and determine the starting download level of the target map;

[0045] A generating and sending module, configured to generate at least one download script according to the position information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device;

[0046] A second receiving module, used to receive a second download request sent by the terminal device;

[0047] The reading and sending module is used to read the starting tile and the associated tiles according to the position information of the starting tile and the position information of the associated tiles, and send the starting tile and the associated tiles to the terminal device.

[0048] In a fourth aspect of the embodiments of the present application, a map downloading device is provided, which is applied to a terminal device, and the device includes:

[0049] A first sending module, used for sending a first download request to a server;

[0050] A third receiving module, used to receive at least one download script sent by the server;

[0051] A determination module, configured to determine, according to the at least one download script, location information of the associated tile in the associated download level;

[0052] A second sending module, configured to generate a second download request according to the position information of each starting tile and the position information of each associated tile, and send the second download request to the server;

[0053] The receiving and generating module is used to receive the starting tile and the associated tiles sent by the server, and generate and output the target map according to the starting tile and the associated tiles.

[0054] In a fifth aspect of an embodiment of the present application, a computer device is provided, which includes a memory and a processor. A computer program executable on the processor is stored in the memory, and when the computer program is executed by the processor, the map downloading method described in the first and second aspects is implemented.

[0055] In a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the map downloading method described in the first aspect and the second aspect is implemented.

[0056] The beneficial effects of the embodiments of the present application include:

[0057] The map download method provided by the embodiment of the present application receives a first download request sent by a terminal device, obtains the target map according to the boundary information, determines the starting download level of the target map, generates at least one download script according to the position information of each starting tile of the target map in the starting download level, and sends the download script to the terminal device, receives a second download request sent by the terminal device, reads the starting tile and the associated tile according to the position information of the starting tile and the position information of the associated tile, and sends the starting tile and the associated tile to the terminal device. Wherein, at least one download script is generated according to the position information of each starting tile of the target map in the starting download level, so that the server does not need to traverse each download level, nor does it need to determine the tiles corresponding to the target map in each download level. In addition, by receiving the second download request sent by the terminal device, the starting tile and the associated tile are read according to the location information of the starting tile and the location information of the associated tile, and the starting tile and the associated tile are sent to the terminal device. In this way, while achieving the purpose of downloading the target map, the server does not need to calculate or process the target map and / or associated tiles in each associated download level. In this way, the processing pressure of the server can be reduced, and the problem of the server crashing due to excessive processing pressure can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 A schematic diagram of an application scenario of a map downloading method provided in an embodiment of the present application;

[0060] Figure 2 A flowchart of a first map downloading method provided in an embodiment of the present application;

[0061] Figure 3 A schematic diagram of a tile distribution provided in an embodiment of the present application;

[0062] Figure 4 A flowchart of a second map downloading method provided in an embodiment of the present application;

[0063] Figure 5 A flowchart of a third map downloading method provided in an embodiment of the present application;

[0064] Figure 6A flowchart of a fourth map downloading method provided in an embodiment of the present application;

[0065] Figure 7 A flowchart of a fifth map downloading method provided in an embodiment of the present application;

[0066] Figure 8 A flowchart of a sixth map downloading method provided in an embodiment of the present application;

[0067] Fig. 9 A flowchart of a seventh map downloading method provided in an embodiment of the present application;

[0068] Fig.10 A flowchart of an eighth map downloading method provided in an embodiment of the present application;

[0069] Fig.11 A flowchart of a ninth map downloading method provided in an embodiment of the present application;

[0070] Fig.12 A schematic diagram of the structure of a map downloading device provided in an embodiment of the present application;

[0071] Fig.13 A schematic diagram of the structure of another map downloading device provided in an embodiment of the present application;

[0072] Fig.14 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0074] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0075] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0076] In the related art, generally, these maps are stored in the server. When the application on the terminal device needs to download the map, the terminal device will send a request to the server, and the server will retrieve all the map data stored in the database, determine the map tile information corresponding to the map that the application needs to download, and send the corresponding map tile information to the terminal device. However, in this solution, the server needs to retrieve all the map data stored in the database. If the server stores a lot of map data, it will greatly increase the workload of the server to retrieve map data. Therefore, this solution has the problem of high processing pressure on the server. In addition, due to the high processing pressure on the server, there may be a problem that the server is prone to downtime.

[0077] To this end, an embodiment of the present application provides a map download method, which receives a first download request sent by a terminal device, obtains a target map based on boundary information, and determines the starting download level of the target map, then generates at least one download script based on the position information of each starting tile of the target map in the starting download level, and sends the download script to the terminal device, then receives a second download request sent by the terminal device, reads the starting tile and the associated tiles based on the position information of the starting tile and the position information of the associated tiles, and sends the starting tile and the associated tiles to the terminal device, thereby achieving the effect of reducing the processing pressure on the server.

[0078] The embodiment of the present application is described by taking the map downloading method applied in the server as an example, but it does not mean that the embodiment of the present application can only be applied to the server for map downloading.

[0079] Figure 1 Schematic diagram of an application scenario of a map downloading method provided in an embodiment of the present application. Figure 1 , the scenario includes: server A, terminal device B and network C.

[0080] The server A may be a server with storage and relay functions, or may be a server with only storage functions. In the embodiment of the present application, the server A having storage and relay functions is used as an example for explanation.

[0081] Optionally, server A may include a data server a1 and a relay server a2.

[0082] The data server a1 is connected to the relay server a2.

[0083] The data server a1 may be used to store maps and / or files and / or other data.

[0084] The relay server a2 can be used to communicate with the terminal device A through the network C. Of course, it can also communicate with the terminal device A through other means. This embodiment of the present application does not limit this.

[0085] In the scenario, terminal device B can be connected to server A through network C. Terminal device B can generate a corresponding download request based on the user's trigger operation and send the download request to server A. Server A can, upon receiving the download request sent by terminal device B, send other possible data such as maps and / or files and / or other data stored in server A to terminal device B through network C, such as data corresponding to maps or map tiles stored in server A.

[0086] Optionally, upon receiving a download request sent by terminal device B, server A may generate a corresponding script and / or application according to the download request, and send the script and / or application to terminal device B via network C.

[0087] Specifically, the terminal device B can send a download request to the relay server a2 via the network C. The relay server a2 can retrieve the map and / or file and / or other data stored in the data server a1 according to the download request and generate a corresponding script and / or application according to the retrieval result. After generating the script and / or application, the relay server a2 can also send the script and / or application to the terminal device B via the network C.

[0088] After terminal device B receives the script sent by server A, it can control the script execution according to the user's confirmation operation, generate corresponding instructions or requests and send them to server A through network C to obtain additional maps and / or files and / or other data.

[0089] Optionally, the terminal device B can send the corresponding instructions or requests directly to the data server a1 through the network C. After receiving the instructions, the data server a1 sends the map and / or files and / or data stored in the data server a1 to the terminal device B through the network C.

[0090] Of course, after receiving the map, file, data, script or application, the terminal device B can perform corresponding operations on the map, file, data, script or application, which is not limited in the embodiment of the present application.

[0091] This allows downloading of maps, files, data, scripts or applications.

[0092] The map downloading method provided in the embodiment of the present application is explained in detail below.

[0093] Figure 2 This is a flowchart of a map downloading method provided by the present application. The method can be applied to the aforementioned server. The server or a database communicating with the server can store at least one map. Figure 2 , the present application embodiment provides a map downloading method, comprising:

[0094] Step 1001: Receive a first download request sent by a terminal device.

[0095] Optionally, the terminal device may be a computer, a smart phone, a tablet computer or other computer devices with communication and processing functions.

[0096] Optionally, the first download request includes boundary information of the target map to be downloaded.

[0097] Optionally, the first download request may further include a handshake signal that complies with a handshake protocol.

[0098] Exemplarily, the handshake protocol may be any communication protocol applicable to data download operations, or any communication protocol applicable to a server and / or a terminal device so that the server and / or the terminal device can establish a communication connection. This embodiment of the application does not limit this.

[0099] Optionally, the handshake signal is used to establish a communication connection between the server and the terminal device.

[0100] Optionally, the target map may be a map that is selected by the user through the terminal device and needs to be downloaded.

[0101] Of course, the target map can be any entire map stored in the server or a database communicating with the server, or a portion of any map stored in the server or a database communicating with the server, or multiple maps stored in the server or a database communicating with the server, and the terminal device can splice or synthesize these multiple maps into a new large map through splicing or synthesis technology. This embodiment of the application is not limited to this.

[0102] Optionally, the boundary information can be used to indicate the size and / or shape and / or coordinates of boundary points of the target map. The boundary information can also be used to indicate that the target map is any entire map in the server or a database communicating with the server, or that the target map is a portion of any map in the server or a database communicating with the server. Of course, if the target map is a portion of any map in the server or a database communicating with the server, then the boundary information can also be used to indicate the location of the target map in the entire map. The embodiments of the present application are not limited to this.

[0103] Optionally, the shape of the target map can be a regular shape such as a rectangle, a circle, a triangle, a star, or any other possible irregular shape, or a shape formed by splicing a regular shape and an irregular shape. The shape of the target map can be adjusted according to the user's choice. This embodiment of the application is not limited to this.

[0104] In addition, the server may be in a state of preparing to receive the first download request in real time, or may enter the state of preparing to receive the first download request based on certain trigger conditions. For example, the server may enter the state of preparing to receive the first download request based on a certain interval time. This embodiment of the application is not limited to this.

[0105] It should be noted that the server will perform subsequent operations only when it receives the first download request sent by the terminal device, otherwise, the server can be in a dormant state or a low power consumption state, thus reducing the power consumption of the server and the processing pressure of the server.

[0106] Step 1002: Acquire the target map according to the boundary information, and determine the starting download level of the target map.

[0107] Optionally, the target map in each download level may be acquired from the server or a database communicating with the server according to the boundary information.

[0108] Exemplarily, any map stored in the server or in a database communicating with the server is provided with at least one corresponding download level, and the size and resolution of the maps included in each download level are different, that is, the maps in each download level correspond to different scales, and the scale is the ratio of the length of a line segment on the map to the actual length of the corresponding line segment on the ground. Generally, the larger the scale, the higher the geometric accuracy of the map, and the smaller the scale, the lower the geometric accuracy of the map. Then, the corresponding download level with a larger scale has fewer tiles, and the corresponding download level with a smaller scale has more tiles. In this way, the map can be reduced or enlarged.

[0109] In addition, each download level is arranged in a certain order, for example, each download level can be arranged according to the size of the scale corresponding to each download level. For another example, the download level corresponding to the smallest scale can be arranged in the first level of each download level, and the download level corresponding to the largest scale can be arranged in the last level of each download level.

[0110] Optionally, the number of each download level may be set to 15, 20 or 23. Of course, the download level may also be set to other possible values ​​according to actual needs.

[0111] Optionally, the starting download level may include the target map and each starting tile of the target map. Of course, if the target map is a part of the entire map, the starting download level may also include maps other than the target map that do not need to be downloaded and each tile of the map that does not need to be downloaded in the entire map. This embodiment of the application does not limit this.

[0112] In addition, each starting tile of the target map in the starting downloading layer may be a tile that completely belongs to the target map, or may be a tile that partially belongs to the target map.

[0113] For example, Figure 3 is a schematic diagram of a tile distribution provided in an embodiment of the present application, Figure 3 The first three layers in each download layer are used as an example for explanation, which does not mean that each download layer in the embodiment of the present application has only three layers. Figure 3 , Figure 3 (a) in the figure is the first layer in each download layer. There is only one tile W1 in the first layer in each download layer. Figure 3 (b) in the figure is the second layer in each downloading layer. There are four tiles W2 in the second layer in each downloading layer. Figure 3 (c) in the figure is the third layer in each download layer, and there are sixteen tiles W3 in the third layer in each download layer. Assume that the third layer in each download layer is the starting download layer, and the starting download layer includes the target map M. Figure 3 It can be seen that the tiles that completely belong to the target map in the starting download level include tile W3 in the second row and third column and tile W3 in the third row and third column, and the tiles that partially belong to the target map in the starting download level include tile W3 in the first row and second column, tile W3 in the first row and third column, tile W3 in the first row and fourth column, tile W3 in the second row and second column, tile W3 in the second row and fourth column, tile W3 in the third row and fourth column, tile W3 in the fourth row and second column, tile W3 in the fourth row and third column, and tile W3 in the fourth row and fourth column. Then, the tile W3 in the second row and third column, the tile W3 in the third row and third column, the tile W3 in the first row and second column, the tile W3 in the first row and third column, the tile W3 in the first row and fourth column, the tile W3 in the second row and second column, the tile W3 in the second row and fourth column, the tile W3 in the third row and second column, the tile W3 in the third row and fourth column, the tile W3 in the fourth row and second column, the tile W3 in the fourth row and third column, and the tile W3 in the fourth row and fourth column in the starting downloading level are all starting tiles of the target map.

[0114] For example, if the number of download levels is 23, then the download levels can be arranged as level 0, level 1, level 2, ..., level 22. Then, the 14th level in each download level can be used as the starting download level, the 15th level in each download level can be used as the starting download level, or any level in each download level can be used as the starting download level. This embodiment of the application is not limited to this.

[0115] It is worth noting that, since the download level corresponding to the smallest scale is generally arranged in the first level of each download level, and the download level corresponding to the largest scale is arranged in the last level of each download level, that is, the map geometric accuracy of the download level arranged in the first level of each download level is the lowest and the corresponding tiles are the least, the map geometric accuracy of the download level arranged in the last level of each download level is the highest and the corresponding tiles are the most, and the number of tiles corresponding to the map in each download level increases exponentially, for example, the map corresponding to the download level arranged in the first level of each download level is 1 tile, the map corresponding to the download level arranged in the second level of each download level is 4 tiles, and the map corresponding to the download level arranged in the third level of each download level is 16 tiles. Then the starting download level can be located in the middle of each download level. In this way, the processing pressure of the server can be reduced, and the problem of excessive processing pressure on the terminal device causing the terminal device to crash can be avoided.

[0116] Step 1003: Generate at least one download script according to the location information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device.

[0117] Optionally, the download script is used to indicate the location information of each starting tile in the starting download level.

[0118] Optionally, the download script may include each starting tile of the target map, may include position information of each starting tile of the target map, and may also include the position of the starting download level in each download level.

[0119] Optionally, the download script may be sent to the terminal device immediately after the download script is generated, or the download script may be sent to the terminal device after a certain trigger condition. This embodiment of the present application does not limit this.

[0120] In addition, only one download script may be generated, or multiple download scripts may be generated, which is not limited in the present embodiment of the application.

[0121] Optionally, after the server sends the download script to the terminal device, the terminal device may calculate each tile in other download levels except the starting download level in each download level according to the starting download level and each starting tile.

[0122] Since the download script only needs to be generated according to the location information of each starting tile of the target map in the starting download level, that is to say, the server does not need to traverse each download level, nor does it need to determine the tiles corresponding to the target map in each download level. This can greatly reduce the processing pressure of the server, and thus avoid the problem of server crashes due to excessive processing pressure.

[0123] Step 1004: Receive a second download request sent by the terminal device.

[0124] Optionally, the second download request includes: location information of the starting tile and location information of associated tiles in an associated download level.

[0125] Optionally, the position information of the starting tile may include row and column information of the starting tile in the starting downloading level.

[0126] Optionally, the position information of the associated tile in each associated downloading level may include row and column information of the associated tile in each associated downloading level.

[0127] Optionally, the associated download level is a download level other than the initial download level.

[0128] For example, if the download levels have level 0 to level 22, and the starting download level is level 15, then levels 0 to 14 and levels 16 to 22 in each download level are all associated download levels.

[0129] Optionally, the associated tile is a tile of the target map in the associated download level.

[0130] Optionally, the location information of the associated tile in the associated download level is calculated by the terminal device.

[0131] For example, see Figure 3 , assuming that the third layer in each download layer is the starting download layer, then the first layer in each download layer, the second layer in each download layer, and the other layers in each download layer except the third layer are all associated download layers. Figure 3 As shown in (a) of FIG. 1 , the only tile W1 in the first layer of each download level is the associated tile, such as Figure 3 As shown in (b) of FIG. 1 , the four tiles W2 in the second layer of each download level are all associated tiles, such as Figure 3As shown in (c) in FIG. 1 , sixteen tiles W3 in the third layer in each downloading level are all starting tiles.

[0132] Exemplarily, the position information of each associated tile in each associated downloading level may include row and column information of each associated tile in each associated downloading level, and the row and column information of each associated tile may be represented by the coordinates of each associated tile in each associated downloading level. For example, the row and column information of the only associated tile W1 in the first layer of each downloading level is (1, 1). The row and column information of each associated tile in the second layer in each download layer can be determined based on the associated tile W1 in the first layer in each download layer. For example, the row and column information of the tile W2 in the first row and first column of the second layer in each download layer is obtained by multiplying the coordinates of the associated tile W1 by 2. The row and column information of the associated tile W2 in the first row and first column of the second layer in each download layer is (2, 2). Based on the row and column information of the associated tile W2 in the first row and first column, it can be determined that the row and column information of the associated tile W2 in the first row and second column is (2, 3), the row and column information of the associated tile W2 in the second row and first column is (3, 2), and the row and column information of the associated tile W3 in the second row and second column is (3, 3).

[0133] Exemplarily, the position information of each starting tile may be the row and column information of each starting tile in the starting downloading layer, and the row and column information of each starting tile may be respectively represented by the coordinates of each starting tile in the starting downloading layer. Of course, the row and column information of the tile W3 in the first row and first column in the starting downloading layer may be obtained by multiplying the coordinates of the associated tile W3 in the first row and first column in the second layer in each downloading layer by 2, as shown in FIG. Figure 3 As shown in (c), the row and column information of tile W3 in the first row and first column of the starting downloading level is (4, 4). Based on the row and column information of the associated tile W3 in the first row and first column, it can be determined that the row and column information of the associated tile W3 in the first row and second column is (4, 5), the associated tile W2 in the second row and first column is (5, 4), and the row and column information of the associated tile W3 in the second row and second column is (5, 5). In this way, the row and column information of each starting tile in the starting downloading level can be calculated in sequence, and then the row and column information of each associated tile in the fourth layer of each downloading level can be calculated, until the row and column information of each associated tile in the last layer of each downloading level is calculated.

[0134] It is worth noting that, since the location information of the associated tile in the associated download level is calculated by the terminal device, that is, the server does not need to calculate or process the target map and / or associated tile in each associated download level. In this way, the processing pressure of the server can be greatly reduced, thereby avoiding the problem of the server crashing due to excessive processing pressure.

[0135] Step 1005: Read the starting tile and the associated tile according to the position information of the starting tile and the position information of the associated tile, and send the starting tile and the associated tile to the terminal device.

[0136] Optionally, the data corresponding to the starting tile and the data corresponding to the associated tile may be sent to the terminal device, and the terminal device may parse or decode the data corresponding to the starting tile and the data corresponding to the associated tile to generate the starting tile and the associated tile.

[0137] In this way, the purpose of downloading the tiles of the target map in each download level can be achieved, and the purpose of downloading the target map can also be achieved.

[0138] In an embodiment of the present application, by receiving a first download request sent by a terminal device, the target map is obtained according to the boundary information, and the starting download level of the target map is determined, at least one download script is generated according to the position information of each starting tile of the target map in the starting download level, and the download script is sent to the terminal device, a second download request sent by the terminal device is received, and the starting tile and the associated tile are read according to the position information of the starting tile and the position information of the associated tile, and the starting tile and the associated tile are sent to the terminal device. Among them, at least one download script is generated according to the position information of each starting tile of the target map in the starting download level, so that the server does not need to traverse each download level, nor does it need to determine the tiles corresponding to the target map in each download level. In addition, by receiving the second download request sent by the terminal device, the starting tile and the associated tile are read according to the location information of the starting tile and the location information of the associated tile, and the starting tile and the associated tile are sent to the terminal device. In this way, while achieving the purpose of downloading the target map, the server does not need to calculate or process the target map and / or associated tiles in each associated download level. In this way, the processing pressure of the server can be reduced, and the problem of the server crashing due to excessive processing pressure can be avoided.

[0139] In a possible implementation, in order to generate a download script that can calculate the location information of each tile in each associated download level and to prevent the terminal device from being overloaded with processing pressure, an embodiment of the present application provides a possible method for determining the starting download level. Determining the starting download level of the target map includes:

[0140] The starting download level is determined according to the number of tile levels of the target map.

[0141] Optionally, the number of tile levels of the target map may be a preset number of levels set in advance, that is, when the target map is stored in the server or a database communicating with the server, the target map may be stored in each tile level according to the preset number of levels.

[0142] Optionally, the tile level of the target map includes the starting download level and the associated download level.

[0143] Optionally, the number of the above-mentioned download levels may be the same as the number of the tile levels, or may be less than the number of the tile levels.

[0144] For example, the number of tile levels is 23, that is, the tile levels of the target map can be from level 0 to level 22, and the number of each download level is less than or equal to 23. If the number of each download level is 23, it means that the target map in all tile levels needs to be downloaded. Of course, you can also select a part of the levels in each tile level as each download level, for example, you can select the 5th to 22nd levels in the tile level of the target map as each download level. In this way, there is no need to download or calculate the location information of tiles from level 0 to level 4. In this way, the flexibility of map downloading can be improved, and the processing pressure of the server can be reduced.

[0145] It is worth noting that, since the tile level corresponding to the smallest scale is generally arranged in the first layer of each tile level, and the tile level corresponding to the largest scale is arranged in the last layer of each tile level, that is, the map geometric accuracy of the tile level arranged in the first layer of each tile level is the lowest and the corresponding tiles are the least, the map geometric accuracy of the tile level arranged in the last layer of each tile level is the highest and the corresponding tiles are the most, and the number of tiles corresponding to the map in each tile level increases exponentially, then the starting download level can be located in the middle of each tile level. In this way, the processing pressure of the server can be reduced, and the problem of excessive processing pressure on the terminal device causing the terminal device to crash can be avoided.

[0146] For a possible implementation, see Figure 4 , determine the starting download level of the target map, including:

[0147] Step 1021: If the map area indicated by the boundary information is less than or equal to the preset area, any level in the tile level of the target map is used as the starting download level.

[0148] Optionally, the map area indicated by the boundary information may refer to the actual area of ​​the target map, that is, the actual area obtained by dividing the area indicated by the target map by the scale.

[0149] For example, the area of ​​the target map in any tile level is 0.01 square meters, and the scale corresponding to this tile level is 1:50,000,000, then the actual area of ​​the target map is 500,000 square meters.

[0150] Optionally, the preset area may be set in advance, for example, the preset area may be set to 500 mu, and of course the preset area may also be set to an area of ​​other numerical values.

[0151] It is worth noting that if the map area indicated by the boundary information is less than or equal to the preset area, it can indicate that the actual area of ​​the target map is small, which means that the content of the target map is small, and the tiles corresponding to the target map in each tile level are small. In this way, any level in the tile level of the target map can be used as the starting download level, and of course, a tile level located in the middle of each tile level can also be used as the starting download level.

[0152] Step 1022: If the map area indicated by the boundary information is larger than the preset area, multiple optional levels are determined according to the tile level of the target map, and the starting download level is selected from the multiple optional levels according to the number of tiles in each optional level of the target map.

[0153] Optionally, the optional levels may be any two or more tile levels in each tile level, or may be two, three or four tile levels located in the middle of each tile level. The number of the optional levels may be adjusted according to actual needs. This embodiment of the present application does not limit this.

[0154] Exemplarily, if the number of the tile levels is 23, that is, the tile levels of the target map can be the 0th to 22nd levels, then the 14th to 18th levels can be used as the multiple optional levels.

[0155] Specifically, according to the number of tiles in each optional level of the target map, the specific operation of selecting the starting download level from the multiple optional levels may be:

[0156] It is determined whether the number of tiles in each optional level of the target map is greater than a first preset threshold value. If the number of tiles in any optional level of each optional level is greater than or equal to the first preset threshold value, any optional level is used as the starting download level.

[0157] Optionally, the first preset threshold may be set according to actual needs. Generally, the first preset threshold may be set to 3.

[0158] If the number of tiles in each optional level is less than the first preset threshold, then determine whether the number of tiles in each optional level of the target map is greater than the second preset threshold; if the number of tiles in any optional level in each optional level is greater than or equal to the second preset threshold, then use any optional level as the starting download level.

[0159] Optionally, the second preset threshold can be set according to actual needs. Generally, the second preset threshold is smaller than the first preset threshold. For example, the second preset threshold can be set to 2.

[0160] If the number of tiles in each optional level is less than the second preset threshold, the first optional level in each optional level is used as the starting download level.

[0161] Exemplarily, the second preset threshold is set to 2. If the 14th to 18th layers in each tile level are used as the multiple optional levels, and the number of tiles in the multiple optional levels is less than 2, the 14th tile level can be used as the starting download level.

[0162] In this way, the processing pressure of the server can be reduced, and at the same time, the problem of excessive processing pressure on the terminal device causing the terminal device to crash can be avoided.

[0163] For a possible implementation, see Figure 5 , generating at least one download script according to the position information of each starting tile of the target map in the starting download level, including:

[0164] Step 1031: According to the number of starting tiles of the target map, each starting tile is divided into at least one tile group.

[0165] Optionally, each tile group may include only one starting tile, or may include at least two starting tiles, which is not limited in the embodiment of the present application.

[0166] Exemplarily, each starting tile may be divided into a tile group.

[0167] Exemplarily, if the number of starting tiles of the target map is greater than a preset number threshold, two adjacent or other numbers of starting tiles may be divided into at least one tile group according to the position information of each starting tile.

[0168] For example, see Figure 3, assuming that the preset number threshold is 8, and the third layer in each download layer is the starting download layer, then the number of starting tiles of the target map in the starting download layer is 12. That is, if the number of starting tiles of the target map is greater than the preset number threshold, then each starting tile in the same row of each starting tile can be divided into a tile group, or each starting tile in the same column of each starting tile can be divided into a tile group, and of course, it can also be divided according to other rules. The embodiment of the present application is not limited to this.

[0169] Step 1032: Generate the download script corresponding to each tile group according to the position information of the starting tile in each tile group.

[0170] Optionally, the position information of the starting tile in each tile group may be written into a preset initial script to generate the download script corresponding to each tile group. This embodiment of the present application does not limit this.

[0171] Optionally, the initial script may be a generic download script template.

[0172] Exemplarily, if each tile group includes only one starting tile, it is necessary to generate download scripts with the same number as the starting tiles in the starting download level.

[0173] In this way, the server only needs to generate the download script according to the location information of each starting tile of the target map in the starting download layer, which can greatly reduce the processing pressure of the server and avoid the problem of server crash due to excessive processing pressure.

[0174] For a possible implementation, see Figure 6 , according to the position information of the starting tile in each tile group, respectively generate the download script corresponding to each tile group, including:

[0175] Step 1033: Generate initial scripts corresponding to each tile group respectively.

[0176] Optionally, the number of the initial scripts may be the same as the number of tile groups.

[0177] Step 1034: write the position information of the starting tile in the tile group in the starting downloading layer and the layer identifier of the starting downloading layer into the initial script corresponding to each tile group to obtain the download script corresponding to each tile group.

[0178] In this way, the amount of data contained in each download script can be controlled, and it can be ensured that when running each download script, the processing pressure of the terminal device will not be very large, and the terminal device can be prevented from crashing.

[0179] For a possible implementation, see Figure 7 Before receiving the first download request sent by the terminal device, the method further includes:

[0180] Step 1006: Slice the map according to a preset tile model to obtain multiple download levels and tiles of the map in each download level.

[0181] Optionally, the preset tile model may be a general model for slicing a map to obtain tiles or tile data. For example, the preset tile model may be a tile map pyramid model, or other possible models. This embodiment of the present application does not limit this.

[0182] Exemplarily, the operation of slicing the map according to the preset tile model may be to first scale the map according to different scales, then cut the scaled map into tiles of the same size, and store the tiles of the scaled map in each tile level respectively. Moreover, the ratio of the scales of any two adjacent tile levels is equal. For example, the ratio of the scales can be set to 4. In other words, the ratio of the number of tiles in any two adjacent tile levels obtained after slicing the map according to the preset tile model is equal. That is, the number of tiles corresponding to the map in each downloaded level grows exponentially. For example, if the ratio of the scales of any two adjacent tile levels is set to 4, then the ratio of the number of tiles in any two adjacent tile levels is 4.

[0183] Continue to see Figure 3 ,like Figure 3 As shown, the sizes or dimensions of the tiles W1 in the first layer of each downloading level, the tiles W2 in the second layer of each downloading level, and the tiles W3 in the third layer of each downloading level obtained after slicing are the same.

[0184] In addition, if Figure 3 As shown, there is only one tile W1 in the first layer of each download level, four tiles W2 in the second layer of each download level, and 16 tiles W3 in the third layer of each download level. This is because when slicing the map according to the preset tile model, the slicing is performed layer by layer, and each tile in each download level has a corresponding relationship with at least one tile in other download levels. Generally, the position information of each tile in a download level can be determined by the position information of the tiles in the download level adjacent to any download level.

[0185] For example, see Figure 3 The four tiles W2 correspond to the tiles W1, and the 16 tiles W3 are obtained by dividing the four tiles W2.

[0186] For example, Figure 3 In (c), the four tiles W3 with row and column information (4,4), (4,5), (5,4), (5,5) are segmented. Figure 3 In (c), the row and column information is obtained for tile W2 (2,2).

[0187] Furthermore, when slicing the map according to the preset tile model, the row and column information corresponding to each tile in each tile level will be generated according to the cutting order and the tile cutting relationship between adjacent levels. For example, if the tile W1 in the first layer of each tile level is cut first, then the row and column information of the tile W1 in the first layer can be set to (1, 1), and the tile W1 can be cut to obtain each tile W2 in the second layer of each tile level. In other words, the row and column information of the tile W1 in the first layer can be used to obtain the row and column information of each tile W2 in the second layer. Figure 3 As shown, the row and column information of each tile W2 are (2, 2), (2, 3), (3, 2), and (3, 3), respectively.

[0188] For another example, by cutting the tile W2 with row and column information (2, 2), we can obtain the four tiles W3 in the upper left corner of the third layer in each tile hierarchy. Then, of course, we can obtain the row and column information of the four tiles W3 in the third layer by using the row and column information of the tile W2 in the second layer. Figure 3 As shown, the row and column information of the four tiles W3 in the upper left corner are (4, 4), (4, 5), (5, 4), and (5, 5) respectively. According to this rule, the position information or row and column information of each tile in each tile level can be obtained respectively.

[0189] In addition, if Figure 3 As shown, the ratio of the row and column information of the tiles in the first row and first column of any two adjacent tile levels is 2, and the row and column information of other tiles in each tile level can be calculated based on the row and column information of the tiles in the first row and first column of this tile level.

[0190] Furthermore, the ratio of the row and column information of each tile in the previous tile level of any two adjacent tile levels to the row and column information of a tile in the upper left corner of the next four tile levels obtained after cutting is 2.

[0191] For example, the row and column information of the tile in the first row and first column of the third layer is (4,4), the row and column information of the tile in the first row and second column of the third layer is (4,5), the row and column information of the tile in the first row and third column of the third layer is (4,7), the row and column information of the tile in the second row and first column of the third layer is (5,4), and the row and column information of the tile in the fourth row and third column of the third layer is (7,6).

[0192] For another example, the row and column information of the tile in the first row and first column of the second layer is (2,2), the row and column information of the tile in the first row and first column of the third layer is (4,4), the row and column information of the tile in the second row and second column of the second layer is (3,3), and the row and column information of the tile in the third row and third column of the third layer is (6,6).

[0193] According to this rule, the position information or row and column information of each tile in other levels in each tile level can be obtained according to the position information of tiles in any layer in each tile level.

[0194] Optionally, due to Figure 3 The above diagram only shows a solution that the tiles of the previous layer can be divided into 4 tiles of the next layer. However, in practical applications, the tiles of the previous layer can also be divided into any number of tiles of the next layer, for example, the tiles of the previous layer can be divided into 2 tiles or 8 tiles of the next layer. This embodiment of the application is not limited to this.

[0195] Optionally, the map may be any map stored in the server or in a database communicating with the server. This embodiment of the present application does not limit this.

[0196] Figure 8 This is a flowchart of a map downloading method provided by the present application. The method can be applied to the aforementioned terminal device, which can be a computer, a smart phone, a tablet computer, etc. Figure 8 , the present application embodiment provides a map downloading method, comprising:

[0197] Step 2001: Send a first download request to the server.

[0198] Optionally, the first download request includes boundary information of the target map to be downloaded.

[0199] Optionally, the boundary information is obtained based on a trigger operation of the user.

[0200] Optionally, the first download request may further include a handshake signal that complies with a handshake protocol.

[0201] Optionally, the boundary information may be used to indicate the size and / or shape and / or coordinates of boundary points of the target map, the boundary information may also be used to indicate that the target map is any entire map in the server or a database communicating with the server, or the target map is a portion of any map in the server or a database communicating with the server, and the boundary information may also be used to indicate the location of the target map in the entire map. The embodiments of the present application are not limited to this.

[0202] Optionally, the shape of the target map can be adjusted according to the user's choice. This embodiment of the present application does not limit this.

[0203] Step 2002: Receive at least one download script sent by the server.

[0204] Optionally, the download script is used to indicate the location information of each starting tile in the starting download level of the target map.

[0205] Optionally, the starting tile is a tile of the target map in the starting downloading level.

[0206] Optionally, each starting tile of the target map in the starting downloading layer may be a tile that completely belongs to the target map, or may be a tile that partially belongs to the target map.

[0207] Step 2003: Determine the location information of the associated tile in the associated download level according to the at least one download script.

[0208] Optionally, each download script can be run simultaneously, and the position information of each starting tile of the target map and / or each starting tile of the target map can be obtained through each download script, so as to determine the position information of each associated tile in each associated download level according to the position information of each starting tile of the target map and / or each starting tile of the target map.

[0209] Optionally, the associated download level is a download level other than the initial download level.

[0210] For example, if the download levels have level 0 to level 22, and the starting download level is level 15, then levels 0 to 14 and levels 16 to 22 in each download level are all associated download levels.

[0211] Optionally, the associated tile is a tile of the target map in the associated download level.

[0212] Optionally, the position information of the associated tile in the associated download level is calculated based on the position information of each starting tile.

[0213] Optionally, the position information of the associated tile in each associated downloading level may include row and column information of the associated tile in each associated downloading level.

[0214] Step 2004: Generate a second download request according to the location information of each starting tile and the location information of each associated tile, and send the second download request to the server.

[0215] Optionally, the second download request includes: location information of the starting tile and location information of associated tiles in an associated download level.

[0216] Optionally, the position information of the starting tile may include row and column information of the starting tile in the starting downloading level.

[0217] Step 2005: Receive the starting tile and the associated tile sent by the server, and generate and output the target map according to the starting tile and the associated tile.

[0218] Optionally, the server may send data corresponding to the starting tile and data corresponding to the associated tile, and the terminal device may parse or decode the data corresponding to the starting tile and the data corresponding to the associated tile to generate the starting tile and the associated tile.

[0219] It is worth noting that the terminal device can determine the location information of each associated tile in each associated download level according to each download script, so that the processing pressure of the server can be greatly reduced, thereby avoiding the problem of the server crashing due to excessive processing pressure.

[0220] In addition, since the number of tiles corresponding to the map in each download level grows exponentially, when generating each download template, the layer located in the middle of each tile level is generally used as the starting download level. In this way, the number of associated tiles corresponding to each starting tile in the starting download level is relatively small, which can reduce the processing pressure of the server and avoid the problem of causing the terminal device to crash due to excessive processing pressure.

[0221] For a possible implementation, see Fig. 9 , determining, according to the at least one download script, location information of the associated tile in the associated download level, including:

[0222] Step 2006: According to the at least one download script, obtain the level identifier of the starting download level and the position information of each starting tile, and determine the position of the starting download level in each download level.

[0223] Optionally, the operation of determining the position of the starting downloading level in each downloading level may be determining the order in which the starting downloading level is arranged in each downloading level according to the size of the scale.

[0224] For example, assuming that the arrangement order of the starting download level is n, and there are 23 download levels in total, namely level 0 to level 22, then determining the position of the starting download level in each download level can refer to determining the specific value of n, and further determining that the starting download level is specifically level n-1 among levels 0 to 22, where n is greater than or equal to 1 and less than or equal to 23.

[0225] Step 2007: According to the position information of each starting tile and the position of the starting downloading level in the downloading level, the position information of each associated tile in each associated downloading level is determined.

[0226] Optionally, the position information of each starting tile may include row and column information of each starting tile in the starting downloading level, and the row and column information of each starting tile may be respectively represented by the coordinates of each starting tile in the starting downloading level.

[0227] Optionally, the position information of each associated tile in each associated downloading level may include row and column information of each associated tile in each associated downloading level, and the row and column information of each associated tile may be respectively represented by the coordinates of each associated tile in each associated downloading level.

[0228] In this way, according to the position information of each starting tile and the position of the starting download level in the download level, the position information of each associated tile in each associated download level arranged before the starting download level in each download level can be calculated in sequence, and the position information of each associated tile in each associated download level arranged after the starting download level in each download level can be calculated in sequence, and the rows and columns of each associated tile in each associated tile level can also be clearly indicated.

[0229] For a possible implementation, see Fig.10 , according to the position information of each starting tile and the position of the starting downloading level in the downloading level, determining the position information of each associated tile in each associated downloading level, including:

[0230] Step 2008: Obtain an associated tile recursive algorithm according to a preset tile model.

[0231] Optionally, the preset tile model may be the tile map pyramid model described above, which is not limited in the present embodiment of the application.

[0232] Optionally, the associated tile recursive algorithm can be used to reverse the row and column information of each starting tile based on a preset rule to obtain the position information of each associated tile in each associated download level that is arranged before the starting download level in each download level. It can also be used to forward the row and column information of each starting tile based on the preset rule to obtain the position information of each associated tile in each associated download level that is arranged after the starting download level in each download level.

[0233] Optionally, the preset rule may be a rule corresponding to the above-mentioned rule of obtaining the position information or row and column information of each tile in other levels of each tile level according to the position information of tiles in any layer of each tile level.

[0234] Step 2009: Input the row and column information of each of the starting tiles and the position of the starting download level in the download level into the associated tile recursive algorithm, and calculate the row and column information of each of the associated tiles in each of the associated download levels in turn.

[0235] For example, see Figure 3 ,by Figure 3 Taking the second layer in as the starting download layer as an example, the row and column information of each tile W2 are (2, 2), (2, 3), (3, 2), and (3, 3). Since these four tiles W2 correspond to tile W1, and the ratio of the row and column information of the tiles in the first row and first column of any two adjacent tile layers is 2, it can be determined that the row and column information of tile W1 is (1, 1), and the row and column information of the tiles in the first row and first column of the third layer is (4, 4).

[0236] For another example, the 16 tiles W3 are obtained by dividing the 4 tiles W2 respectively, and the ratio of the row and column information of each tile in the tile level of the previous layer in any two adjacent tile levels to the row and column information of a tile in the upper left corner of the 4 tile levels of the next layer obtained after cutting is 2. Then, it can be determined that the row and column information of a tile W3 corresponding to the tile W2 with the row and column information (2, 3) is (4, 6), the row and column information of a tile W3 corresponding to the tile W2 with the row and column information (3, 2) is (6, 4), and the row and column information of a tile W3 corresponding to the tile W2 with the row and column information (3, 3) is (6, 6).

[0237] In addition, since the row and column information of other tiles in each tile level can be calculated based on the row and column information of the tile in the first row and first column of this tile level, the row and column information of each tile W3 located to the right, below, and to the lower right of these four tiles W3 can be calculated based on the tile W3 with row and column information (4, 6), the tile W3 with row and column information (6, 4), the tile W3 with row and column information (6, 6), and the tile W3 with row and column information (4, 4). In this way, the row and column information of all tiles W3 in the third layer can be calculated.

[0238] Since the associated tile recursive algorithm is also obtained based on the preset tile model, the position information or row and column information of each associated tile in each associated downloading layer can be obtained based on the position of the starting downloading layer and the position information of each starting tile in the starting downloading layer. In this way, the terminal device can complete the work of determining the position information of each associated tile in each associated downloading layer. In this way, the processing pressure of the server can be greatly reduced, and the problem of the server crashing due to excessive processing pressure can be avoided.

[0239] In a possible implementation, generating and outputting the target map according to the starting tile and the associated tile includes:

[0240] The starting tiles are spliced ​​according to the position information of each starting tile, and the target map of the starting download level is generated and output.

[0241] For example, the starting tiles located in adjacent rows or columns may be sequentially spliced ​​together. Figure 3 , assuming that the second layer is used as the starting downloading layer, the starting tile of the row and column information (2,2) can be used as the first tile in the upper left corner of the target map of the starting downloading layer, and then the starting tiles in the same row as the starting tile of the row and column information (2,2) are sequentially spliced ​​to the right of the starting tile of the row and column information (2,2) according to the size of the serial number of the column where the starting tile is indicated in the row and column information. And the starting tiles in the same column as the starting tile of the row and column information (2,2) are sequentially spliced ​​below the starting tile of the row and column information (2,2) according to the size of the serial number of the row where the starting tile is indicated in the row and column information.

[0242] In this way, the target map of the initial download level can be generated.

[0243] Optionally, after the target map of the initial download level is generated, the target map of the initial download level can be output to a display device connected to the terminal device, or the target map of the initial download level can be output to other terminal devices. This embodiment of the application does not limit this.

[0244] The associated tiles belonging to the same associated download level are spliced ​​according to the position information of the associated tiles, and the target map of each associated download level is generated and output.

[0245] Exemplarily, the tiles in each associated downloading level may be sequentially spliced ​​in the same manner as the above-mentioned splicing of each starting tile to generate the target map of each associated downloading level.

[0246] In this way, the target map of each associated download level can be generated.

[0247] Optionally, after the target map of each associated download level is generated, the target map of each associated download level can be output to a display device connected to the terminal device, or the target map of each associated download level can be output to other terminal devices. This embodiment of the application does not limit this.

[0248] Fig.11 is a flow chart of a map downloading method provided in an embodiment of the present application. Fig.11, the method comprising:

[0249] Step 3001: The terminal device sends the first download request to the server.

[0250] Step 3002: The server receives the first download request sent by the terminal device.

[0251] Step 3003: The server obtains the target map according to the boundary information and determines the starting download level of the target map.

[0252] Step 3004: The server generates at least one download script according to the location information of each starting tile of the target map in the starting download level.

[0253] Step 3005: The server sends the download script to the terminal device.

[0254] Step 3006: The terminal device receives at least one download script sent by the server.

[0255] Step 3007: The terminal device determines the location information of the associated tile in the associated download layer according to the at least one download script.

[0256] Step 3008: The terminal device generates a second download request according to the location information of each starting tile and the location information of each associated tile.

[0257] Step 3009: The terminal device sends the second download request to the server.

[0258] Step 3010: The server reads the starting tile and the associated tile according to the location information of the starting tile and the location information of the associated tile.

[0259] Step 3011: The server sends the starting tile and the associated tile to the terminal device.

[0260] Step 3012: The terminal device receives the starting tile and the associated tile sent by the server, and generates and outputs the target map according to the starting tile and the associated tile.

[0261] The following describes the apparatus, device, and computer-readable storage medium used to execute the map downloading method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0262] Fig.12 is a structural diagram of a map downloading device provided in an embodiment of the present application, which is applied to the above-mentioned server, see Fig.12 , the device comprises:

[0263] The first receiving module 401 is used to receive a first download request sent by a terminal device.

[0264] Optionally, the first download request includes boundary information of the target map to be downloaded.

[0265] Optionally, the first download request may further include a handshake signal that complies with a handshake protocol.

[0266] The acquisition and determination module 402 is used to acquire the target map according to the boundary information and determine the starting download level of the target map.

[0267] The generating and sending module 403 is used to generate at least one download script according to the position information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device.

[0268] Optionally, the download script is used to indicate the location information of each starting tile in the starting download level.

[0269] Optionally, the download script may include each starting tile of the target map, may include position information of each starting tile of the target map, and may also include the position of the starting download level in each download level.

[0270] The second receiving module 404 is configured to receive a second download request sent by the terminal device.

[0271] Optionally, the second download request includes: location information of the starting tile and location information of associated tiles in an associated download level.

[0272] The reading and sending module 405 is used to read the starting tile and the associated tiles according to the position information of the starting tile and the position information of the associated tiles, and send the starting tile and the associated tiles to the terminal device.

[0273] Fig.13 is a structural diagram of a map downloading device provided in an embodiment of the present application, which is applied to the above-mentioned terminal device, see Fig.13 , the device comprises:

[0274] The first sending module 501 is used to send a first download request to the server.

[0275] Optionally, the first download request includes boundary information of the target map to be downloaded.

[0276] Optionally, the first download request may further include a handshake signal that complies with a handshake protocol.

[0277] The third receiving module 502 is used to receive at least one download script sent by the server.

[0278] Optionally, the download script is used to indicate the location information of each starting tile in the starting download level of the target map.

[0279] The determination module 503 is used to determine the location information of the associated tile in the associated download layer according to the at least one download script.

[0280] Optionally, the associated download level is a download level other than the initial download level.

[0281] The second sending module 504 is used to generate a second download request according to the position information of each starting tile and the position information of each associated tile, and send the second download request to the server.

[0282] Optionally, the second download request includes: location information of the starting tile and location information of associated tiles in an associated download level.

[0283] The receiving and generating module 505 is used to receive the starting tile and the associated tiles sent by the server, and generate and output the target map according to the starting tile and the associated tiles.

[0284] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0285] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microcontrollers, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0286] Fig.14 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.14The computer device includes: a memory 601 and a processor 602. The memory 601 stores a computer program that can be run on the processor 602. When the computer program is executed by the processor 602, the steps in any of the above method embodiments are implemented.

[0287] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0288] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute any of the above-mentioned map downloading method embodiments when executed by a processor.

[0289] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0290] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0291] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0292] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0293] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0294] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A map downloading method, characterized in that: Applied to a server, the method comprises: Receiving a first download request sent by a terminal device, wherein the first download request includes boundary information of a target map to be downloaded; According to the boundary information, the target map is acquired, and a starting downloading level of the target map is determined, wherein the starting downloading level includes the target map and each starting tile of the target map; Generate at least one download script according to the position information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device, wherein the download script is used to indicate the position information of each starting tile in the starting download layer; receiving a second download request sent by the terminal device, wherein the second download request includes: location information of the starting tile and location information of associated tiles in an associated downloading layer, wherein the associated downloading layer is a downloading layer other than the starting downloading layer, and the associated tiles are tiles of the target map in the associated downloading layer; The starting tile and the associated tiles are read according to the position information of the starting tile and the position information of the associated tiles, and the starting tile and the associated tiles are sent to the terminal device.

2. The map downloading method according to claim 1, characterized in that: The step of determining the starting download level of the target map includes: The starting downloading level is determined according to the number of tile levels of the target map.

3. The map downloading method according to claim 1, characterized in that: The step of determining the starting download level of the target map includes: If the map area indicated by the boundary information is less than or equal to the preset area, any level in the tile level of the target map is used as the starting download level; If the map area indicated by the boundary information is larger than the preset area, multiple optional levels are determined according to the tile level of the target map, and the starting download level is selected from the multiple optional levels according to the number of tiles in each optional level of the target map.

4. The map downloading method according to claim 1, characterized in that: The generating at least one download script according to the position information of each starting tile of the target map in the starting download level includes: Dividing the starting tiles into at least one tile group according to the number of starting tiles of the target map; According to the position information of the starting tile in each tile group, the download script corresponding to each tile group is generated respectively.

5. The map downloading method according to claim 4, characterized in that: Generating the download scripts corresponding to each tile group according to the position information of the starting tile in each tile group includes: Generate the initial script corresponding to each tile group respectively; The position information of the starting tile in the tile group in the starting downloading layer and the layer identifier of the starting downloading layer are written into the initial script corresponding to each tile group to obtain the download script corresponding to each tile group.

6. The map downloading method according to any one of claims 1 to 5, characterized in that: Before receiving the first download request sent by the terminal device, the method further includes: The map is sliced ​​according to a preset tile model to obtain multiple download levels and tiles of the map in each download level.

7. A map downloading method, characterized in that: Applied to a terminal device, the method comprises: Sending a first download request to a server, wherein the first download request includes boundary information of a target map to be downloaded, wherein the boundary information is obtained based on a trigger operation of a user; receiving at least one download script sent by the server, wherein the download script is used to indicate the position information of each starting tile in the starting download level of the target map, and the starting tile is a tile of the target map in the starting download level; Determine, according to the at least one download script, location information of an associated tile in an associated download level, wherein the associated download level is a download level other than the starting download level, and the associated tile is a tile of the target map in the associated download level; generating a second download request according to the position information of each starting tile and the position information of each associated tile, and sending the second download request to the server; The starting tile and the associated tiles sent by the server are received, and the target map is generated and output according to the starting tile and the associated tiles.

8. The map downloading method according to claim 7, characterized in that: The determining, according to the at least one download script, location information of the associated tile in the associated download level comprises: According to the at least one download script, obtain the level identifier of the starting download level and the position information of each starting tile, and determine the position of the starting download level in the download level; According to the position information of each of the starting tiles and the position of the starting downloading level in the downloading level, the position information of each of the associated tiles in each of the associated downloading levels is determined.

9. The map downloading method according to claim 8, characterized in that: The position information of each of the starting tiles includes the row and column information of each of the starting tiles in the starting downloading level; the position information of each of the associated tiles includes the row and column information of each of the associated tiles in each of the associated downloading levels; The determining, according to the position information of each of the starting tiles and the position of the starting downloading level in the downloading level, the position information of each of the associated tiles in each of the associated downloading levels comprises: Obtaining an associated tile recursive algorithm according to a preset tile model; The row and column information of each of the starting tiles and the position of the starting download level in the download level are input into the associated tile recursive algorithm, and the row and column information of each of the associated tiles in each of the associated download levels is calculated in sequence.

10. The map downloading method according to claim 7, characterized in that: The generating and outputting the target map according to the starting tile and the associated tile comprises: splicing the starting tiles according to the position information of the starting tiles, generating and outputting the target map of the starting download level; The associated tiles belonging to the same associated download level are spliced ​​according to the position information of the associated tiles, and the target map of each associated download level is generated and output.

11. A map downloading device, applied to a server, comprising: A first receiving module, configured to receive a first download request sent by a terminal device, wherein the first download request includes boundary information of a target map to be downloaded; An acquisition and determination module, configured to acquire the target map according to the boundary information, and determine a starting download level of the target map, wherein the starting download level includes the target map and each starting tile of the target map; A generating and sending module, configured to generate at least one download script according to the position information of each starting tile of the target map in the starting download layer, and send the download script to the terminal device, wherein the download script is used to indicate the position information of each starting tile in the starting download layer; A second receiving module is used to receive a second download request sent by the terminal device, wherein the second download request includes: location information of the starting tile and location information of associated tiles in an associated download layer, wherein the associated download layer is a download layer other than the starting download layer, and the associated tile is a tile of the target map in the associated download layer; The reading and sending module is used to read the starting tile and the associated tiles according to the position information of the starting tile and the position information of the associated tiles, and send the starting tile and the associated tiles to the terminal device.

12. A map downloading device, applied to a terminal device, comprising: A first sending module, configured to send a first download request to a server, wherein the first download request includes boundary information of a target map to be downloaded, and the boundary information is obtained based on a trigger operation of a user; A third receiving module is used to receive at least one download script sent by the server, wherein the download script is used to indicate the position information of each starting tile in the starting download layer of the target map, and the starting tile is a tile of the target map in the starting download layer; A determination module, configured to determine, according to the at least one download script, location information of an associated tile in an associated download level, wherein the associated download level is a download level other than the starting download level, and the associated tile is a tile of the target map in the associated download level; A second sending module, configured to generate a second download request according to the position information of each starting tile and the position information of each associated tile, and send the second download request to the server; The receiving and generating module is used to receive the starting tile and the associated tiles sent by the server, and generate and output the target map according to the starting tile and the associated tiles.

13. A computer device, comprising a memory and a processor, wherein a computer program executable on the processor is stored in the memory, and when the computer program is executed by the processor, the map downloading method according to any one of claims 1 to 10 is implemented.

14. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the map downloading method according to any one of claims 1 to 10 is implemented.