Map data processing method, wearable device, and electronic device
By working in tandem with wearable devices and electronic devices, the system identifies stored tile data and retrieves only unstored data, solving the problem of smartwatches being unable to view maps promptly in low-network environments and redundant storage, thus enabling offline downloading and storage optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-25
- Publication Date
- 2026-05-26
AI Technical Summary
Smartwatches have limited hardware capabilities and cannot directly render vector maps provided by map providers, resulting in large amounts of tile map data. When the network environment is poor, users cannot view map information in a timely manner, and redundant storage of tile data between different travel segments occupies storage space.
Wearable devices establish connections with electronic devices, determine the stored tile data by receiving requests, and only acquire the unstored tile data to achieve offline downloading, reducing redundant storage and improving transmission speed.
It can acquire map data in a timely manner even in low network environments, improving user experience, saving storage space, avoiding redundant storage, and increasing the flexibility of map data processing.
Smart Images

Figure CN122086893A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, specifically to a map data processing method, a wearable device, and an electronic device. Background Technology
[0002] With the continuous development of terminal device technology, wearable devices (such as smartwatches and smart bracelets) are becoming increasingly popular among users due to their portability. For example, in sports scenarios such as running, walking, and cycling, smartwatches can track and display the user's location in real time, and use map data provided by map providers to present the user with surrounding map information.
[0003] In related technologies, due to the limited hardware capabilities of smartwatches, their graphics processing unit (GPU) cannot directly render vector maps provided by map providers. Therefore, smartwatches obtain pre-rendered tile maps from map providers to achieve mapping functionality.
[0004] However, compared to vector maps, tile maps have a larger data volume, which makes downloading tile maps more demanding on network conditions. In poor network environments, users cannot view map information promptly. Summary of the Invention
[0005] This application provides a map data processing method, a wearable device, and an electronic device. The wearable device acquires tile data through the electronic device, enabling offline downloading of map data. This allows for faster map data acquisition even in poor network conditions, resulting in a better user experience. Furthermore, tile data shared by multiple road segments only needs to be acquired once, reducing redundant storage and saving storage space.
[0006] In a first aspect, this application provides a map data processing method applied to a wearable device, wherein the wearable device establishes a connection with an electronic device, and the method includes: receiving a first request sent by the electronic device, the first request being used to request the transmission of map data of a first road segment to the wearable device; responding to the first request, determining a plurality of first tile identifiers corresponding to the first road segment, the first tile identifiers being used to identify the tile data corresponding to the first road segment; if a second tile identifier exists among the plurality of first tile identifiers, then obtaining the first tile data corresponding to a third tile identifier from the electronic device, wherein the second tile identifier refers to the tile identifier among the plurality of first tile identifiers whose corresponding tile data has been stored in the wearable device, and the third tile identifier is the tile identifier among the plurality of first tile identifiers other than the second tile identifier.
[0007] The first segment is any one of multiple exercise segments provided by a fitness application (such as a fitness app) on an electronic device. For example, segment 1 or segment 2 as described below.
[0008] Map data refers to a series of tile data provided by a third-party map provider. It can be understood that the map data corresponding to a road segment can be composed of multiple tile data corresponding to that road segment. It should be noted that, in this embodiment, tile data refers to pre-rendered tile images, i.e., raster tiles.
[0009] A tile identifier (also known as a tile number) is a unique identifier provided by a third-party map provider (i.e., a map server) to uniquely identify a piece of tile data. For example, the tile key for tile data 'a' is tile_file_key1, and the tile key for tile data 'b' is tile_file_key2.
[0010] The first road segment corresponds to multiple tile data, and the multiple first tile identifiers correspond one-to-one with the multiple tile data corresponding to the first road segment. For example, the first road segment is road segment 2 in the following text, the tile data corresponding to the first road segment is tile data 2, and the first tile identifier is tile number 2 in the following text.
[0011] The tile data corresponding to the second tile identifier has been stored in the wearable device. Correspondingly, the first tile data corresponding to the third tile identifier refers to the tile data to be downloaded in the first road segment, which has not yet been transmitted to the wearable device. It can be understood that the first tile data can be one or multiple. For example, the second tile identifier is tile number 4 (described below), the third tile identifier is tile number 3 (described below), and the first tile data corresponding to the third tile identifier is tile data 3 (described below).
[0012] In some embodiments, multiple first tile identifiers can be determined based on the feature point information of the first road segment. The feature point information is used to characterize the geographical location of the corresponding road segment. For example, the feature point information may include the coordinate information (i.e., latitude and longitude information) of multiple feature points (also referred to as geographical location points) in the first road segment. For details on this implementation, please refer to the relevant descriptions in S201 to S207 below.
[0013] In this embodiment, when an electronic device requests to transmit map data of a first road segment to a wearable device, the wearable device can determine multiple first tile identifiers corresponding to the first road segment. After determining the multiple first tile identifiers, the wearable device can determine whether there are second tile identifiers among the multiple first tile identifiers. If there are second tile identifiers among the multiple first tile identifiers, it means that some tile data in the tile data corresponding to the first road segment has been stored in the wearable device, that is, this part of the tile data has been obtained when transmitting map data of other road segments. Therefore, the wearable device obtains the first tile data from the electronic device based on a third tile identifier other than the second tile identifier among the multiple second tile identifiers. In this way, for tile data shared by multiple road segments, it only needs to be obtained once, avoiding repeated acquisition of the same tile data and improving the map data transmission speed.
[0014] Furthermore, since tile data shared by multiple road segments only needs to be retrieved once, identical tile data only needs to be stored once. This avoids redundant storage of tile files and reduces the storage space occupied by tile data. Additionally, for higher tile levels, even if different road segments have a higher probability of using the same tile data, redundant storage of tile files can be reduced to a greater extent, saving storage space.
[0015] Furthermore, after identifying the third tile identifier, the wearable device retrieves the corresponding first tile data from the electronic device based on that identifier. This enables offline downloading of map data, reducing reliance on network conditions. Even in low-network environments, the wearable device can promptly acquire road segment map data, allowing users to view surrounding map information and enhancing the user experience.
[0016] In one possible implementation of the first aspect, the method further includes: if at least one first tile identifier exists in the tile identifier corresponding to the tile data stored in the wearable device, then determine that a second tile identifier exists among the plurality of first tile identifiers.
[0017] In other words, for any first tile identifier, it is determined whether the first tile identifier exists in the tile identifiers corresponding to the tile data stored in the wearable device. If the first tile identifier does not exist in the tile identifiers corresponding to the tile data stored in the wearable device, it means that the tile data corresponding to the first tile identifier has been stored in the wearable device, and the first tile identifier is determined as the second tile identifier; otherwise, the tile data stored in the wearable device does not include the tile data corresponding to the first tile identifier, and the first tile identifier is determined as the third tile identifier.
[0018] For details on this implementation method, please refer to the relevant explanations in S210 or S303 below.
[0019] In one possible implementation of the first aspect, the above-mentioned method of obtaining the first tile data corresponding to the third tile identifier from the electronic device if a second tile identifier exists among the plurality of first tile identifiers includes: if a second tile identifier exists among the plurality of first tile identifiers, obtaining the download information (i.e., the download address hereinafter) corresponding to the first tile data from the map server according to the third tile identifier; sending a second request to the electronic device, the second request being used to request the first tile data from the electronic device, the second request carrying the download information corresponding to the first tile data; and receiving the first tile data sent by the electronic device.
[0020] For example, the first segment is segment 2 in the following text, and the second request is tile download request 2 in the following text.
[0021] For example, the download information can be the actual download URL. The actual download URL is determined based on the concatenated download URL. That is, after obtaining the third tile identifier, a concatenated download URL for the first tile data is generated based on the third tile identifier, and the actual download URL corresponding to the first tile data is obtained from the map server based on the concatenated download URL for the first tile data.
[0022] In other words, after identifying the third tile, the wearable device sends the download information for the first tile data to be downloaded to an electronic device. The electronic device then downloads the first tile data and returns it to the wearable device via Bluetooth upon completion. This enables offline downloading of map data, reducing reliance on network conditions. Even in low-network environments, the wearable device can promptly acquire map data for road segments, allowing users to view surrounding map information and improving the user experience.
[0023] For details on this implementation, please refer to the relevant explanations in S211 to S215 below.
[0024] In one possible implementation of the first aspect, the method further includes: storing first tile data; and establishing a relationship between the first tile data and the first road segment.
[0025] In this embodiment, tile data shared by multiple road segments only needs to be acquired once. Therefore, identical tile data only needs to be stored once, avoiding redundant storage of tile files and reducing the storage space occupied by tile data. Furthermore, for higher tile levels, even if different road segments have a higher probability of using the same tile data, redundant storage of tile files can be reduced to a greater extent, saving storage space.
[0026] For details on this implementation method, please refer to the relevant explanations in S401 to S405 below.
[0027] In one possible implementation of the first aspect, establishing the association between the first tile data and the first road segment includes: obtaining first reference information corresponding to the first tile data, the first reference information including multiple first parameters, one first parameter being used to indicate the association between a road segment stored by the wearable device and the first tile data, the multiple first parameters including a second parameter corresponding to the first road segment; updating the parameter value of the second parameter from a first preset value (i.e., the first value hereinafter, such as 0) to a second preset value (i.e., the second value hereinafter, such as 1), the first preset value being used to indicate that there is no association between the first tile data and the first road segment, and the second preset value being used to indicate that there is an association between the first tile data and the first road segment.
[0028] The first reference information is used to indicate the association between the first tile data and the road segments stored by the wearable device, indicating which road segments among the multiple road segments stored by the wearable device use the first tile data. For example, the first reference information is, for instance, the reference relationship information hereinafter, and the first parameter is, for instance, the reference status hereinafter. Correspondingly, the second parameter is the reference status of the corresponding road segment in the reference relationship information of the first tile data.
[0029] In this embodiment, after acquiring the first tile data, an association is established between the first tile data and the first road segment. Thus, when deleting other road segments besides the first road segment, if the tile data corresponding to those other road segments includes the first tile data, based on the association between the first tile data and the first road segment, it can be determined that the first tile data is reused by the first road segment. Therefore, when deleting other road segments, only the tile data used independently by those other road segments is deleted, without deleting the first tile data. This avoids the accidental deletion of tile data associated with the first road segment and does not affect the normal use of the map data for the first road segment.
[0030] For details on this implementation, please refer to the relevant explanations in S405 or S304 below.
[0031] In one possible implementation of the first aspect, the method further includes: obtaining road segment index information, which is used to record the road segment identifier (i.e., the road segment number hereinafter) of the road segment stored in the wearable device; adding the first road segment identifier corresponding to the first road segment to the road segment index information; updating the parameter value of the second parameter from the first preset value to the second preset value includes: determining the second parameter from multiple first parameters according to the storage location of the first road segment identifier in the road segment index information; and updating the parameter value of the second parameter from the first preset value to the second preset value.
[0032] The storage location of the first road segment identifier in the road segment index information can be represented as the index location corresponding to the first road segment. The road segment index information is used to record the road segment numbers of each road segment stored in the smartwatch. For example, the road segment index information can be represented by a road segment ID array. Correspondingly, the first reference information can also be represented by an array. The character length of the first reference information array is related to the character length of the road segment ID array.
[0033] For example, taking the first reference information as represented by a 32-bit array, the road segment index information as a road segment ID array, and the first road segment as road segment 2 as an example, establishing the association between the first tile data and the first road segment can include: obtaining the index position corresponding to road segment 2, determining the bit in the 32-bit array corresponding to road segment 2 (i.e., the second parameter among multiple first parameters) based on the index position corresponding to road segment 2 (i.e., the storage position of the road segment identifier corresponding to road segment 2 in the road segment index information), and updating the status value of the bit corresponding to road segment 2 (i.e., the parameter value of the first parameter) from 0 to 1, which indicates that there is an association between road segment 2 and the first tile data.
[0034] In this way, by recording the association between tile data and road segments stored in the wearable device using an array, the relationship between each road segment and tile data stored in the wearable device can be accurately represented. The recording method is simple and can reduce the storage space occupied by tile index information. For details on this implementation method, please refer to the relevant description in S304 below.
[0035] In one possible implementation of the first aspect, the number of the first tile data is multiple, and the storage of the first tile data includes: obtaining the data size of each first tile data; if the data size of each first tile data is less than or equal to a preset data size threshold, then the multiple first tile data are merged and stored; if the data size of at least one first tile data is greater than the preset data size threshold, then each first tile data is stored separately.
[0036] In this embodiment, because the image complexity of the tile map affects the compression ratio of the tile data, at the same scaling level, the data size of tile data in different areas may vary significantly even if the covered area size is the same. For example, areas with green grasslands or blue water bodies have smaller tile data, while areas with complex buildings have larger tile data. To address this, this embodiment provides two storage methods: merged storage and separate storage. The appropriate method can be selected based on the size of the tile data corresponding to a road segment.
[0037] Specifically, when storing multiple first tile data corresponding to a first road segment, if the data size of each first tile data is less than or equal to a preset data volume threshold, the multiple first tile data corresponding to the first road segment are merged and stored; otherwise, each first tile data is stored separately. In other words, this embodiment supports both merging and storing tile data with smaller data volumes, and also supports storing tile data with smaller data volumes separately, providing greater flexibility in storage methods. This fully utilizes the storage space of the wearable device and reduces the storage space occupied by the map data of the road segment.
[0038] For details on this implementation method, please refer to the relevant explanations in S401 to S403 below.
[0039] In one possible implementation of the first aspect, the method further includes: if a second tile identifier exists among multiple first tile identifiers, obtaining the second tile data corresponding to the second tile identifier; and establishing an association between the second tile data and the first road segment.
[0040] For example, taking the second tile identifier as tile number 2 and the second tile data as tile data 2 corresponding to tile number 2, establishing the association between the second tile data and the first road segment can include: obtaining the reference relationship information of tile data 2 corresponding to tile number 2; determining the reference status of road segment 2 from the reference relationship information of tile data 2 corresponding to tile number 2 based on the index position of road segment 2; and updating the status value of the reference status of road segment 2 from a first value (e.g., 0) to a second value (e.g., 1).
[0041] In this embodiment, if a second tile identifier exists among multiple first tile identifiers, it indicates that some tile data in the tile data corresponding to the first road segment has been stored in the wearable device. Therefore, an association is established between the second tile data corresponding to the second tile identifier and the first road segment. Thus, when deleting other road segments besides the first road segment, if the tile data corresponding to those other road segments includes the second tile data corresponding to the second tile identifier, based on the association between the second tile data and the first road segment, it can be determined that the second tile data is reused by the first road segment. Therefore, when deleting other road segments, only the tile data used independently by those other road segments is deleted, without deleting the second tile data. This avoids the accidental deletion of tile data associated with the first road segment and does not affect the normal use of the map data for the first road segment.
[0042] For details on this implementation, please refer to the relevant explanation in S304 below.
[0043] In one possible implementation of the first aspect, the method further includes: receiving a first operation from a user, the first operation being used to display a map corresponding to a first road segment; responding to the first operation, obtaining third tile data based on the geographical location information of the first road segment; generating map data for the first road segment based on the third tile data; and displaying the map corresponding to the first road segment.
[0044] For example, the wearable device can display a second interface (such as interface 22 below), which includes watch segment options corresponding to the first route segment. The first operation can be a user's selection of the watch segment option corresponding to the first route segment.
[0045] In this embodiment, since the tile data corresponding to the second tile identifier is stored in the wearable device, even if the tile data corresponding to the second tile identifier is not obtained when synchronizing the first road segment, the tile data corresponding to the second tile identifier stored in the wearable device can be reused when displaying the map of the first road segment. Thus, the map data of the first road segment can be used normally without repeatedly obtaining the same tile data, thereby enabling multiple road segments to reuse the same tile data.
[0046] In one possible implementation of the first aspect, obtaining the third tile data based on the geographical location information of the first road segment includes: determining the fourth tile identifier based on the geographical location information of the first road segment; determining the file information of the third tile data based on the fourth tile identifier; and obtaining the third tile data based on the file information of the third tile data.
[0047] The file information may include at least one of the following: data size information, offset information, and the file name of the tile file.
[0048] The third tile data is the tile data corresponding to the fourth tile identifier. Accordingly, there can be one or more fourth tile identifiers.
[0049] For example, the geographic location information of the first road segment may include the coordinate information of multiple feature points in the first road segment. Based on the coordinate information of the multiple feature points in the first road segment, the coordinate information of the center point is determined. Based on the coordinate information of the center point, the tile coordinates corresponding to the center point are determined. Based on the zoom level and the tile coordinates corresponding to the center point, a fourth tile identifier is determined. Based on the fourth tile identifier, the file information of the third tile data is determined. Based on the file information of the third tile data, the third tile data can be obtained from the tile data stored in the wearable device.
[0050] For example, the first segment is segment 2 in the following text, and correspondingly, the fourth tile is identified as tile number 5, and the third tile data is tile data 4.
[0051] In this embodiment, after storing the tile data, tile index information is generated based on the tile identifier, file information, and reference information of the tile data. Thus, when displaying a map of a specific road segment, the wearable device can obtain the file information of the corresponding tile data through the tile identifier, and then read the tile data based on the file information. Instead of directly obtaining all the tile data for a road segment through the road segment information, this method ensures that the same tile data shared by different road segments is stored only once, while enabling the reuse of the same tile data among multiple road segments.
[0052] For details on this implementation, please refer to the relevant explanations in S601 to S610 below.
[0053] In one possible implementation of the first aspect, the method further includes: receiving a second operation from a user, the second operation being used to delete map data for the first road segment; in response to the second operation, determining fourth tile data from tile data stored in the wearable device, the fourth tile data being tile data used exclusively for the first road segment; and deleting the fourth tile data.
[0054] For example, the wearable device may display a third interface (such as interface 24 below), which includes a road segment deletion control (such as a "Delete Road Segment" control or a "Clear Map Data" control). The second operation may be a user's selection of the road segment deletion control.
[0055] In this embodiment, when deleting map data for the first road segment, only the tile data used exclusively by the first road segment is deleted, while the tile data shared by the first road segment and other road segments is retained. This avoids rendering the map data for other road segments that share tile data with the first road segment unusable after deleting the map data for the first road segment, thus improving the flexibility of map data processing.
[0056] For details on this implementation method, please refer to the relevant explanations in S501 to S509 below.
[0057] In one possible implementation of the first aspect, determining the fourth tile data from the tile data stored in the wearable device includes: if there is a correlation between the fifth tile data and the first road segment, and there is no correlation between the fifth tile data and other road segments stored in the wearable device, then the fifth tile data is determined as the fourth tile data, and the fifth tile data is any one of the tile data stored in the wearable device.
[0058] In other words, after deleting the map data of the first road segment, the fourth tile data, which is only associated with the first road segment, is determined by the relationship between the tile data stored in the wearable device and each road segment, thereby avoiding the deletion of tile data that is reused by the first road segment and other road segments.
[0059] For example, the first segment is segment 2 in the following text, and the fourth tile data is tile data 5.
[0060] For details on this implementation method, please refer to the relevant explanations in S503 to S509 below.
[0061] In one possible implementation of the first aspect, the method further includes: if there is an association between the fifth tile data and the first road segment, and the fifth tile data is associated with at least one other road segment, then the fifth tile data is stored in the tile file of the second road segment, where the second road segment is any one of the other road segments associated with the fifth tile data; and the association between the fifth tile data and the first road segment is deleted.
[0062] In other words, if the fifth tile data is shared by both the first road segment and at least one other synchronized road segment, the storage location of the fifth tile data is updated. After updating the storage location, the tile index information corresponding to the fifth tile data is updated based on the updated file information to ensure that other road segments can obtain the fifth tile data. Furthermore, the referencing information of the fifth tile data is updated promptly to avoid map display errors.
[0063] For details on this implementation method, please refer to the relevant explanation in S505 below.
[0064] In one possible implementation of the first aspect, after deleting the fourth tile data, the method further includes: receiving a third operation from the user, the third operation being used to display the map corresponding to the second road segment; in response to the third operation, obtaining the sixth tile data based on the geographical location information of the second road segment; generating the map corresponding to the second road segment based on the sixth tile data; and displaying the map corresponding to the second road segment.
[0065] For example, the wearable device can display a second interface (such as interface 22 below), which includes watch segment options corresponding to the second road segment. The third operation can be the user's selection of the watch segment option corresponding to the second road segment.
[0066] For example, the first segment is segment 2 in the following text, the second segment is segment 1 in the following text, and the sixth tile data is tile data 6.
[0067] In this embodiment of the application, when deleting the map data of the first road segment, only the map data used by the first road segment alone is deleted, and the tile data shared by the first road segment and the second road segment is not deleted. Therefore, when displaying the map of the second road segment, the tile data shared by the first road segment and the second road segment stored in the wearable device can be reused. Thus, the map data of the second road segment can be used normally without repeatedly obtaining the same tile data, thereby enabling multiple road segments to reuse the same tile data.
[0068] For details on this implementation, please refer to the relevant explanations in S120 to S121 below.
[0069] In one possible implementation of the first aspect, the method further includes: obtaining second reference information corresponding to the fifth tile data, the second reference information including multiple third parameters, one third parameter indicating the association between a road segment stored by the wearable device and the fifth tile data, the multiple third parameters including a fourth parameter corresponding to the first road segment; if the parameter value of the fourth parameter is a first preset value, then it is determined that there is an association between the road segment corresponding to the fourth parameter and the fifth tile data, the fourth parameter being any one of the multiple third parameters; if the parameter value of the fourth parameter is a second preset value, then it is determined that there is an association between the road segment corresponding to the fourth parameter and the fifth tile data.
[0070] The second reference information indicates the association between the fifth tile data and the road segments stored by the wearable device, representing which road segments among the multiple road segments stored by the wearable device use the fifth tile data. For example, the second reference information may be the reference relationship information described below, the third parameter may be the reference status described below, and correspondingly, the fourth parameter is the reference status of the first road segment in the reference relationship information of the fifth tile data. For example, the second reference information can also be represented by a 32-bit array.
[0071] For details on this implementation method, please refer to the relevant explanation in S503 below.
[0072] Secondly, this application provides a map data processing method applied to an electronic device, wherein the electronic device establishes a connection with a wearable device. The method includes: in response to a fourth operation, sending a first request to the electronic device, the first request being used to request the transmission of map data of a first road segment to the wearable device; sending first tile data corresponding to a third tile identifier to the wearable device, wherein the first road segment corresponds to multiple first tile identifiers, the third tile identifier being a tile identifier other than a second tile identifier among the multiple first tile identifiers, and the second tile identifier referring to a tile identifier among the multiple first tile identifiers whose corresponding tile data has been stored in the wearable device.
[0073] In one possible implementation of the second aspect, sending the first tile data corresponding to the third tile identifier to the wearable device includes: receiving a second request sent by the wearable device, the second request being used to request the first tile data, the second request carrying download information corresponding to the first tile data; responding to the second request, obtaining the first tile data from the map server according to the download information of the first tile data; and sending the first tile data to the wearable device.
[0074] In one possible implementation of the second aspect, the method further includes: an electronic device displaying a first interface, the first interface including a road segment option corresponding to the first road segment; and receiving a fourth operation from the user, the fourth operation being a selection operation of the road segment option corresponding to the first road segment.
[0075] Thirdly, this application provides an apparatus included in a wearable device, which has the function of implementing the behaviors of the wearable device in the first aspect and possible implementations of the first aspect described above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a receiving module or unit, a processing module or unit, etc.
[0076] Fourthly, this application provides an apparatus included in an electronic device, which has the function of implementing the electronic device behavior described in the second aspect and possible implementations of the second aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. For example, a receiving module or unit, a processing module or unit, etc.
[0077] Fifthly, this application provides a wearable device, which includes a processor, a memory, and an interface; the processor, memory, and interface cooperate with each other to enable the wearable device to execute any one of the methods in the first aspect of the technical solution.
[0078] Sixthly, this application provides an electronic device comprising: a processor, a memory, and an interface; the processor, memory, and interface cooperate with each other to enable the electronic device to execute any method of the technical solution in the second aspect.
[0079] In a seventh aspect, this application provides a chip including a processor. The processor is configured to read and execute a computer program stored in a memory to perform the methods of the first aspect and any possible implementation thereof, or to perform the methods of the second aspect and any possible implementation thereof.
[0080] Optionally, the chip may also include memory, which is connected to the processor via circuitry or wires.
[0081] Alternatively, the chip may also include a communication interface.
[0082] Eighthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform any method of the technical solution of the first aspect, or causes the processor to perform any method of the technical solution of the second aspect.
[0083] Ninthly, this application provides a computer program product, which includes: computer program code, which, when executed on an electronic device, causes the electronic device to perform any method of the technical solution of the first aspect, or causes the electronic device to perform any method of the technical solution of the second aspect. Attached Figure Description
[0084] Figure 1 This is a schematic diagram of map segmentation provided in an embodiment of this application;
[0085] Figure 2 This is a schematic diagram of an example tile pyramid model provided in an embodiment of this application;
[0086] Figure 3 This is a schematic diagram of the tile composition at different levels in an example tile pyramid model provided in this application embodiment;
[0087] Figure 4 This is a schematic diagram of tile coordinates for an example tile map provided in an embodiment of this application;
[0088] Figure 5 This is an application scenario diagram of an example map data processing method provided in the embodiments of this application;
[0089] Figure 6 This is a schematic diagram of the structure of a wearable device provided in an embodiment of this application;
[0090] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0091] Figure 8 This is a software structure block diagram of a wearable device provided in an embodiment of this application;
[0092] Figure 9 This is a software structure block diagram of an electronic device provided in an embodiment of this application;
[0093] Figure 10 This is a schematic diagram of interface changes in an example of a road segment synchronization process provided in an embodiment of this application;
[0094] Figure 11 This is a schematic diagram of an example pop-up window provided in an embodiment of this application;
[0095] Figure 12 This is a schematic diagram of interface changes during a road segment viewing process provided in an embodiment of this application;
[0096] Figure 13 This is a schematic diagram of interface changes during a road segment deletion process provided in an embodiment of this application;
[0097] Figure 14 This is a schematic diagram of interface changes for another example of a road segment deletion process provided in this application embodiment;
[0098] Figure 15 This is a schematic flowchart of an example map data processing method provided in an embodiment of this application;
[0099] Figure 16 This is a schematic diagram of an example map index file provided in an embodiment of this application;
[0100] Figure 17 This is a schematic diagram of an example of a tile storage method provided in an embodiment of this application;
[0101] Figure 18 This is a schematic diagram of another example of a map index file provided in an embodiment of this application;
[0102] Figure 19 This is a schematic diagram illustrating an application scenario of a map data processing method provided in an embodiment of this application;
[0103] Figure 20 This is a flowchart illustrating another example of a map data processing method provided in an embodiment of this application;
[0104] Figure 21 This is a flowchart illustrating yet another map data processing method provided in the embodiments of this application;
[0105] Figure 22 This is a flowchart illustrating yet another map data processing method provided in the embodiments of this application;
[0106] Figure 23 This is a schematic diagram illustrating an example of deleting a newly added road segment provided in an embodiment of this application;
[0107] Figure 24 This is a flowchart illustrating yet another map data processing method provided in the embodiments of this application;
[0108] Figure 25 This is a flowchart illustrating another example of a map data processing method provided in this application. Detailed Implementation
[0109] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0110] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0111] References to "one embodiment" or "some embodiments" as described in this application specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0112] With the continuous development of terminal device technology, smartwatches are becoming increasingly popular among users due to their portability. For example, in sports scenarios such as running, walking, and cycling, smartwatches can track and display the user's location in real time, and use map data provided by map providers to present the user with surrounding map information.
[0113] Typically, map data from map providers can be a series of tiles generated based on tile mapping technology. Smartwatches can determine the required tiles based on the geographic area to be displayed, download them, and then render and stitch them together to display a complete map.
[0114] Among them, tile mapping technology is a technique that divides a large map into a series of map tiles through multi-scale hierarchical segmentation. These divided map tiles can be called tiles, and each tile can be loaded and displayed independently. For example, taking a world map as an example, ... Figure 1 As shown, the world map is divided into a series of map tiles.
[0115] like Figure 2As shown, the segmented tiles described above can form a tile pyramid model. A tile pyramid model is a multi-resolution hierarchical model where each layer represents a scaling level. From the bottom layer (highest resolution) to the top layer (lowest resolution), the scaling level gradually decreases, but the geographical coverage of each layer remains constant. During construction, the highest resolution map is started and segmented into a series of tiles of equal size (e.g., 256*256 pixels), forming the bottom layer of the tile pyramid model. Subsequently, each layer of the map is generated by refining each pixel in the next layer (higher resolution) into 2×2 pixels and segmenting it into a series of tiles, thus obtaining all levels of the tile pyramid model. In other words, the lower the tile level (i.e., the higher the scaling level), the more tiles make up the map, and the more detailed the map can be displayed. For example, as shown... Figure 3 As shown, the top layer of the tile pyramid (layer 0, denoted as L0) consists of one tile; the first layer (L1) can contain 4 tiles; the second layer (L2) can contain 16 tiles; the third layer (L3) can contain 64 tiles; the fourth layer (L4) can contain 256 tiles; and so on, with the bottom layer (layer n, denoted as Ln) containing 4 tiles. n A tile.
[0116] Furthermore, each layer of tiles forms a tile matrix, and a tile can be uniquely identified by its layer number (i.e., scaling level) and row and column numbers. Figure 4 A schematic diagram showing the coordinates of some tiles is provided, such as... Figure 4 As shown, with the top left corner of the map as the origin, each tile is numbered, and each tile has unique coordinates for its layer. The horizontal coordinate (x-coordinate) corresponds to the column number, and the vertical coordinate (y-coordinate) corresponds to the row number. For example, Figure 4 The coordinates of tile 1 shown are (0,0), tile 2 is (1,0), and tile 4 is (0,1). Of course, the x-coordinate can also correspond to the row number, and the y-coordinate to the column number. Optionally, each tile can also use the z-coordinate to represent its scaling level.
[0117] It is understandable that the aforementioned tiles can be vector tiles constructed based on vector data, which use geometric elements such as points, lines, surfaces, and polygons, along with their attribute information, to describe geospatial data. Alternatively, the aforementioned tiles can be pre-rendered raster tiles, i.e., actual map images.
[0118] In related technologies, due to the limited hardware capabilities of smartwatches, their GPUs cannot directly render vector maps provided by map providers. Therefore, smartwatches obtain pre-rendered tile maps (i.e., raster tiles) from map providers to achieve map functionality. Compared to vector tiles, raster tiles typically have a larger data volume. For example, taking Shenzhen as an example, the data volume of its vector tiles is approximately 70MB, while the data volume of its raster tiles exceeds 1GB. Because of the large data volume of raster tiles, the requirements for a good network environment are high when downloading tile maps. In poor network conditions, users cannot view map information in a timely manner, affecting their exercise experience.
[0119] In some scenarios, users can view map data of their exercise route using a smartwatch. It's understandable that the map data for a single exercise route is composed of multiple tile maps. Smartwatches typically store the map data for each exercise route separately; that is, all the tile maps corresponding to each exercise route are stored on the smartwatch. However, because different exercise routes may have overlapping areas, the tiles in the overlapping areas are stored multiple times, causing data redundancy and consuming a significant amount of storage space.
[0120] Furthermore, as described above regarding the tile pyramid model, a single tile at a higher level is actually composed of four tiles at the level below it. Therefore, as the level increases, the geographical area covered by each tile also increases. Based on this, for overlapping areas between two different travel segments, when the tile map level is low (i.e., high resolution), multiple tiles are needed to cover the overlapping area; conversely, when the tile map level is high (i.e., low resolution), fewer tiles are needed to cover the overlapping area, such as a single tile covering the same area. In other words, as the tile level increases, the probability of different travel segments sharing the same tiles increases, leading to a greater number of duplicated tiles and thus requiring more storage space for the map data of travel segments.
[0121] In view of this, embodiments of this application provide a map data processing method. When an electronic device transmits map data of a certain road segment to a wearable device, the wearable device can determine multiple tile numbers corresponding to the road segment, and these multiple tile numbers correspond one-to-one with multiple tile data corresponding to the road segment. Based on the multiple tile numbers corresponding to the road segment, it is determined whether the road segment shares tile data with at least one other road segment in the wearable device. If the road segment shares tile data with at least one other road segment in the wearable device, the wearable device can obtain the tile data corresponding to the road segment from the electronic device, excluding the shared tile data. In this way, for tile data shared by multiple road segments, it only needs to be obtained once, avoiding repeated acquisition of the same tile data, improving map data transmission speed, and reducing redundant data storage.
[0122] In addition, wearable devices can acquire the tile data to be downloaded from electronic devices, enabling offline downloading of map data and reducing reliance on network conditions. Smartwatches can also acquire road map data in a timely manner even in low-network environments, allowing users to view surrounding map information on their smartwatches and improving the user experience.
[0123] This method can be applied to scenarios involving the transmission of map data between electronic devices and wearable devices. The electronic devices can be mobile phones, tablets, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. This application embodiment does not impose any restrictions on the specific type of electronic device. The wearable device can be a smartwatch, smart bracelet, smart glasses, etc. This application embodiment does not impose any restrictions on the specific type of wearable device.
[0124] For example, Figure 5 This diagram illustrates an application scenario of a map data processing method provided in an embodiment of this application. Figure 5As shown, the example uses a mobile phone 101 as the electronic device and a smartwatch 102 as the wearable device. A Bluetooth connection is established between the mobile phone 101 and the smartwatch 102, and a wired or wireless communication connection is established between the mobile phone 101 and the server 103 (i.e., the map server). When the mobile phone 101 transmits map data (such as tile data) for a certain road segment to the smartwatch 102, the mobile phone 101 can send a map transmission request for that road segment to the smartwatch 102. In response to the map transmission request, the smartwatch 102 determines the multiple tile data corresponding to that road segment and checks whether there are duplicate tile data shared by other road segments. If duplicate tile data exists, the smartwatch 102 can request the mobile phone 101 to obtain the tile data excluding the duplicate tile data. After obtaining the required tile data, the mobile phone 101 can send the required tile data to the smartwatch 102 via Bluetooth connection, so that the user can use the map data of the road segment on the smartwatch 102.
[0125] The hardware structure of the wearable device and electronic device provided in the embodiments of this application will be described below.
[0126] For example, Figure 6 This is a schematic diagram of the structure of a wearable device provided in an embodiment of this application. Figure 6 As shown, wearable device 200 can be, for example, a smartwatch, fitness tracker, smart wristband, smart glasses, or other wearable devices. Wearable device 200 may include a processor 210, an external memory interface 220, internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna, a wireless communication module 250, an audio module 260, a speaker 260A, a microphone 260B, buttons 270, a display screen 271, and a sensor module 280, etc. The sensor module 280 may include an infrared light sensor 280A, a gyroscope sensor 280B, an accelerometer sensor 280C, a touch sensor 280D, a photoplethysmography (PPG) heart rate sensor 280E, an ambient light sensor 280F, etc.
[0127] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the wearable device 200. In other embodiments of this application, the wearable device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0128] Processor 210 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processor, an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, etc. These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on the instruction opcode and timing signals to control instruction fetching and execution.
[0129] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory.
[0130] Internal memory 221 can be used to store computer executable program code, which includes instructions. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as voice navigation, image playback, etc.), etc. The data storage area may store data created during the use of the wearable device 200 (such as audio data, phonebook, etc.). Furthermore, internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 210 executes various functional applications and data processing of the wearable device 200 by running instructions stored in internal memory 221 and / or instructions stored in memory located in the processor.
[0131] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the wearable device 200. In other embodiments of this application, the wearable device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0132] Wearable device 200 can provide wireless communication solutions through modules such as antenna, wireless communication module 250, modem processor and baseband processor, including but not limited to wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, infrared (IR) technology and other wireless communication solutions.
[0133] In other words, the wireless communication module 250 can achieve short-range wireless communication, or in other words, the wireless communication module 250 includes a short-range wireless communication module. In this embodiment, the wearable device 200 can use the wireless communication module 250 to conduct short-range wireless communication with electronic devices based on a short-range wireless communication protocol. For example, the wireless communication module 250 can establish a Bluetooth connection with a mobile phone or other device based on the Bluetooth protocol, and transmit data based on the Bluetooth connection. The wireless communication module 250 may include a Bluetooth module (also called a Bluetooth device). The Bluetooth device can be a classic Bluetooth device, a BLE Bluetooth device, or a dual-mode Bluetooth device; this embodiment does not limit the specific type of Bluetooth device.
[0134] Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in wearable device 200 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antennas can be reused as diversity antennas for a wireless local area network. In some other embodiments, antennas can be used in conjunction with tuning switches.
[0135] The wireless communication module 250 can be one or more devices integrating at least one communication processing module. The wireless communication module 250 receives electromagnetic waves via an antenna, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to the processor 210. The wireless communication module 250 can also receive signals to be transmitted from the processor 210, perform frequency modulation and amplification on them, and then convert them into electromagnetic waves for radiation via the antenna.
[0136] The 280A infrared light sensor is a sensor that uses infrared light for data processing. It is used to sense certain features of the surrounding environment, measure the heat emitted by the human body, and detect movement.
[0137] The gyroscope sensor 280B can be used to determine the motion posture of the wearable device 200. In some embodiments, the gyroscope sensor 280B can determine the angular velocity of the wearable device 200 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 280B can be used to detect the user's motion state.
[0138] The accelerometer 280C can detect the magnitude of acceleration of the wearable device 200 in various directions (typically three axes). When the wearable device 200 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the wearable device 200, and applied to step counting, motion status feedback, etc.
[0139] Touch sensor 280D is also called a "touch panel". Touch sensor 280D can be located on display screen 271, and the touch sensor 280D and display screen 271 together form a touch screen, also called a "touchscreen". Touch sensor 280D is used to detect touch operations applied to or near it. Touch sensor 280D can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 271. In other embodiments, touch sensor 280D can also be located on the surface of wearable device 200, in a different position than display screen 271, for example, on the side of the watch face of a smartwatch.
[0140] The PPG heart rate sensor 280E detects the intensity of reflected light after it has been absorbed by human blood and tissues, records changes in blood vessel volume during the cardiac cycle, obtains a pulse waveform, and then calculates the heart rate based on the pulse waveform. The PPG heart rate sensor 280E is used for user health monitoring.
[0141] The ambient light sensor 280F is used to sense the ambient light intensity. The wearable device 200 can adaptively adjust the brightness of the display screen 271 according to the sensed ambient light intensity. The ambient light sensor 280L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 280F can also be used in conjunction with proximity sensors (not shown in the figure) to detect whether the wearable device 200 is being worn.
[0142] For example, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 7As shown, electronic device 300 can be, for example, a mobile phone, tablet computer, in-vehicle device, laptop computer, etc. Electronic device 300 may include processor 310, external memory interface 320, internal memory 321, universal serial bus interface 330, charging management module 340, power management module 341, battery 342, antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, sensor module 380, button 390, motor 391, indicator 392, camera 393, display screen 394, and subscriber identification module (SIM) card interface 395, etc. The sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, a barometric pressure sensor 380C, a magnetic sensor 380D, an accelerometer sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.
[0143] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0144] Processor 310 may include one or more processing units, such as application processors, modem processors, graphics processors, image signal processors, controllers, memory, video codecs, digital signal processors, baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0145] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0146] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0147] The wireless communication function of electronic device 300 can be realized through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor, etc.
[0148] The wireless communication module 360 can provide solutions for wireless communication applications on the electronic device 300, including wireless local area networks (such as Wi-Fi networks), Bluetooth, global navigation satellite systems, frequency modulation, short-range wireless communication technologies, and infrared technologies. The wireless communication module 360 can be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 310. The wireless communication module 360 can also receive signals to be transmitted from processor 310, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0149] In other words, the wireless communication module 360 is capable of short-range wireless communication, or in other words, the wireless communication module 360 includes a short-range wireless communication module. In this embodiment, the electronic device 300 can establish a short-range wireless communication connection with the wearable device 100 through the wireless communication module 360, and communicate based on this short-range wireless communication connection. Optionally, the wireless communication module 360 may include a Bluetooth module (also called a Bluetooth device). The Bluetooth module can be a classic Bluetooth device, a BLE Bluetooth device, or a dual-mode Bluetooth device; this embodiment does not impose any limitations on this.
[0150] Electronic device 300 implements display functions through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 310 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0151] Wearable device 200 and electronic device 300 run operating systems on top of the aforementioned components. Wearable device 200 may run a lightweight operating system such as Watch OS, HarmonyOS, or RTOS. Electronic device 300 may run an iOS operating system, the Android open-source operating system, or a Windows operating system. The software systems of wearable device 200 and electronic device 300 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. A layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces.
[0152] For example, Figure 8 This is a schematic diagram of the software architecture of a wearable device provided in an embodiment of this application. Figure 8 As shown, the wearable device 200 running an RTOS operating system will be used as an example for illustration. The RTOS operating system can include, from top to bottom, the application layer, the system service layer, the kernel layer, and the driver layer.
[0153] The application layer can include a series of applications, such as telephone, camera, gallery, music, and other business applications (also referred to as business applications) used to implement business functions. Application layer programs can implement specific functions by calling interfaces of the system service layer and kernel layer. It should be noted that the application names provided in this application embodiment are merely examples to illustrate the business functions that the applications can implement and do not constitute a limitation on the applications. In reality, these applications can be standalone applications or units integrated into other applications or modules; this is not limited.
[0154] like Figure 8 As shown in this embodiment, the application layer may further include a sports field module, map services, a third-party map software development kit (SDK), and a general file module. The sports field module is used to implement sports functions, such as providing personalized route suggestions, allowing users to select routes of interest for outdoor running, walking, and cycling.
[0155] Map services are used to manage tile data within smartwatches, such as storage, deletion, and retrieval. Third-party map SDKs can be used to calculate the required tile data based on geographic location information and to generate the map to be displayed based on the tile data. Map services provide third-party map SDKs with interface capabilities to access local files. When a third-party map SDK needs to access tile data in a local file, it can interact with the map service and obtain the file information of the tile data using the tile key. After obtaining the file information of the tile data, the third-party map SDK can access the tile data based on that information. It should be noted that third-party map SDKs can be encapsulated within map services, meaning they represent an interface capability of the map service.
[0156] In some embodiments, the sports field module can interact with a sports and health application in an electronic device. Upon receiving a map transmission request for a specific road segment from the sports and health application, the sports field module can send a tile data retrieval request to the map service. In response to the tile data retrieval request, the map service obtains the tile numbers of multiple tile data corresponding to the road segment from a third-party map SDK, and based on these tile numbers, determines the tile data shared by the road segment with other road segments, i.e., determines the tile data required for the road segment. Then, the map service can obtain the download address of the required tile data for the road segment from the map server and send the download address to the sports field module. The sports field module then sends the download address of the required tile data for the road segment to the sports and health application to request the electronic device to obtain the download address of the required tile data for the road segment. After the required tile data for the road segment is transmitted, the map service can also store the required tile data for the road segment.
[0157] In some embodiments, in response to a user's map deletion operation for a certain road segment, the sports field module sends a map deletion request to the map service, requesting the deletion of map data for that road segment. In response to the map deletion request, the map service identifies the tile data unique to that road segment from the tile data stored on the smartwatch and deletes that unique tile data.
[0158] In some embodiments, in response to a user's map viewing operation for a certain road segment, the sports field module sends a map viewing request to the map service, which requests the map data for that road segment. In response to the map viewing request, the map service sends a map processing request to the third-party map SDK, which may include the geographical location information of the road segment. The third-party map SDK determines the tile number of the tile data to be displayed based on the geographical location information of the road segment. The third-party map SDK, through the map service, obtains the file information of the tile data to be displayed based on the tile number, and then obtains the tile data to be displayed from the tile data stored on the smartwatch based on the file information of the tile data. The third-party map SDK then performs stitching processing on the obtained tile data to be displayed to obtain the map of that road segment. Finally, the third-party map SDK sends the map of that road segment to the sports field module through the map service. The sports field module can then display the map of that road segment.
[0159] In some embodiments, the map service can also be used to maintain map index files. For a detailed description of the map index files, please refer to the section below. Figure 16 The details of that part will not be elaborated here.
[0160] The general file module is used to receive data (such as tile data) sent by electronic devices, and to send data to electronic devices.
[0161] The system service layer, built on top of the kernel layer, provides higher-level system services to applications. It can include a file system, network protocol stack, graphics library, and database. The file system provides read and write operations on files on storage devices. The network protocol stack enables network communication with other devices. The graphics library provides graphics rendering and user interface display capabilities. The database stores and manages data.
[0162] The kernel layer is the core of an RTOS operating system, responsible for managing system resources and task scheduling. It provides basic services such as task management, interrupt management, memory management, timer management, communication, and synchronization.
[0163] The driver layer sits above the hardware layer of the wearable device 200 and is primarily responsible for driving and controlling the hardware. The driver layer software abstracts the operations of the hardware device into a set of functions or interfaces for upper-layer software to call. The driver layer may include display drivers, Bluetooth drivers, Wi-Fi drivers, audio drivers, sensor drivers, etc.
[0164] It should be noted that the above software architecture and modules are only an example and do not constitute a limitation on the structure of wearable devices.
[0165] For example, Figure 9This is a schematic diagram of the software architecture of an electronic device provided in an embodiment of this application. For example... Figure 9 As shown, electronic devices such as mobile phones and tablets are used as examples, and the Android operating system running on an electronic device is used as an example for illustration. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0166] The application layer can include a series of application packages. For example... Figure 9 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, SMS, and sports and health. In this embodiment, the sports and health application (i.e., the sports and health APP) may include multiple functional modules, such as a weight loss plan, a running companion feature, and a sports track. The sports track can provide personalized route suggestions, allowing users to choose routes of interest for outdoor running, walking, and cycling. Users can also select opponents and initiate challenges in the leaderboard. During the challenge, users can view their opponents' performance on that route on their mobile phones. Furthermore, after a user completes their route exercise, their route score will be ranked in the route leaderboard.
[0167] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0168] like Figure 9 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0169] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0170] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.
[0171] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0172] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0173] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0174] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0175] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0176] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0177] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0178] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0179] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0180] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0181] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0182] A 2D graphics engine is a graphics engine for 2D drawing.
[0183] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0184] For ease of understanding, the following embodiments of this application will be described using the following methods: Figure 6 and Figure 8 Wearable devices with the structure shown Figure 7 and Figure 9 Taking the electronic device with the structure shown as an example, the map data processing method provided in the embodiments of this application will be specifically described.
[0185] The application scenarios of the map data processing method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0186] In some scenarios, users typically use fitness apps on their electronic devices while exercising. For example, using a fitness app on an electronic device, a user can select a desired route from several options provided by the app and synchronize the map data of that route to a wearable device connected to the electronic device. The wearable device receives and stores the synchronized map data, allowing the user to view the map data of that route on the wearable device during exercise.
[0187] The following section uses mobile phone 1 as an electronic device and smartwatch 2 as a wearable device, with mobile phone 1 and smartwatch 2 communicating and connecting, to explain in detail the process of synchronizing map data.
[0188] like Figure 10 As shown in (a), mobile phone 1 can display desktop 11. Desktop 11 can include icons of multiple applications installed on mobile phone 1, such as the icon of a clock app, the icon of a calendar app, and the icon 111 of a fitness and health app. In response to the user's click on the icon 111 of the fitness and health app, mobile phone 1 can display... Figure 10 Interface 12, shown in (b) above, is the application interface of a sports and health app. Interface 12 may include multiple functional controls, such as a "Weight Loss Plan" control, a "Run with Me Plan" control, and a "Sports Arena" control 121. In response to a user's click on the "Sports Arena" control 121, the phone 1 can display... Figure 10Interface 13, shown in (c), is the functional interface for a sports arena. For example, interface 13 may include multiple settings such as location range, sports type, and intelligent sorting. The location range setting allows the user to set the sports area. For example, the location range setting may include "nearby," "within 5 kilometers," or "within 10 kilometers." The sports type setting allows the user to set the sports mode, such as outdoor running, walking, or cycling. Interface 13 may also display a map of the selected sports area, marking various road segments within that area. Interface 13 may also include a list of road segments in the current area. This list may include multiple road segment options, each corresponding to a road segment within the selected sports area. For example, with the location range set to "nearby" and the sports type set to "outdoor running,"... Figure 10 As shown in (c), interface 13 can display a map of the nearby area and mark various road segments in the nearby area on the map. Interface 13 can also display a list of road segments in the current area 131, which includes road segment options corresponding to multiple road segments in the nearby area, such as the "Sports Park Road Segment" option 132, the "Reservoir Road Segment" option, and the "Street Garden Road Segment" option. In addition, each road segment option can display the corresponding road segment information, such as road segment name, thumbnail, road segment trajectory, total length information, elevation information, number of participants, etc. For example, taking the Sports Park Road Segment as an example, the "Sports Park Road Segment" option 132 can include a thumbnail 133 of the road segment, and the road segment trajectory 134 of the Sports Park Road Segment can be presented in the thumbnail 133. The "Sports Park Road Segment" option 132 can also include information such as "total length 2.60 kilometers", "0.13 kilometers from you", and "65 people participated". It should be noted that due to page length limitations, all road segment options within the selected movement area may not be displayed on one page. Users can view the undisplayed road segments by performing preset operations within the current area road segment list, such as swiping up or down.
[0189] After entering interface 13 on mobile phone 1, the user can select the desired route from the current area route list on interface 13, and synchronize the route data of the selected route to smartwatch 2 through preset operations. The route data can include route information (such as route name, thumbnail, route trajectory, total length information, elevation information, number of participants) and map data (such as the tile data corresponding to the route).
[0190] For example, taking the user-selected road segment as... Figure 10 Taking the sports park section shown in (c) as an example, in response to the user's click on the "sports park section" section option 132, mobile phone 1 can display Figure 10Interface 14, shown in (d), is a road segment details interface for the sports park section. Interface 14 may include a map 141 showing the area where the sports park section is located, and the road trajectory 142 of the sports park section can be displayed on this map. Interface 14 may also include a control 143. In response to a user's click on control 143, mobile phone 1 can display... Figure 10 Option panel 15 is shown in (e). Option panel 15 may include a "Road Segment Feedback" option and a "Transfer to Wearable Device" option 151. In response to the user's click on the "Transfer to Wearable Device" option 151, mobile phone 1 can display... Figure 10 The pop-up window 16 shown in (f) is used for the user to confirm whether to transmit the current road segment (i.e., the sports park road segment) to the wearable device (such as a smartwatch 2) connected to the mobile phone 1. For example, as Figure 10 As shown in (f), the pop-up window 16 can display the text "Transmit the current road segment to smartwatch 2?". Pop-up window 16 may also include an "OK" control 161 and a "Cancel" control 162. In response to the user's click on the "OK" control 161, mobile phone 1 can transmit road segment data (such as map data, thumbnails, and road trajectory) of the sports park road segment to smartwatch 2. In response to the user's click on the "Cancel" control 162, mobile phone 1 can cancel the transmission of the sports park road segment and cancel the display of pop-up window 16, i.e., mobile phone 1 returns to interface 14.
[0191] Optionally, when transmitting road segment data to the wearable device, the mobile phone, in response to the user's operation, may transmit only the road segment information of the selected road segment, or it may transmit both the road segment information and map data simultaneously. For example, such as... Figure 11 As shown, pop-up window 16 may also include an option 163 for "Simultaneously transmit related offline maps," allowing the user to choose whether to simultaneously transmit map data for the road segment. When the user selects option 163, in response to the user's click on the "OK" control 161, mobile phone 1 can transmit road segment information for the sports park to smartwatch 2, such as road segment name, thumbnail, and road trajectory. Simultaneously with transmitting the road segment information, mobile phone 1 can also transmit map data for the sports park to smartwatch 2. If the user does not select option 163, mobile phone 1 can transmit road segment information for the sports park to smartwatch 2 without simultaneously transmitting map data for the sports park.
[0192] In other scenarios, after receiving the current road segment data transmitted by the mobile phone 1, the smartwatch 2 can store the current road segment data, so that the user can view the road segment data of any road segment stored on the smartwatch 2.
[0193] For example, continuing with the example of the sports park section, after transmitting the road segment data (such as road information and map data) of the sports park section to the smartwatch 2, the user can view the road segment data of the sports park section on the smartwatch 2. Specifically, such as... Figure 12 As shown in (a), the smartwatch 2 can display interface 21, which may include icons of multiple applications installed on the smartwatch 2, such as the icon of the fitness age application, the icon 211 of the sports application, the icon of the activity record application, etc. In response to the user's click on the icon 211 of the sports application, the smartwatch 2 can display... Figure 12 Interface 22, shown in (b) above, is the display interface for the watch route list. Interface 22 can display the "Sports Park Route" watch route option 221 transmitted by mobile phone 1. Of course, interface 22 can also display other watch route options, such as the "Seaside Park Route" and "Fat Loss Running Route" watch route options. Figure 12 As shown in (b), the watch's route options can display route information for the corresponding route, such as route name, thumbnail, route track, total length, and distance. For example, the "Sports Park Route" watch route option 221 can display the route name: Sports Park Route, total length: 2.60 km, and distance: 0.13 km from you. The "Sports Park Route" watch route option 221 can also display a thumbnail 222 of the Sports Park Route, and the route track 223 of the Sports Park Route can be presented in the thumbnail 222.
[0194] It should be noted that due to page length limitations, all route options stored in the smartwatch may not be displayed on a single page. Users can view the undisplayed route options by performing preset operations within the smartwatch route list, such as swiping up or down.
[0195] Furthermore, users can view the map of the corresponding road segment through the watch's road segment option. For example, continuing with the sports park road segment, in response to the user's click on the "sports park road segment" watch road segment option 221, the smartwatch 2 can load the map data for the sports park road segment. After the map data is loaded, the smartwatch 2 can display... Figure 12 The interface 23 shown in (c) can display a map of the "Sports Park Section". Of course, in response to the user's map operations on the interface 23 (such as swiping, zooming in, zooming out, etc.), the smartwatch 2 can update the map display.
[0196] In addition, after selecting a route, users can follow the path displayed on the map. During the exercise, the smartwatch 2 updates the map in real time based on the user's current location. The specific implementation process for displaying and updating the map on the smartwatch 2 can be found in the section on displaying tile data later, and will not be repeated here.
[0197] In other scenarios, users can also delete road segments stored in the smartwatch 2 as needed. For example, continuing with the example of a sports park road segment, such as... Figure 13 As shown in (a), interface 23 may also include a details control 231. In response to a user's click on the details control 231, the smartwatch 2 can display... Figure 13 Interface 24, shown in (b) above, is the segment details interface for the sports park section. Interface 24 can include segment information such as segment name, exercise type, total length, number of participants, distance, and address. Interface 24 can also include multiple controls, such as a "Start Exercise" control, a "Delete Segment" control 241, and a "Leaderboard" control. In response to the user's click on the "Delete Segment" control 241, the smartwatch 2 can display... Figure 13 Interface 25, shown in (c) above, is the road segment deletion reminder interface. For example, as... Figure 13 As shown in (c), interface 25 can display the text "Delete this road segment?". Interface 25 may also include an "OK" control 251 and a "Cancel" control 252. In response to the user's click on the "OK" control 251, the smartwatch 2 deletes the map data and road segment information (such as road segment name, thumbnail, road segment trajectory, total length information, etc.) of the sports park road segment, i.e., deletes the sports park road segment. After deleting the sports park road segment, the smartwatch 2 can display... Figure 13 Interface 26, shown in (d), returns to the watch route list interface. At this time, it is consistent with... Figure 12 Unlike interface 22 shown in (b), interface 26 does not include the "Sports Park Section" watch section option. In response to the user's click on the "Cancel" control 252, the smartwatch 2 cancels the deletion of the Sports Park section and returns to interface 24.
[0198] Optional, such as Figure 14 As shown in (a), interface 24 may also include a "Clear Map Data" control 242. In response to a user's click on the "Clear Map Data" control 242, the smartwatch 2 can display... Figure 14Interface 27, shown in (b) above, is a map clearing reminder interface. For example, interface 27 may display the text "Clear map data?". Interface 27 may also include an "OK" control 271 and a "Cancel" control 272. In response to the user's click on the "OK" control 271, the smartwatch 2 deletes the map data for the sports park section. After deleting the map data for the sports park section, the smartwatch 2 may display... Figure 14 Interface 28, shown in (c), returns to the watch route list interface. At this point, since the smartwatch 2 has only deleted the map data for the sports park route but not the route information (such as thumbnails, route tracks, etc.), interface 28 is the same as interface 22. Interface 28 includes the "Sports Park Route" watch route option 281, which displays the route information for that route. In response to the user's click on the "Sports Park Route" watch route option 281, the smartwatch 2 can display... Figure 14 Interface 29, shown in (d), is the map interface for the sports park section, and... Figure 13 Unlike interface 23 shown in (a), interface 29 displays the route track 291 of the sports park instead of a detailed map.
[0199] In other words, in this embodiment of the application, the smartwatch can provide a map data deletion entry in the road segment details interface of any road segment, such as the aforementioned "Delete Road Segment" control and "Clear Map Data" control. In response to the user's selection of the map data deletion entry, the smartwatch can delete the map data for the corresponding road segment. It should be noted that... Figure 13 (b) and Figure 14 The map data deletion entry shown in (a) is only an example and is not limited to this in practice.
[0200] In addition, such as Figure 14 As shown in (d), interface 29 may also include a details control 292. In response to a user's click on the details control 292, the smartwatch 2 can display... Figure 14 Interface (e) shown in the image is interface 2010, which is the section details interface for the Sports Park section. Figure 13 Unlike interface 24 shown in (b), interface 2010 may include a "Save to Watch" control 2011. In response to the user's click on the "Save to Watch" control 2011, the smartwatch 2 can retrieve the map data of the sports park section from a connected electronic device (such as mobile phone 1).
[0201] The above is an illustrative description of the application scenarios of the embodiments of this application. The following, in conjunction with... Figure 15Continuing with the example of mobile phone 1 as the electronic device and smartwatch 2 as the wearable device, the map data processing method provided in this application embodiment will be described.
[0202] Please see Figure 15 The map data processing method may include:
[0203] S101, in response to transmission operation 1, the sports and health APP in mobile phone 1 sends map transmission request 1 to smartwatch 2. Map transmission request 1 is used to request the transmission of map data of road segment 1 to smartwatch 2.
[0204] In this embodiment, the sports and health app can provide multiple exercise routes for users to choose from. Route 1 can be any one of the multiple exercise routes.
[0205] Transmission operation 1 can be used to trigger mobile phone 1 to transmit road segment data of road segment 1 to a wearable device (such as smartwatch 2) connected to it. For example, taking road segment 1 as... Figure 10 Taking the sports park section shown in (d) as an example, transmission operation 1 can include clicking on the control 143 in the section details interface (i.e., interface 14) of the sports park section, and clicking on the control 143 in the section details interface (i.e., interface 14). Figure 10 The click operation of option 151, "Transfer to wearable device," shown in (e) above. The above-described transmission operation 1 is also merely an example. In other embodiments, transmission operation 1 may also be an operation of instructing the transmission route via voice; or, transmission operation 1 may also be an operation of instructing the transmission route via gesture recognition. This application does not limit the scope of the embodiments described herein.
[0206] Road segment data includes map data. Map data refers to a series of tile data provided by a third-party map provider. It can be understood that the map data corresponding to a road segment can be composed of multiple tile data corresponding to that road segment. For example, the map data for road segment 1 refers to multiple tile data 1 corresponding to road segment 1.
[0207] In some embodiments, in response to transmission operation 1, the fitness app can also send road segment information of road segment 1 to the smartwatch 2, such as road segment name, thumbnail, road segment trajectory, total length information, elevation gain information, and number of participants information. The thumbnail refers to a thumbnail map of the area where the road segment is located. The road segment trajectory consists of a series of consecutive geographic location points (global positioning system, or GPS points) on the road segment. The road segment trajectory can indicate the start and end points of the road segment, the total length of the path, and the direction of movement. The total length information refers to the total length of the road segment. The elevation gain information refers to the total vertical elevation gain from the start to the end of the road segment. The elevation gain information can reflect the difficulty of completing the road segment. The distance information is used to indicate the distance between the location of the road segment (such as the location of the start of the road segment) and the user's current location (i.e., the current location of the mobile phone). The number of participants information refers to the number of people who completed the road segment.
[0208] For example, continuing with section 1 as the City Sports Park section, its name is "City Sports Park Section", its total length is 2.60 kilometers, its elevation gain is 46.00 meters, its distance from the current location is 0.13 kilometers (i.e., 0.13 kilometers from you), and 11 people are participating.
[0209] In some embodiments, when the health and fitness app receives a user's operation 1 requesting to view road segment details for road segment 1, it sends a road segment details viewing request 1 to the smartwatch 2 in response to the operation 1. The road segment details viewing request 1 requests the smartwatch's road segment status for road segment 1. The smartwatch's road segment status may include conditions such as "road segment with map," "road segment without map," or "no road segment." Upon receiving the smartwatch's road segment status for road segment 1 from the smartwatch 2, the health and fitness app can display corresponding prompts to indicate whether road segment 1 has already been transferred, thus guiding the user to perform subsequent road segment transfer operations.
[0210] S102, in response to map transmission request 1, smartwatch 2 determines multiple tile numbers 1 corresponding to road segment 1, and there is no shared tile data between road segment 1 and the road segment stored in smartwatch 2.
[0211] A tile number is a unique identifier provided by a third-party map provider (i.e., a map server) to uniquely identify a piece of tile data.
[0212] In this context, road segment 1 corresponds to multiple tile data 1s, and each tile number 1 corresponds one-to-one with a tile data 1. Tile number 1 is used to identify the tile data 1 corresponding to road segment 1.
[0213] As can be understood, in this embodiment, the smartwatch 2 stores multiple road segments (for ease of explanation, the road segments stored in the smartwatch can be referred to as synchronized road segments). There is no shared tile data between road segment 1 and any synchronized road segment.
[0214] S103, Smartwatch 2 obtains the download address of tile data 1 from the map server based on tile number 1.
[0215] S104, Smartwatch 2 sends a tile download request 1 to the Sports & Health APP. Tile download request 1 is used to request multiple tile data 1 from the Sports & Health APP. Tile download request 1 can carry the download address of tile data 1.
[0216] After determining multiple tile numbers 1, smartwatch 2 can retrieve the download address of the corresponding tile data 1 from the map server for each tile number 1, thus obtaining the download addresses of each tile data 1. After obtaining the download addresses of each tile data 1, smartwatch 2 can send a tile download request 1 to mobile phone 1 to request multiple tile data 1 corresponding to road segment 1 from mobile phone 1.
[0217] S105, the Sports & Health APP obtains multiple tile data 1 from the map server based on the download address of tile data 1.
[0218] After receiving the download addresses of each tile data 1 from the smartwatch 2, the Health & Fitness app interacts with the map server to retrieve multiple tile data 1s. Specifically, the Health & Fitness app can send a tile download request 1 to the map server, which can include the download addresses of each tile data 1. Upon receiving the tile download request 1, the map server sends multiple tile data 1s to the Health & Fitness app.
[0219] S106, the Sports & Health APP sends multiple tile data 1 to the smartwatch 2.
[0220] After acquiring multiple tile data 1, the sports and health app sends the multiple tile data 1 to the smartwatch 2 based on the Bluetooth connection between the mobile phone 1 and the smartwatch 2.
[0221] S107, after receiving multiple tile data 1, the smartwatch 2 stores multiple tile data 1.
[0222] After receiving multiple tile data 1 of road segment 1 transmitted by mobile phone 1, smartwatch 2 stores the multiple tile data, that is, the transmission of map data corresponding to road segment 1 is completed.
[0223] In some embodiments, during the transmission of map data for road segment 1, the fitness and health app can send a transmission progress request to the smartwatch 2 to request the transmission progress information of the map data for road segment 1 from the smartwatch 1. The fitness and health app can display the transmission progress information of the map data for road segment 1 in real time, so that users can keep track of the map data transmission progress of the road segment in a timely manner, resulting in a better user experience.
[0224] It should be noted that the processes of transmitting map data for road segment 1 (i.e., processes S101-S107 above) and transmitting road segment information for road segment 1 can be executed sequentially, such as executing the process of transmitting road segment information for road segment 1 first, and then executing the process of transmitting map data for road segment 1; the processes of transmitting road segment information for road segment 1 and transmitting map data for road segment 1 can also be executed simultaneously. In this embodiment, the execution order of the processes of transmitting road segment information for road segment 1 and transmitting map data for road segment 1 is not limited.
[0225] In some embodiments, during the transmission of road segment data (such as map data and road segment information) for road segment 1, smartwatch 2 can obtain device status (such as network connection status, battery level, URL generation failure, etc.). If the device status is abnormal, smartwatch 2 can send a device abnormality message to the fitness app to notify smartwatch 2 of the device abnormality. Upon receiving the device abnormality message, the fitness app can pause the transmission of road segment 1. Similarly, when a transmission error occurs, smartwatch 2 can also return a general error code to the fitness app to notify the fitness app of the transmission error.
[0226] S108, in response to transmission operation 2, the sports and health APP sends map transmission request 2 to the smartwatch 2. Map transmission request 2 is used to request the transmission of map data of road segment 2 to the smartwatch 2.
[0227] This step is similar to step S101, except that it involves sending a transmission request for segment 2. Segment 2 is different from segment 1. For example, segment 1 is... Figure 10 Section (c) of the map shows the urban sports park section, and section 2 is... Figure 10 The reservoir section shown in (c) is shown in the image.
[0228] Transmission operation 2 can be used to trigger mobile phone 1 to transmit road segment data of road segment 2 to smartwatch 2. It can be understood that transmission operation 2 is similar to transmission operation 1, for example, clicking the "Transmit to Wearable Device" option that pops up in the road segment details interface of road segment 2. Of course, transmission operation 2 can also be an operation of transmitting the road segment via voice instruction; or, transmission operation 2 can also be an operation of transmitting the road segment via gesture recognition. This embodiment of the application does not limit this.
[0229] Similar to segment 1, in some embodiments, in response to transmission operation 2, the sports and health APP can send segment information of segment 2 to smartwatch 2, such as segment name, thumbnail, segment trajectory, total length information, elevation information, number of participants, etc.
[0230] In some embodiments, the fitness app can also respond to the operation 2 of viewing road segment details for road segment 2 by sending a road segment details viewing request 2 to the smartwatch 2. The road segment details viewing request 2 is used to request the watch's road segment status for road segment 1. Upon receiving the watch's road segment status for road segment 2 from the smartwatch 2, the fitness app can display corresponding prompts to indicate to the user whether road segment 1 has already been transmitted, thus guiding the user to perform subsequent road segment transmission operations.
[0231] S109, in response to map transmission request 2, smartwatch 2 determines multiple tile numbers 2 corresponding to road segment 2, and there is shared tile data between road segment 2 and road segment 1.
[0232] In this context, road segment 2 corresponds to multiple tile data 2, and the multiple tile numbers 2 correspond one-to-one with the multiple tile data 2. The tile number 2 is used to identify the tile data 2 corresponding to road segment 2.
[0233] S110, Smartwatch 2 determines tile number 3 from multiple tile numbers 2.
[0234] Tile number 3 refers to all tile numbers 2 except for tile number 4. Tile number 4 refers to the tile number in the smartwatch that corresponds to the data stored within the multiple tile numbers 2. Tile data 3, corresponding to tile number 3, refers to the tile data to be downloaded from the multiple tile data sets 2. It can be understood that tile number 3 can be one or more. Similarly, tile data 3 can be one or more.
[0235] For example, if a smartwatch stores tile data shared between road segment 1 and road segment 2, then tile data corresponding to tile number 4 is tile data shared between road segment 1 and road segment 2. Tile data 3 corresponding to tile number 3 refers to tile data other than the tile data shared with road segment 1 from among multiple tile data 2.
[0236] S111, Smartwatch 2 obtains the download address of tile data 3 from the map server based on tile number 3.
[0237] S112, the smartwatch 2 sends a tile download request 2 to the sports and health APP. The tile download request 2 is used to request tile data 3 from the sports and health APP. The tile download request 2 may include the download address of tile data 3.
[0238] After determining tile number 3 from multiple tile numbers 2, smartwatch 2 can obtain the download address of the corresponding tile data 3 from the map server based on tile number 3. After obtaining the download address of tile data 3, smartwatch 2 can send a tile download request 2 to mobile phone 1 to request tile data 3 from mobile phone 1.
[0239] S113, the sports and health app obtains tile data from the map server 3.
[0240] After receiving the download address for tile data 3 from smartwatch 2, the Health & Fitness app interacts with the map server to retrieve tile data 3. Specifically, the Health & Fitness app can send a tile download request 2 to the map server, which can include the download address for tile data 3. Upon receiving the tile download request 2, the map server sends the tile data 3 to the Health & Fitness app.
[0241] S114, the Sports & Health APP sends tile data 3 to the smartwatch 2.
[0242] After obtaining tile data 3, the sports and health app sends tile data 3 to the smartwatch 2 based on the Bluetooth connection between the mobile phone 1 and the smartwatch 2.
[0243] S115, after receiving tile data 3, smartwatch 2 stores tile data 3.
[0244] After receiving the tile data 3 of road segment 2 transmitted by mobile phone 1, smartwatch 2 stores the tile data 3, thus completing the transmission of the map data corresponding to road segment 2.
[0245] In some embodiments, during the transmission of map data for road segment 2, the fitness and health app can send a transmission progress request to the smartwatch 2 to request the transmission progress information of the map data for road segment 2. After receiving the transmission progress information of the map data for road segment 2, the fitness and health app can display the transmission progress information of the map data for road segment 2, so that users can keep abreast of the map data transmission progress of the road segment, resulting in a better user experience.
[0246] It should be noted that the processes of transmitting map data for road segment 2 (i.e., processes S108-S115 above) and transmitting road segment information for road segment 2 can be executed sequentially, such as executing the process of transmitting road segment information for road segment 2 first, and then executing the process of transmitting map data for road segment 2; the processes of transmitting road segment information for road segment 2 and transmitting map data for road segment 2 can also be executed simultaneously. In this embodiment, the execution order of the processes of transmitting road segment information for road segment 2 and transmitting map data for road segment 2 is not limited.
[0247] The above S101-S107 are the process of transmission segment 1, and S108-S115 are the process of transmission segment 2.
[0248] In this embodiment, when a mobile phone requests the transmission of map data for a certain road segment (e.g., road segment 2) to a smartwatch, the smartwatch can determine multiple tile numbers 2 corresponding to road segment 2. After determining the multiple tile numbers 2, the smartwatch can determine whether tile number 4 exists among the multiple tile numbers 2. If tile number 4 exists among the multiple tile numbers 2, it means that some tile data 2 of the multiple tile data 2 corresponding to road segment 2 has been stored in the smartwatch. That is, this part of the tile data 2 has been obtained when transmitting map data for other road segments. Therefore, the smartwatch obtains the tile data 3 corresponding to tile number 3 from the mobile phone based on tile number 3 other than tile number 4 among the multiple tile numbers 2. In this way, for tile data shared by multiple road segments, it only needs to be obtained once, avoiding repeated acquisition of the same tile data and improving the map data transmission speed.
[0249] Furthermore, when a mobile phone transmits map data for a specific road segment to a smartwatch, tile data shared by multiple road segments only needs to be retrieved once. Therefore, identical tile data only needs to be stored once, avoiding redundant tile file storage and reducing the storage space occupied by tile data. Additionally, at higher tile levels, even if different road segments have a higher probability of using the same tile data, redundant tile file storage can be reduced even more significantly, saving storage space.
[0250] S116, in response to map viewing operation 1, smartwatch 2 obtains tile data 4 based on the geographical location information of road segment 2.
[0251] Map view operation 1 can be used to trigger the viewing of map data for road segment 2. For example, taking road segment 2 as... Figure 12 Taking the sports park section shown in (b) as an example, map viewing operation 1 can be a response to the user's click operation on the "sports park section" watch section option 221, and this is not limited in this embodiment.
[0252] It can be understood that tile data 4 may include some tile data from all tile data corresponding to road segment 2 (i.e., multiple tile data 2). Optionally, tile data 4 may include tile data shared by road segment 2 and road segment 1.
[0253] S117, Smartwatch 2 generates and displays a map of road segment 2 based on tile data 4.
[0254] In this embodiment, in response to a user's map viewing operation on a road segment, the smartwatch can retrieve the tile data corresponding to the road segment from the stored tile data, and generate and display the map corresponding to the road segment based on the tile data. That is, this embodiment can support the reuse of the same tile data for multiple road segments. For example, since the smartwatch has already stored the tile data corresponding to road segment 1, even if the tile data shared by road segment 2 and road segment 1 is not retrieved when synchronizing road segment 2, the corresponding tile data in road segment 1 can still be reused when displaying the map of road segment 2. This allows the map data of road segment 1 to be used normally without repeatedly retrieving the same tile data.
[0255] S118, in response to the map deletion operation, smartwatch 2 determines tile data 5 from the stored tile data, tile data 5 is the tile data used exclusively by road segment 2.
[0256] The map deletion operation can be used to trigger the deletion of map data for road segment 2. For example, taking road segment 2 as... Figure 13 Taking the sports park road segment shown in (b) as an example, the map deletion operation can be a user's click operation on the "Delete Road Segment" control 241 or a click operation on the "Clear Map Data" control. This application embodiment does not limit this.
[0257] For example, taking the case where road segment 2 and road segment 1 share tile data, tile data 5 is the tile data other than the tile data shared with road segment 1 among the multiple tile data 2 corresponding to road segment 2.
[0258] S119, Smartwatch 2 deletes tile data 5.
[0259] S120, in response to map viewing operation 2, smartwatch 2 obtains tile data 6 based on the geographical location information of road segment 1. Map viewing operation 2 can be used to trigger the viewing of map data for road segment 1.
[0260] It is understandable that tile data 6 may include some tile data from all tile data corresponding to road segment 1.
[0261] S121, Smartwatch 2 generates and displays a map of road segment 1 based on tile data 6.
[0262] In this embodiment, when deleting map data for a road segment, the smartwatch can determine whether there are tile data used by other road segments among the multiple tile data corresponding to that road segment. If such tile data exists, only the tile data used by that road segment is deleted, while the tile data shared by that road segment and other road segments is retained. This avoids the situation where deleting map data for one road segment renders the map data of other road segments that share tile data unusable, thus improving the flexibility of map data processing.
[0263] For example, when deleting map data for road segment 2, only the tile data used by road segment 2 alone is deleted, while the tile data shared by road segment 2 and road segment 1 is not deleted. In this way, it will not affect the user's use of map data for road segment 1.
[0264] The above combination Figure 15 The map data processing method of this application embodiment is described in general terms. As can be seen from the above description, the tile data processing process for any road segment may include: a tile data acquisition process (i.e., processes S101 to S106, or S108 to S114), a tile data storage process (i.e., processes S107 or S115), a tile data deletion process (i.e., processes S118 and S119), and a tile data display process (i.e., processes S116 to S117, or S120 to S121).
[0265] In this embodiment, after receiving road segments transmitted by a mobile phone, the smartwatch can store relevant information about the road segments and tile data. Thus, upon receiving a preset operation (such as the map deletion operation, map viewing operation 1, map viewing operation 2, etc.) for a synchronized road segment, the smartwatch can perform corresponding processing on the synchronized road segment based on the stored relevant information about the road segment and tile data. Furthermore, the smartwatch can also perform operations such as transmitting, deleting, and viewing other road segments based on the stored relevant information about the road segments and tile data. In other words, in this embodiment, the smartwatch can implement all of the above processes based on the relevant information about the road segments and tile data.
[0266] In some embodiments, the smartwatch can record information related to road segments and tile data through a map index file. Specifically, after acquiring tile data for a road segment from a mobile phone, the smartwatch can record information about that road segment and the acquired tile data in the map index file. Thus, upon receiving a preset operation for that road segment (such as the map deletion operation or map viewing operation 1 mentioned above), the smartwatch can perform corresponding processing on that road segment based on the information recorded in the map index file. Similarly, the smartwatch can also perform transmission, deletion, and viewing of other road segments based on the information recorded in the map index file. In other words, the smartwatch can implement all of the above processes based on the information recorded in the map index file.
[0267] The following is an illustrative explanation of map index files.
[0268] For example, Figure 16 This is a schematic diagram of an example map index file provided in an embodiment of this application. For example... Figure 16 As shown, the map index file can include road segment index information and multiple tile index information. One tile index information corresponds to one tile data stored in the smartwatch (for ease of explanation, the tile data stored in the smartwatch can be referred to as synchronized tile data).
[0269] The road segment index information records the road segment numbers stored in the smartwatch. The road segment number is the identification number (or road segment ID) of a road segment, used to uniquely identify it. For example, the road segment ID for road segment 1 is 001, and the road segment ID for road segment 2 is 002. Therefore, the road segment index information can also be called the road segment ID header information.
[0270] For example, road segment index information can be represented by a road segment ID array. Optionally, the length of the road segment ID array is related to the number of road segments that the smartwatch is allowed to store. For example, taking a smartwatch that is allowed to store 32 road segments as an example, the road segment ID array can consist of 64 bytes of characters, where every 2 bytes of characters correspond to the road segment ID. It is understood that the length of the road segment ID array can be set according to actual conditions, and this embodiment does not limit it.
[0271] In practical applications, smartwatches can write the segment IDs of road segments into a segment ID array sequentially. Specifically, when recording the segment ID of a road segment, the smartwatch can write the segment ID into the first two empty bytes of the segment ID array. For example, taking a 64-byte segment ID array as an example, for the first road segment synchronized to the smartwatch, the smartwatch writes the segment ID of that road segment into the first two bytes. For the next synchronized road segment, the smartwatch writes the segment ID of that road segment into the third and fourth bytes.
[0272] It should be noted that since the character length of the road segment IDs is the same for different road segments, the position of a road segment ID in the road segment ID array is unique, meaning the order of a road segment ID among multiple road segment IDs is also unique. Typically, the position of a road segment ID in the road segment ID array is represented by its index (mask).
[0273] For example, taking the road segment ID of road segment 1 as 01, the road segment ID of road segment 2 as 02, the road segment ID of road segment 3 as 03, and the road segment ID of road segment 4 as 04 as an example, the road segment index information is: 01020304. Correspondingly, the index subscript of the road segment ID (01) of road segment 1 is 1, the index subscript of the road segment ID (02) of road segment 2 is 2, the index subscript of the road segment ID (03) of road segment 3 is 3, and the index subscript of the road segment ID (04) of road segment 4 is 4.
[0274] For example, such as Figure 16 As shown, tile index information can include tile number, data size information, tile file name, offset information, reference relationship information (also known as road segment reference information), and index status.
[0275] The tile number (or tile key) is a unique identifier provided by a third-party map provider (i.e., the map server) to uniquely identify a piece of tile data. For example, the tile key for tile data 'a' is tile_file_key1, and the tile key for tile data 'b' is tile_file_key2.
[0276] For example, for a set of tile data, a tile key is generated based on the tile coordinates and zoom level of the tile data according to a preset rule. It should be noted that different map providers may use different preset rules; the rules for generating the tile key are not limited in this embodiment.
[0277] The data size information indicates the size of the tile data, specifically the size of the original tile file downloaded from a third-party map provider (also known as a cloud-side file, or cloud-downloaded file). For example, tile data 'a' has a data size of 256KB. Similarly, tile data 'b' also has a data size of 256KB.
[0278] The filename of a tile file refers to the filename of the file containing the tile data on the smartwatch. This filename, distinct from cloud-based files downloaded from third-party map providers, can also be called a local file. Accordingly, the filename of the tile file can also be referred to as the local filename.
[0279] In some embodiments, the file name of the tile file can be determined according to a preset naming rule. The naming rule is related to the way the tile data is stored.
[0280] For example, Figure 17 This is a schematic diagram of an example of a tile storage method provided in an embodiment of this application. For example... Figure 17 As shown, tile data can be stored in two ways: separate storage and merged storage. Separate storage means storing each tile data as a separate file. Merged storage means storing multiple tile data into one file (i.e., a merged file). Optionally, in this embodiment, the smartwatch typically performs processing (such as deletion) on a specific road segment; therefore, merged storage could refer to merging and storing multiple tile data corresponding to a road segment into one file.
[0281] Based on this, for separate storage, the smartwatch can generate the filename of the tile file corresponding to the tile data based on the tile key. For example, the filename of the tile file can consist of an "S" prefix, the tile key, and a filename suffix. The "S" prefix indicates separate storage. The filename suffix indicates the tile file format. For instance, if tile data 'a' is stored separately, with the tile key 'tile_file_key1' and the filename suffix '.png', the filename of the tile file corresponding to tile data 'a' would be "Stile_file_key1.png".
[0282] For the merged storage method, when merging multiple tile data corresponding to a road segment, the smartwatch can generate the filename of the merged file containing the multiple tile data of that road segment based on the road segment ID. For example, the filename of the merged file can consist of an "M" prefix, the road segment ID, and a filename suffix. The "M" prefix indicates the merged storage method. The filename suffix indicates the tile file format. For instance, taking the merged storage of multiple tile data corresponding to road segment 'a', where road segment 'a' has a road segment ID of 0001 and a filename suffix of .png, the filename of the merged file corresponding to road segment 'a' would be "M0001.png".
[0283] Offset information refers to the index position of the tile data within the tile file (also known as the index subscript, or mask), or the index subscript of the cloud-side file within the local file. The offset information of the tile data indicates the starting position for reading tile data from the tile file, i.e., the starting position for reading the original tile file from the local file.
[0284] For example, the offset information is also related to how the tile data is stored. In the case of a single storage method, since a tile file contains only one piece of tile data, the offset information of the tile data is 0.
[0285] For the merged storage method, the offset information can be determined based on the storage location of the tile data in the merged file and the size of the tile data. Specifically, for the first tile in the merged file, the offset information is 0. For other tile data in the merged file besides the first tile, the offset information can be determined based on the size of one or more preceding tiles. For example, taking a tile file as... Figure 18 The merged file A shown includes tile data a, tile data b, and tile data c, each with a size of 256KB. Tile data a, being the first tile in merged file A, has an offset (index) of 0. Tile data b, the second tile, has an offset equal to the size of tile data a (256KB). Tile data c, the third tile, has an offset equal to the sum of the sizes of the two preceding tiles (a and b) (512KB).
[0286] It is understandable that a smartwatch can obtain tile data based on the size of the tile data, the file name of the tile file containing the tile data, and the offset information of the tile data.
[0287] For example, with Figure 18Taking tile data b from merged file A as an example, the smartwatch reads the data size (256KB), local file name (Merged A), and offset information (256KB) of tile data b from the map index file based on the tile key (key is tile_file_key2). Based on this, the smartwatch reads 256KB of data starting from the 256KB position in merged file A, thus obtaining tile data b.
[0288] by Figure 18 Taking the tile data c in the merged file A as an example, the smartwatch reads the data size (256KB), local file name (Merged A), and offset information (512KB) of tile data c from the map index file based on the tile key (key is tile_file_key3) of tile data c. Based on this, the smartwatch reads 256KB of data starting from the 512KB position in the merged file A, thus obtaining tile data c.
[0289] Referencing information indicates the association between tile data and road segments stored on the smartwatch. This referencing information can indicate which road segments among the multiple road segments stored on the smartwatch use that tile data.
[0290] In one embodiment, the reference relationship information may include multiple reference states, with each reference state corresponding to a road segment. A reference state indicates the usage relationship between a road segment stored on the smartwatch and the tile data. For example, a reference state value of a first value (e.g., 0) indicates that there is no association between the corresponding road segment and the tile data, meaning the corresponding road segment is not using the tile data. A reference state value of a second value (e.g., 1) indicates that there is an association between the corresponding road segment and the tile data, meaning the corresponding road segment is using the tile data.
[0291] In a specific example, similar to the road segment ID array, reference relationship information can also be represented by a reference status array. The character length of the reference status array is related to the character length of the road segment ID array.
[0292] Taking a road segment ID array that can store 32 road segments as an example, the tile data reference status array can be a 32-bit (4-byte) array. Each bit in the reference status array corresponds to a road segment, and the status value (0 or 1) of each bit represents the association between a road segment and the tile data, indicating whether a road segment uses the tile data. In this way, by recording the association between tile data and the road segments stored in the smartwatch using the reference status array, the association between each road segment stored in the smartwatch and the tile data can be accurately represented. The recording method is simple and can reduce the storage space occupied by tile index information.
[0293] It should be noted that the order of reference states in the reference relationship information corresponds to the order of road segment IDs in the road segment index information. That is, the position of a road segment's reference state in the reference relationship information (i.e., its order among multiple reference states) is the same as the position of that road segment's road segment ID in the road segment index information (i.e., its order among multiple road segment IDs). Based on this, when retrieving the reference state of a road segment from the reference relationship information, the reference state of that road segment can be obtained from multiple reference states based on the position of its road segment ID in the road segment index information (i.e., the road segment ID index subscript).
[0294] For example, assuming road segment ID 1 is 01, road segment ID 2 is 02, road segment ID 3 is 03, and road segment ID 4 is 04, the road segment ID array is represented as 01020304, and the reference status array for tile data 'a' is represented as 010101. In this case, the first position in the reference status array corresponds to road segment 1, and its value is "0", indicating no association between road segment 1 and tile data 'a'. The second position corresponds to road segment 2, and its value is "1", indicating an association between road segment 2 and tile data 'a'. The third position corresponds to road segment 3, and its value is "0", indicating no association between road segment 3 and tile data 'a'. The fourth position corresponds to road segment 4, and its value is "1", indicating an association between road segment 4 and tile data 'a'. In other words, tile data 'a' is shared by road segments 2 and 4.
[0295] Optional, such as Figure 16 As shown, the tile index information may also include an index status. The index status indicates whether the tile index information is valid. For example, the index status of the tile index information can be set using a flag bit. For instance, a status value of 1 indicates that the tile index information is valid. A status value of 0 indicates that the tile index information is invalid.
[0296] In practical applications, after a map service stores new tile data, it adds the tile index information for that tile data to the map index file and sets the index status of that tile index information to valid. After the map service deletes the tile data, it sets the index status of the corresponding tile index information to invalid. Thus, when the map service records information for a new tile, it can first check if there is any invalid tile index information in the map index file. If so, it can update that tile index information with the new tile data and set its index status to valid. This allows for the reuse of tile index information, avoids generating too many invalid tile indexes due to tile data deletion, and saves storage space.
[0297] It should be noted that, based on the tile number, the tile index information of the corresponding tile data can be found in the map index file, and then any of the above information (i.e., tile number, data size information, tile file name, offset information, index status, and reference relationship information) can be obtained from the tile index information of the corresponding tile data.
[0298] For example, Figure 18 This is a schematic diagram of another example of a map index file provided in an embodiment of this application.
[0299] like Figure 18 As shown, the map index file includes a 64-byte road segment ID array (i.e., 0x1234), which stores the road segment IDs of 32 road segments, with each 2 bytes corresponding to one road segment ID. The map index file also includes multiple tile index information.
[0300] The format of a tile index is as follows:
[0301] tile_file_key (tile key), size of the cloud-side file, file name of the tile file, offset information, index status, and reference relationship information.
[0302] Following the format described above, write the tile data from the merged A file, merged B file, and the separate C file into the map index file. Specifically:
[0303] tile_file_key1, 256, merge A, 0, 1, 0X0060
[0304] tile_file_key2, 256, merge A, 256, 1, 0X0760
[0305] tile_file_key3, 256, merge A, 512, 1, 0X0760
[0306] tile_file_key4, 256, merge B, 0, 1, 0X0060
[0307] tile_file_key5, 256, merge B, 256, 1, 0X0060
[0308] tile_file_key6, 256, merge B, 512, 1, 0X0760
[0309] tile_file_key7, 256, C alone, 0, 1, 0X0060.
[0310] It should be noted that Figure 18 The map index file shown is merely an example and is not intended to be used in practice.
[0311] The following section, based on the relevant information regarding the aforementioned road sections and tile data, provides a detailed explanation of the tile data acquisition process, tile data storage process, tile data deletion process, and tile data display process.
[0312] 1. Tile data acquisition process
[0313] The following section uses road segment 2 as an example to illustrate the process of obtaining tile data.
[0314] In some embodiments, the smartwatch receives a map transmission request from a mobile phone, requesting the transmission of map data for a specific road segment. In response to the map transmission request, the smartwatch can identify multiple tile data sets to be downloaded corresponding to that road segment. The smartwatch can identify the tile data shared by that road segment and other road segments (referred to as shared tile data) from the multiple tile data sets to be downloaded. The smartwatch can then obtain the tile data excluding the shared tile data from the multiple tile data sets to be downloaded from the mobile phone.
[0315] Shared tile data refers to the tile data shared by the road segment to be transmitted and at least one synchronized road segment in the smartwatch. In other words, the number of shared tiles refers to the tile data already stored in the smartwatch.
[0316] For example, taking the segment to be transmitted as segment 2, and the synchronized segments including segment 1, the shared tile data refers to the tile data shared by segment 2 and segment 1. Alternatively, taking the segment to be transmitted as segment 2, and the synchronized segments including segment 1 and segment 3, the shared tile data includes the tile data shared by segment 2 and segment 1, as well as the tile data shared by segment 2 and segment 3.
[0317] The following is combined Figure 19 This paper uses a specific scenario to illustrate the process of acquiring tile data.
[0318] The smartwatch stores map data for road segment 1. For example... Figure 19 As shown in (a), the eight tile data corresponding to segment 1 are tile data 01, tile data 02, tile data 03, tile data 04, tile data 05, tile data 06, and tile data 08.
[0319] Then, the map data for road segment 2 is transmitted to the smartwatch. For example... Figure 19 As shown in (b), the 10 tile data corresponding to road segment 2 are tile data 04, 06, 07, 08, 09, 10, 11, 12, 13, and 14. Among them, tile data 04, 06, 07, and 08 are tile data shared by road segments 1 and 2. Therefore, when transmitting map data for road segment 2, only the tile data other than the shared tile data needs to be transmitted, namely tile data 09, 10, 11, 12, 13, and 14.
[0320] Next, map data for road segment 3 is transmitted to the smartwatch. For example... Figure 19 As shown in (c), the 10 tile data corresponding to road segment 3 are tile data 03, 05, 07, 08, 11, 12, 15, 16, 17, and 18. Among them, tile data 03, 05, 07, 08, 11, and 12 are shared tile data between road segment 3 and other road segments. Therefore, when transmitting the map data of road segment 3, only the tile data other than the shared tile data, namely tile data 15, 16, 17, and 18, needs to be transmitted.
[0321] Next, map data for road segment 4 is transmitted to the smartwatch. For example... Figure 19 As shown in (d), road segment 4 corresponds to 10 tile data points: tile data 02, tile data 04, tile data 05, tile data 07, tile data 12, tile data 13, tile data 16, tile data 19, tile data 20, and tile data 21. Among these, tile data 02, 04, 05, 07, 12, and 13 are shared tile data between road segment 4 and other road segments. Therefore, when transmitting map data for road segment 4, only the tile data excluding the shared tile data needs to be transmitted, namely tile data 19, 20, and 21.
[0322] In other words, tile data shared by multiple road segments only needs to be retrieved once, reducing redundant storage and saving storage space.
[0323] The following section continues to use road segment 2 as an example, and will explain in detail the process of acquiring tile data in conjunction with the various modules in the smartwatch.
[0324] For example, Figure 20 This is a schematic diagram illustrating another map data processing method provided in an embodiment of this application. Please refer to... Figure 20 Map data processing methods may include:
[0325] S201, in response to transmission operation 2, the sports and health APP of mobile phone 1 sends the road segment ID and feature point information of road segment 2 to the sports field module of smartwatch 2.
[0326] Transmission operation 2 can be used to trigger mobile phone 1 to transmit road segment data of road segment 2 to smartwatch 2. The road segment data may include map data.
[0327] As explained earlier regarding road segment IDs, road segment IDs are used to uniquely identify a road segment. For example, the road segment ID for road segment 2 is 002.
[0328] Feature point information can characterize the geographical location of a corresponding road segment. Using the feature point information of a road segment, the corresponding tile data can be determined. In this embodiment, the feature point information may include the coordinate information of multiple feature points within the road segment. Based on the coordinate information of multiple feature points, the corresponding map data (such as tile data) can be determined. The coordinate information may include accuracy information and latitude information. Optionally, the coordinate information may also include altitude (i.e., height) information.
[0329] In one example, each geographical location point constituting a road segment can be identified as a feature point. In another example, a subset of geographical locations can be selected from a series of consecutive geographical locations constituting a road segment as feature points. For example, taking road segment 2 as an example, the start and end points of road segment 2 can be identified as feature points of road segment 2, and a geographical location point can be selected at preset intervals as a feature point of road segment 2. Of course, the above methods for determining feature points are merely examples, and the specific methods for determining feature points in this application embodiment are not limited.
[0330] S202, after receiving the road segment ID and feature point information of road segment 2 from the Sports and Health APP, the sports venue module sends message 1 to the Sports and Health APP. Message 1 is used to indicate that the transmission of the road segment ID and feature point information of road segment 2 is complete.
[0331] In some embodiments, after receiving the road segment ID and feature point information of road segment 1, the sports field module associates and stores the road segment ID and feature point information of road segment 1.
[0332] S203, after receiving message 1 from the sports venue module, the sports and health app sends map transmission request 2 to the sports venue module. Road segment transmission request 2 is used to request the transmission of map data for road segment 2 to the smartwatch 2. Road segment transmission request 2 may include the road segment ID of road segment 2.
[0333] S204, in response to map transmission request 2, the sports stadium module sends a tile acquisition request to the map service. The tile acquisition request is used to request multiple tile information corresponding to road segment 2 from the map service. The tile acquisition request 1 may carry the road segment ID of road segment 2.
[0334] A tile information can include a tile number (tile key) and a reference address. For segment 2, a tile information can include a tile number 2 and the reference address corresponding to that tile number 2.
[0335] The reference address can be used to obtain the download address of the tile data. For example, the reference address can be represented by concatenating a Uniform Resource Locator (URL). Specifically, the concatenated download URL can be dynamically generated based on the API interface key provided by the map provider and the tile key of the tile data. By concatenating the download URL, the legitimacy of the address acquisition request can be verified, and if the address acquisition request is successfully verified, the download address of the tile data can be obtained from the map server. S205, after receiving tile acquisition request 1, the map service obtains the feature point information of road segment 2 from the sports field module.
[0336] Specifically, in response to tile acquisition request 1, the map service sends a feature point acquisition request to the sports field module. This request is used to request feature point information for road segment 2 from the sports field module. The feature point acquisition request may include the road segment ID of road segment 2. In response to the feature point acquisition request, the sports field module can query the feature point information of road segment 2 based on its road segment ID and then send this information to the map service.
[0337] The process of obtaining feature point information for road segment 2 described above is merely an example. In other embodiments, the sports field module may also directly send a tile acquisition request 1 carrying feature point information for road segment 2 to the map service. Specifically, in response to map transmission request 2, the sports field module can obtain the feature point information for road segment 2 based on the road segment ID, and send a tile acquisition request 1 carrying the road segment ID and feature point information for road segment 2 to the map service. The method of obtaining feature point information is not limited in the embodiments of this application.
[0338] S206, The map service sends a tile acquisition request 2 to the third-party map SDK. The tile acquisition request is used to request multiple tile information corresponding to road segment 2 from the third-party map SDK. The tile acquisition request 2 may include feature point information of road segment 2.
[0339] S207, the third-party map SDK determines the multiple tile numbers 2 corresponding to road segment 2 based on the feature point information of road segment 2.
[0340] In practical applications, as explained earlier regarding tile maps, tile maps have multiple zoom levels. Therefore, when calculating the tile number corresponding to a certain road segment, the third-party map SDK can iteratively calculate the tile number of that road segment at multiple zoom levels.
[0341] For example, when determining multiple tile numbers 2 corresponding to road segment 2, the third-party map SDK iteratively calculates the tile numbers 2 at each zoom level. For each zoom level, the third-party map SDK traverses the feature points of road segment 2. For each feature point traversed, it calculates the tile coordinates corresponding to the feature point based on the zoom level and the feature point's coordinate information (i.e., latitude and longitude). The third-party map SDK generates tile number 2 based on preset rules, according to the zoom level and the tile coordinates corresponding to the feature point. This process continues until all feature points of road segment 2 have been traversed, resulting in multiple tile numbers 2 at that zoom level. In this way, by iterating through each zoom level, all tile numbers 2 corresponding to road segment 2 can be obtained, i.e., the tile keys for all tile data 2 corresponding to road segment 2. It should be understood that if two or more feature points correspond to the same tile coordinates, the corresponding tile number 2 is recorded only once to avoid duplication.
[0342] For example, taking road segment 2 as the target road segment and zoom levels 3 to 17 as the target zoom level, when determining the multiple tile numbers 2 corresponding to road segment 2, for each zoom level from 3 to 17, the third-party map SDK can determine one or more tile numbers 2 corresponding to road segment 2 at that zoom level based on the feature point information of road segment 2. In this way, the third-party map SDK can calculate the tile numbers 2 of road segment 2 at zoom levels 3 to 17, thus obtaining multiple tile numbers 2.
[0343] S208, the third-party map SDK determines multiple reference addresses based on multiple tile numbers 2. Each reference address corresponds one-to-one with a tile number, meaning that one reference address is used to obtain the tile data 2 identified by the corresponding tile number 2.
[0344] After determining the multiple tile numbers 2 corresponding to road segment 2, the third-party map SDK generates the reference address of the tile data 2 corresponding to each tile number 2, thus obtaining multiple reference addresses.
[0345] For example, taking the reference address as the spliced download URL, the third-party map SDK splices the API interface key provided by the map provider and the tile number 2 to obtain the spliced download URL of the tile data 2 corresponding to tile number 2.
[0346] Of course, in practical applications, the third-party map SDK can generate the corresponding stitching download URL for each tile number 2 of road segment 2 at different zoom levels, that is, determine the stitching download URL of each tile data 2.
[0347] S209, the third-party map SDK sends multiple tile numbers 2 and multiple reference addresses to the map service.
[0348] S210, the map service determines tile number 3 from multiple tile numbers 2.
[0349] Tile number 3 refers to all tile numbers 2 except for tile number 4. Tile number 4 refers to the tile number in the smartwatch that corresponds to the data stored within the multiple tile numbers 2. Tile data 3, corresponding to tile number 3, refers to the tile data to be downloaded from the multiple tile data sets 2. It can be understood that tile number 3 can be one or more. Similarly, tile data 3 can be one or more.
[0350] In some embodiments, the map service can determine whether there is a tile number 4 among the multiple tile numbers 2. If there is a tile number 4 among the multiple tile numbers 2, then the tile numbers other than tile number 4 among the multiple tile numbers 2 are determined as tile numbers 3.
[0351] Specifically, the map service iterates through multiple tile numbers 2. For each tile number 2 encountered, the map service checks if a matching tile number exists in the tile numbers stored in the smartwatch 2 (i.e., the tile numbers of the tile data stored in the smartwatch 2). If a matching tile number exists in the tile numbers stored in the smartwatch 2, then the tile data 2 corresponding to that tile number 2 is already stored in the smartwatch 2, and this tile number 2 is identified as tile number 4. Otherwise, the tile data stored in the smartwatch 2 does not include the tile data 2 corresponding to that tile number 2, and this tile number 2 is identified as tile number 3. In this way, tile number 4 can be determined from multiple tile numbers 2, thus obtaining tile number 3.
[0352] Optionally, as explained above regarding map index files, map services can maintain tile index information (including tile numbers) of stored tile data through map index files. Therefore, map services can determine tile number 3 from multiple tile numbers 2 by determining whether the map index file includes tile number 2.
[0353] S211, the map service obtains the download address of tile data 3 from the map server based on the reference address corresponding to tile number 3.
[0354] The download address can point to the storage address of the tile data on the map server. Specifically, the download address is determined based on the reference address of the tile data. For example, the reference address is a concatenated download URL, and correspondingly, the download address can be the actual download URL. Specifically, the actual download URL can be a temporary download link with a certain time limit.
[0355] In some embodiments, after determining tile number 3, the map service sends an address retrieval request to the map server. This request requests the download address of tile data 3 from the map server and may include a reference address corresponding to tile number 3 (e.g., a concatenated download URL). Upon receiving the address retrieval request, the map server verifies its validity based on the reference address of tile data 3. If the address retrieval request is successfully verified, the map server returns the download address (e.g., the actual download URL) of tile data 3 to the map service.
[0356] In practical applications, map services can maintain download addresses for the tile data to be downloaded through a tile download list. For example, continuing with road segment 2, after the map service obtains the download address of tile data 3 according to the above process, it adds the download address of tile data 3 to the tile download list.
[0357] It is understood that the process of obtaining the download address of tile data 3 described above is only an example. In some other embodiments, continuing to take road segment 2 as an example, the map service can determine all tile numbers 3 from multiple tile numbers 2. After determining the multiple tile numbers 3, it obtains the download addresses of multiple tile data 3 corresponding to the multiple tile numbers 3 from the map server and adds the download addresses of the multiple tile data 3 to the tile download list.
[0358] S212, The map service sends the download address of tile data 3 to the sports field module.
[0359] Specifically, the map service can return a list of tile downloads to the sports field module, which includes the download address of tile data 3. It can be understood that tile data 3 can be one or multiple.
[0360] Additionally, the map service can register a callback with the general file module so that when the general file module receives tile data 3, it can return a tile transmission completion notification to the map service.
[0361] In some embodiments, after obtaining the download address of tile data 3, the map service can also send a response message to the third-party map SDK. The response message indicates that the map service has obtained the download address of tile data 3 from the third-party map SDK. After receiving the response message, the third-party map SDK maintains the offline tile information according to tile number 3.
[0362] It should be noted that the process of sending the download address of tile data 3 (i.e., S213) and the process of sending the response message can be executed sequentially, such as executing S213 first and then executing the process of sending the response message; or, the process of sending the download address of tile data 3 and the process of sending the response message can be executed simultaneously. This application embodiment does not limit the execution order of the process of sending the download address of tile data 3 and the process of sending the response message.
[0363] The specific implementation process of S210 to S212 can be found in the following text. Figure 21 The explanation will not be repeated here.
[0364] S213, the sports field module sends a tile download request 2 to the sports and health APP. The tile download request 2 is used to request tile data 3 from the sports and health APP. The tile download request 2 can carry the download address of tile data 3.
[0365] S214, in response to tile download request 2, the Sports & Health APP obtains tile data from the map server 3.
[0366] In other words, after receiving tile download request 2, the Sports and Health APP interacts with the map server and sends tile download request 2 to the map server in order to download tile data 3 from the map server according to the download address of tile data 3.
[0367] S215, the Sports & Health APP sends tile data 3 to the smartwatch 2, and the general file module of the smartwatch 2 receives the tile data 3 sent by the Sports & Health APP.
[0368] Specifically, the fitness and health app can send tile data 3 to the smartwatch 2 via the Bluetooth module of the phone 1. The smartwatch 2 can receive the tile data 3 via the universal file module.
[0369] S216 After receiving tile data 3, the general file module sends a tile transmission completion notification to the map service. The tile transmission completion notification is used to indicate that tile data 3 has been transmitted successfully.
[0370] S217, after receiving the tile transmission completion notification, the map service stores tile data 3.
[0371] After receiving the tile data 3 of road segment 2 transmitted by mobile phone 1, the map service stores the tile data 3, that is, the transmission of the map data corresponding to road segment 2 is completed.
[0372] The specific implementation process of S217 can be found in the following description of storing tile data, and will not be repeated here.
[0373] The following section continues using road segment 2 as an example to further explain the process of determining tile number 3 from multiple tile numbers 2 and obtaining the download address of tile data 3 corresponding to tile number 3. That is, it further explains the specific implementation process of S210 to S212 described above. In this embodiment, the execution entity is the map service in a smartwatch.
[0374] For example, Figure 21 This is a schematic diagram of another map data processing method provided in the embodiments of this application, as shown below. Figure 21 As shown, the map data processing method may include:
[0375] S301, after obtaining multiple tile information (i.e. multiple tile numbers 2 and multiple reference addresses) corresponding to road segment 2 from the third-party map SDK, the map service stores the road segment ID of road segment 2 into the road segment index information (such as the road segment ID array) and obtains the index position corresponding to road segment 2.
[0376] The index position corresponding to a road segment refers to the index position of the road segment ID in the road segment index information, that is, the index subscript of the road segment ID.
[0377] S302, the map service traverses multiple tile numbers 2.
[0378] S303, for each tile number 2 encountered, the map service determines whether there is a tile number matching tile number 2 in the tile number stored in smartwatch 2 (i.e., the tile number corresponding to the tile data stored in the smartwatch). If there is a tile number matching tile number 2, execute S304; otherwise, execute S305.
[0379] For example, the map service can maintain tile index information (including tile numbers) of the stored tile data through the map index file. Specifically, for each tile number 2 encountered, the map service determines whether the map index file includes tile number 2. If the map index file includes tile number 2, it means that the smartwatch 2 stores a tile number that matches tile number 2, i.e., the tile data 2 corresponding to tile number 2 is stored in the smartwatch 2. Otherwise, it means that the smartwatch 2 stores a tile number that matches tile number 2, i.e., the smartwatch 2 does not store the tile data corresponding to tile number 2.
[0380] S304, The map service establishes the association between tile data 2 corresponding to tile number 2 and road segment 2 based on the index location corresponding to road segment 2.
[0381] In other words, if there is a tile number in the tile numbers stored in smartwatch 2 that matches tile number 2 (i.e., tile number 2 has been stored in the map index file), the map service establishes the association between the tile data 2 corresponding to tile number 2 and road segment 2.
[0382] In some embodiments, the association between tile data and road segments can be represented by the reference relationship information corresponding to the tile data. That is, establishing the association between tile data and road segments can be understood as updating the reference relationship information corresponding to the tile data based on the road segment ID.
[0383] Specifically, based on tile number 2, the map service can retrieve the tile index information of tile data 2 corresponding to tile number 2 from the map index information. From the tile index information of tile data 2, it can obtain the reference relationship information of tile data 2. This reference relationship information of tile data 2 includes multiple reference states. Each reference state corresponds to a road segment stored in the smartwatch. It can be understood that the road segment stored in the smartwatch is the road segment corresponding to the road segment ID stored in the road segment index information. Based on the index position corresponding to road segment 2, the reference state corresponding to road segment 2 is determined from multiple reference states. The state value of the reference state corresponding to road segment 2 is updated from the first value (e.g., 0) to the second value (e.g., 1).
[0384] For example, taking the reference relationship information as a 32-bit array and the road segment index information as a road segment ID array as an example, establishing the association between tile data 2 corresponding to tile number 2 and road segment 2 can include: the map service obtains the index position corresponding to road segment 2, determines the bit in the 32-bit array corresponding to road segment 2 based on the index position corresponding to road segment 2, and updates the status value of the bit corresponding to road segment 2 from 0 to 1, which means that there is an association between road segment 2 and tile data 2 corresponding to tile number 2.
[0385] The following is combined Figure 19 This paper uses a specific scenario to illustrate the process of updating the reference relationship information of the tile data already stored in a smartwatch.
[0386] For example, if a smartwatch stores map data for road segment 1, and the transmitted data is for road segment 2, then... Figure 19 As shown in (b), in the tile data corresponding to road segment 2, tile data 04, tile data 06, tile data 07, and tile data 08 are already stored in the merged file 1 corresponding to road segment 1. Therefore, when transmitting the map data of road segment 2, the association between these tile data (i.e., tile data 04, tile data 06, tile data 07, and tile data 08) and road segment 2 is established to indicate that these tile data are shared by road segment 1 and road segment 2 (e.g., represented as 1&2).
[0387] Taking a smartwatch that stores map data for road segment 1 and road segment 2, and transmits road segment 3 as an example, Figure 19 As shown in (c), multiple tile data corresponding to road segment 3, tile data 03, tile data 05, tile data 07, and tile data 08, are already stored in the merged file 1 corresponding to road segment 1. Therefore, when transmitting the map data of road segment 3, the association between these tile data (i.e., tile data 03, tile data 05, tile data 07, and tile data 08) and road segment 3 is established to indicate that tile data 03 and tile data 05 are tile data shared by road segment 1 and road segment 3 (e.g., represented as 1&3), and tile data 07 and tile data 08 are tile data shared by road segment 1, road segment 2, and road segment 3 (e.g., represented as 1&2&3).
[0388] Similarly, among the multiple tile data corresponding to road segment 3, tile data 11 and tile data 12 are already stored in the merged file 2 corresponding to road segment 2. Therefore, when transmitting the map data of road segment 3, the association between these tile data (i.e., tile data 11 and tile data 12) and road segment 3 is established to indicate that these tile data (i.e., tile data 11 and tile data 12) are tile data shared by road segments 2 and 3 (i.e., represented as 2&3).
[0389] Taking a smartwatch that stores map data for road segments 1, 2, and 3, and transmits road segment 4 as an example, Figure 19As shown in (d), among the multiple tile data corresponding to road segment 4, tile data 02, tile data 04, tile data 05, and tile data 07 are already stored in the merged file 1 corresponding to road segment 1. Therefore, when transmitting the map data of road segment 4, the association between these tile data (i.e., tile data 02, tile data 04, tile data 05, and tile data 07) and road segment 4 is established to indicate that tile data 02 is tile data shared by road segment 1 and road segment 4 (e.g., denoted as 1&4), tile data 04 is tile data shared by road segment 1, road segment 2, and road segment 4 (e.g., denoted as 1&2&4), tile data 05 is tile data shared by road segment 1, road segment 3, and road segment 4 (e.g., denoted as 1&3&4), and tile data 07 is tile data shared by road segment 1, road segment 2, road segment 3, and road segment 4 (e.g., denoted as 1&2&3&4).
[0390] Similarly, among the multiple tile data corresponding to road segment 4, tile data 12 has already been stored in the merged file 2 corresponding to road segment 2. Therefore, when transmitting the map data of road segment 4, the association between tile data 12 and road segment 4 is established to indicate that tile data 12 is tile data shared by road segments 2, 3 and 4 (i.e., represented as 2&3&4).
[0391] Similarly, among the multiple tile data corresponding to road segment 4, tile data 16 has already been stored in the merged file 3 corresponding to road segment 3. Therefore, when transmitting the map data of road segment 4, the association between tile data 16 and road segment 4 is established to indicate that tile data 16 is tile data shared by road segment 3 and road segment 4 (i.e., represented as 3&4).
[0392] In this embodiment, if tile number 4 exists among multiple tile numbers 2, it indicates that some tile data in the tile data corresponding to road segment 2 has been stored in the wearable device. Therefore, an association is established between the tile data corresponding to tile number 4 and road segment 2. Thus, when the smartwatch deletes other road segments besides road segment 2, if the tile data corresponding to those other road segments includes tile data 2 corresponding to tile number 2, based on the association between tile data 2 corresponding to tile number 2 and road segment 2, it can be determined that tile data 2 corresponding to tile number 2 belongs to the tile data corresponding to road segment 2. Therefore, when deleting other road segments, only the tile data used individually by those other road segments is deleted, without deleting tile data 2 corresponding to tile number 2. This avoids the accidental deletion of tile data associated with road segment 2 and does not affect the normal use of the map data for road segment 2.
[0393] S305, the map service determines tile number 2 as tile number 3 and obtains the download address of tile data 3 corresponding to tile number 3. After obtaining the download address of tile data 3, execute S306.
[0394] In other words, after determining that there is no matching tile number 2 in the tile numbers stored in smartwatch 2 (i.e., tile number 2 is not stored in the map index file), the map service obtains the download address of tile number 3 from the third-party map SDK. Specifically, the map service can record the download address of the obtained tile data 3 in the tile download list.
[0395] S306, the map service determines whether the traversal of multiple tile numbers 2 has been completed. If the traversal is complete, execute S307; otherwise, execute S302.
[0396] S307, The map service sends the download address of tile data 3 to the sports field module.
[0397] Specifically, the map service can return a tile download list to the sports field module, which includes the download address of tile data 3. After receiving the download address of tile data 3, the sports field module can send tile download request 2 to the sports and health APP to request tile data 3 (i.e., execute process S213), which will not be elaborated here.
[0398] In this embodiment, when a mobile phone requests the transmission of map data for a certain road segment (e.g., road segment 2) to a smartwatch, the smartwatch can determine multiple tile numbers 2 corresponding to road segment 2. After determining the multiple tile numbers 2, the smartwatch can determine whether tile number 4 exists among the multiple tile numbers 2. If tile number 4 exists among the multiple tile numbers 2, it means that some tile data 2 of the multiple tile data 2 corresponding to road segment 2 has been stored in the smartwatch. That is, this part of the tile data 2 has been obtained when transmitting map data for other road segments. Therefore, the smartwatch obtains the tile data 3 corresponding to tile number 3 from the mobile phone based on tile number 3 other than tile number 4 among the multiple tile numbers 2. In this way, for tile data shared by multiple road segments, it only needs to be obtained once, avoiding repeated acquisition of the same tile data and improving the map data transmission speed.
[0399] Furthermore, after the smartwatch determines the tile data 3 to be downloaded for road segment 2, it sends the download address of the tile data 3 to the mobile phone. The mobile phone then downloads the required tile data 3, and after the download is complete, it returns the tile data 3 to the smartwatch via Bluetooth. This enables offline downloading of map data, reducing reliance on network conditions. Even in low-network environments, the smartwatch can promptly obtain map data for the road segment, allowing users to view surrounding map information on the smartwatch and improving the user experience.
[0400] 2. Tile Data Storage Process
[0401] In the embodiments of this application, as mentioned above... Figure 17As explained, tile data can be stored in two ways: individual storage and merged storage. Therefore, when storing tile data for a road segment, the map service can determine the storage method for that segment. If the storage method for that road segment is merged, the multiple tile data points corresponding to that road segment are merged and stored together to obtain a merged file for that road segment. If the storage method for that road segment is individual storage, each tile data point corresponding to that road segment is stored as an independent tile file, resulting in multiple tile files.
[0402] The process of storing tile data (i.e., the process described in S107 or S115 above) will be further explained below. In this embodiment, the execution entity is the map service in the smartwatch.
[0403] For example, Figure 22 This is a schematic diagram of yet another map data processing method provided in this application embodiment. Please refer to... Figure 22 Taking road segment 2 as an example, the process of storing tile data (i.e., the process described in S115 above) may include:
[0404] S401: After receiving the tile transmission completion notification sent by the general file module, the map service determines whether the multiple tile data 3 corresponding to road segment 2 meet the conditions for merging and storing. If the multiple tile data 2 meet the conditions for merging and storing, then execute S402; otherwise, execute S403.
[0405] In some embodiments, the merging storage condition is related to the data size of the tile data. In one specific embodiment, the merging storage condition is that the data size of each tile data in multiple tile data corresponding to a road segment is less than or equal to a preset data volume threshold.
[0406] Specifically, taking road segment 2 as an example, the map service can obtain the data size of each tile data 3 from multiple tile data 3. It determines whether the data size of each tile data 3 is less than or equal to a preset data volume threshold; if the data size of each tile data 3 is less than or equal to the preset data volume threshold, it is determined that the multiple tile data 3 corresponding to road segment 2 meet the conditions for merging and storing; otherwise, it is determined that the multiple tile data 3 corresponding to road segment 2 do not meet the conditions for merging and storing.
[0407] It should be noted that smartwatch file systems typically store files in blocks or clusters as the smallest storage unit. Even if the data size of a stored file is smaller than a block or cluster, the entire block or cluster space will still be occupied by that file. Therefore, the preset data size threshold can be set based on the size of the smallest storage unit of the smartwatch's file system. For example, the preset data size threshold can be the size of a cluster, such as 32KB. That is, when the data size of each tile in multiple tile data corresponding to a road segment is less than or equal to 32KB, the multiple tile data corresponding to that road segment will be merged and stored. Of course, the preset data size threshold can also be set according to specific circumstances, and this application embodiment does not limit this.
[0408] In this embodiment, because the image complexity of the tile map affects the compression ratio of the tile data, at the same scaling level, the data size of tile data in different areas may vary significantly even if the covered area size is the same. For example, areas with green grasslands or blue water bodies have smaller tile data, while areas with complex buildings have larger tile data. To address this, this embodiment provides two storage methods: merged storage and separate storage. The appropriate method can be selected based on the size of the tile data corresponding to a road segment.
[0409] Specifically, when storing tile data for a certain road segment, the smartwatch can determine whether the size of each tile corresponding to that road segment is less than or equal to a preset data size threshold. If the size of each tile corresponding to that road segment is less than or equal to the preset data size threshold, the tile data for that road segment is merged and stored; otherwise, each tile is stored separately. In other words, this embodiment supports both merging and storing small tile data, as well as storing small tile data separately, offering greater flexibility in storage methods. This fully utilizes the smartwatch's storage space and reduces the storage space occupied by the road segment's map data.
[0410] For example, consider a road segment containing 10 tile data points, each with a data size of 10k. If these 10 tile data points are stored separately, they would occupy 10 clusters (320k) of storage space. However, by merging and storing these 10 tile data points as described above, they only occupy one cluster (32k) of storage space.
[0411] S402, the map service merges and stores multiple tile data 3.
[0412] Specifically, the map service can create a merge file for road segment 2, and write multiple tile data 3 into the merge file for road segment 2 in a certain order.
[0413] For example, such as Figure 19 As shown in (d), the tile data of road segment 1 is merged and stored to obtain merged file 1. The tile data of road segment 2 is merged and stored to obtain merged file 2. The tile data of road segment 3 is merged and stored to obtain merged file 3. The tile data of road segment 4 is merged and stored to obtain merged file 4.
[0414] S403, the map service stores and processes each tile data 3 separately.
[0415] In other words, each tile data 3 is stored as a separate tile file.
[0416] S404, The map service obtains file information for each tile data 3. The file information may include at least one of the following: data size information, offset information, and the file name of the tile file.
[0417] S405, for each tile data 3, the map service generates tile index information corresponding to tile data 3, and the tile index information includes at least the file information of tile data 3.
[0418] In some examples, the tile index information also includes reference relationship information.
[0419] In other words, after storing tile data (i.e., executing S402 or S403 above), the map service obtains the file information of the tile data and records the tile key, file information, reference relationship information, etc. of the tile data in the map index file, thus generating a tile index information corresponding to the tile data.
[0420] For example, when generating the tile index information corresponding to tile data 3, the map service checks whether there is any tile index information with an invalid index status in the index map file. If there is no invalid tile index information in the index map file, a new tile index information is added to the map index file. This tile index information may include the tile key, data size information, tile file name, offset information, and reference relationship information of tile data 3, and the index status value is set to 1. Otherwise, the invalid tile index information is updated, that is, the tile key, data size information, tile file name, offset information, and reference relationship information of tile data 3 are updated into the invalid tile index information, and the index status value of the invalid tile index information is changed from 0 to 1.
[0421] Specifically, the reference relationship information of tile data 3 is updated, that is, the association between tile data 3 and road segment 2 is established. In other words, after storing the tile data corresponding to a road segment, the map service establishes the association between the tile data and the corresponding road segment.
[0422] For example, such as Figure 19 As shown in (a), after storing the tile data of road segment 1, the smartwatch establishes the association between the tile data (such as tile data 01, tile data 02, tile data 03, tile data 04, tile data 05, tile data 06, tile data 07 and tile data 08) and road segment 1.
[0423] For example, if a smartwatch stores map data for road segment 1, and the transmitted data is for road segment 2, then... Figure 19 As shown in (b), for the tile data corresponding to road segment 2, tile data 09, tile data 10, tile data 11, and tile data 12 are not present in the tile data stored in the smartwatch. Therefore, when transmitting map data for road segment 2, these tile data (i.e., tile data 09, tile data 10, tile data 11, and tile data 12) are acquired and stored, and the association between these tile data (i.e., tile data 09, tile data 10, tile data 11, and tile data 12) and road segment 2 is established.
[0424] For example, if a smartwatch stores map data for road segment 1 and road segment 2, and the transmitted road segment is road segment 3, then... Figure 19 As shown in (c), for the tile data corresponding to road segment 3, tile data 15, tile data 16, tile data 17, and tile data 18 are not present in the tile data stored in the smartwatch. Therefore, when transmitting the map data of road segment 3, these tile data (i.e., tile data 15, tile data 16, tile data 17, and tile data 18) are acquired and stored, and the association between these tile data (i.e., tile data 15, tile data 16, tile data 17, and tile data 18) and road segment 2 is established.
[0425] For example, if a smartwatch stores map data for road segment 1, road segment 2, and road segment 3, and the transmitted road segment is road segment 4, then... Figure 19 As shown in (d), for the multiple tile data corresponding to road segment 4, tile data 19, tile data 20, and tile data 21 are not present in the tile data stored in the smartwatch. Therefore, when transmitting map data for road segment 4, these tile data (i.e., tile data 19, tile data 20, and tile data 21) are acquired and stored, and the association between these tile data (i.e., tile data 19, tile data 20, and tile data 21) and road segment 2 is established.
[0426] The specific implementation process for establishing the relationship between tile data and road segments can be found in the previous section S304, and will not be repeated here.
[0427] In this embodiment, when a mobile phone transmits map data for a certain road segment to a smartwatch, tile data shared by multiple road segments only needs to be acquired once. Therefore, identical tile data only needs to be stored once, avoiding redundant storage of tile files and reducing the storage space occupied by tile data. Furthermore, for higher tile levels, even if different road segments have a higher probability of using the same tile data, redundant storage of tile files can be reduced to a greater extent, saving storage space.
[0428] Furthermore, after storing tile data, the smartwatch generates tile index information based on the tile number, file information, and reference relationships. This allows the smartwatch to retrieve the file information of the corresponding tile data when displaying a map of a specific road segment, and then read the tile data based on that file information. This is different from directly retrieving all tile data for a road segment from the segment's information. Therefore, while storing only one copy of the same tile data shared across different road segments, it enables the reuse of the same tile data across multiple road segments.
[0429] 3. Tile data deletion process
[0430] It is understood that in this embodiment, the smartwatch 2 may include multiple synchronized road segments, that is, the smartwatch 2 stores multiple tile data. For ease of description, the tile data stored in the smartwatch 2 will be referred to as synchronized tile data below.
[0431] In some embodiments, in response to a map deletion operation targeting a specific road segment, the smartwatch 2 determines multiple tile data corresponding to that road segment from a pool of synchronized tile data. For each tile data corresponding to that road segment, it determines whether the tile data is used by other synchronized road segments in the smartwatch. If the tile data is used by other synchronized road segments in the smartwatch, the tile data is not deleted, but its storage location and corresponding tile index information are updated; otherwise, the tile data is deleted. In other words, when deleting map data for a road segment, only the tile data used exclusively by that road segment is deleted.
[0432] For example, such as Figure 23 As shown in (a), the smartwatch can include tile data for road segments 1, 2, 3, and 4. Figure 23As shown in (b), when deleting segment 1, only the tile data used solely by segment 1, i.e., tile data 01, is deleted. The tile data associated with segment 2 (i.e., tile data 04, tile data 06, tile data 07, and tile data 08) are transferred to the merge file 2 corresponding to segment 2; the tile data associated with segment 3 (i.e., tile data 03 and tile data 05) are transferred to the merge file 3 corresponding to segment 3; and the tile data associated with segment 4 (i.e., tile data 02) is transferred to the merge file 4 corresponding to segment 4. Furthermore, the reference relationship information for each tile data is updated.
[0433] The following section, taking road segment 2 as an example, will further explain the process of deleting tile data, that is, further explain the specific implementation process of S118 and S119 above.
[0434] For example, Figure 24 This is a schematic diagram of another map data processing method provided in the embodiments of this application.
[0435] Please see Figure 24 The process of deleting tile data may include:
[0436] S501, in response to the map deletion operation of road segment 2, the sports field module sends a map deletion request to the map service. The map deletion request is used to request the deletion of map data for road segment 2, and the map deletion request may include the road segment ID of road segment 2.
[0437] The map deletion operation can be used to trigger the deletion of map data for road segment 2. For example, taking road segment 2 as... Figure 13 Taking the sports park road segment shown in (b) as an example, the map deletion operation can be a user's click operation on the "Delete Road Segment" control 241 or a click operation on the "Clear Map Data" control. This application embodiment does not limit this.
[0438] S502, in response to a map deletion request, the map service traverses multiple synchronized tile data stored in the smartwatch 2.
[0439] Specifically, since the smartwatch records the tile index information of all synchronized tile data through a map index file, the map service's traversal of multiple synchronized tile data in the smartwatch 2 can be understood as traversing all tile index information in the map index file.
[0440] S503, for each synchronized tile data traversed, the map service determines whether there is a relationship between the synchronized tile data and road segment 2 based on the road segment ID of road segment 2. If there is a relationship between the synchronized tile data and road segment 2, then execute S504; otherwise, execute S507.
[0441] In one embodiment, the map service can determine whether there is a correlation between the synchronized tile data and road segment 2 based on the reference relationship information of the synchronized tile data.
[0442] Specifically, for each synchronized tile data (i.e., each tile index information) encountered, the map service can determine the reference status of road segment 2 based on its index location (i.e., the index subscript of the road segment ID corresponding to road segment 2) from the reference relationship information of the synchronized tile data. Based on the reference status of road segment 2, it determines whether there is a relationship between road segment 2 and the synchronized tile data. If the reference status value of road segment 2 is the first value (e.g., 0), it indicates that there is no relationship between road segment 2 and the synchronized tile data. If the reference status value of road segment 2 is the second value (e.g., 0), it indicates that there is a relationship between road segment 2 and the synchronized tile data, meaning that the synchronized tile data belongs to the tile data corresponding to road segment 2.
[0443] Optionally, before determining whether there is a correlation between the synchronized tile data and road segment 2, the map service can obtain the index status of the tile index information of the synchronized tile data. Based on the index status, it can determine whether the tile index information of the synchronized tile data is valid. If the tile index information of the synchronized tile data is valid, it means that the tile data corresponding to the tile index information is stored in the smartwatch. Then, it continues to determine whether there is a correlation between the synchronized tile data and road segment 2. Otherwise, it iterates through the tile index information of the next synchronized tile data. In other words, if the tile index information of the synchronized tile data is valid and there is a correlation between the synchronized tile data and road segment 2, it is determined that the synchronized tile data is the tile data corresponding to road segment 2.
[0444] In some embodiments, the map service can record the tile data to be deleted through a tile deletion list. After determining that there is a relationship between the synchronized tile data and road segment 2, the map service can add the tile key of the synchronized tile data to the tile deletion list.
[0445] S504, the map service determines whether the synchronized tile data is associated with at least one other synchronized road segment in the smartwatch. If the synchronized tile data is associated with at least one other synchronized road segment in the smartwatch, then execute S505; otherwise, execute S506.
[0446] In one embodiment, similar to S503, the map service can also determine whether the synchronized tile data is associated with at least one other synchronized road segment in the smartwatch based on the reference relationship information of the synchronized tile data.
[0447] Specifically, the map service can obtain the reference status of other synchronized road segments besides road segment 2 from the reference relationship information of the synchronized tile data. Based on the reference status of other synchronized road segments, it can determine whether there is a relationship between the synchronized tile data and other synchronized road segments. Taking any other synchronized road segment as an example, if the status value of the reference status corresponding to the other synchronized road segment is the first value (e.g., 0), it means that there is no relationship between the synchronized tile data and other synchronized road segments. If the status value of the reference status corresponding to the other synchronized road segment is the second value (e.g., 1), it means that there is a relationship between the synchronized tile data and other synchronized road segments. In other words, if the status value of the reference status corresponding to road segment 2 is 1 and the status values of other reference statuses are all 0 in the reference relationship information of the synchronized tile data, it means that the synchronized tile data has no relationship with any other synchronized road segments in the smartwatch, that is, the synchronized tile data is tile data used solely by road segment 2.
[0448] S505, the map service updates the storage location of the synchronized tile data and updates the tile index information of the synchronized tile data.
[0449] Specifically, after determining that there is a correlation between the synchronized tile data and road segment 2, and that the synchronized tile data is also correlated with at least one other synchronized road segment in smartwatch 2 (meaning the synchronized tile data is shared by both road segment 2 and at least one other synchronized road segment), the map service stores the synchronized tile data in the merged file corresponding to the target road segment. The target road segment is any one of the other synchronized road segments that is correlated with the synchronized tile data. After updating the storage location of the tile data, the tile index information corresponding to the tile data is updated according to the updated file information to ensure that other synchronized road segments can read the tile data. Additionally, the reference relationship information of the synchronized tile data is updated. For example, the reference status corresponding to road segment 2 in the reference relationship information is updated to a first value (e.g., 0), and the filename and offset information of the tile file containing the synchronized tile data are updated.
[0450] In addition, the map service will remove synchronized tile data from the tile deletion list.
[0451] S506, the map service identifies the synchronized tile data as tile data to be deleted (i.e., tile data 5 mentioned above).
[0452] Specifically, after determining that there is a correlation between the synchronized tile data and road segment 2, and that there is no correlation between the synchronized tile data and other synchronized road segments in smartwatch 2 (meaning the synchronized tile data is used solely by road segment 2), the map service identifies the synchronized tile data as tile data to be deleted. Furthermore, the map service can update the index status of the synchronized tile data's tile index information to invalid.
[0453] S507, the map service determines whether it has finished traversing the multiple synchronized tile data stored in smartwatch 2. If the traversal is complete, execute S508; otherwise, execute S502.
[0454] S508, Map service deletes tile data to be deleted.
[0455] Specifically, the map service deletes all tile data recorded in the tile deletion list to free up storage space.
[0456] S509, the map service updates the road segment index information based on the road segment ID of road segment 2.
[0457] In some embodiments, after deleting the map data of road segment 2, the map service sets the road segment ID corresponding to road segment 2 in the road segment index information to empty, so as to indicate that the map data of road segment 2 has been deleted.
[0458] In this embodiment, when deleting map data for a road segment, the smartwatch can determine whether there are tile data used by other road segments among the multiple tile data corresponding to that road segment. If such tile data exists, only the tile data used by that road segment is deleted, while the tile data shared by that road segment and other road segments is retained. This avoids the situation where deleting map data for one road segment renders the map data of other road segments that share tile data unusable, thus improving the flexibility of map data processing.
[0459] For example, when deleting map data for road segment 2, only the tile data used by road segment 2 alone is deleted, while the tile data shared by road segment 2 and road segment 1 is not deleted. In this way, it will not affect the user's use of map data for road segment 1.
[0460] 4. Tile data display process
[0461] The process of displaying tile data will be further explained below, that is, the specific implementation process of the above-mentioned S116 to S117, or S120 to S121, will be further explained.
[0462] In some embodiments, in response to a map viewing operation for a specific road segment, the smartwatch 2 determines the tile data to be displayed based on the geographical location information of that road segment. Then, it retrieves the tile data to be displayed from stored synchronized tile data, stitches the tile data to be displayed together, and generates and displays a map of the area where that road segment is located.
[0463] For example, Figure 25 This is a schematic diagram of yet another map data processing method provided in the embodiments of this application. The following is in conjunction with... Figure 25Continuing with section 2 as an example, we will further explain the process of displaying tile data.
[0464] Please see Figure 25 The process of displaying tile data may include:
[0465] S601, in response to the map viewing operation 1 for road segment 2, the sports field module sends a map viewing request to the map service. The map viewing request is used to request map data of road segment 2 from the map service. The map viewing request may include the road segment ID of road segment 2.
[0466] Map view operation 1 can be used to trigger the viewing of map data for road segment 2. For example, taking road segment 2 as... Figure 12 Taking the sports park section shown in (b) as an example, map viewing operation 1 can be a response to the user's click operation on the "sports park section" watch section option 221, and this is not limited in this embodiment.
[0467] S602, in response to the map viewing request, the map service obtains the feature point information of road segment 2 from the sports field module based on the road segment ID of road segment 2.
[0468] S603, the map service sends a map processing request to the third-party map SDK. The map processing request is used to request the tile data of road segment 2 from the map service. The map processing request can carry the feature point information of road segment 2.
[0469] S604, the third-party map SDK determines tile number 5 based on the feature point information of road segment 2.
[0470] The feature point information for road segment 2 can include the coordinate information of multiple feature points (i.e., geographical locations) within road segment 2. In a specific embodiment, the third-party map SDK can determine the coordinate information of the center location point based on the coordinate information of multiple feature points in road segment 2, determine the tile coordinates corresponding to the center location point based on the coordinate information of the center location point, and determine tile number 5 based on the zoom level and the tile coordinates corresponding to the center location point. It can be understood that tile number 5 can be one or multiple.
[0471] For details on the specific implementation process of S604, please refer to the specific implementation process of the aforementioned embodiment S207, which will not be repeated here.
[0472] S605, the third-party map SDK obtains the file information of tile data 4 from the map service based on tile number 5.
[0473] Specifically, tile data 4 refers to the tile data corresponding to tile number 5. Correspondingly, tile data 4 can be one or more tiles. Furthermore, it can be understood that tile data 4 represents a portion of the tile data corresponding to all tiles for road segment 2. Of course, tile data 4 can include tile data shared by road segment 2 and road segment 1.
[0474] The file information may include at least one of the following: data size information, offset information, and the file name of the tile file.
[0475] Specifically, the third-party map SDK sends a file information retrieval request to the map service. This request requests the file information of tile data 4 corresponding to tile number 5. The file information retrieval request can include tile number 5. In response to the file information retrieval request, the map service checks if tile index information corresponding to tile number 5 exists in the map index file. If such tile index information exists, the map service retrieves the file information of tile data 4 corresponding to tile number 5 from the tile index information and returns the file information of tile data 4 to the third-party map SDK. Upon receiving the file information of tile data 4, the third-party map SDK retrieves tile data 4 from its local file.
[0476] If the tile index information corresponding to tile number 5 does not exist in the map index file, a message indicating that the file information was not found is sent to the third-party map SDK. Understandably, after receiving this message, the third-party map SDK can retrieve the corresponding tile data from the map server.
[0477] S606, after receiving the file information of tile data 4, the third-party map SDK obtains tile data 4 based on the file information of tile data 4.
[0478] S607, the third-party map SDK generates map data corresponding to road segment 2 based on tile data 4.
[0479] Specifically, the third-party map SDK stitches together multiple tile data 4 to obtain the map data corresponding to road segment 2.
[0480] S608, the third-party map SDK sends the map data corresponding to road segment 2 to the map service.
[0481] S609, the map service sends the map data corresponding to road segment 2 to the sports field module.
[0482] S610, the sports field module displays the map data corresponding to road segment 2.
[0483] In some embodiments, after selecting a route, the user can move according to the route trajectory displayed on the map. During the movement, the smartwatch 2 can obtain the current location information (i.e., the user's current location), determine and obtain the required tile data based on the current location information, and generate and update the map based on the required tile data. The specific implementation process of updating the map in real time based on the current location information can be found in the specific implementation process of S604 to S610 above, and will not be repeated here.
[0484] In this embodiment, in response to a user's map viewing operation on a road segment, the smartwatch can retrieve the tile data corresponding to the road segment from the stored tile data, and generate and display the map corresponding to the road segment based on the tile data. That is, this embodiment can support the reuse of the same tile data for multiple road segments. For example, since the smartwatch has already stored the tile data corresponding to road segment 1, even if the tile data shared by road segment 2 and road segment 1 is not retrieved when synchronizing road segment 2, the corresponding tile data in road segment 1 can still be reused when displaying the map of road segment 2. This allows the map data of road segment 1 to be used normally without repeatedly retrieving the same tile data.
[0485] The foregoing has detailed examples of map data processing methods provided in the embodiments of this application. It is understood that, in order to achieve the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0486] This application embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0487] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0488] The electronic device provided in this embodiment is used to execute the above-described map data processing method, and therefore can achieve the same effect as the above-described implementation method.
[0489] When using integrated units, the electronic device may further include a processing module, a storage module, and a communication module. The processing module is used to control and manage the operation of the electronic device. The storage module supports the execution of stored program code and data. The communication module supports communication between the electronic device and other devices.
[0490] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a digital signal processor (DSP), and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0491] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment can be a device having... Figure 7 The device with the structure shown.
[0492] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the map data processing method of any of the above embodiments.
[0493] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the map data processing method described in the above embodiments.
[0494] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the map data processing methods in the above-described method embodiments.
[0495] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0496] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0497] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0498] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0499] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0500] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0501] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A map data processing method, characterized in that, The method is applied to a wearable device, which establishes a connection with an electronic device, and the method includes: Receive a first request sent by the electronic device, the first request being used to request the transmission of map data for a first road segment to the wearable device; In response to the first request, a plurality of first tile identifiers corresponding to the first road segment are determined, wherein the first tile identifiers are used to identify the tile data corresponding to the first road segment; If a second tile identifier exists among the plurality of first tile identifiers, then the first tile data corresponding to the third tile identifier is obtained from the electronic device. The second tile identifier refers to the tile identifier whose corresponding tile data has been stored in the wearable device among the plurality of first tile identifiers. The third tile identifier is a tile identifier other than the second tile identifier among the plurality of first tile identifiers.
2. The method according to claim 1, characterized in that, The method further includes: If at least one of the first tile identifiers exists in the tile identifiers corresponding to the tile data stored in the wearable device, then it is determined that the second tile identifier exists among the plurality of first tile identifiers.
3. The method according to claim 1 or 2, characterized in that, If a second tile identifier exists among the plurality of first tile identifiers, then obtaining the first tile data corresponding to the third tile identifier from the electronic device includes: If a second tile identifier exists among the plurality of first tile identifiers, then download information corresponding to the first tile data is obtained from the map server based on the third tile identifier; A second request is sent to the electronic device, the second request being used to request the first tile data from the electronic device, the second request carrying download information corresponding to the first tile data; Receive the first tile data sent by the electronic device.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: Store the data of the first tile; Establish the association between the first tile data and the first road segment.
5. The method according to claim 4, characterized in that, The process of establishing the association between the first tile data and the first road segment includes: Obtain first reference information corresponding to the first tile data. The first reference information includes multiple first parameters. One of the first parameters is used to indicate the association between a road segment stored by the wearable device and the first tile data. The multiple first parameters include a second parameter corresponding to the first road segment. The parameter value of the second parameter is updated from the first preset value to the second preset value. The first preset value is used to indicate that there is no correlation between the first tile data and the first road segment, and the second preset value is used to indicate that there is a correlation between the first tile data and the first road segment.
6. The method according to claim 5, characterized in that, The method further includes: Obtain road segment index information, which is used to record the road segment identifiers stored in the wearable device; Add the first road segment identifier corresponding to the first road segment to the road segment index information; The step of updating the parameter value of the second parameter from the first preset value to the second preset value includes: The second parameter is determined from the plurality of first parameters based on the storage location of the first road segment identifier in the road segment index information; Update the value of the second parameter from the first preset value to the second preset value.
7. The method according to any one of claims 4-6, characterized in that, The number of the first tile data is multiple, and storing the first tile data includes: Obtain the data size of each of the first tile data; If the data size of each first tile is less than or equal to a preset data volume threshold, then multiple first tile data will be merged and stored. If the data size of at least one of the first tile data is greater than the preset data volume threshold, then each of the first tile data will be stored and processed separately.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: If a second tile identifier exists among the plurality of first tile identifiers, obtain the second tile data corresponding to the second tile identifier; Establish the association between the second tile data and the first road segment.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Receive the user's first operation, which is used to display the map corresponding to the first road segment; In response to the first operation, the third tile data is obtained based on the geographical location information of the first road segment; Based on the third tile data, generate a map corresponding to the first road segment; Display the map corresponding to the first road segment.
10. The method according to claim 9, wherein obtaining the third tile data based on the geographical location information of the first road segment includes: Based on the geographical location information of the first road segment, the fourth tile identifier is determined; Based on the fourth tile identifier, determine the file information of the third tile data; The third tile data is obtained based on the file information of the third tile data.
11. The method according to any one of claims 1-10, characterized in that, The method further includes: Receive a second operation from the user, the second operation being used to delete the map data of the first road segment; In response to the second operation, a fourth tile data is determined from the tile data stored in the wearable device, the fourth tile data being the tile data used exclusively by the first road segment; Delete the data for the fourth tile.
12. The method according to claim 11, characterized in that, Determining the fourth tile data from the tile data stored in the wearable device includes: If there is a correlation between the fifth tile data and the first road segment, and there is no correlation between the fifth tile data and other road segments stored in the wearable device, then the fifth tile data is determined as the fourth tile data, and the fifth tile data is any one of the tile data stored in the wearable device.
13. The method according to claim 12, characterized in that, The method further includes: If the fifth tile data is associated with the first road segment, and the fifth tile data is associated with at least one other road segment, then the fifth tile data is stored in the tile file of the second road segment, where the second road segment is any one of the other road segments associated with the fifth tile data. Delete the association between the fifth tile data and the first road segment.
14. The method according to claim 13, characterized in that, After deleting the fourth tile data, the method further includes: Receive a third operation from the user, the third operation being used to display the map corresponding to the second road segment; In response to the third operation, the sixth tile data is obtained based on the geographical location information of the second road segment; Based on the data from the sixth tile, a map corresponding to the second road segment is generated; Display the map corresponding to the second road segment.
15. The method according to any one of claims 12-14, characterized in that, The method further includes: Obtain the second reference information corresponding to the fifth tile data. The second reference information includes multiple third parameters. One of the third parameters is used to indicate the association between a road segment stored by the wearable device and the fifth tile data. The multiple third parameters include a fourth parameter corresponding to the first road segment. If the value of the fourth parameter is the first preset value, then it is determined that there is a correlation between the road segment corresponding to the fourth parameter and the fifth tile data, and the fourth parameter is any one of the plurality of third parameters; If the value of the fourth parameter is the second preset value, then it is determined that there is a correlation between the road segment corresponding to the fourth parameter and the fifth tile data.
16. A map data processing method, characterized in that, The method is applied to an electronic device, which establishes a connection with a wearable device, and the method includes: In response to the fourth operation, a first request is sent to the electronic device, the first request being used to request the transmission of map data for a first road segment to the wearable device; Send the first tile data corresponding to the third tile identifier to the wearable device, wherein the first road segment corresponds to multiple first tile identifiers, the third tile identifier is a tile identifier other than the second tile identifier among the multiple first tile identifiers, and the second tile identifier refers to the tile identifier among the multiple first tile identifiers whose corresponding tile data has been stored in the wearable device.
17. The method according to claim 16, characterized in that, Sending the first tile data corresponding to the third tile identifier to the wearable device includes: The wearable device sends a second request, which requests the first tile data and carries download information corresponding to the first tile data. In response to the second request, the first tile data is obtained from the map server based on the download information of the first tile data; The first tile data is sent to the wearable device.
18. The method according to claim 16 or 17, characterized in that, The method further includes: The electronic device displays a first interface, which includes the road segment options corresponding to the first road segment; The user's fourth operation is received, which is a selection operation of the road segment option corresponding to the first road segment.
19. A wearable device, characterized in that, include: Processor, memory, and interface; The processor, the memory, and the interface cooperate to enable the wearable device to perform the method as described in any one of claims 1 to 15.
20. An electronic device, characterized in that, include: Processor, memory, and interface; The processor, the memory, and the interface cooperate with each other to enable the electronic device to perform the method as described in any one of claims 16 to 18.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 18.