Rendering methods, apparatus, devices, and storage media

By dividing the high-precision map into grids and selecting target grids for rendering, the performance problem caused by the large amount of data in high-precision map rendering is solved, and the rendering effect and device performance are improved.

CN116433817BActive Publication Date: 2026-11-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310282295.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2026-11-17
Estimated Expiration
2043-03-21

AI Technical Summary

Technical Problem

High-precision map rendering involves processing large amounts of data in vehicle infotainment systems, resulting in poor rendering performance and a tendency to stutter and drop frames, especially noticeable on low-performance devices.

Method used

By dividing the map data into multiple grids, the target grids that need to be rendered are selected based on the vehicle's position and rendering perspective. Only the element information of these grids is rendered, reducing the amount of data processing.

Benefits of technology

It reduces the amount of data that needs to be processed in rendering operations, improves rendering effects and device rendering performance, and meets the high-performance rendering requirements of low-cost devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433817B_ABST
    Figure CN116433817B_ABST
Patent Text Reader

Abstract

This disclosure provides a rendering method, apparatus, device, and storage medium, relating to the field of computer technology, and particularly to the fields of autonomous driving, high-precision maps, and rendering technology. The specific implementation scheme is as follows: based on map data corresponding to the vehicle's location, the area in the map data is divided into multiple grids; based on the visualized area from the vehicle's rendering perspective and the vehicle's location, the target grid to be rendered is obtained from the multiple grids; the information of the elements included in the target grid is rendered into the target scene. By dividing the map into grids and identifying a portion of the grids to be rendered from all grids according to the rendering perspective, according to the embodiments of this disclosure, the amount of data that needs to be processed in the rendering operation can be reduced, and the rendering effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to the fields of autonomous driving, high-precision mapping, and rendering technology. Background Technology

[0002] In-vehicle infotainment systems (HMIs) can include devices installed within the vehicle to support human-machine interaction. Within the HMI, some applications, such as high-definition map rendering, require processing large amounts of data. In such cases, the HMI's rendering performance may be poor. Summary of the Invention

[0003] This disclosure provides a rendering method, apparatus, device, and storage medium.

[0004] According to one aspect of this disclosure, a rendering method is provided, comprising:

[0005] Based on the map data corresponding to the vehicle's location, the area in the map data is divided into multiple grids;

[0006] Based on the visual area of ​​the vehicle from the rendering perspective and the vehicle's position, the target mesh to be rendered is obtained from the multiple meshes;

[0007] Render the information of the elements included in the target mesh into the target scene.

[0008] According to another aspect of this disclosure, a rendering apparatus is provided, comprising:

[0009] The segmentation module is used to divide the area in the map data into multiple grids based on the location of the vehicle.

[0010] The first acquisition module is used to acquire the target mesh to be rendered from the multiple meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle.

[0011] The rendering module is used to render information about the elements included in the target mesh into the target scene.

[0012] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0013] At least one processor; and

[0014] The memory is communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.

[0016] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.

[0017] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.

[0018] According to embodiments of this disclosure, the amount of data that needs to be processed in rendering operations can be reduced, thereby improving rendering results.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0021] Figure 1 This is a schematic diagram illustrating the application scenarios of this disclosure;

[0022] Figure 2 This is a schematic diagram of the rendering area according to this disclosure;

[0023] Figure 3 This is a schematic flowchart of a rendering method according to an embodiment of the present disclosure;

[0024] Figure 4 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0025] Figure 5 This is a schematic diagram of the region to be divided according to an embodiment of the present disclosure;

[0026] Figure 6 This is a schematic diagram of mesh division according to an embodiment of the present disclosure;

[0027] Figure 7 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0028] Figure 8 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0029] Figure 9 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0030] Figure 10This is a schematic diagram of the visualized area according to an embodiment of the present disclosure;

[0031] Figure 11 This is a schematic diagram of offset values ​​according to an embodiment of the present disclosure;

[0032] Figure 12 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0033] Figure 13 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure;

[0034] Figure 14 This is a flowchart illustrating a high-precision map rendering method according to an embodiment of the present disclosure;

[0035] Figure 15 This is a schematic diagram of the structure of a rendering apparatus according to an embodiment of the present disclosure;

[0036] Figure 16 This is a schematic diagram of the structure of a rendering apparatus according to another embodiment of the present disclosure;

[0037] Figure 17 This is a block diagram of an electronic device used to implement the methods of the embodiments of this disclosure. Detailed Implementation

[0038] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0039] In vehicle-mounted human-machine interface (HMI) rendering, high-precision maps need to continuously update tile data and render based on the vehicle's position. Due to the vehicle's high speed, to avoid road breaks in the rendered view, the HMI can generate vertex information for map elements based on the tile data around the vehicle and render this information in a three-dimensional (3D) scene. However, generating a large number of triangles from tile data places significant pressure on the data bandwidth from the central processing unit (CPU) to the graphics processing unit (GPU), as well as on the GPU's shading and rendering performance. Therefore, on some devices, the display of certain map elements can be selectively disabled to balance rendering stuttering. For example, to achieve... Figure 1The display effect under normal rendering perspective, the actual map area processed by HMI is as follows: Figure 2 As shown, the selected area is Figure 1 Corresponding part.

[0040] With the development of technologies such as autonomous driving, the rendering of in-vehicle HMIs needs to continuously enrich the display of high-precision map elements. Real-time rendering of large scenes can employ methods such as occlusion culling, Levels of Detail (LOD), mesh generation, and texture mapping to improve the frame rate and stability of real-time rendering of large scenes.

[0041] For example, occlusion culling can be achieved by omitting objects that are hidden behind other objects. Even if an occluded object is within the camera's field of view, it doesn't need to be rendered because it's invisible. Removing occluded objects reduces GPU / CPU data transfer overhead, reduces GPU triangle rendering, and reduces the number of draw calls, thereby improving rendering performance. Occlusion culling can also use bounding boxes and spatial trees to define the spatial structure, accelerating the determination of occlusion relationships.

[0042] For example, LOD (Level of Detail) can be achieved by generating several levels of model detail during model creation. Lower-detail models have fewer triangles and less defined edges, allowing for a general outline while reducing rendering performance. Higher-detail models have more triangles and sharper edges, appearing more refined but requiring more rendering. The rendering engine can adaptively match the appropriate model level based on the distance between the model and the camera. This aligns with human visual expectations: a distant model shows its outline, while a closer model reveals details. It also alleviates rendering pressure when the view is far away.

[0043] For example, mesh partitioning methods can include: dividing a large scene into several smaller scenes, predicting the next location based on the current position and movement trend, loading the scene mesh resources involved in the next location, and unloading scene meshes that were needed in the previous location but no longer need to be updated in the next location. Dynamic unloading and loading ensures timely scene updates while reducing scene data processing.

[0044] For example, texturing can be used to replace models in the scene when no models need to be loaded.

[0045] Real-time rendering of large scenes can utilize one or more of the methods mentioned above to improve rendering performance. These methods generally require the pre-production of scene resources, resulting in a large workload for offline modeling. However, high-precision map rendering requires dynamically loading and rendering map elements around the vehicle based on its coordinates. Given the high randomness of vehicle movement, offline modeling of all possible tiles is extremely costly. Therefore, high-precision map rendering necessitates real-time modeling based on tile data collected from road conditions. This modeling process involves a vast amount of tile data; otherwise, missing map information around the main vehicle can easily occur.

[0046] One method for rendering high-precision maps involves loading tile data for a large area around the vehicle every 10 seconds, and generating vertex information for elements such as buildings, roads, and zebra crossings based on the tile data. HMI rendering then renders the generated map element vertex information in the 3D scene in real-time for each frame. This method requires processing a large amount of data and places high demands on device performance; low-performance devices are prone to stuttering and frame drops, which can severely impact application responsiveness (ANR). Furthermore, when the vehicle stops on the road, the actual map information around the vehicle does not change, making updating the rendering ineffective.

[0047] This disclosed embodiment can filter out the data that truly needs rendering from a large amount of map data, such as tile data, reducing data processing volume and improving the performance of the high-precision map rendering engine. This reduces the rendering pressure on high-precision maps and helps meet the requirements of high-performance rendering on low-cost devices.

[0048] Figure 3 This is a flowchart illustrating a rendering method according to an embodiment of the present disclosure, including:

[0049] S301. Based on the map data corresponding to the vehicle's location, the area in the map data is divided into multiple grids.

[0050] S302. Based on the visual area under the rendering view of the vehicle and the position of the vehicle, obtain the target mesh to be rendered from the multiple meshes.

[0051] S303. Render the information of the elements included in the target mesh into the target scene.

[0052] In this embodiment of the disclosure, the map may include, but is not limited to, 3D maps, stereoscopic maps, high-precision maps, etc. Map data may include, but is not limited to, tile data. Vehicles may include manually driven vehicles, various levels of autonomous driving vehicles, etc.

[0053] In this embodiment, the vehicle's location can be obtained through a Global Positioning System (GPS), BeiDou Navigation Satellite System, or similar means. The map data corresponding to the vehicle's location can include map data covering a certain area around the vehicle. For example, data within a certain range using a point on the vehicle as a reference point. For instance, map data encompassing a square area of ​​a certain size, such as 100m x 100m, centered on the left front end of the vehicle. Another example is map data encompassing a circular area with a radius of a certain length, such as 50m, centered on the center point of the vehicle. Of course, other methods can also be used to determine the map data corresponding to the vehicle's location, as long as the area in the map data covers the vehicle's location. In one example, the map data corresponding to the vehicle's location can be requested through a rendering engine. The rendering engine can be installed in a device with an HMI, such as an in-vehicle infotainment system.

[0054] In this embodiment of the disclosure, the rendering engine can divide the area in the map data corresponding to the vehicle's location into multiple grids, and the number of grids can be set according to actual needs. For example, for a 100m*100m square area, it can be divided into 100 10m*10m grids in a 10x10 grid format, or into 200 5m*10m grids in a 20x10 grid format.

[0055] In this embodiment of the disclosure, the vehicle's position may change during driving; however, it may remain unchanged in scenarios such as parking or temporary stopping. For example, temporary stopping scenarios may include waiting at a traffic light at an intersection, waiting to refuel at a gas station, or waiting to pay a toll at a toll booth. Using map data corresponding to the vehicle's position, a grid can be dynamically divided as the vehicle's position changes.

[0056] In this embodiment, the vehicle's rendering perspective can be determined based on the perspective of onboard sensors, such as cameras, infrared sensors, radar, and laser sensors, or based on the perspective of a virtual camera in the rendering engine. For example, the visualized area under the vehicle's rendering perspective can include, for example, the intersection area of ​​the vehicle camera's view frustum plane and the map plane. Alternatively, the visualized area under the vehicle's rendering perspective can include an extended area obtained by extending a certain length outward from the aforementioned intersection area. There are various methods for determining the extended area; for example, the vertex coordinates of the intersection area can be substituted into a transformation formula, such as an addition formula or a multiplication formula, to obtain the vertex coordinates of the extended area. The vehicle camera's view frustum plane can be determined based on, for example, the field of view of the onboard sensors or the field of view of the virtual camera in the rendering engine. The map plane can be the z-plane in a 3D map, or other planes below or above the z-plane. Assuming that in the coordinate axes of a 3D map, the x-axis represents the north-south direction (or latitude), the y-axis represents the east-west direction (or longitude), and the z-axis represents altitude, then the plane with a z-axis coordinate of 0 can be the z-plane.

[0057] The visualized area from the vehicle's rendering perspective can include various map elements visible to the vehicle. If the map data corresponding to the vehicle's location is divided into N grids, the grids containing the map elements visible to the vehicle can be further determined from these N grids based on the visualized area; these are the target grids to be rendered. The number of target grids can be less than N. Map elements in the target grids can include various landmarks on the map, such as lane lines, zebra crossings, curbs, green belts, buildings, traffic signs, and traffic lights. The rendering engine can identify the target grids to be rendered from the visualized area from the vehicle's rendering perspective. During rendering operations, it can render the information of the map elements included in the selected target grids into the target scene, such as a 3D scene, reducing the amount of data that needs to be processed during rendering operations and improving rendering quality. For example, this can reduce the computing power requirements of onboard computing devices and improve the rendering efficiency and quality of high-precision maps and other demanding applications.

[0058] Figure 4 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure, which may include one or more features of the rendering method described above. In one implementation, S302 divides a region in the map data corresponding to the vehicle's location into multiple grids, including:

[0059] S401. Parse the map data corresponding to the vehicle's location to obtain the vertices of the elements included in the map data.

[0060] S402. Traverse the vertices of the elements included in the map data to obtain multiple edge vertices.

[0061] S403. Based on the multiple edge vertices and the mesh division method, divide the region composed of the multiple edge vertices into the multiple meshes.

[0062] In this embodiment of the disclosure, the map data corresponding to the vehicle's location may include several map elements. The map elements included in the map data for different vehicle locations may be all or part different. A certain map element may include several constituent faces. A constituent face can be understood as a plane that makes up the map element. A constituent face may include multiple vertices. For example, if the constituent face is a triangular face, then the constituent face may include three vertices. If the constituent face is a square face, then the square face may include four vertices. The constituent face may also be other planar shapes. The data of multiple vertices of a constituent face of a map element can be stored in a constituent face, and a constituent face may have a corresponding constituent face index. The data of the vertices of multiple constituent faces of a map element can be stored in the constituent face list of the map element. The constituent face list of a map element may have a corresponding list index. The constituent face list includes information such as the vertex identifier, vertex coordinates, constituent face index, and constituent face orientation of the constituent face. For example, if the index of the constituent face list of a map element is A, table A includes the indices of the constituent faces of the map element as A1, A2, and A3. Face A1 consists of vertices A1-1, A1-2, and A1-3; face A2 consists of vertices A2-1, A2-2, and A2-3; face A3 consists of vertices A3-1, A3-2, and A3-3.

[0063] In one scenario, information about each vertex within a constituent face can be retrieved based on its index. Similarly, information about a specific vertex can be used to retrieve the constituent face containing that vertex, and consequently, information about all vertices within that constituent face. For example, information about vertices A2-1, A2-2, and A2-3 within constituent face A2 can be retrieved based on vertex A2-3.

[0064] In another scenario, information about the vertices of all constituent faces included in the constituent face list can be obtained based on the index of the constituent face list. Similarly, information about a specific vertex can be used to retrieve the constituent face list containing that vertex, and thus, information about the vertices of all constituent faces in that list. For example, based on vertex A2-3, information about all vertices of all constituent faces A1, A2, and A3 in table A can be obtained.

[0065] In this embodiment of the disclosure, after obtaining the map data corresponding to the vehicle's location, the map data can be parsed to obtain several vertices of each map element included in the map data. The process of parsing the map data and the process of dividing the grid can be performed without time constraints; the grid can be divided first and then the map data can be parsed, or the map data corresponding to the vehicle's location can be parsed first and then the grid can be divided, or they can be executed in parallel.

[0066] In this embodiment of the disclosure, by traversing several vertices of the elements in the map data corresponding to the vehicle's location, the edge vertices of the area covered by the map data can be obtained. For example, edge vertices may include the vertex with the largest x-coordinate, the vertex with the largest y-coordinate, the vertex with the smallest x-coordinate, and the vertex with the smallest y-coordinate among all vertices in the map data corresponding to the vehicle's location. Alternatively, edge vertices may include the vertex with the largest x-coordinate, the vertex with the largest y-coordinate, the vertex with the smallest x-coordinate, and the vertex with the smallest y-coordinate among all vertices in the map data corresponding to the vehicle's location, each with a set value added. This is equivalent to extending the coordinates of the largest vertex in the map data corresponding to the vehicle's location outwards. The coordinate values ​​of these edge vertices can be obtained during the traversal of all vertices in the map data. In one approach, the coordinate values ​​of these vertices can be connected to obtain the region to be divided. In another approach, the region to be divided corresponding to the map data can be determined based on the largest x-coordinate, the largest y-coordinate, the smallest x-coordinate, and the smallest y-coordinate among the edge vertices. For example, as... Figure 5 As shown, two lines parallel to the x-axis are obtained based on the maximum and minimum x-coordinates; two lines parallel to the y-axis are obtained based on the maximum and minimum y-coordinates; and a bounding box is determined based on the lines parallel to the x-axis and the two lines parallel to the y-axis. This bounding box can represent the area to be divided in the map data corresponding to the vehicle's position.

[0067] Alternatively, edge coordinates can be obtained directly instead of edge vertices. For example, edge coordinates can include the maximum x-coordinate, maximum y-coordinate, minimum x-coordinate, and minimum y-coordinate of all vertices in the map data. Based on the maximum x-coordinate, maximum y-coordinate, minimum x-coordinate, and minimum y-coordinate, the corresponding region to be divided in the map data can be determined.

[0068] In this embodiment of the disclosure, the region to be divided can be considered as a bounding box. The bounding box can be divided into multiple grids according to a preset grid division method. The parameters corresponding to the preset grid division method can be one or more of the following: the number of grids, the number of rows, the number of columns, etc. By substituting the parameters corresponding to the preset grid division method, the coordinates of the edge vertices, etc., into the set division formula, the information of the divided grid can be calculated.

[0069] For example, such as Figure 6 As shown, the maximum x-coordinate is globalmaxx, the maximum y-coordinate is globalmaxy, the minimum x-coordinate is globalminx, and the minimum y-coordinate is globalminy. If the grid is divided into m rows and n columns, the following division formula can be used to calculate the coordinates of the four vertices of the grid.

[0070] zoneData[i].minx=globalminx+(i%n)*deltax;

[0071]

[0072] zoneData[i].maxx=globalminx+(i%n+1)*deltax;

[0073]

[0074] deltax=(globalmaxx-globalminx) / n;

[0075] deltay=(globalmaxy-globalminy) / m.

[0076] Where zoneData[i] represents the grid, i represents the grid number or index, zoneData[i].maxx represents the maximum x-coordinate of the i-th grid, zoneData[i].maxy represents the maximum y-coordinate of the i-th grid, zoneData[i].minx represents the minimum x-coordinate of the i-th grid, and zoneData[i].miny represents the minimum y-coordinate of the i-th grid. globalminx represents the minimum x-coordinate of the bounding box, globalminy represents the minimum y-coordinate of the bounding box, globalmaxx represents the maximum x-coordinate of the bounding box, and globalmaxy represents the maximum y-coordinate of the bounding box. This indicates rounding down. If deltax and deltay are integers, the coordinates of the four vertices of the calculated mesh can also be integers.

[0077] The coordinates of the top-right vertex of the i-th grid can be determined using zoneData[i].maxx and zoneData[i].maxy. The coordinates of the bottom-right vertex of the i-th grid can be determined using zoneData[i].maxx and zoneData[i].miny. The coordinates of the top-left vertex of the i-th grid can be determined using zoneData[i].minx and zoneData[i].maxy. The coordinates of the bottom-left vertex of the i-th grid can be determined using zoneData[i].maxx and zoneData[i].maxy.

[0078] Taking the example of needing to divide a rectangular bounding box into a 10 (rows) * 10 (columns) grid, the coordinates of the four vertices of each grid can be calculated using the following formula.

[0079] zoneData[i].minx=globalminx+(i%10)*deltax;

[0080]

[0081] zoneData[i].maxx=globalminx+(i%10+1)*deltax;

[0082]

[0083] deltax=(globalmaxx-globalminx) / 10;

[0084] deltay=(globalmaxy-globalminy) / 10.

[0085] exist Figure 6 In the example, the bounding box corresponding to the region to be divided has globalminx = 0, globalminy = 0, globalmaxx = 10, and globalmaxy = 10. The bounding box is divided into 100 grids of 10*10. The grid number i ranges from i = [0, 99], i ∈ N. (minx, miny) represents the lower left corner coordinate of the grid, and (maxx, maxy) represents the upper right corner coordinate. The coordinates of the grids i = 0, i = 1, i = 8, i = 9, i = 18, and i = 99 are calculated as follows:

[0086] When i = 0, (minx,miny) = (0,0), (maxx,maxy) = (1,1).

[0087] When i = 1, (minx,miny) = (1,0), (maxx,maxy) = (2,1).

[0088] When i = 8, (minx,miny) = (8,0), (maxx,maxy) = (9,1).

[0089] When i = 9, (minx,miny) = (9,0), (maxx,maxy) = (10,1).

[0090] When i = 18, (minx, miny) = (8, 1), (maxx, maxy) = (9, 2).

[0091] When i = 99, (minx,miny) = (9,9) and (maxx,maxy) = (10,10).

[0092] According to the embodiments of this disclosure, multiple edge vertices are obtained from the vertices of the elements included in the map data corresponding to the vehicle's location. The region composed of the multiple edge vertices can cover more elements in the map data corresponding to the vehicle's location, such as the vertices of all elements. The grid subsequently divided based on this region can also include more elements in the map data, such as the vertices of all elements, which is beneficial to improving the accuracy of the rendering results.

[0093] Figure 7 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure, which may include one or more features of the rendering method described in the above embodiments. In one implementation, the method further includes:

[0094] S701, Traverse the constituent surfaces of the elements included in the map data;

[0095] S702. If at least one vertex of the constituent surfaces of the first element included in the map data is located within the first grid, the index corresponding to the constituent surface of the first element is added to the constituent surface list of the first grid; wherein the first grid is one of the multiple grids.

[0096] In this embodiment of the disclosure, after dividing the map data corresponding to the vehicle's location into multiple grids, the vertex coordinates of the constituent faces of each element in the map data can be traversed. If at least one vertex coordinate of a constituent face of an element is within the range of a certain grid, the index of that constituent face can be associated with that grid. Specifically, the index of the constituent face can be recorded in the constituent face list corresponding to the grid to indicate that the grid includes the constituent face. If different vertex coordinates of a constituent face of an element are within the range of multiple grids, the index of the constituent face can be associated with each of these multiple grids respectively. For example, the index of the constituent face can be recorded in the constituent face list corresponding to each of these multiple grids.

[0097] For example, if the index of a component face of a building in the map data corresponding to the vehicle's location is A3, and vertices A3-1 and A3-2 in component face A3 are in grid n0, the index A3 of the component face corresponding to the lane line can be recorded in the component face list corresponding to grid n0.

[0098] In one implementation, if at least one vertex of the first element is within the first grid, the index corresponding to the list of constituent faces of the first element can be added to the element list of the first grid. In this case, more complete information about some elements appearing in the grid can be stored through the element list of the grid.

[0099] In this embodiment of the disclosure, if the coordinates of at least one vertex of a constituent face of an element are within the range of a certain grid, the index of the constituent face list corresponding to that element can be associated with that grid. Specifically, the index of the constituent face list corresponding to that element can be recorded in the element list corresponding to that grid to indicate that the grid includes that element. If the coordinates of different vertices of a constituent face of an element are within the range of multiple grids, the index of the constituent face list corresponding to that element can be associated with each of these multiple grids respectively. For example, the index of the constituent face list corresponding to that element can be recorded in the element lists corresponding to these multiple grids respectively.

[0100] For example, if the index of the component surface list of an element in the map data corresponding to the vehicle's location, such as a lane line, is A, and vertex A1-1 in grid n1 and vertex A3-2 in grid n2 in table A, then the index A of the component surface list corresponding to the lane line can be recorded in the element list corresponding to grid n1, and the index A of the component surface list corresponding to the lane line can also be recorded in the element list corresponding to grid n2.

[0101] Taking a triangular face as an example, the index of the triangular face list of an element is T, and the index of a triangular face of that element is T1. The coordinates of the three vertices of triangular face T1 are (0,0), (0,1), and (2,0), and the four vertices of grid n1 are (0,0), (0,1), (1,0), and (1,1), and the four vertices of grid n2 are (1,0), (1,1), (2,0), and (2,1). Since the vertices (0,0) and (0,1) of triangular face T1 are in grid n1, and the vertex (2,0) is in grid n2, the index corresponding to triangular face T1 can be recorded in the face list of grid n1 and grid n2, or the index of the triangular face list corresponding to the element containing triangular face T1 can be recorded in the element list of grid n1 and grid n2 respectively.

[0102] According to embodiments of this disclosure, map elements included in the map data corresponding to the vehicle's location can be associated with a grid based on the vertices of the map elements, which facilitates the display of a complete rendering effect during rendering and prevents data loss.

[0103] Figure 8 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure, which may include one or more features of the rendering method described in the above embodiments. In one implementation, the method includes:

[0104] S801. If the first runtime of the rendering engine reaches the first set duration, request the map data corresponding to the location of the vehicle.

[0105] In one implementation, the first runtime is the time elapsed from the moment the rendering engine last requested map data corresponding to the vehicle's location to the current moment.

[0106] In this embodiment of the disclosure, step S801 can be executed before step S301. For example, after the rendering engine starts, the runtime of the rendering engine can be obtained. By determining whether the runtime of the rendering engine has reached a preset duration, it is decided whether to request map data of the vehicle at its current location. For example, the runtime of the rendering engine can be recorded using a timer. First, when the rendering engine starts, a timer can be started and a request can be made to obtain map data of the vehicle at its current location. Then, the timer is cleared and restarted. When the working duration of the timer reaches a first preset duration, it indicates that the first runtime of the rendering engine has reached the first preset duration, and map data can be requested again. The timer is then cleared and restarted, and so on. For example, if the first preset duration is 10 seconds, when the rendering engine starts, it requests to obtain tile data of the vehicle at its current first location once, and the timer starts and begins counting. When the timer counts to 10 seconds, it requests to obtain tile data of the vehicle at its current second location again, clears the timer and restarts counting. In this way, the rendering engine can request to obtain map data corresponding to the vehicle at its current location every 10 seconds. If the vehicle is in motion, and the first and second positions are different, the tile data obtained from the two requests will also be different. The above-mentioned first set duration of 10 seconds is only an example and not a limitation. It can be adjusted according to the specific application scenario, such as adjusting it to 5 seconds, 20 seconds, or 30 seconds.

[0107] According to embodiments of this disclosure, the first runtime is determined based on the time of the last request for map data corresponding to the vehicle's location. The first runtime can control the time interval for requesting map data corresponding to the vehicle's location, avoiding frequent requests for large amounts of data and reducing computational power consumption. Alternatively, other methods can be used to determine the first runtime. For example, the time when the map data corresponding to the vehicle's location is obtained from the rendering engine can be used as the starting point of the first runtime. In this case, the time interval for obtaining map data can be controlled, reducing the amount of data that needs to be processed.

[0108] In one implementation, S302 obtains the target mesh to be rendered from the plurality of meshes based on the visualization area under the rendering view of the vehicle and the position of the vehicle, and further includes the following case one or case two.

[0109] Scenario 1: When the second runtime of the rendering engine reaches the second set duration, the target mesh to be rendered is obtained from the multiple meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle.

[0110] Scenario 2: If the first runtime of the rendering engine has not reached the first set runtime and the second runtime of the rendering engine has reached the second set runtime, the target mesh to be rendered is obtained from the multiple meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle.

[0111] In one implementation, the second runtime is the duration from the moment the rendering engine last entered rendering mode to the current moment. The moment the rendering engine last entered rendering mode can be determined based on the moment the rendering engine last began determining the target mesh, for example, the same moment as the moment the rendering engine last began determining the target mesh. The moment the rendering engine last entered rendering mode can also be another moment, such as the moment when the vertex cache update was completed.

[0112] In this embodiment of the disclosure, a second runtime may be set instead of a first runtime. In this case, the rendering engine can request map data corresponding to the vehicle's location based on events and / or vehicle status. For example, if an event is detected where the driver operates certain buttons or functions on the vehicle's infotainment system, a request to obtain map data corresponding to the vehicle's location is triggered. Similarly, if the vehicle speed reaches a certain speed threshold or the vehicle's position movement reaches a certain distance threshold, a request to obtain map data corresponding to the vehicle's location is triggered.

[0113] In this embodiment of the disclosure, the rendering engine can control whether the vehicle enters the rendering process based on a second runtime. For example, a timer can be set to record the second runtime of the rendering engine. After the rendering engine initially starts running, the timer starts working. When the timer's working duration reaches the second set duration for the first time, the vehicle can enter the rendering mode for the first time, for example, to begin determining the target mesh. Then, the timer is reset and restarted. If the timer's working duration reaches the second set duration again, the vehicle can enter the rendering mode again.

[0114] In this embodiment, the rendering engine can control whether a vehicle enters the rendering process based on a first runtime and a second runtime. For example, two timers can be set. The first timer records the first runtime of the rendering engine. The second timer records the second runtime of the rendering engine. If the first timer's runtime has not reached the first set runtime and the second timer's runtime has reached the second set runtime, the rendering engine can enter the rendering mode. If the first set runtime is longer than the second set runtime, the frequency of requesting regional data is lower than the frequency of updating the target grid. For example, the first set runtime is 10 seconds and the second set runtime is 100 milliseconds. The rendering engine can request tile data of the vehicle at its current location every 10 seconds. And, within 10 seconds, the rendering engine can enter the rendering process every 100 milliseconds.

[0115] According to embodiments of this disclosure, the second runtime is determined based on the last time the rendering mode was entered, which can control the frequency of entering the rendering mode, update the target mesh that needs to be rendered in a timely manner, and obtain a more continuous and accurate rendering effect.

[0116] Figure 9 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure. The method may include one or more features of the rendering method described in the above embodiments. In one implementation, the visualization area under the vehicle's rendering viewpoint includes the projection area of ​​the camera's view frustum onto the map plane under that rendering viewpoint. Based on the visualization area under the vehicle's rendering viewpoint and the vehicle's position, the target mesh to be rendered is obtained from the plurality of meshes, and the method further includes:

[0117] S901. Based on the plane equation of the view frustum and the map plane equation, obtain multiple vertices of the visualization area;

[0118] S902. Compare the positions of multiple vertices in the visualization area with the position of the vehicle to obtain multiple rendering offset values;

[0119] S903. Based on the vehicle's position and the multiple rendering offset values, obtain the target mesh from the multiple meshes.

[0120] In this embodiment of the disclosure, the visualized area from the vehicle's rendering perspective may include the interface between the view frustum plane of the vehicle's camera and the map plane. The camera used to determine the view frustum may include an actual onboard sensor or a virtual camera in the rendering engine. The view frustum can represent the camera's field of view, such as a square pyramid with the vehicle's head position as its side vertex. If the view frustum plane is referred to as the view frustum surface, the view frustum surface may include the four sides of the square pyramid, which can be represented by a plane equation. In a 3D map, the map plane may be a plane with an axis of 0; for example, a plane with a z-axis of 0 may be the z-plane. The map plane may have a corresponding plane equation. Four intersection equations can be calculated using the plane equations of each view frustum surface and the plane equation of the map plane, respectively. Then, the intersection points are calculated pairwise using the four intersection equations to obtain four intersection points. These four intersection points are the four vertices of the visualized area. The above four intersection points are merely examples and not limitations; other shapes of view frustums may also be used to obtain other numbers of intersection points.

[0121] like Figure 10 As shown, taking a vehicle-mounted camera as an example, the map plane is the z-plane. By using the plane equation of each view frustum and the plane equation of the z-plane respectively, four corresponding z-plane line equations are obtained. Then, using the four z-plane line equations, the intersection points are calculated pairwise to obtain four intersection points, which are the vertices of the visualization area.

[0122] In some examples, the number and location of target meshes to be rendered can be determined based on the relationship between the coordinates of the four vertices of the visualized area and the coordinates of the four vertices of each of the aforementioned grids. For example, if at least one bounding box boundary of a mesh passes through the visualized area, or if at least one vertex of a mesh is within the visualized area, that mesh can be identified as a target mesh. Specifically, multiple vertices of the visualized area can be compared with the vehicle's position to obtain multiple rendering offset values. Based on these rendering offset values, it can be determined whether the changes in the target meshes to be rendered are significant. If so, the rendering process continues. If the rendering offset values ​​indicate that the changes in the target meshes to be rendered are minor, the rendering process can be stopped, retaining the previous rendering result.

[0123] According to embodiments of this disclosure, the vehicle's visualization area can be determined by the plane equation of the view frustum and the map plane equation. This visualization area can be the display area in the vehicle's HMI. By filtering the number and location of target grids to be rendered through the visualization area, the computational load required for rendering can be reduced. Since it is not necessary to process the entire area of ​​map data corresponding to the vehicle's location, the computational power requirements for high-precision map rendering can be reduced, improving rendering efficiency and rendering effect.

[0124] In one implementation, within the map plane, the rendering offset value is at a distance greater than a distance threshold or the furthest distance from the vehicle's position in a specified direction.

[0125] In this embodiment, the specified direction can include up, down, left, and right, or it can include a direction along one or more reference lines. If the distance between a vertex and the vehicle's position in a certain direction is greater than a certain distance threshold, an offset value can be calculated based on the positions of the vertex and the vehicle. For example, if a vertex in the visualization area is above the vehicle, an upward offset value between the vertex and the vehicle can be calculated. If the distance between a vertex and the vehicle's position is the farthest in a certain direction, a farthest offset value can be calculated based on the positions of the vertex and the vehicle. For example, if a vertex in the visualization area is above the vehicle, a farthest upward offset value between the vertex and the vehicle can be calculated.

[0126] For example, the offset value between each vertex of the visualization area and the vehicle's position can be calculated, i.e., the rendering offset value. Figure 11 As shown, based on the distance between the vertex coordinates of the visualized area and the center point coordinates of the vehicle, the left offset of the visualized area relative to the vehicle's position on the x-axis can be calculated.

[0127] According to embodiments of this disclosure, by using a rendering offset value that is a certain distance from the vehicle's position, more grids around the vehicle can be identified as target grids, preventing data loss and achieving continuous rendering effects.

[0128] Figure 12 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure, which may include one or more features of the rendering method described above. In one implementation, S903 obtains the target mesh from the plurality of meshes based on the vehicle's position and the plurality of rendering offset values, including:

[0129] S1201. Based on the vehicle's position, the multiple rendering offset values, and the conversion coefficient, obtain the rendering boundary associated with the vehicle; wherein, the conversion coefficient is the conversion coefficient between the length unit in the rendering view and the reference length unit;

[0130] S1202. Obtain the target mesh that is within the rendering boundary from the plurality of meshes.

[0131] In this embodiment of the disclosure, distortion may occur in the image captured by the map or camera in the rendering engine due to factors such as virtual field of view or shooting angle. A conversion factor can mitigate the error caused by distortion. The conversion factor can be obtained by calculating the ratio of the unit length in the image captured by the map or camera in the rendering engine to the actual unit length. For example, a marker point is set on the map, and the actual distance S1 between the vehicle and the marker point, and the distance S2 between the vehicle and the marker point in the rendering are calculated. The conversion factor KA can be equal to S2 / S1.

[0132] According to embodiments of this disclosure, the rendering boundary under the rendering viewpoint is calculated using the vehicle's position, rendering offset value, and conversion coefficient. This allows the area covered by multiple rendering boundaries to be larger than the visualization area, and more grids associated with the vehicle's surroundings to be identified as target grids, making the rendering effect more continuous.

[0133] In one implementation, S1201 obtains the rendering boundary associated with the vehicle based on the vehicle's position, the plurality of rendering offset values, and the conversion coefficient, including at least one of the following:

[0134] Method 1: Subtract the product of the first rendering offset value and the conversion coefficient from the x-coordinate of the vehicle's position to obtain the minimum x-coordinate of the rendering boundary; where the first rendering offset value is the left offset value of the visualization area and the vehicle's position on the x-axis.

[0135] Method 2: Add the product of the second rendering offset value and the conversion coefficient to the x-coordinate of the vehicle's position to obtain the maximum x-coordinate of the rendering boundary; where the second rendering offset value is the right offset value of the visualization area and the vehicle's position on the x-axis.

[0136] Method 3: Subtract the product of the third rendering offset value and the conversion coefficient from the y-coordinate of the vehicle's position to obtain the minimum y-coordinate of the rendering boundary; where the third rendering offset value is the downward offset of the visualization area and the vehicle's position on the y-axis.

[0137] Method 4: Add the product of the fourth rendering offset value and the conversion coefficient to the y-coordinate of the vehicle's position to obtain the maximum y-coordinate of the rendering boundary; where the fourth rendering offset value is the upward offset value of the visualization area and the vehicle's position on the y-axis.

[0138] For example, the rendering boundary corresponding to the rendering boundary can be calculated using the following formula:

[0139] Minimum x-coordinate of the rendering boundary = Vehicle x-coordinate – Farthest left offset * KA

[0140] Maximum x-coordinate of the rendering boundary = vehicle x-coordinate + furthest right offset * KA

[0141] Minimum y-coordinate of the rendering boundary = vehicle y-coordinate - farthest upper offset * KA

[0142] Maximum y-coordinate of the rendering boundary = vehicle y-coordinate + farthest lower offset * KA

[0143] According to the embodiments of this disclosure, based on the coordinates of the above-mentioned multiple rendering boundaries, the largest area to be rendered associated with the visualization area can be determined, thereby selecting a more suitable target mesh to be rendered in the largest area to be rendered. This not only reduces the amount of rendering calculation required, but also ensures the rendering effect.

[0144] In one implementation, S1202 obtaining the target grid within the rendering boundary from the plurality of grids includes: setting the grid to be processed to a renderable state in the coordinate system of the map plane if the coordinates of the grid to be processed among the plurality of grids meet at least one of the following conditions, and the grid in the renderable state is the target grid:

[0145] The maximum x-coordinate of the mesh to be processed is less than or equal to the maximum x-coordinate of the rendering boundary;

[0146] The minimum x-coordinate of the mesh to be processed is greater than or equal to the minimum x-coordinate of the rendering boundary;

[0147] The maximum y-coordinate of the mesh to be processed is less than or equal to the maximum y-coordinate of the rendering boundary;

[0148] The minimum y-coordinate of the mesh to be processed is greater than or equal to the minimum y-coordinate of the rendering boundary.

[0149] In this embodiment of the disclosure, by comparing the vertex coordinates of each grid obtained from the division with the coordinates of the rendering boundary, the position and number of grids within the region formed by the rendering boundary can be determined. For example, the minimum x-coordinate of the rendering boundary is 2, the maximum x-coordinate is 5, the minimum y-coordinate is 1, and the maximum y-coordinate is 3. If a vertex of a grid has coordinates (2, 3), then at least a portion of that grid is within the region formed by the rendering boundary, and it can be identified as the target grid.

[0150] According to embodiments of this disclosure, the target mesh around the vehicle determined by rendering boundaries can not only reduce the amount of rendering computation required, but also improve the continuity of rendering effects.

[0151] Figure 13 This is a flowchart illustrating a rendering method according to another embodiment of the present disclosure, which may include one or more features of the rendering method described in the above embodiment. In one implementation, the target mesh includes element information in a vertex cache, and the method further includes:

[0152] S1301. Obtain the vertices of the constituent faces corresponding to the indices in the constituent face list of the target mesh;

[0153] S1302. Add the vertices of the constituent face list of the target mesh to the rendering list of the vertex cache.

[0154] In this embodiment of the disclosure, the map data of the target mesh can be stored in a cache during rendering. For example, the vertex cache may include a rendering list. This rendering list may include specific information about the constituent faces and / or vertices to be rendered. If the index of a constituent face containing a vertex is in the constituent face list of the target mesh, the vertex of that constituent face can be added to the rendering list. Specifically, the map data of this disclosure includes map elements, a constituent face list, and constituent faces. Taking a triangular face as an example, its data structure is as follows:

[0155] Struct TriangleData{

[0156] Float3 pos1;

[0157] Float3 pos2;

[0158] Float3 pos3;

[0159] Float3 normal;

[0160] }

[0161] Where pos1, pos2, and pos3 are the coordinates of the three vertices of the triangle face, and normal is the orientation information of the triangle face.

[0162] std::map<int,TriangleData> TriangleInfo;

[0163] In this context, TriangleData represents the triangle face, int represents the triangle face index, and TriangleInfo represents the list of triangle faces.

[0164] std::map<std::string,TriangleInfo> globalMapElementsTriangle;

[0165] Here, string is the name of the map element, such as zebra crossing, lane line, traffic light, building, etc., TriangleInfo is the list of triangles, and globalMapElementsTriangle is the map element information.

[0166] In this embodiment of the disclosure, when storing map data into the cache, the elements in the map data and their corresponding list of constituent faces can be stored in the cache, or the vertices of the constituent faces and their corresponding map element information can be stored in the cache.

[0167] In some examples, a corresponding element list can be set for the divided grid. The element list can include indices of the face lists of map elements whose vertices are partially or entirely within the grid. In this case, if the index of the face list of an element to which a vertex belongs is in the element list of the target grid, the vertices included in that element's face list can be added to the rendering list. If the index of the face list of an element to which a vertex belongs is not in the element list of the target grid, the vertices included in that element's face list can be removed from the rendering list.

[0168] According to embodiments of this disclosure, the cache can obtain map data corresponding to the grid to be rendered, providing traversal for further rendering of the high-precision map. Furthermore, during storage, not all map data corresponding to the grid is stored in the cache, reducing cache occupancy, increasing the amount of available data, and improving rendering efficiency.

[0169] In one implementation, S303 renders the information of the elements included in the target mesh into the target scene, including: if the difference between the rendering offset value obtained in the (N+1)th time and the rendering offset value obtained in the Nth time is greater than the offset threshold, rendering the vertices of the elements in the vertex cache into the target scene; where N is an integer greater than or equal to 1.

[0170] In this embodiment of the disclosure, the data in the vertex cache is constantly updated. When the vehicle position changes, its area to be rendered also changes. At this time, it is necessary to store the map data corresponding to the new grid to be rendered in the cache.

[0171] According to the embodiments of this disclosure, the consistency between the cached map data and the grid to be rendered can be guaranteed, and high-precision maps can be dynamically rendered as the vehicle position changes.

[0172] In one implementation, such as Figure 13 As shown, the method also includes:

[0173] S1303. Remove vertices from the vertex cache rendering list that are not in the component face list of the target mesh. For example, if the index of a component face containing a vertex is not in the component face list of any target mesh, the vertex of that component face can be deleted.

[0174] In this embodiment of the disclosure, when the map data in the vertex cache is updated, the map data corresponding to the meshes that have left the rendering boundary can also be deleted.

[0175] According to embodiments of this disclosure, map data that does not need to be rendered can be deleted from the cache, saving cache space, reducing unnecessary rendering work, and improving rendering efficiency.

[0176] In one implementation, the method further includes: maintaining the previous rendering state of the vehicle's display interface in one or more of the following situations:

[0177] The rendering engine's second runtime has not reached the second set duration;

[0178] The difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth rendering iteration is less than the offset threshold; where N is an integer greater than or equal to 1.

[0179] The data in the vertex cache has not been updated.

[0180] In this embodiment of the disclosure, when the runtime of the rendering engine has not reached the preset duration, the previous rendering result can be used temporarily for display. When the vehicle is stopped or moving slowly, if the calculated change in its offset value does not exceed a threshold, the previous rendering result can also be used temporarily for display. When no new data is stored in the vertex cache, the previous rendering result can also be used temporarily for display.

[0181] According to embodiments of this disclosure, the number of rendering operations can be reduced, saving the device's computing power. Simultaneously, using the previous rendering result for display ensures the normal display of high-precision maps in the HMI under special circumstances.

[0182] In a specific application scenario, the rendering method of this disclosure embodiment can be a method to improve the rendering performance of high-precision maps. When the rendering engine parses tile data, it can generate a tile mesh structure and divide the tile mesh into multiple mesh structures. During rendering, the map area to be displayed around the main vehicle is first calculated. On the z-plane, only meshes within a certain distance from the main vehicle are rendered. As the main vehicle moves, the required mesh data is refreshed every certain period of time, for example, 100ms, based on the main vehicle's position and loaded into the scene rendering. Mesh data that is no longer needed is unloaded from the scene.

[0183] like Figure 14 As shown, the rendering method may include the following steps:

[0184] S1401, Application startup. For example, the rendering engine in the vehicle's infotainment system starts.

[0185] S1402. Calculate the conversion factor (KA) between the unit in the rendering view and the actual unit, such as 1m (meter). For example, a marker point can be set on the map, and the conversion factor can be calculated by calculating the actual distance between the main vehicle and the marker point, as well as the distance between the main vehicle and the marker point in the rendering.

[0186] This step can also be calculated before subsequent rendering is required. For example, it can be performed before S1409.

[0187] S1403. During application operation, obtain the application's runtime.

[0188] S1404. Determine whether the first runtime of the rendering engine has reached the first set duration, such as 10 seconds. If yes, execute S1405; otherwise, execute S1408.

[0189] S1405, The rendering engine requests tile data. After receiving the tile data, the rendering engine parses the tile data and generates an example of a tile mesh structure, as shown below:

[0190] A triangle's vertices can include the coordinates of the three vertices, the triangle's orientation, the triangle's index, the triangle's information structure, and a list of triangles. For example:

[0191] Struct TriangleData{

[0192] / / Vertex of the triangle

[0193] Float3 pos1;

[0194] Float3 pos2;

[0195] Float3 pos3;

[0196] / / Triangle direction

[0197] Float3 normal;

[0198] }

[0199] Among them, pos1, pos2, and pos3 can represent the coordinates of the three vertices of the triangle face, respectively, and normal can represent the orientation information of the triangle face.

[0200] An example of a triangular face index and triangular face information structure is as follows:

[0201] std::map<int,TriangleData> TriangleInfo.

[0202] Among them, TriangleData can represent triangle face data, int can represent triangle face index, and TriangleInfo can represent triangle face information.

[0203] a kind of land Figure 10 The following is an example of a list of triangles for elements such as intersections, zebra crossings, stop lines, and buildings:

[0204] std::map<std::string,TriangleInfo> globalMapElementsTriangle.

[0205] An example of a triangular facet list is as follows: where string can represent the name of a map element, such as a map element. Figure 10 Elements such as intersections, zebra crossings, stop lines, and buildings. `globalMapElementsTriangle` can represent a list of triangles representing this element.

[0206] S1406. After parsing the tile data, the rendering engine iterates through the vertices of each element in the tile data, such as intersections, zebra crossings, stop lines, and buildings, and generates triangles based on the vertices. The triangles and their corresponding indices are then filled into the corresponding triangle information (TriangleInfo). The triangle index can be incremented by a value, for example, 1, and the element name and triangle information are added to the map element triangle (globalMapElementsTriangle).

[0207] S1407, Mesh Generation. Traverse the vertices obtained from the parsing, such as the vertices included in the globalMapElementsTriangle of the map elements, and obtain the maximum values ​​of the vertices, globalmaxx and globalmaxy, and the minimum values, globalminx and globalminy. Update the mesh, such as zoneData

[100] , based on the maximum and minimum values ​​of the vertices.

[0208] The mesh structure can include mesh bounding box information, a flag indicating whether the mesh is involved in rendering, and a list of triangles belonging to the region to which an element belongs.

[0209] An example of a mesh structure is as follows:

[0210] Struct MeshData{

[0211] / / Mesh bounding box information

[0212] float maxx;

[0213] float maxy;

[0214] float minx;

[0215] float miny;

[0216] / / Use a flag to determine whether the grid is involved in rendering.

[0217] bool used;

[0218] / / land Figure 10 List of triangular faces belonging to the area containing elements such as intersections, zebra crossings, stop lines, and buildings.

[0219] std::map <std::string,std::vector <int>>mapElementsTrianglesIndex;

[0220] }

[0221] Among them, maxx, maxy, minx, and miny can represent the mesh bounding box information; used can represent the usage flag, used to indicate whether the mesh participates in rendering. For example, if used is true, it indicates that the mesh participates in rendering. If used is false, it indicates that the mesh does not participate in rendering. mapElementsTrianglesIndex can represent the bounding box information. Figure 10 The index of the triangular facet list of the areas to which elements such as intersections, zebra crossings, stop lines, and buildings belong.

[0222] In one example, a grid structure can be used to store grid data information. For example, MeshDatazoneData

[100] indicates that the grid structure includes data for 100 grids. zoneData can be used to represent the basic information of each grid.

[0223] In one example, the tile mesh region can be divided into 10x10 grids based on the maximum values ​​of globalmaxx and globalmaxy, and the minimum values ​​of globalminx and globalminy of the resolved vertices, and the MeshData information of each grid can be calculated. An example of a partitioning formula is as follows:

[0224] zoneData[i].minx=globalminx+(i%10)*deltax;

[0225]

[0226] zoneData[i].maxx=globalminx+(i%10+1)*deltax;

[0227]

[0228] deltax=(globalmaxx-globalminx) / 10;

[0229] deltay=(globalmaxy-globalminy) / 10.

[0230] An example of mesh generation based on formulas can be found here. Figure 6 And its related descriptions.

[0231] Furthermore, the triangular face information of each element can be traversed. If a triangular face contains a vertex that is within the bounding box of zoneData[i], then the corresponding index of that triangular face is added to the triangular face list of the element associated with the bounding box of zoneData[i]. Additionally, the index of the complete triangular face list corresponding to that element can also be added to the constituent face list associated with the bounding box of zoneData[i].

[0232] S1408. Determine whether the second runtime of the rendering engine has reached the second set duration, such as 100ms. If yes, execute S1409; otherwise, execute S1413.

[0233] S1409. Coordinates of points in the Z-plane visualization area under the rendering view: {jp0,jp1,jp2,jp3}. For example, four sets of straight line equations in the z-plane can be obtained by using the equations of the view frustum plane and the Z-plane. By finding the intersection points of each pair of lines, the vertices of the visualization area can be obtained.

[0234] Compare the vertex values ​​to find the farthest left offset (maxLeftOffset), farthest right offset (maxRightOffset), farthest bottom offset (maxBottomOffset), and farthest top offset (maxTopOffset) from the main vehicle's position. See [link / reference]. Figure 11 .

[0235] Based on the main vehicle's position coordinates, rendering offset, and conversion factor KA, calculate the mesh region surrounding the main vehicle (see the rendering area above). An example of the formula for calculating the boundary of this mesh region (see the rendering boundary above) is as follows:

[0236] Grid minx = Main vehicle position coordinate x-value - maxLeftOffset * KA;

[0237] Grid maxx = Main vehicle position coordinate x value + maxRightOffset * KA;

[0238] Grid miny = Main vehicle position coordinate y value - minBottomOffset * KA;

[0239] Grid maxy = Main vehicle position coordinate y value + maxTopOffset * KA.

[0240] Wherein, `minx` is the minimum x-coordinate of the grid region (i.e., the minimum x-coordinate of the rendering boundary), `miny` is the minimum y-coordinate of the grid region (i.e., the minimum y-coordinate of the rendering boundary), `maxx` is the maximum x-coordinate of the grid region (i.e., the maximum x-coordinate of the rendering boundary), and `maxy` is the maximum y-coordinate of the grid region (i.e., the maximum y-coordinate of the rendering boundary). The x-coordinate of the main vehicle's position is also the x-coordinate of the main vehicle, and the y-coordinate of the main vehicle's position is also the y-coordinate of the main vehicle.

[0241] S1410. Traverse the grid. If grid i satisfies at least one of the following conditions, execute S1411; otherwise, execute S1412:

[0242] zoneData[i].maxx <= grid maxx;

[0243] zoneData[i].minx >= grid minx;

[0244] zoneData[i].maxy <= grid maxy;

[0245] zoneData[i].miny>=grid miny.

[0246] S1411. If the used flag of mesh i is false, indicating that it will not participate in rendering, then mark the used flag as true and allow it to participate in rendering. Find the triangle face corresponding to mesh i and add the corresponding triangle face information to the vertex cache.

[0247] S1412. If the flag "used" for mesh i is true, then mark the flag "used" as false, indicating that it will not participate in rendering. Delete the vertex information of mesh i from the vertex cache.

[0248] S1413. Render based on vertex cache. The rendering list in the vertex cache can include the indices of the triangles of the elements to be rendered or the indices of the triangle list.

[0249] For example, during the rendering engine's operation, upon receiving available mesh information, it locates the vertex information of triangles based on the triangle list and adds this vertex information to the scene resources. After processing, when the rendering engine recognizes mesh data in use, it sets the mesh visibility to true and then renders the mesh data into the 3D scene. When the rendering engine recognizes mesh data that is no longer in use, it sets the mesh visibility to false, allowing the mesh to be unloaded from the 3D scene, and the 3D scene will no longer render this data.

[0250] Figure 15 This is a schematic diagram of a rendering apparatus according to an embodiment of the present disclosure, the apparatus comprising:

[0251] The partitioning module 1501 is used to divide the area in the map data into multiple grids based on the map data corresponding to the vehicle's location.

[0252] The first acquisition module 1502 is used to acquire the target mesh to be rendered from the multiple meshes based on the visualization area under the rendering view of the vehicle and the position of the vehicle.

[0253] Rendering module 1503 is used to render information about the elements included in the target mesh into the target scene.

[0254] Figure 16 This is a schematic diagram of a rendering apparatus according to another embodiment of the present disclosure. In one embodiment, the partitioning module 1501 includes:

[0255] The parsing submodule 1601 is used to parse the map data corresponding to the vehicle's location and obtain the vertices of the elements included in the map data;

[0256] The traversal submodule 1602 is used to traverse the vertices of the elements included in the map data to obtain multiple edge vertices;

[0257] The partitioning submodule 1603 is used to divide the region composed of the multiple edge vertices into multiple meshes according to the multiple edge vertices and the mesh partitioning method.

[0258] In one implementation, such as Figure 16 As shown, the device also includes:

[0259] Traversal module 1604 is used to traverse the constituent surfaces of the elements included in the map data;

[0260] Add module 1605 is used to add the index corresponding to the constituent face of the first element to the constituent face list of the first grid when at least one vertex of the constituent face of the first element included in the map data is located within the first grid; wherein the first grid is one of the multiple grids.

[0261] In one implementation, such as Figure 16 As shown, the device also includes:

[0262] The request module 1606 is used to request map data corresponding to the location of the vehicle when the first runtime of the rendering engine reaches a first set duration; wherein the first runtime is the duration from the moment when the rendering engine last requested map data corresponding to the location of the vehicle to the current moment.

[0263] In one implementation, such as Figure 16 As shown, the first acquisition module 1502 is also used for:

[0264] If the second runtime of the rendering engine reaches the second set duration, the target mesh to be rendered is obtained from the multiple meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle; or

[0265] If the first runtime of the rendering engine does not reach the first set runtime and the second runtime of the rendering engine reaches the second set runtime, the target mesh to be rendered is obtained from the multiple meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle.

[0266] The second runtime is the duration from the moment the rendering engine last entered rendering mode to the current moment.

[0267] In one implementation, the visualized area from the vehicle's rendering perspective includes the projection area of ​​the camera's view frustum onto the map plane from that rendering perspective, such as... Figure 16 As shown, the first acquisition module 1502 further includes:

[0268] The calculation submodule 1607 is used to obtain multiple vertices of the visualization area based on the plane equation of the view frustum and the map plane equation;

[0269] Comparison submodule 1608 is used to compare the positions of multiple vertices in the visualization area with the vehicle's position to obtain multiple rendering offset values;

[0270] The acquisition submodule 1609 is used to obtain the target mesh from the multiple meshes based on the vehicle's position and the multiple rendering offset values.

[0271] In one implementation, within the map plane, the rendering offset value is at a distance greater than a distance threshold or the furthest distance from the vehicle's position in a specified direction.

[0272] In one implementation, the acquisition submodule 1609 is further configured to:

[0273] Based on the vehicle's position, the multiple rendering offset values, and the conversion factor, the rendering boundary associated with the vehicle is obtained; where the conversion factor is the conversion factor between the length unit in the rendering view and the reference length unit;

[0274] Obtain the target mesh that is within the rendering boundary from among the multiple meshes.

[0275] In one implementation, the acquisition submodule is used to obtain the rendering boundary associated with the vehicle based on the vehicle's position, the plurality of rendering offset values, and the conversion coefficient, including at least one of the following:

[0276] The minimum x-coordinate of the rendering boundary is obtained by subtracting the product of the first rendering offset value and the conversion coefficient from the x-coordinate of the vehicle's position; where the first rendering offset value is the left offset value of the visualization area and the vehicle's position on the x-axis.

[0277] The maximum x-coordinate of the rendering boundary is obtained by adding the product of the second rendering offset value and the transformation coefficient to the x-coordinate of the vehicle's position; where the second rendering offset value is the right offset value of the visualization area and the vehicle's position on the x-axis.

[0278] The minimum y-coordinate of the rendering boundary is obtained by subtracting the product of the third rendering offset value and the transformation coefficient from the y-coordinate of the vehicle's position; where the third rendering offset value is the downward offset of the visualization area and the vehicle's position on the y-axis.

[0279] The maximum y-coordinate of the rendering boundary is obtained by adding the product of the fourth rendering offset value and the transformation coefficient to the y-coordinate of the vehicle's position; where the fourth rendering offset value is the upward offset value of the visualization area and the vehicle's position on the y-axis.

[0280] In one implementation, the acquisition submodule is used to acquire the target grid within the rendering boundary from the plurality of grids, including: setting the grid to be processed to a renderable state in the coordinate system of the map plane if the coordinates of the grid to be processed among the plurality of grids meet at least one of the following conditions, and the grid in the renderable state is the target grid:

[0281] The maximum x-coordinate of the mesh to be processed is less than or equal to the maximum x-coordinate of the rendering boundary;

[0282] The minimum x-coordinate of the mesh to be processed is greater than or equal to the minimum x-coordinate of the rendering boundary;

[0283] The maximum y-coordinate of the mesh to be processed is less than or equal to the maximum y-coordinate of the rendering boundary;

[0284] The minimum y-coordinate of the mesh to be processed is greater than or equal to the minimum y-coordinate of the rendering boundary.

[0285] In one implementation, such as Figure 16 As shown, the target mesh includes information about its elements in a vertex cache, and the device also includes:

[0286] The second acquisition module 1610 is used to acquire the vertices of the constituent faces corresponding to the indices in the constituent face list of the target mesh;

[0287] Add module 1611 to add vertices from the list of constituent faces of the target mesh to the rendering list of the vertex cache.

[0288] In one implementation, the rendering module 1503 is further configured to render the vertices of the element in the vertex cache to the target scene if the difference between the rendering offset value obtained in the (N+1)th time and the rendering offset value obtained in the Nth time is greater than the offset threshold; wherein N is an integer greater than or equal to 1.

[0289] In one implementation, such as Figure 16 As shown, the device also includes:

[0290] The deletion module 1612 is used to delete vertices of constituent faces that are not in the constituent face list of the target mesh from the rendering list of the vertex cache.

[0291] In one implementation, such as Figure 16 As shown, the device also includes:

[0292] The retention module 1613 is used to retain the previous rendering state of the vehicle's display interface under one or more of the following conditions;

[0293] The rendering engine's second runtime has not reached the second set duration;

[0294] The difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth rendering iteration is less than the offset threshold; where N is an integer greater than or equal to 1.

[0295] The data in the vertex cache has not been updated.

[0296] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0297] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0298] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0299] Figure 17 A schematic block diagram of an example electronic device 1700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0300] like Figure 17 As shown, device 1700 includes a computing unit 1701, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1702 or a computer program loaded into random access memory (RAM) 1703 from storage unit 1708. The RAM 1703 may also store various programs and data required for the operation of device 1700. The computing unit 1701, ROM 1702, and RAM 1703 are interconnected via bus 1704. Input / output (I / O) interface 1705 is also connected to bus 1704.

[0301] Multiple components in device 1700 are connected to I / O interface 1705, including: input unit 1706, such as a keyboard, mouse, etc.; output unit 1707, such as various types of displays, speakers, etc.; storage unit 1708, such as a disk, optical disk, etc.; and communication unit 1709, such as a network card, modem, wireless transceiver, etc. Communication unit 1709 allows device 1700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0302] The computing unit 1701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1701 performs the various methods and processes described above, such as rendering methods. For example, in some embodiments, the rendering method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1700 via ROM 1702 and / or communication unit 1709. When the computer program is loaded into RAM 1703 and executed by the computing unit 1701, one or more steps of the rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 1701 may be configured to perform the rendering method by any other suitable means (e.g., by means of firmware).

[0303] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0304] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0305] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0306] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0307] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0308] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0309] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the embodiments of this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0310] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.< / int>

Claims

1. A rendering method, comprising: Based on the map data corresponding to the vehicle's location, the area in the map data is divided into multiple grids; Based on the visualization area under the rendering view of the vehicle and the position of the vehicle, the target mesh to be rendered is obtained from the multiple meshes; Render the information of the elements included in the target mesh into the target scene; The visualized area from the vehicle's rendering perspective includes the projection area of ​​the camera's view frustum onto the map plane from that rendering perspective. Based on the visualized area from the vehicle's rendering perspective and the vehicle's position, the target mesh to be rendered is obtained from the plurality of meshes, including: Based on the plane equation of the view frustum and the map plane equation, multiple vertices of the visualization area are obtained; By comparing the positions of multiple vertices in the visualization area with those of the vehicle, multiple rendering offset values ​​are obtained; Obtaining the target mesh from the plurality of meshes based on the vehicle's position and the plurality of rendering offset values ​​includes: obtaining the rendering boundary associated with the vehicle based on the vehicle's position, the plurality of rendering offset values, and a conversion factor; wherein the conversion factor is a conversion factor between the length unit in the rendering view and the reference length unit; and obtaining the target mesh within the rendering boundary from the plurality of meshes.

2. The method of claim 1, wherein, Based on the map data corresponding to the vehicle's location, the area in the map data is divided into multiple grids, including: The map data corresponding to the vehicle's location is parsed to obtain the vertices of the elements included in the map data; By traversing the vertices of the elements included in the map data, multiple edge vertices are obtained; Based on the multiple edge vertices and the mesh division method, the region composed of the multiple edge vertices is divided into the multiple meshes.

3. The method according to claim 1 or 2, further comprising: Iterate through the constituent surfaces of the elements included in the map data; If at least one vertex of the constituent face of the first element included in the map data is located within the first grid, the index corresponding to the constituent face of the first element is added to the constituent face list of the first grid. The first grid is one of the plurality of grids.

4. The method according to claim 1 or 2, further comprising: If the first runtime of the rendering engine reaches the first set duration, request the map data corresponding to the location of the vehicle. The first runtime is the time from the moment the rendering engine last requested map data corresponding to the vehicle's location to the current moment.

5. The method of claim 1 or 2, wherein, Based on the visual area from the vehicle's rendering perspective and the vehicle's position, the target mesh to be rendered is obtained from the plurality of meshes, including: When the second runtime of the rendering engine reaches the second set duration, the target mesh to be rendered is obtained from the plurality of meshes based on the visual area under the rendering view of the vehicle and the position of the vehicle; or If the first runtime of the rendering engine does not reach the first set runtime and the second runtime of the rendering engine reaches the second set runtime, the target grid to be rendered is obtained from the plurality of grids based on the visual area under the rendering view of the vehicle and the position of the vehicle. The second runtime is the duration from the moment the rendering engine last entered rendering mode to the current moment.

6. The method according to claim 1 or 2, wherein, within the map plane, the distance between the rendering offset value and the position of the vehicle in the specified direction is greater than a distance threshold or the furthest distance.

7. The method according to claim 1 or 2, wherein the rendering boundary associated with the vehicle is obtained based on the vehicle's position, the plurality of rendering offset values, and the conversion coefficient, including at least one of the following: subtracting a product of a first rendering offset value and a conversion factor from an x-coordinate of a location of the vehicle, to obtain a minimum x-coordinate of the rendering boundary; wherein The first rendering offset value is the left offset value of the visualization area relative to the position of the vehicle on the x-axis; The maximum x-coordinate of the rendering boundary is obtained by adding the product of the second rendering offset value and the conversion coefficient to the x-coordinate of the vehicle's position; wherein, the second rendering offset value is the right offset value of the visualization area and the vehicle's position on the x-axis; The minimum y-coordinate of the rendering boundary is obtained by subtracting the product of the third rendering offset value and the conversion coefficient from the y-coordinate of the vehicle's position; wherein, the third rendering offset value is the downward offset value of the visualization area and the vehicle's position on the y-axis. The maximum y-coordinate of the rendering boundary is obtained by adding the product of the fourth rendering offset value and the conversion coefficient to the y-coordinate of the vehicle's position; wherein, the fourth rendering offset value is the upward offset value of the visualization area and the vehicle's position on the y-axis.

8. The method according to claim 1 or 2, wherein obtaining the target mesh within the rendering boundary from the plurality of meshes comprises: In the coordinate system of the map plane, if the coordinates of the grid to be processed among the plurality of grids meet at least one of the following conditions, the grid to be processed is set to a renderable state, and the grid in the renderable state is the target grid: The maximum x-coordinate of the mesh to be processed is less than or equal to the maximum x-coordinate of the rendering boundary; The minimum x-coordinate of the mesh to be processed is greater than or equal to the minimum x-coordinate of the rendering boundary; The maximum y-coordinate of the mesh to be processed is less than or equal to the maximum y-coordinate of the rendering boundary; The minimum y-coordinate of the mesh to be processed is greater than or equal to the minimum y-coordinate of the rendering boundary.

9. The method according to claim 1 or 2, wherein information about the elements of the target mesh is stored in a vertex cache, and the method further comprises: Obtain the vertices of the constituent faces corresponding to the indices in the constituent face list of the target mesh; Add the vertices of the constituent face list of the target mesh to the rendering list of the vertex cache.

10. The method according to claim 9, wherein rendering information of the elements included in the target mesh into the target scene comprises: If the difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth rendering iteration is greater than the offset threshold, the vertices of the elements in the vertex cache are rendered into the target scene; where N is an integer greater than or equal to 1.

11. The method according to claim 9, further comprising: Remove vertices from the vertex cache rendering list that are not in the component face list of the target mesh.

12. The method according to claim 1 or 2, further comprising: The vehicle's display interface retains the previous rendering state under one or more of the following conditions: The rendering engine's second runtime has not reached the second set duration; The difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth rendering iteration is less than the offset threshold; where N is an integer greater than or equal to 1. The data in the vertex cache has not been updated.

13. A rendering apparatus, comprising: The segmentation module is used to divide the area in the map data into multiple grids based on the map data corresponding to the vehicle's location. The first acquisition module is used to acquire the target mesh to be rendered from the plurality of meshes based on the visualization area under the rendering view of the vehicle and the position of the vehicle. A rendering module is used to render the information of the elements included in the target mesh into the target scene; The visualized area from the vehicle's rendering perspective includes the projection area of ​​the camera's view frustum onto the map plane from the rendering perspective. The first acquisition module further includes: The calculation submodule is used to obtain multiple vertices of the visualization area based on the plane equation of the view frustum and the map plane equation; The comparison submodule is used to compare the positions of multiple vertices in the visualization area with those of the vehicle to obtain multiple rendering offset values; The acquisition submodule is used to acquire the target mesh from the multiple meshes based on the vehicle's position and the multiple rendering offset values; The acquisition submodule is further configured to obtain the rendering boundary associated with the vehicle based on the vehicle's position, the plurality of rendering offset values, and the conversion coefficient; wherein the conversion coefficient is the conversion coefficient between the length unit under the rendering view and the reference length unit; and to obtain the target mesh within the rendering boundary from the plurality of meshes.

14. The apparatus according to claim 13, wherein, The partitioning module includes: The parsing submodule is used to parse the map data corresponding to the vehicle's location and obtain the vertices of the elements included in the map data; The traversal submodule is used to traverse the vertices of the elements included in the map data to obtain multiple edge vertices; The partitioning submodule is used to divide the region composed of the multiple edge vertices into the multiple grids according to the multiple edge vertices and the grid partitioning method.

15. The apparatus according to claim 13 or 14, further comprising: The traversal module is used to traverse the constituent surfaces of the elements included in the map data; An adding module is used to add the index corresponding to the constituent face of the first element to the constituent face list of the first grid when at least one vertex of the constituent face of the first element included in the map data is located within the first grid. The first grid is one of the plurality of grids.

16. The apparatus according to claim 13 or 14, further comprising: The request module is used to request map data corresponding to the location of the vehicle when the first runtime of the rendering engine reaches a first set duration. The first runtime is the time from the moment the rendering engine last requested map data corresponding to the vehicle's location to the current moment.

17. The apparatus according to claim 13 or 14, wherein, The first acquisition module is used for: When the second runtime of the rendering engine reaches the second set duration, the target grid to be rendered is obtained from the plurality of grids based on the visualization area under the rendering view of the vehicle and the position of the vehicle. or If the first runtime of the rendering engine does not reach the first set runtime and the second runtime of the rendering engine reaches the second set runtime, the target grid to be rendered is obtained from the plurality of grids based on the visual area under the rendering view of the vehicle and the position of the vehicle. The second runtime is the duration from the moment the rendering engine last entered rendering mode to the current moment.

18. The apparatus of claim 13 or 14, wherein, within the map plane, the distance between the rendering offset value and the position of the vehicle in a specified direction is greater than a distance threshold or the furthest distance.

19. The apparatus of claim 13 or 14, wherein the acquisition submodule is configured to obtain the rendering boundary associated with the vehicle based on the vehicle's position, the plurality of rendering offset values, and the conversion coefficient, including at least one of the following: The minimum x-coordinate of the rendering boundary is obtained by subtracting the product of the first rendering offset and the conversion coefficient from the x-coordinate of the vehicle's position; where, The first rendering offset value is the left offset value of the visualization area relative to the position of the vehicle on the x-axis; The maximum x-coordinate of the rendering boundary is obtained by adding the product of the second rendering offset value and the conversion coefficient to the x-coordinate of the vehicle's position; wherein, the second rendering offset value is the right offset value of the visualization area and the vehicle's position on the x-axis; The minimum y-coordinate of the rendering boundary is obtained by subtracting the product of the third rendering offset value and the conversion coefficient from the y-coordinate of the vehicle's position; wherein, the third rendering offset value is the downward offset value of the visualization area and the vehicle's position on the y-axis. The maximum y-coordinate of the rendering boundary is obtained by adding the product of the fourth rendering offset value and the conversion coefficient to the y-coordinate of the vehicle's position; wherein, the fourth rendering offset value is the upward offset value of the visualization area and the vehicle's position on the y-axis.

20. The apparatus of claim 13 or 14, wherein the acquisition submodule is configured to acquire the target mesh located within the rendering boundary from the plurality of meshes, comprising: In the coordinate system of the map plane, if the coordinates of the grid to be processed among the plurality of grids meet at least one of the following conditions, the grid to be processed is set to a renderable state, and the grid in the renderable state is the target grid: The maximum x-coordinate of the mesh to be processed is less than or equal to the maximum x-coordinate of the rendering boundary; The minimum x-coordinate of the mesh to be processed is greater than or equal to the minimum x-coordinate of the rendering boundary; The maximum y-coordinate of the mesh to be processed is less than or equal to the maximum y-coordinate of the rendering boundary; The minimum y-coordinate of the mesh to be processed is greater than or equal to the minimum y-coordinate of the rendering boundary.

21. The apparatus of claim 13 or 14, wherein information about the elements of the target mesh is stored in a vertex cache, the apparatus further comprising: The second acquisition module is used to acquire the vertices of the constituent faces corresponding to the indices in the constituent face list of the target mesh; The add module is used to add vertices from the list of constituent faces in the target mesh to the rendering list of the vertex cache.

22. The apparatus according to claim 21, wherein the rendering module is configured to render the vertices of the elements in the vertex cache to the target scene when the difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth iteration is greater than an offset threshold; wherein, N is an integer greater than or equal to 1.

23. The apparatus of claim 21, further comprising: The deletion module is used to delete vertices of constituent faces that are not in the constituent face list of the target mesh from the rendering list of the vertex cache.

24. The apparatus according to claim 13 or 14, further comprising: A retention module is used to retain the previous rendering state on the display interface of the vehicle under one or more of the following conditions; The rendering engine's second runtime has not reached the second set duration; The difference between the rendering offset value obtained in the (N+1)th rendering iteration and the rendering offset value obtained in the Nth rendering iteration is less than the offset threshold; where N is an integer greater than or equal to 1. The data in the vertex cache has not been updated.

25. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.

26. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-12.

27. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Analysis method of unmanned aerial vehicle detection range

    CN106127853A

  • Electronic map rendering method, device and equipment and automatic driving vehicle

    CN113487694A