Map display method, device, equipment, medium and program product
By preloading the layer data of public road segments into memory after the navigation route is generated, the problem of slow map display speed in scenarios where vehicles deviate from their course is solved, achieving more efficient display and resource utilization.
Patent Information
- Application Number
- CN202611271611.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-06
AI Technical Summary
In scenarios where vehicles veer off course, existing technologies suffer from slow map display speeds due to real-time interaction with servers to obtain layer data.
After generating multiple navigation routes, public road segments are identified and layer data is preloaded into memory. If the vehicle is traveling on a public road segment, the layer data is retrieved from memory for overlay rendering and display. If the vehicle is traveling on a non-public road segment, the layer data is retrieved from the server.
It improves map display efficiency, reduces memory consumption, and increases preload hit rate, ensuring display continuity and responsiveness.
Smart Images

Figure CN123045396A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of map technology, specifically to a map display method, apparatus, device, medium, and program product. Background Technology
[0002] With the development of technology, navigation systems can provide more and more information and perform more and more functions. Vehicle-mounted terminals or user-defined devices can overlay and render layer data of the current road segment to generate a map image for display by the user.
[0003] In existing technologies, the way maps are displayed is usually by generating a route and then interacting with a server during the journey to obtain the layer data of the current location from the server in real time, overlaying and rendering it to generate a map image for display.
[0004] However, in scenarios where the vehicle veers off course, using real-time interaction with the server to obtain layer data results in a slower display speed. Summary of the Invention
[0005] One objective of this invention is to provide a map display method to solve the problem of slow map display speed caused by real-time interaction with a server to obtain layer data in scenarios where vehicles deviate from their course. A second objective is to provide a map display device. A third objective is to provide an electronic device. A fourth objective is to provide a readable storage medium. A fifth objective is to provide a computer program product.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] In a first aspect, the present invention provides a map display method, comprising:
[0008] After generating multiple navigation routes based on the origin and destination, the common road segments among the multiple navigation routes are determined, and each common road segment is a road segment shared by at least two navigation routes;
[0009] Retrieve the layer data for each public road segment from the server and load it into memory;
[0010] After the yaw generates a new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory.
[0011] Based on the layer data, overlay rendering is performed for display.
[0012] Furthermore, the layer data includes base map layer data, route layer data, and thematic layer data;
[0013] The step of retrieving layer data for each public road segment from the server and loading it into memory includes:
[0014] If the current memory usage is less than the preset first usage threshold, then retrieve the base map layer data, route layer data, and thematic layer data for each public road segment from the server and load them into memory;
[0015] If the current memory usage rate is greater than or equal to the preset first usage rate threshold and less than the preset second usage rate threshold, then the base map layer data and route layer data of each public road segment are obtained from the server and loaded into memory; the preset second usage rate threshold is greater than the preset first usage rate threshold.
[0016] If the current memory usage rate is greater than or equal to the preset second usage rate threshold, the base map layer data of each public road segment is obtained from the server and loaded into memory.
[0017] Furthermore, after obtaining the base map layer data and route layer data of each public road segment from the server and loading them into memory, the method further includes:
[0018] According to the preset order of thematic layer data, thematic layer data for each public road segment is obtained from the server and loaded into memory until the memory utilization rate reaches a preset third utilization rate threshold; the preset third utilization rate threshold is greater than the preset first utilization rate threshold.
[0019] Furthermore, after obtaining the base map layer data of each public road segment from the server and loading it into memory, the method further includes:
[0020] According to the order of travel distance from the starting point to the road segment, the route layer data of each public road segment is sequentially obtained from the server and loaded into memory until the memory utilization rate reaches the preset fourth utilization rate threshold; the preset fourth utilization rate threshold is greater than the preset second utilization rate threshold.
[0021] Furthermore, the method also includes:
[0022] After generating a new route by yaw, the layer data of the first resolution of each non-common segment in the new route is obtained from the server and loaded into memory;
[0023] If the road segment where the vehicle is currently located is a non-public road segment while the vehicle is traveling along the new route, the layer data of the first resolution of the road segment where the vehicle is currently located is obtained from memory.
[0024] Based on the layer data of the first resolution, overlay rendering is performed and the second resolution layer data of the road segment is obtained from the server, wherein the first resolution is smaller than the second resolution;
[0025] The layer data at the second resolution is overlaid and rendered for display.
[0026] Furthermore, before retrieving the layer data of each public road segment from the server and loading it into memory, the method further includes:
[0027] For each public road segment, calculate the yaw usage score of the public road segment based on the score data of the public road segment;
[0028] Based on the yaw usage score and preset score threshold of each public road segment, all public road segments are filtered to obtain the filtered public road segments;
[0029] The step of retrieving layer data for each public road segment from the server and loading it into memory includes:
[0030] Retrieve the layer data of each filtered public road segment from the server and load it into memory.
[0031] Furthermore, after generating multiple navigation routes based on the origin and destination, the method further includes:
[0032] In response to the user's route selection operation, determine the target route among the multiple navigation routes;
[0033] Retrieve layer data for each segment of the target route from the server and load it into memory;
[0034] As the vehicle travels along the target route, the layer data of the road segment where the vehicle is currently located is retrieved from memory;
[0035] Based on the layer data, overlay rendering is performed for display.
[0036] Furthermore, the method also includes:
[0037] The layer data of the road segments that have already been traveled in the target route are deleted from memory.
[0038] In a second aspect, the present invention provides a map display device, comprising:
[0039] The processing module is used to determine the common road segments among the multiple navigation routes after generating multiple navigation routes based on the starting point and the ending point. Each common road segment is a road segment shared by at least two navigation routes.
[0040] The acquisition module is used for:
[0041] Retrieve the layer data for each public road segment from the server and load it into memory;
[0042] After the yaw generates a new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory.
[0043] The display module is used to perform overlay rendering and display based on the layer data.
[0044] Thirdly, the present invention provides an electronic device, comprising:
[0045] Processor, memory, communication interface, and display;
[0046] The memory is used to store the executable instructions of the processor;
[0047] The processor is configured to execute the map display method according to any one of the first aspects by executing the executable instructions.
[0048] Fourthly, the present invention provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the map display method described in any of the first aspects.
[0049] Fifthly, the present invention provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the map display method described in any of the first aspects.
[0050] The beneficial effects of this invention are:
[0051] (1) This application generates multiple navigation routes based on the starting point and the ending point, determines the common road segments among the multiple navigation routes, and then obtains the layer data of each common road segment from the server and loads it into memory. After the vehicle generates a new route by yaw, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is obtained from memory; and the layer data is overlaid and rendered according to the layer data. By preloading the layer data of the common road segments, the preloaded layer data can be directly used for display when the vehicle yaws to a common road segment, thus improving the display efficiency.
[0052] (2) This application reduces memory overhead by preloading only the layer data of public road sections;
[0053] (3) By loading the layer data of public road segments, the probability of the new route passing through public road segments is relatively high, which improves the preloading hit rate. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 A schematic diagram of the public road sections provided for this application;
[0056] Figure 2 The new route diagram provided for this application;
[0057] Figure 3 A flowchart illustrating an embodiment of the map display method provided in this application;
[0058] Figure 4 A flowchart illustrating Embodiment 2 of the map display method provided in this application;
[0059] Figure 5 A schematic diagram of the road sections already traversed for this application;
[0060] Figure 6 A schematic diagram of the structure of an embodiment of the map display device provided in this application;
[0061] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application.
[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0063] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0064] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0065] With the development of technology, navigation systems can provide more and more information and perform more and more functions. Vehicle-mounted terminals or user-defined devices can overlay and render layer data of the current road segment to generate a map image for display by the user.
[0066] In existing technologies, map display typically involves generating a route and then interacting with a server during the journey to retrieve layer data of the current location in real time. This data is then overlaid and rendered to generate a map image for display. However, in scenarios where the vehicle deviates from its course, relying solely on real-time interaction with the server to obtain layer data results in a slow display speed.
[0067] To address the problems existing in the prior art, the inventors, during their research on map display methods, discovered that to improve display efficiency, layer data can be preloaded into memory and retrieved directly from memory during use. Since common road segments are more likely to appear in the new routes after generating multiple navigation routes based on the start and end points, the layer data for each common road segment is retrieved from the server and loaded into memory. After generating a new route via yaw, if the vehicle's current location is on a common road segment while traveling along the new route, the layer data for that common road segment is retrieved from memory, and then overlaid and rendered based on the layer data. Based on the above inventive concept, the map display scheme in this application was designed.
[0068] The entity executing the map display method in this application can be an in-vehicle terminal, a user terminal, a computer, etc. This application does not limit it. The following explanation uses an in-vehicle terminal as an example.
[0069] The following provides examples illustrating the application scenarios of the map display method provided in this application.
[0070] For example, in this application scenario, the user needs to drive a vehicle from location A to location B.
[0071] After the user gets in the car, they enter the starting point and destination on the in-vehicle terminal. The starting point is location A and the destination is location B. The in-vehicle terminal can generate and display multiple navigation routes based on the starting point and destination.
[0072] In order to display the new route map more quickly after the vehicle deviates from its course, the onboard terminal can identify common road segments in multiple navigation routes. Each common road segment is a segment shared by at least two navigation routes.
[0073] For example, Figure 1 A schematic diagram of the public road sections provided for this application. (For example...) Figure 1As shown, three navigation routes are generated from location A to location B: navigation route 1, navigation route 2, and navigation route 3. The line segments between two black dots represent road segments, and the dashed lines represent common road segments. Navigation route 2 and navigation route 3 share a common road segment, as do navigation routes 1, 2, and 3.
[0074] The vehicle-mounted terminal then retrieves the layer data for each public road segment from the server and loads it into memory.
[0075] The vehicle travels along navigation route 1. If it deviates from the course during the journey, the onboard terminal will generate a new route.
[0076] For example, in Figure 1 On this basis, Figure 2 A schematic diagram of the new route provided for this application. For example... Figure 2 As shown, there are common road segments between the new route and navigation routes 1, 2, and 3.
[0077] After generating a new route through yaw, the vehicle travels along the new route. During the journey, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory. Based on the layer data, overlay rendering is performed for display.
[0078] exist Figure 2 Based on this, when the vehicle is traveling on the last two road segments, the layer data of the common road segments can be retrieved from memory and then overlaid and rendered for display.
[0079] It should be noted that the above scenario is only an example of an application scenario provided by the embodiments of this application. The embodiments of this application do not limit the actual form of the various devices included in the scenario, nor do they limit the interaction method between devices. In the specific application of the solution, it can be set according to actual needs.
[0080] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0081] Figure 3 This is a flowchart illustrating an embodiment of the map display method provided in this application. This embodiment preloads layer data of common road segments from multiple navigation routes onto the vehicle terminal. After a new route is generated by yaw, the vehicle travels along the new route to the common road segment, and the map is displayed based on the preloaded layer data of the common road segment. The method in this embodiment can be implemented through software, hardware, or a combination of both. Figure 3 As shown, the map display method specifically includes the following steps:
[0082] S301: After generating multiple navigation routes based on the origin and destination, determine the common road segments among the multiple navigation routes.
[0083] After obtaining the origin and destination, the vehicle terminal can generate multiple navigation routes based on road network data and traffic information.
[0084] In this step, after the vehicle terminal generates multiple navigation routes based on the origin and destination, in order to quickly display the map in case of deviation, it is necessary to determine the common road segments in the multiple navigation routes. Each common road segment is a road segment shared by at least two navigation routes.
[0085] Since routes are composed of road segments, after generating multiple navigation routes, for each road segment in all navigation routes, if the road segment belongs to at least two navigation routes, then the road segment is determined to be a common road segment.
[0086] It should be noted that the start and end points can be determined by user input, retrieval of historical records, voice interaction, or sent by other devices. This application does not limit the method of obtaining the start and end points; they can be determined according to the actual situation.
[0087] S302: Retrieve the layer data of each public road segment from the server and load it into memory.
[0088] In this step, after the vehicle terminal identifies the public road segments, it retrieves the layer data of each public road segment from the server and loads it into memory.
[0089] The vehicle-mounted terminal can send a layer data retrieval request to the server, which includes the identifier of public road segments. The server maintains a mapping between identifiers and layer data. Based on the public road segment identifier in the layer data retrieval request, the server finds the corresponding layer data, establishes the mapping between the identifier and the layer data, and then sends it to the vehicle-mounted terminal. Upon receiving the data, the vehicle-mounted terminal loads the layer data into memory, and can subsequently retrieve the corresponding layer data from memory based on the identifier.
[0090] It should be noted that, in Figure 1 Based on this, since the line segment between two black dots represents a road segment, the coordinates of the two black dots can be used as the identifier of the road segment. The coordinates can be latitude and longitude, or they can be obtained by mapping latitude and longitude. For example, the coordinates of the two black dots are (0, 1) and (1, 1), and the road segment corresponding to these two black dots is a common road segment. The correspondence between (0, 1) and (1, 1) can be established with the layer data.
[0091] In one implementation, the layer data includes base map layer data, route layer data, and thematic layer data.
[0092] The base map layer data includes static geographic information such as road networks, building outlines, water systems, and topography; the route layer data includes information such as navigation route colors and instructions; and the thematic layer data includes information such as real-time traffic conditions, traffic control, weather, construction sections, traffic lights, and cameras.
[0093] If the current memory usage is less than the preset first usage threshold, the base map layer data, route layer data, and thematic layer data for each public road segment are retrieved from the server and loaded into memory.
[0094] If the current memory usage is greater than or equal to a preset first usage threshold, but less than a preset second usage threshold, then the base map layer data and route layer data for each public road segment are retrieved from the server and loaded into memory. The preset second usage threshold is greater than the preset first usage threshold.
[0095] If the current memory usage rate is greater than or equal to the preset second usage rate threshold, the base map layer data of each public road segment is retrieved from the server and loaded into memory.
[0096] As memory usage gradually increases, the layer data that is acquired and loaded can be changed from base map layer data, route layer data, and thematic layer data, back to base map layer data and route layer data, and then back to base map layer data, thus avoiding excessive memory consumption.
[0097] Since the base map layer data is the foundational layer data of the map and is essential for map generation, it is necessary to obtain and load the base map layer data regardless of memory usage.
[0098] It should be noted that the preset first usage rate threshold can be 25%, 30%, 35%, etc., and the preset second usage rate threshold can be 45%, 50%, 55%, etc. The embodiments of this application do not limit the preset first usage rate threshold and the preset second usage rate threshold, which can be determined according to the actual situation.
[0099] By adopting this implementation method, the loading granularity of public road segment layer data can be dynamically adjusted according to memory usage. When memory is sufficient, more complete layer content can be loaded, and when memory is tight, the basic layer can be retained. A dynamic balance can be achieved between resource consumption and display effect, which can improve the reusability of public road segment layers and maintain the continuity of map display after deviation.
[0100] In one implementation, when the current memory usage rate is greater than or equal to a preset first usage rate threshold and less than a preset second usage rate threshold, after the vehicle terminal obtains the base map layer data and route layer data of each public road segment from the server and loads them into memory, it can also obtain the thematic layer data of each public road segment from the server and load them into memory according to the preset thematic layer data type order, until the memory usage rate reaches a preset third usage rate threshold.
[0101] It should be noted that the types of thematic layer data can include traffic control, construction sections, real-time traffic conditions, cameras, traffic lights, etc. This application embodiment does not limit the types of thematic layer data, which can be determined according to the actual situation.
[0102] It should be noted that the preset order of thematic layer data types can be: traffic control, construction section, real-time traffic conditions, cameras, and traffic lights. Alternatively, it can be: construction section, traffic control, real-time traffic conditions, cameras, and traffic lights. This application embodiment does not limit the preset order of thematic layer data types and can determine it according to the actual situation.
[0103] It should be noted that the preset third usage rate threshold is greater than the preset first usage rate threshold. The preset third usage rate threshold can be 65%, 70%, 75%, etc. This application embodiment does not limit the preset third usage rate threshold, and it can be determined according to the actual situation.
[0104] Once the base map layer data and route layer data for public road sections are loaded, the system can continue to supplement thematic layer data within a preset memory boundary and cache it according to a fixed category order. This allows subsequent overlay rendering of public road sections to directly call the cached layer data. This reduces the number of repeated requests in deviating or replanning scenarios and improves the continuity of map display and response efficiency.
[0105] In one implementation, when the current memory usage rate is greater than or equal to a preset second usage rate threshold, after the vehicle terminal obtains the base map layer data of each public road segment from the server and loads it into memory, it can also obtain the route layer data of each public road segment from the server in order of the driving distance between the road segment and the starting point from farthest to closest and load it into memory until the memory usage rate reaches a preset fourth usage rate threshold.
[0106] Since the new route is more likely to pass through public road segments that are farther from the starting point, the road segments are acquired and loaded in order of their distance from the starting point, from farthest to closest.
[0107] It should be noted that the preset fourth usage rate threshold is greater than the preset second usage rate threshold. The preset fourth usage rate threshold can be 65%, 70%, 75%, etc. This application embodiment does not limit the preset fourth usage rate threshold, and it can be determined according to the actual situation.
[0108] The route layer data of public road sections can be loaded in an orderly manner based on the travel distance, and the cache range can continue to be expanded even when the base map layer data has occupied part of the memory, thereby improving the layer reuse capability when deviating or changing routes, and reducing the frequency of repeated requests to the server.
[0109] It should be noted that after obtaining the public road segments, the vehicle terminal can filter the public road segments, and then the server can obtain the layer data of each filtered public road segment and load it into memory.
[0110] For each public road segment, a yaw usage score is calculated based on the segment's rating data. Then, based on this score and a preset score threshold, all public road segments are filtered to obtain the filtered segments. Specifically, public road segments with yaw usage scores greater than the preset score threshold are retained, while those with scores less than or equal to the threshold are filtered out.
[0111] Yaw usage score is used to characterize the probability of a public segment appearing on the new route after a yaw. The higher the yaw usage score, the greater the probability of a public segment appearing on the new route after a yaw.
[0112] By filtering public road segments, the hit rate of preloading can be improved, and memory usage can be reduced.
[0113] The scoring data includes at least one of the following: number of repeated routes, road segment level, number of times a road segment is reused, road segment congestion index, and road segment length. Each data point in the scoring data is standardized and then weighted and summed with its corresponding preset weight to obtain the yaw usage score.
[0114] The number of duplicate routes refers to how many routes a common road segment belongs to. The number of duplicate routes is divided by the preset baseline number to complete the standardization.
[0115] Road sections are classified into expressways, arterial roads, secondary arterial roads, and local roads. Different levels correspond to different standardized values, thus enabling standardization. Standardized values range from 0 to 1.
[0116] The number of times a road segment is reused refers to the number of times a user passes through a public road segment. The number of times a road segment is reused is set at a preset reuse baseline number to achieve standardization.
[0117] The road congestion index is used to characterize the degree of congestion on public roads. The road congestion index is mapped to a range of 0 to 1 to complete the standardization.
[0118] The road segment length is divided by the preset standard length to complete the standardization.
[0119] Rating data can be entered by the user or retrieved from a database.
[0120] It should be noted that the preset scoring threshold can be 0.7, 0.8, 0.9, etc.; the preset weight can be 0.1, 0.3, 0.6, 0.8, etc.; the preset number of benchmarks can be 3, 5, 7, etc.; the preset number of benchmark reuses can be 10, 30, 100, 500, etc.; and the preset standard length can be 500 meters, 1000 meters, 50000 meters, etc. This application embodiment does not limit the preset scoring threshold, preset weight, preset number of benchmarks, preset number of benchmark reuses, or preset standard length; these can be determined according to actual circumstances.
[0121] S303: After generating a new route by yaw, if the road segment where the vehicle is currently located is a common road segment while the vehicle is traveling along the new route, the layer data of the common road segment where the vehicle is currently located is retrieved from memory.
[0122] After the vehicle terminal loads the layer data of public road sections into memory, the vehicle generally travels along one of the multiple navigation routes. During the journey, deviation may occur. When deviation is detected, the vehicle terminal will replan the route and generate a new route.
[0123] In this step, after the vehicle terminal generates a new route by yaw, if the road segment where the vehicle is currently located is a public road segment while the vehicle is traveling along the new route, the layer data of the public road segment where the vehicle is currently located is retrieved from memory.
[0124] In this step, common road segments serve as the benchmark for data reuse. Specifically, by determining whether the current location falls within a road segment shared by at least two routes, it determines whether pre-loaded content can be directly accessed. Layer data in this step serves as the data source for real-time display. Its reading process may include retrieving the layer object corresponding to the target common road segment from the memory cache and submitting the result to the map engine's rendering queue.
[0125] After veerging off course, the system determines whether the vehicle's current location is within an identified and cached public road segment, and then directly reads the corresponding layer data from memory. This shortens the processing chain for stable image display, enabling the map to be displayed quickly around the vehicle's current location.
[0126] It should be noted that if the layer data in memory is incomplete, and some data in the base map layer, route layer, and thematic layer are missing, the missing data can be retrieved from the server to complete the data.
[0127] It should be noted that after the yaw generates a new route, if the road segment where the vehicle is currently located is not a public road segment while the vehicle is traveling along the new route, the layer data of the road segment where the vehicle is currently located will be obtained from the server.
[0128] Since the layer data for road segments other than public road segments are not preloaded, layer data needs to be obtained from the server when driving on non-public road segments.
[0129] This processing method can promptly supplement new layer data for non-public road sections after a deviation, maintaining continuous display of the navigation screen and consistency in road section switching. Since the server is only triggered to retrieve data when the vehicle's current location is not on a public road section, the display data for non-public road sections can be updated independently. This, combined with the memory reuse mechanism for public road sections, reduces display gaps and data loss caused by route replanning.
[0130] S304: Based on the layer data, perform overlay rendering and display.
[0131] In this step, after the vehicle terminal obtains the layer data, it performs overlay rendering and display based on the layer data.
[0132] It can parse, sort, and draw various layers according to a predetermined rendering pipeline, and then overlay and render them in a predetermined order to create a single display screen.
[0133] For example, overlay rendering can first process the base map layer data, then overlay supplementary route layer data, and finally overlay supplementary thematic layer data.
[0134] It should be noted that after the yaw generates a new route, the first resolution layer data of each non-common road segment in the new route is obtained from the server and loaded into memory.
[0135] As the vehicle travels along the new route, if the road segment where the vehicle is currently located is a non-public road segment, the first resolution layer data of the road segment where the vehicle is currently located is obtained from memory; then, the first resolution layer data is used for overlay rendering and display; and the second resolution layer data of the road segment is obtained from the server, and then the second resolution layer data is used for overlay rendering and display.
[0136] The first resolution is lower than the second resolution. By displaying the lower-resolution layer first, followed by the higher-resolution layer, a map can be quickly displayed without blank areas in non-public road sections.
[0137] The loading score of non-public road segments can be determined based on their length, level, etc. Non-public road segments with loading scores greater than the preset loading score threshold are filtered out. Then, the first resolution layer data of these non-public road segments in the new route is obtained from the server and loaded into memory to reduce memory usage.
[0138] The road segment level and road segment length are standardized, and then weighted and summed with the corresponding preset weights to obtain the loading score.
[0139] The preset loading score threshold can be 0.5, 0.7, 0.9, etc.; the preset weight can be 0.1, 0.3, 0.6, 0.8, etc. This application embodiment does not limit the preset score threshold or preset weight, and these can be determined according to the actual situation.
[0140] The map display method provided in this embodiment generates multiple navigation routes based on the starting point and destination, identifies common road segments among these routes, and then retrieves the layer data of each common road segment from the server and loads it into memory. After a veer-off to generate a new route, as the vehicle travels along the new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of that common road segment is retrieved from memory. Based on this layer data, overlay rendering is performed. By preloading the layer data of common road segments, the map can be directly displayed when the vehicle veers off to a common road segment, eliminating the need to retrieve layer data from the server, thus improving display efficiency and reducing network resource consumption.
[0141] In addition, by preloading only the layer data of common road segments, memory overhead is reduced. By loading the layer data of common road segments, the probability of new routes passing through common road segments is higher, thus improving the preloading hit rate.
[0142] Figure 4 This is a flowchart illustrating a second embodiment of the map display method provided in this application. Based on the above embodiments, this application describes how the vehicle terminal preloads layer data of target routes from multiple navigation routes, and then displays the map based on the preloaded layer data while driving along the target route. Figure 4 As shown, the map display method specifically includes the following steps:
[0143] S401: In response to the user's route selection operation, determine the target route among multiple navigation routes.
[0144] In this step, after the vehicle terminal generates multiple navigation routes, the user can select a route from the multiple navigation routes. The vehicle terminal responds to the user's route selection and determines the target route from the multiple navigation routes.
[0145] S402: Retrieve the layer data of each segment of the target route from the server and load it into memory.
[0146] In this step, after the vehicle terminal determines the target route, in order to quickly acquire layer data while the vehicle is traveling along the target route, it can obtain the layer data of each segment of the target route from the server and load it into memory to achieve preloading.
[0147] It should be noted that the base map layer data and route layer data of each segment of the target route can be obtained from the server and loaded into memory.
[0148] It should be noted that this step is similar to step S302 in Embodiment 1, and will not be described again here.
[0149] S403: While the vehicle is traveling along the target route, the layer data of the road segment where the vehicle is currently located is retrieved from memory.
[0150] In this step, the vehicle terminal will retrieve the layer data of each road segment of the target route and load it into memory. As the vehicle travels along the target route, the vehicle terminal will retrieve the layer data of the road segment where the vehicle is currently located from memory.
[0151] S404: Based on the layer data, perform overlay rendering and display.
[0152] In this step, after the vehicle terminal obtains the layer data, it performs overlay rendering and display based on the layer data.
[0153] It should be noted that this step is similar to step S304 in Embodiment 1, and will not be described again here.
[0154] It should be noted that the vehicle-mounted terminal can delete the layer data of the road segments that have already been traveled in the target route from memory.
[0155] During the journey along the target route, the vehicle terminal matches the vehicle's current location with road segments on the target route. After passing a road segment, the layer data corresponding to the passed road segment is deleted from memory to reduce memory usage.
[0156] For example, in Figure 1 On this basis, Figure 5 A schematic diagram of the road sections already traveled, as provided in this application, is shown below. Figure 5 As shown, navigation route 1 is the target route. The vehicle is currently traveling to point C. The section of the target route between point A and point C is a section that has already been traveled.
[0157] By removing the layer data of the already traveled road segments in the target route from memory, the map cache can shrink synchronously with the driving process, reducing the continuous occupation of local resources by invalid layers, and keeping subsequent layer requests, loading, and rendering within a relatively stable range of resource usage.
[0158] The map display method provided in this embodiment preloads the layer data of each segment of the entire route after the target route is determined. This allows the system to directly read the layer information of the segment where the vehicle is currently located from memory and perform overlay rendering during driving. This reduces the number of times data is repeatedly requested from the server along the route and also reduces the display waiting time when changing routes. As a result, the navigation screen can maintain continuous output after the path is determined, layer switching is more timely, and the local cache of the terminal is utilized more fully.
[0159] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0160] Figure 6 This is a schematic diagram of the structure of an embodiment of the map display device provided in this application; as shown below. Figure 6 As shown, the map display device 60 includes:
[0161] Processing module 61 is used to determine the common road segments among the multiple navigation routes after generating multiple navigation routes based on the starting point and the ending point. Each common road segment is a road segment shared by at least two navigation routes.
[0162] Module 62 is used for:
[0163] Retrieve the layer data for each public road segment from the server and load it into memory;
[0164] After the yaw generates a new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory.
[0165] Display module 63 is used to perform overlay rendering display based on layer data.
[0166] Furthermore, the layer data includes base map layer data, route layer data, and thematic layer data;
[0167] Module 62 is used specifically for:
[0168] If the current memory usage is less than the preset first usage threshold, then retrieve the base map layer data, route layer data, and thematic layer data for each public road segment from the server and load them into memory;
[0169] If the current memory usage is greater than or equal to a preset first usage threshold and less than a preset second usage threshold, then the base map layer data and route layer data of each public road segment are retrieved from the server and loaded into memory; the preset second usage threshold is greater than the preset first usage threshold.
[0170] If the current memory usage rate is greater than or equal to the preset second usage rate threshold, the base map layer data of each public road segment is retrieved from the server and loaded into memory.
[0171] Furthermore, after retrieving the base map layer data and route layer data for each public road segment from the server and loading them into memory, module 62 is also used for:
[0172] According to the preset order of thematic layer data, thematic layer data for each public road segment is obtained from the server and loaded into memory until the memory utilization rate reaches the preset third utilization rate threshold; the preset third utilization rate threshold is greater than the preset first utilization rate threshold.
[0173] Furthermore, after retrieving the base map layer data of each public road segment from the server and loading it into memory, module 62 is also used for:
[0174] According to the order of travel distance from the starting point to the road segment, the route layer data of each public road segment is retrieved from the server and loaded into memory in sequence until the memory utilization rate reaches the preset fourth utilization rate threshold; the preset fourth utilization rate threshold is greater than the preset second utilization rate threshold.
[0175] Furthermore, based on the layer data, before performing overlay rendering and display, module 62 is also used for:
[0176] After generating a new route by yaw, the first resolution layer data of each non-common segment in the new route is retrieved from the server and loaded into memory;
[0177] If the road segment where the vehicle is currently located is a non-public road segment while the vehicle is traveling along the new route, the first resolution layer data of the road segment where the vehicle is currently located is retrieved from memory.
[0178] Based on the layer data of the first resolution, overlay rendering is performed and the second resolution layer data of the road segment is obtained from the server. The first resolution is smaller than the second resolution.
[0179] The layer data at the second resolution is overlaid and rendered for display.
[0180] Furthermore, before retrieving the layer data for each public road segment from the server and loading it into memory, processing module 61 is also used for:
[0181] For each public road segment, calculate the yaw usage score of the public road segment based on the public road segment's score data;
[0182] Based on the yaw usage score and preset score threshold of each public road segment, all public road segments are filtered to obtain the filtered public road segments;
[0183] Module 62 is used specifically for:
[0184] Retrieve the layer data of each filtered public road segment from the server and load it into memory.
[0185] Furthermore, after generating multiple navigation routes based on the origin and destination, the processing module 61 is also used to determine the target route among the multiple navigation routes in response to the user's route selection operation.
[0186] Module 62 is also used for:
[0187] Retrieve the layer data of each segment of the target route from the server and load it into memory;
[0188] As the vehicle travels along the target route, the layer data of the road segment where the vehicle is currently located is retrieved from memory;
[0189] Display module 63 is also used for overlay rendering display based on layer data.
[0190] Furthermore, the processing module 61 is also used to delete the layer data of the road segments that have been traveled in the target route from memory.
[0191] The map display device provided in this embodiment is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0192] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 7 As shown, the electronic device 70 includes:
[0193] Processor 71, memory 72, communication interface 73, and display 74;
[0194] Memory 72 is used to store executable instructions of processor 71;
[0195] The processor 71 is configured to execute the technical solutions in any of the foregoing method embodiments by executing executable instructions.
[0196] Optionally, the memory 72 can be either standalone or integrated with the processor 71.
[0197] Optionally, when the memory 72 is a device independent of the processor 71, the electronic device 70 may further include:
[0198] Bus 75, memory 72, communication interface 73 and display 74 are connected to processor 71 through bus 75 and complete communication with each other. Communication interface 73 is used to communicate with other devices.
[0199] Optionally, the communication interface 73 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0200] Bus 75 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0201] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0202] The electronic device is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0203] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.
[0204] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.
[0205] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0206] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0207] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0208] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0209] In addition, the functional units in the various embodiments of the present invention 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.
[0210] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. 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.
[0211] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0212] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A map display method, characterized in that, include: After generating multiple navigation routes based on the origin and destination, the common road segments among the multiple navigation routes are determined, and each common road segment is a road segment shared by at least two navigation routes; Retrieve the layer data for each public road segment from the server and load it into memory; After the yaw generates a new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory. Based on the layer data, overlay rendering is performed for display.
2. The method according to claim 1, characterized in that, Layer data includes base map layer data, route layer data, and thematic layer data; The step of retrieving layer data for each public road segment from the server and loading it into memory includes: If the current memory usage is less than the preset first usage threshold, then retrieve the base map layer data, route layer data, and thematic layer data for each public road segment from the server and load them into memory; If the current memory usage rate is greater than or equal to the preset first usage rate threshold and less than the preset second usage rate threshold, then the base map layer data and route layer data of each public road segment are obtained from the server and loaded into memory; the preset second usage rate threshold is greater than the preset first usage rate threshold. If the current memory usage rate is greater than or equal to the preset second usage rate threshold, the base map layer data of each public road segment is obtained from the server and loaded into memory.
3. The method according to claim 2, characterized in that, After obtaining the base map layer data and route layer data of each public road segment from the server and loading them into memory, the method further includes: According to the preset order of thematic layer data, thematic layer data for each public road segment is obtained from the server and loaded into memory until the memory utilization rate reaches a preset third utilization rate threshold; the preset third utilization rate threshold is greater than the preset first utilization rate threshold.
4. The method according to claim 2, characterized in that, After retrieving the base map layer data of each public road segment from the server and loading it into memory, the method further includes: According to the order of travel distance from the starting point to the road segment, the route layer data of each public road segment is sequentially obtained from the server and loaded into memory until the memory utilization rate reaches the preset fourth utilization rate threshold; the preset fourth utilization rate threshold is greater than the preset second utilization rate threshold.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: After generating a new route by yaw, the layer data of the first resolution of each non-common segment in the new route is obtained from the server and loaded into memory; If the road segment where the vehicle is currently located is a non-public road segment while the vehicle is traveling along the new route, the layer data of the first resolution of the road segment where the vehicle is currently located is obtained from memory. Based on the layer data of the first resolution, overlay rendering is performed and the second resolution layer data of the road segment is obtained from the server, wherein the first resolution is smaller than the second resolution; The layer data at the second resolution is overlaid and rendered for display.
6. The method according to any one of claims 1 to 4, characterized in that, Before retrieving the layer data of each public road segment from the server and loading it into memory, the method further includes: For each public road segment, calculate the yaw usage score of the public road segment based on the score data of the public road segment; Based on the yaw usage score and preset score threshold of each public road segment, all public road segments are filtered to obtain the filtered public road segments; The step of retrieving layer data for each public road segment from the server and loading it into memory includes: Retrieve the layer data of each filtered public road segment from the server and load it into memory.
7. The method according to any one of claims 1 to 4, characterized in that, After generating multiple navigation routes based on the origin and destination, the method further includes: In response to the user's route selection operation, determine the target route among the multiple navigation routes; Retrieve layer data for each segment of the target route from the server and load it into memory; As the vehicle travels along the target route, the layer data of the road segment where the vehicle is currently located is retrieved from memory; Based on the layer data, overlay rendering is performed for display.
8. The method according to claim 7, characterized in that, The method further includes: The layer data of the road segments that have already been traveled in the target route are deleted from memory.
9. A map display device, characterized in that, include: The processing module is used to determine the common road segments among the multiple navigation routes after generating multiple navigation routes based on the starting point and the ending point. Each common road segment is a road segment shared by at least two navigation routes. The acquisition module is used for: Retrieve the layer data for each public road segment from the server and load it into memory; After the yaw generates a new route, if the road segment where the vehicle is currently located is a common road segment, the layer data of the common road segment where the vehicle is currently located is retrieved from memory. The display module is used to perform overlay rendering and display based on the layer data.
10. An electronic device, characterized in that, include: Processor, memory, communication interface, and display; The memory is used to store the executable instructions of the processor; The processor is configured to execute the map display method according to any one of claims 1 to 8 by executing the executable instructions.
11. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the map display method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the map display method according to any one of claims 1 to 8.
