Rendering method, device and cloud service
By performing the calculation and optimization of vector map rendering data on the server side, the client only performs data conversion, solving the problem of heavy computing burden and difficulty in updating vector electronic map rendering, improving the user experience.
Patent Information
- Application Number
- CN202010985181.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-18
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2040-09-18
AI Technical Summary
In the prior art, rendering of vector electronic maps is burdened with heavy calculations when the client is in progress, difficult to update algorithms, and high hardware performance requirements.
The client requests the server to provide vector map rendering data and convert it into triangular grid data for rendering. The server performs calculation-intensive tasks, such as road network model establishment and algorithm optimization.
It reduces the amount of computing on the client, reduces the hardware performance requirements, and improves the convenience and user experience of algorithm updates.
Smart Images

Figure CN114283247B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical fields of image rendering and map data, and particularly to a rendering method, apparatus, and cloud service. Background Art
[0002] A raster image refers to a bitmap image composed of countless pixels, arranged in a matrix form, where each pixel represents the smallest unit point, and the image will become blurred when magnified; a vector image refers to an image drawn based on Bezier curves, which can be infinitely magnified with unchanged clarity.
[0003] Taking the rendering of vector electronic maps as an example, the inventors of the present application found that in the prior art, the rendering of vector electronic maps is usually that the cloud server sends map data to the terminal, and the terminal renders the vector map based on the corresponding map data according to the required rendering effect. For example, as shown in Figure 6 In the map rendering, it is necessary to render the road intersection with effects such as the road surface, the connection conditions of each road, and the turning arrows at the intersection. To achieve this effect, the terminal needs to create a three-dimensional model of the intersection based on the map data and then perform rendering. This method results in a large amount of processing work being completed on the client side, which requires high computing power of the client side, that is, high hardware performance requirements for the client side. Summary of the Invention
[0004] In view of the above problems, the present disclosure is proposed to provide a rendering method, apparatus, and cloud service that overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present disclosure provides a rendering method, including:
[0006] The client requests map rendering data from the server;
[0007] The client receives the vector map rendering data of map elements returned by the server according to the request;
[0008] The client converts the vector map rendering data of the map elements into triangular mesh data according to the vector expression form of the map elements, and renders the map elements based on the triangular mesh data.
[0009] In some optional embodiments, the converting the vector map rendering data of the map elements into triangular mesh data according to the vector expression form of the map elements specifically includes:
[0010] If the vector expression form of the map element is a line, convert the vector map rendering data of the map element into triangular mesh data;
[0011] If the vector expression form of the map element is a rectangle, convert the vector map rendering data of the map element into triangular mesh data;
[0012] If the vector representation of the map element is a triangular mesh, the triangular mesh data is parsed from the vector map rendering data of the map element.
[0013] In some alternative embodiments, if the vector representation of the map element is a line, the vector map rendering data of the map element includes feature point data, a first width on the first side corresponding to the feature point, and a second width on the second side. The connection line of the feature points is parallel to the map element, and the sum of the first width and the second width matches the width of the map element. Converting the vector map rendering data of the map element into triangular mesh data specifically includes:
[0014] According to the first width and the second width, the first-side extension points and the second-side extension points of each feature point are respectively determined;
[0015] Connect the pairwise adjacent first-side extension points, the pairwise adjacent second-side extension points, and the first-side extension point and the second-side extension point of the same feature point to form a plurality of quadrilaterals, and connect two non-adjacent vertices of each quadrilateral according to a set rule to obtain the triangular mesh data of the map element.
[0016] In some alternative embodiments, the step of respectively determining the first-side extension point and the second-side extension point of each feature point according to the first width and the second width specifically includes:
[0017] For the feature point at the head end or the tail end, determine a first extension line passing through the feature point and perpendicular to the connection line between the feature point and its adjacent feature point. On the first extension line, determine a point on the first side of the feature point and at a distance of the first width from the feature point as the first-side extension point of the feature point, and determine a point on the second side of the feature point and at a distance of the second width from the feature point as the second-side extension point of the feature point;
[0018] For the intermediate feature point, determine the angle bisector of the connection lines between the intermediate feature point and its adjacent feature points, and determine the line where the angle bisector is located as the second extension line. On the second extension line, determine a point on the first side of the intermediate feature point and at a distance of the first width from the intermediate feature point as the first-side extension point of the intermediate feature point, and determine a point on the second side of the intermediate feature point and at a distance of the second width from the intermediate feature point as the second-side extension point of the intermediate feature point.
[0019] In some alternative embodiments, if the vector representation of the map element is a rectangle, the vector map rendering data of the map element includes the first vertex data of two non-adjacent vertices of the map element. Converting the vector map rendering data of the map element into triangular mesh data specifically includes:
[0020] Determine the second vertex data of the other two vertices of the map feature according to the first vertex data;
[0021] Determine two sets of triangular mesh data of the map feature according to the first vertex data and the second vertex data according to a preset diagonal principle.
[0022] In a second aspect, an embodiment of the present disclosure provides a rendering method, including:
[0023] The server obtains vector map rendering data of the map feature whose vector expression form matches the type according to the type of the map feature;
[0024] Based on a map rendering data acquisition request of the client, provide the vector map rendering data of the map feature to the client.
[0025] In some optional embodiments, the obtaining vector map rendering data of the map feature whose vector expression form matches the type according to the type of the map feature specifically includes:
[0026] If it is determined that the type of the map feature is a line feature, obtain vector map rendering data whose vector expression form of the map feature is a line according to the map data;
[0027] If it is determined that the type of the map feature is a rectangle feature, obtain vector map rendering data whose vector expression form of the map feature is a rectangle according to the map data;
[0028] If it is determined that the type of the map feature is a surface feature, obtain vector map rendering data whose vector expression form of the map feature is a triangular mesh according to the map data.
[0029] In some optional embodiments, the if it is determined that the type of the map feature is a line feature, obtaining vector map rendering data whose vector expression form of the map feature is a line according to the map data specifically includes:
[0030] Determine that the type of the lane line of the road in the map feature is a line feature;
[0031] According to the position information of the road, the width of the road, the number of lanes of the road, and the one-way or two-way of the road included in the map data, obtain vector map rendering data whose vector expression form of the lane line of the road is a line, where the vector map rendering data includes the feature point data of the lane line, and the first width on the first side and the second width on the second side corresponding to the feature point, the connection line of the feature points is parallel to the lane line, and the sum of the first width and the second width matches the width of the lane line.
[0032] In some alternative embodiments, the vector map rendering data further includes any one of the following texture information of lane lines:
[0033] Solid yellow line, dashed yellow line, double solid yellow line, yellow with a solid side on the first side and a dashed side on the second side, solid white line, dashed white line, double solid white line, white with a solid side on the first side and a dashed side on the second side.
[0034] In some alternative embodiments, when it is determined that the type of the map element is a rectangular element, obtaining the vector map rendering data in which the vector expression form of the map element is a rectangle according to the map data specifically includes:
[0035] Determining that the type of the zebra crossing and / or the intersection turning arrow on the road in the map element is a rectangular element;
[0036] Obtaining the vector map rendering data in which the vector expression form of each zebra crossing is a rectangle according to the position information and road width of the zebra crossing in the map data; and / or, obtaining the vector map rendering data in which the vector expression form of the intersection turning arrow is a rectangle according to the position information and pointing information of the intersection turning arrow in the map data.
[0037] In some alternative embodiments, when it is determined that the type of the map element is a surface element, obtaining the vector map rendering data in which the vector expression form of the map element is a triangular mesh according to the map data specifically includes:
[0038] Determining that the type of the road surface in the map element is a surface element;
[0039] Establishing the vector map rendering data in which the vector expression form of the road surface is a triangular mesh according to the position information, road width and connectivity relationship between roads in the map data.
[0040] In a third aspect, an embodiment of the present disclosure provides a rendering method, including:
[0041] The client requests image rendering data from the server;
[0042] The client receives the vector map rendering data of the image element returned by the server according to the request;
[0043] The client converts the vector map rendering data of the image element into triangular mesh data according to the vector expression form of the image element, and renders the image element based on the triangular mesh data.
[0044] In a fourth aspect, an embodiment of the present disclosure provides a rendering method, including:
[0045] The server obtains the vector map rendering data of the image element in which the vector expression form matches the type according to the type of the image element;
[0046] Based on the image rendering data acquisition request from the client, provide the vector map rendering data of the image elements to the client.
[0047] In a fifth aspect, an embodiment of the present disclosure provides a rendering device, including:
[0048] A sending module, configured to request map rendering data from a server;
[0049] A receiving module, configured to receive the vector map rendering data of map elements returned by the server according to the request;
[0050] A rendering module, configured to convert the vector map rendering data of the map elements into triangular mesh data according to the vector expression form of the map elements, and render the map elements based on the triangular mesh data.
[0051] In a sixth aspect, an embodiment of the present disclosure provides a rendering device, including:
[0052] An acquisition module, configured to obtain the vector map rendering data of the map elements whose vector expression form matches the type according to the type of the map elements;
[0053] A sending module, configured to provide the vector map rendering data of the map elements to the client based on the map rendering data acquisition request from the client.
[0054] In a seventh aspect, an embodiment of the present disclosure provides a rendering system, including a server and at least one client;
[0055] The server is provided with the rendering device described in the sixth aspect above, and the client is provided with the rendering device described in the fifth aspect above.
[0056] In an eighth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned rendering method is implemented.
[0057] In an eighth aspect, an embodiment of the present disclosure provides a cloud service, and when the cloud service runs, it executes the rendering method described in any one of the second aspect and the fourth aspect above.
[0058] The beneficial effects of the above technical solutions provided by the embodiments of the present disclosure at least include:
[0059] (1) The rendering method provided by the embodiments of the present disclosure is such that the client sends a request for obtaining map rendering data to the server; the client receives the vector map rendering data of map elements returned by the server according to the request; the client converts the vector map rendering data of map elements into triangular mesh data based on the vector expression form of the map elements, and renders the map elements based on the triangular mesh data. What the client receives is not the map data obtained by the server according to the request, but the vector map rendering data of map elements further determined by the server according to the map data. After parsing the triangular mesh data from the vector map data, the client can directly perform the rendering of the vector map. The calculation work of the vector map rendering data is executed on the server side, reducing the calculation amount of the client and lowering the performance requirements for the client.
[0060] (2) If the calculation of the vector map rendering data, that is, the road expansion algorithm in the process of establishing the road network model, is all executed on the client side, when there are problems with the rendered vector map, such as the road shape is not good-looking, roads overlap each other, etc., it is necessary to update the algorithm and release it with the release of the client version to solve; while for the rendering method provided by the embodiments of the present disclosure, the road expansion algorithm is executed by the server, and the algorithm problem can be directly solved on the server side, which can make the version containing the new algorithm go online quickly and improve the user experience.
[0061] Other features and advantages of the present disclosure will be described in the following description, and part of them will be obvious from the description or understood by implementing the present disclosure. The objectives and other advantages of the present disclosure can be achieved and obtained through the structures specifically pointed out in the written description, claims, and drawings.
[0062] The technical solutions of the present disclosure will be further described in detail below with reference to the drawings and embodiments. Description of the Drawings
[0063] The drawings are used to provide a further understanding of the present disclosure and constitute a part of the description. They are used together with the embodiments of the present disclosure to explain the present disclosure and do not constitute a limitation to the present disclosure. In the drawings:
[0064] Figure 1 It is a flowchart of the rendering method in the first embodiment of the present disclosure;
[0065] Figure 2 It is a flowchart of the rendering method in the second embodiment of the present disclosure;
[0066] Figure 3 It is a specific implementation flowchart of the method for converting vector map rendering data in the third embodiment of the present disclosure;
[0067] Figure 4 It is an example diagram of the conversion of the vector expression form from a line to a triangular mesh in the third embodiment of the present disclosure;
[0068] Figure 5 It is a specific implementation flowchart of the road vector map rendering method in the fourth embodiment of the present disclosure;
[0069] Figure 6 It is an example diagram of the road vector map in the fourth embodiment of the present disclosure;
[0070] Figure 7 It is a schematic structural diagram of the rendering device in the embodiment of the present disclosure;
[0071] Figure 8 It is a schematic structural diagram of another rendering device in the embodiment of the present disclosure;
[0072] Figure 9 It is a schematic structural diagram of the rendering system in the embodiment of the present disclosure. Detailed implementation manners
[0073] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be completely conveyed to those skilled in the art.
[0074] To solve the problems of heavy computing burden on the client and difficult algorithm update in the rendering process of road vector maps in the prior art, the embodiments of the present disclosure provide a rendering method, device, and cloud service, which reduce the computing amount of the client and make the algorithm update convenient and efficient.
[0075] Embodiment 1
[0076] The first embodiment of the present disclosure provides a rendering method, which is executed by a client that performs vector rendering of map elements. The process is as Figure 1 shown and includes the following steps:
[0077] Step S11: The client requests map rendering data from the server.
[0078] Specifically, the above map rendering data acquisition request is used for the server to determine map data. For example, the data acquisition request may include map range information to be rendered as a vector map, or may include the identifier and / or road range information of the road to be rendered as a vector map.
[0079] Taking the road data in the map data first obtained by the server according to the request as an example, it may include: the position information of the road, the width of the road, the number of lanes of the road, the one-way or two-way of the road, the traffic direction of the road, and the connectivity relationship between roads, etc. Then, the vector map rendering data of the map elements is determined according to the obtained data.
[0080] Step S12: The client receives the vector map rendering data of the map elements returned by the server according to the request.
[0081] Specifically, the vector expression form of the vector map rendering data of the above map elements can be determined according to the type of the map elements: if the type of the map element is a line element, the determined vector expression form of the vector map rendering data of the map element is a line; if the type of the map element is a rectangular element, the determined vector expression form of the vector map rendering data of the map element is a rectangle; if the type of the map element is a surface element, the determined vector expression form of the vector map rendering data of the map element is a triangular mesh.
[0082] That is, the linear map elements are represented in a linear data format; the rectangular map elements are represented in a rectangular data format; the surface map elements are represented in a data format of a triangular mesh. The surface map elements can be planar elements or three-dimensional elements composed of multiple surfaces.
[0083] In one embodiment, it may further include that the client receives the vector map rendering data of the map elements returned by the server according to the request, and its vector expression form is all triangular mesh data, so that the client can directly parse the triangular mesh data from the received vector map rendering data for rendering, further reducing the calculation amount of the client.
[0084] Since converting the map elements with vector expression forms of lines or rectangles into triangular mesh forms does not consume a large amount of calculation and does not occupy too much CPU resources. Compared with determining the vector expression forms of the vector map rendering data of all map elements as triangular meshes, the data volume of the vector map rendering data is reduced, and the broadband pressure during the data transmission process is alleviated. Therefore, the above two methods each have their own advantages and can be selected according to specific needs.
[0085] For example, a set of rectangular data may include 4 vertices of a rectangular element, while the corresponding triangular mesh data needs to include 6 vertices; another example is that a road line has 100 feature points, and after being extended to a triangular mesh, it has 200 feature points. Therefore, the vector expression forms of the vector map rendering data include road lines, rectangles, and triangular meshes, reducing the data volume of the data.
[0086] At the same time, since the linear data, rectangular data, and triangular mesh data can support the extension of any effects, adding the vector rendering of points of interest does not require additional development effort from the client. For example, adding a building or adding a large flower bed in a roundabout.
[0087] Step S13: The client converts the vector map rendering data of the map elements into triangular mesh data according to the vector expression form of the map elements, and renders the map elements based on the triangular mesh data.
[0088] In one embodiment, it may include: if the vector representation form of the map element is a line, converting the vector map rendering data of the map element into triangular mesh data; if the vector representation form of the map element is a rectangle, converting the vector map rendering data of the map element into triangular mesh data; if the vector representation form of the map element is a triangular mesh, parsing the triangular mesh data from the vector map rendering data of the map element.
[0089] For the rendering method provided in the first embodiment of the present disclosure, the client sends a map rendering data acquisition request to the server; the client receives the vector map rendering data of the map element returned by the server according to the request; the client converts the vector map rendering data of the map element into triangular mesh data according to the vector representation form of the map element, and renders the map element based on the triangular mesh data. What the client receives is not the map data obtained by the server according to the request, but the vector map rendering data of the map element further determined by the server according to the map data. After the client parses the triangular mesh data from the vector map data, it can directly perform the rendering of the vector map. The calculation work of the vector map rendering data is executed on the server side, reducing the calculation amount of the client and lowering the performance requirements for the client.
[0090] If the calculation of the vector map rendering data, that is, the road expansion algorithm in the process of establishing the road network model, is all executed on the client side, when there are problems with the rendered vector map, such as the road shape is not good-looking, roads overlap each other, etc., it is necessary to update the algorithm and release it with the release of the client version to solve; while for the rendering method provided in the embodiments of the present disclosure, the road expansion algorithm is executed by the server, and the algorithm problem can be directly solved on the server side, which can enable the version containing the new algorithm to be quickly launched online and improve the user experience.
[0091] Embodiment Two
[0092] A rendering method provided in the second embodiment of the present disclosure is executed by a server that performs the vector map rendering of map elements, and its process is as Figure 2 shown, including the following steps:
[0093] Step S21: The server obtains the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element.
[0094] In one embodiment, it may include: if it is determined that the type of the map element is a line element, obtaining the vector map rendering data whose vector representation form of the map element is a line according to the map data; if it is determined that the type of the map element is a rectangle element, obtaining the vector map rendering data whose vector representation form of the map element is a rectangle according to the map data; if it is determined that the type of the map element is a surface element, obtaining the vector map rendering data whose vector representation form of the map element is a triangular mesh according to the map data.
[0095] In one embodiment, it may further include determining the vector representation form of the vector map rendering data of all map elements as a triangular mesh.
[0096] In one embodiment, it may further include the server expanding the points of interest around the road into vector map rendering data with the expression form of a triangular mesh.
[0097] Step S22: Based on the map rendering data acquisition request of the client, provide the vector map rendering data of map elements to the client.
[0098] Specifically, it may be that the server pre-obtains the vector map rendering data of all map elements within the specified map range, or obtains the vector map rendering data of all map elements within the specified map range, and extracts the data specifically requested by the client from the pre-obtained vector map rendering data and sends it to the client according to the data acquisition request of the client; it may also be that the server passively obtains the vector map rendering data corresponding to the data acquisition request based on the data acquisition request of the client.
[0099] Embodiment Three
[0100] Embodiment Three of the present disclosure provides a method for converting vector map rendering data, which is used to convert the vector representation form of vector map rendering data from a line to a triangular mesh. If the vector representation form of a map element is a line, the vector map rendering data of the map element includes feature point data, the first width on the first side corresponding to the feature point, and the second width on the second side. The connection line of the feature points is parallel to the map element, and the sum of the first width and the second width matches the width of the map element. The vector map rendering data of the map element is converted into triangular mesh data. Refer to Figure 3 As shown, it includes the following steps:
[0101] Step S31: Determine the first-side extension points and second-side extension points of each feature point according to the first width and the second width.
[0102] For the feature points at the head end or the tail end, determine the first extension line passing through the feature point and perpendicular to the connection line between the feature point and its adjacent feature point. On the first extension line, determine the point on the first side of the feature point and at a distance of the first width from the feature point as the first-side extension point of the feature point, and determine the point on the second side of the feature point and at a distance of the second width from the feature point as the second-side extension point of the feature point.
[0103] For the intermediate feature points, determine the angular bisectors of the lines connecting the intermediate feature points to their adjacent feature points respectively, and define the lines where the angular bisectors are located as the second extension lines. On the second extension lines, determine the points on the first side of the intermediate feature points and at a distance of the first width from the intermediate feature points as the first-side extension points of the intermediate feature points, and determine the points on the second side of the intermediate feature points and at a distance of the second width from the intermediate feature points as the second-side extension points of the intermediate feature points.
[0104] Refer to Figure 4 As shown in the figure, for the feature point A at the head end, determine the first extension line L1 passing through the feature point A and perpendicular to the line connecting the feature point A and its adjacent feature point B. On the first extension line L1, determine the point A1 on the first side of the feature point A and at a distance of the first width from the feature point A as the first-side extension point of the feature point A, and determine the point A2 on the second side of the feature point A and at a distance of the second width from the feature point A as the second-side extension point of the feature point A; for the feature point C at the tail end, determine the first extension line L3 passing through the feature point C and perpendicular to the line connecting the feature point C and its adjacent feature point B. On the first extension line L3, determine the point C1 on the first side of the feature point C and at a distance of the first width from the feature point C as the first-side extension point of the feature point C, and determine the point C2 on the second side of the feature point C and at a distance of the second width from the feature point C as the second-side extension point of the feature point C; for the intermediate feature point B, determine the angular bisectors of the lines connecting the intermediate feature point B to its adjacent feature points respectively, and define the line where the angular bisectors are located as the second extension line L2. On the second extension line L2, determine the point B1 on the first side of the intermediate feature point B and at a distance of the first width from the intermediate feature point B as the first-side extension point of the intermediate feature point B, and determine the point B2 on the second side of the intermediate feature point B and at a distance of the second width from the intermediate feature point B as the second-side extension point of the intermediate feature point B.
[0105] Step S32: Connect the pairwise adjacent first-side extension points, the pairwise adjacent second-side extension points, and the first-side extension point and the second-side extension point of the same feature point to form a plurality of quadrilaterals.
[0106] Refer to Figure 4 As shown in the figure, connect the pairwise adjacent first-side extension points A1B1 and B1C1, connect the pairwise adjacent second-side extension points A2B2 and B2C2, connect the first-side extension point A1 and the second-side extension point A2 of the same feature point A, the first-side extension point B1 and the second-side extension point B2 of the same feature point B, and the first-side extension point C1 and the second-side extension point C2 of the same feature point C.
[0107] Step S33: Connect the two non-adjacent vertices of each quadrilateral according to the set rules to obtain the triangular grid data of the map element.
[0108] Refer toFigure 4 As shown in the figure, connect the diagonals B1A2 and C1B2 of the quadrilateral to obtain 4 sets of triangular grid data.
[0109] In one embodiment, if the vector representation form of the map element is a rectangle, the vector map rendering data of the map element includes the first vertex data of two non-adjacent vertices of the map element. Converting the vector map rendering data of the map element into triangular grid data may specifically include: determining the second vertex data of the other two vertices of the map element according to the first vertex data; and determining two sets of triangular grid data of the map element according to the first vertex data and the second vertex data according to the preset diagonal principle.
[0110] The existing implementation solutions for rendering road vector maps are usually as follows: The intersection information is sent from the cloud, and the client models the 2D link data into a 3D model through an algorithm for rendering. In this way, the modeling work, as well as the repair of existing problems and the addition of rendering effects, all focus on the client.
[0111] Embodiment 4
[0112] Embodiment 4 of the present disclosure provides a specific implementation of a road vector map rendering method, which is executed by a server that performs road vector map rendering. The process is as Figure 5 shown and includes the following steps:
[0113] Step S51: Determine a road element of the type of line element, and obtain the vector map rendering data of the road element with a vector representation form of a line.
[0114] Specifically, it may be to determine that the type of the lane line of the road in the road element is a line element, and obtain the vector map rendering data of the lane line of the road with a vector representation form of a line.
[0115] According to the position information of the road, the width of the road, the number of lanes of the road, and the one-way or two-way of the road included in the road data, obtain the vector map rendering data of the lane line of the road with a vector representation form of a line. The vector map rendering data of the lane line includes the feature point data of the lane line, and the first width on the first side and the second width on the second side corresponding to the feature point. The connection line of the feature points is parallel to the lane line, and the sum of the first width and the second width matches the width of the lane line.
[0116] Specifically, the above-mentioned position information of the road may be the longitude and latitude values or coordinate values of the road center line. The connection line of the feature points may be the center line of the lane line, that is, the values of the first width and the second width are equal.
[0117] In one embodiment, the vector map rendering data of the lane line may further include any one of the following texture information of the lane line:
[0118] Solid yellow line, dashed yellow line, double solid yellow line, yellow with a solid side on the first side and a dashed side on the second side, solid white line, dashed white line, double solid white line, white with a solid side on the first side and a dashed side on the second side.
[0119] Step S52: Determine the road elements of the rectangle element type, and obtain the vector map rendering data with the vector expression form of the rectangle for the road elements.
[0120] In one embodiment, it may include determining that the type of the zebra crossing and / or the intersection turning arrow on the road in the road elements is a rectangle element; obtaining the vector map rendering data with the vector expression form of the rectangle for each zebra crossing according to the position information and the road width of the zebra crossing in the road data; and / or obtaining the vector map rendering data with the vector expression form of the rectangle for the intersection turning arrow according to the position information and the pointing information of the intersection turning arrow in the road data.
[0121] It may be that the server obtains the rectangle data of the zebra crossing according to the road width and the position information of the road in the road data; and obtains the rectangle data of the intersection turning arrow of the lane according to the traffic direction of the road and the connectivity relationship between the roads in the road data.
[0122] That is, the rectangle data of the intersection turning arrow and the rectangle data of the zebra crossing may be directly converted by the server according to the obtained data information of the intersection turning arrow and the zebra crossing; or may be calculated by the server according to the traffic direction of the road, the connectivity relationship between the roads, the position information of the road, and the road width, etc.
[0123] The above rectangle data includes the first vertex data of two non - adjacent vertices of the rectangle element, which can minimize the data volume of the rectangle data; optionally, it may also be the vertex data including the four vertices of the rectangle element. In this case, the data volume of the rectangle data doubles, increasing the broadband pressure during the data transmission process, but reducing the calculation amount for the client to convert the rectangle data into triangular mesh data.
[0124] Step S53: Determine the road elements of the surface element type, and obtain the vector map rendering data with the vector expression form of the triangular mesh for the road elements.
[0125] In one embodiment, it may include that the server determines that the type of the road surface in the road elements is a surface element; and establishes the vector map rendering data with the vector expression form of the triangular mesh for the road surface according to the position information, the road width, and the connectivity relationship between the roads in the road data.
[0126] Specifically, it may be to determine the triangular mesh data of the road surface of a single road according to the position information and the road width of the road; and determine the triangular mesh data of the road surface at the intersection connection according to the connectivity relationship of the roads and the predetermined connection rules. For exampleFigure 6 The road surface at the intersection connection formed by zebra crossings, etc. at the road intersections in the road vector map.
[0127] Step S54: The server expands the points of interest around the road into vector map rendering data in the form of a triangular mesh as the vector expression form.
[0128] Step S55: The server combines the obtained vector map rendering data to generate combined vector map rendering data.
[0129] Step S56: Based on the map rendering data acquisition request of the client, provide the combined vector map rendering data to the client.
[0130] Specifically, the above rendering method is not only applicable to the rendering of maps and vector maps of roads in the map, but also applicable to the rendering of other types of images. As long as the image rendering is performed through the interaction between the client and the server, the above method can be applied. For example, the rendering of vector maps of game interfaces, the rendering of vector maps of scenic spots, etc.
[0131] Based on the inventive concept of the present disclosure, an embodiment of the present disclosure further provides a rendering method, which is applied to a rendering client and includes:
[0132] The client requests image rendering data from the server;
[0133] The client receives the vector map rendering data of the image elements returned by the server according to the request;
[0134] The client converts the vector map rendering data of the image elements into triangular mesh data according to the vector expression form of the image elements, and renders the image elements based on the triangular mesh data.
[0135] Based on the inventive concept of the present disclosure, an embodiment of the present disclosure further provides a rendering method, which is applied to a rendering server and includes:
[0136] The server obtains the vector map rendering data of the image elements whose vector expression form matches the type according to the type of the image elements;
[0137] Based on the image rendering data acquisition request of the client, provide the vector map rendering data of the image elements to the client.
[0138] Based on the inventive concept of the present disclosure, an embodiment of the present disclosure further provides a rendering device, which is arranged in a rendering client, and its structure is as shown in Figure 7 and includes:
[0139] A sending module 71, configured to request map rendering data from the server;
[0140] A receiving module 72, configured to receive the vector map rendering data of the map elements returned by the server according to the request;
[0141] A rendering module 73, configured to convert the vector map rendering data of the map elements into triangular mesh data according to the vector representation form of the map elements, and render the map elements based on the triangular mesh data.
[0142] In one embodiment, the rendering module 73 converts the vector map rendering data of the map elements into triangular mesh data according to the vector representation form of the map elements, and specifically is configured to:
[0143] If the vector representation form of the map element is a line, convert the vector map rendering data of the map element into triangular mesh data; if the vector representation form of the map element is a rectangle, convert the vector map rendering data of the map element into triangular mesh data; if the vector representation form of the map element is a triangular mesh, parse out the triangular mesh data from the vector map rendering data of the map element.
[0144] In one embodiment, if the vector representation form of the map element is a line, the vector map rendering data of the map element includes feature point data, a first width on the first side corresponding to the feature point, and a second width on the second side, the connection line of the feature points is parallel to the map element, and the sum of the first width and the second width matches the width of the map element. The rendering module 73 converts the vector map rendering data of the map element into triangular mesh data, and specifically is configured to:
[0145] According to the first width and the second width, respectively determine the first-side extension points and the second-side extension points of each feature point; connect the pairwise adjacent first-side extension points, the pairwise adjacent second-side extension points, and the first-side extension point and the second-side extension point of the same feature point to form a plurality of quadrilaterals, and connect two non-adjacent vertices of each quadrilateral according to a set rule to obtain the triangular mesh data of the map element.
[0146] In one embodiment, the rendering module 73 respectively determines the first-side extension points and the second-side extension points of each feature point according to the first width and the second width, and specifically is configured to:
[0147] For the feature points at the head or tail ends, determine a first extension line passing through the feature point and perpendicular to the line connecting the feature point and its adjacent feature point. On the first extension line, determine a point on the first side of the feature point and at a distance of a first width from the feature point as the first-side extension point of the feature point, and a point on the second side of the feature point and at a distance of a second width from the feature point as the second-side extension point of the feature point; for the intermediate feature points, determine the angular bisectors of the angles formed by the lines connecting the intermediate feature points with their adjacent feature points respectively, and determine the line where the angular bisectors are located as the second extension line. On the second extension line, determine a point on the first side of the intermediate feature point and at a distance of a first width from the intermediate feature point as the first-side extension point of the intermediate feature point, and a point on the second side of the intermediate feature point and at a distance of a second width from the intermediate feature point as the second-side extension point of the intermediate feature point.
[0148] In one embodiment, if the vector representation form of the map element is a rectangle, the vector map rendering data of the map element includes the first vertex data of two non-adjacent vertices of the map element. The rendering module 73 converts the vector map rendering data of the map element into triangular mesh data, specifically for:
[0149] According to the first vertex data, determine the second vertex data of the other two vertices of the map element; according to the first vertex data and the second vertex data, determine two sets of triangular mesh data of the map element according to the preset diagonal principle.
[0150] Based on the inventive concept of the present disclosure, embodiments of the present disclosure further provide a rendering device, which is disposed on the rendering server side, and its structure is as shown in Figure 8 and includes:
[0151] An acquisition module 81, configured to obtain the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element;
[0152] A sending module 82, configured to provide the vector map rendering data of the map element to the client based on the map rendering data acquisition request of the client.
[0153] In one embodiment, the acquisition module 81 obtains the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element, specifically for:
[0154] If it is determined that the type of the map element is a line element, the vector map rendering data in the form of a line of the vector expression of the map element is obtained according to the map data; if it is determined that the type of the map element is a rectangular element, the vector map rendering data in the form of a rectangle of the vector expression of the map element is obtained according to the map data; if it is determined that the type of the map element is a surface element, the vector map rendering data in the form of a triangular mesh of the vector expression of the map element is obtained according to the map data.
[0155] In one embodiment, the obtaining module 81, if it is determined that the type of the map element is a line element, obtains the vector map rendering data in the form of a line of the vector expression of the map element according to the map data, and specifically is used for:
[0156] Determine that the type of the lane lines of the road in the map element is a line element; according to the position information of the road, the width of the road, the number of lanes of the road, and the one-way or two-way direction of the road included in the map data, obtain the vector map rendering data in the form of a line of the vector expression of the lane lines of the road, where the vector map rendering data includes the feature point data of the lane lines, and the first width on the first side and the second width on the second side corresponding to the feature points, the connection line of the feature points is parallel to the lane lines, and the sum of the first width and the second width matches the width of the lane lines.
[0157] In one embodiment, the obtaining module 81, if it is determined that the type of the map element is a rectangular element, obtains the vector map rendering data in the form of a rectangle of the vector expression of the map element according to the map data, and specifically is used for:
[0158] Determine that the type of the zebra crossing and / or the intersection turning arrow of the road in the map element is a rectangular element; according to the position information of the zebra crossing and the road width in the map data, obtain the vector map rendering data in the form of a rectangle of the vector expression of each zebra crossing; and / or, according to the position information and the pointing information of the intersection turning arrow in the map data, obtain the vector map rendering data in the form of a rectangle of the vector expression of the intersection turning arrow.
[0159] In one embodiment, the obtaining module 81, if it is determined that the type of the map element is a surface element, obtains the vector map rendering data in the form of a triangular mesh of the vector expression of the map element according to the map data, and specifically is used for:
[0160] Determine that the type of the road surface in the map element is a surface element; according to the position information of the road, the road width, and the connectivity relationship between the roads in the map data, establish the vector map rendering data in the form of a triangular mesh of the vector expression of the road surface.
[0161] Based on the inventive concept of the present disclosure, an embodiment of the present disclosure further provides a rendering system, the structure of which refers to Figure 9As shown, it includes a server 91 and at least one client 92;
[0162] The server 91 is provided with the above two road vector map rendering devices, and the client 92 is provided with the above first road vector map rendering device.
[0163] Regarding the devices and systems in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here in detail.
[0164] Based on the inventive concept of the present disclosure, embodiments of the present disclosure further provide a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the above rendering method is implemented.
[0165] Based on the inventive concept of the present disclosure, embodiments of the present disclosure further provide a cloud service, and when the cloud service runs, the above rendering method is executed.
[0166] Unless otherwise specifically stated, terms such as processing, computing, operation, determination, display, etc. can refer to the actions and / or processes of one or more processing or computing systems, or similar devices, and the actions and / or processes will represent data operations and conversions of physical (such as electronic) quantities in the registers or memories of the processing system into other data of physical quantities similarly represented in the memories, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals can be represented using any of a variety of different technologies and methods. For example, the data, instructions, commands, information, signals, bits, symbols, and chips mentioned throughout the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0167] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the protection scope of the present disclosure. The appended method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy.
[0168] In the above detailed description, various features are combined in a single embodiment to simplify the present disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the present disclosure is in a state less than all the features of the disclosed single embodiment. Therefore, the appended claims are hereby clearly incorporated into the detailed description, where each claim stands alone as a separate preferred embodiment of the present disclosure.
[0169] Those skilled in the art should also understand that all the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the above various illustrative components, blocks, modules, circuits, and steps have been generally described in terms of their functions. Whether such a function is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Skilled technicians can implement the described functions in a flexible manner for each specific application. However, such implementation decisions should not be construed as departing from the protection scope of the present disclosure.
[0170] The steps of the methods or algorithms described in connection with the embodiments herein can be directly embodied as hardware, software modules executed by a processor, or a combination thereof. The software modules can be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium well-known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. The ASIC can be located in a user terminal. Of course, the processor and the storage medium can also exist as discrete components in the user terminal.
[0171] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented inside the processor or outside the processor. In the latter case, it is communicatively coupled to the processor via various means, which are well-known in the art.
[0172] The foregoing description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but those of ordinary skill in the art should recognize that the various embodiments can be further combined and arranged. Accordingly, the embodiments described herein are intended to embrace all such changes, modifications, and variations that fall within the scope of the appended claims. Further, with respect to the term "comprising" used in the specification or claims, the word is inclusive in a manner similar to the term "including" as interpreted when used as a transitional word in a claim. Additionally, any use of the term "or" in the claims or specification is to be meant "non-exclusive or." The terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Claims
1. A rendering method, comprising: The client requests map rendering data from the server; The client receives the vector map rendering data of map features returned by the server according to the request; If the type of the map feature is a line feature, the vector representation form of the vector map rendering data of the map feature is a line; if the type of the map feature is a rectangular feature, the vector representation form of the vector map rendering data of the map feature is a rectangle; if the type of the map feature is a surface feature, the vector representation form of the vector map rendering data of the map feature is a triangular mesh; The client converts the vector map rendering data of the map feature into triangular mesh data according to the vector representation form of the map feature, and renders the map feature based on the triangular mesh data.
2. The method according to claim 1, wherein the converting the vector map rendering data of the map feature into triangular mesh data according to the vector representation form of the map feature specifically comprises: If the vector representation form of the map feature is a line, converting the vector map rendering data of the map feature into triangular mesh data; If the vector representation form of the map feature is a rectangle, converting the vector map rendering data of the map feature into triangular mesh data; If the vector representation form of the map feature is a triangular mesh, parsing out the triangular mesh data from the vector map rendering data of the map feature.
3. The method according to claim 2, if the vector representation form of the map feature is a line, the vector map rendering data of the map feature includes feature point data, a first width on the first side corresponding to the feature point, and a second width on the second side, the connection line of the feature points is parallel to the map feature, and the sum of the first width and the second width matches the width of the map feature. The converting the vector map rendering data of the map feature into triangular mesh data specifically comprises: Determining a first extended point on the first side and a second extended point on the second side of each feature point according to the first width and the second width; Connecting two adjacent first extended points, two adjacent second extended points, and the first extended point and the second extended point of the same feature point to form a plurality of quadrilaterals, and connecting two non-adjacent vertices of each quadrilateral according to a set rule to obtain the triangular mesh data of the map feature.
4. The method according to claim 3, wherein the determining a first extended point on the first side and a second extended point on the second side of each feature point according to the first width and the second width specifically comprises: For a feature point at the head end or the tail end, determining a first extended line passing through the feature point and perpendicular to the connection line between the feature point and its adjacent feature point, determining a point on the first side of the feature point and at a distance of the first width from the feature point as the first extended point on the first side of the feature point, and determining a point on the second side of the feature point and at a distance of the second width from the feature point as the second extended point on the second side of the feature point; For the intermediate feature point, determine the angular bisectors of the lines connecting the intermediate feature point to the adjacent feature points respectively, and determine the line where the angular bisector is located as the second extension line. On the second extension line, determine the point on the first side of the intermediate feature point and at a distance of the first width from the intermediate feature point as the first-side extension point of the intermediate feature point, and determine the point on the second side of the intermediate feature point and at a distance of the second width from the intermediate feature point as the second-side extension point of the intermediate feature point.
5. The method according to claim 2, if the vector representation form of the map element is a rectangle, the vector map rendering data of the map element includes the first vertex data of two non-adjacent vertices of the map element. The conversion of the vector map rendering data of the map element into triangular mesh data specifically includes: According to the first vertex data, determine the second vertex data of the other two vertices of the map element; According to the first vertex data and the second vertex data, determine two sets of triangular mesh data of the map element according to the preset diagonal principle.
6. A rendering method, including: The server obtains the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element; If the type of the map element is a line element, the vector representation form of the vector map rendering data of the map element is a line; if the type of the map element is a rectangle element, the vector representation form of the vector map rendering data of the map element is a rectangle; if the type of the map element is a surface element, the vector representation form of the vector map rendering data of the map element is a triangular mesh; Based on the map rendering data acquisition request of the client, provide the vector map rendering data of the map element to the client for the client to convert the vector map rendering data of the map element into triangular mesh data according to the vector representation form of the map element.
7. The method according to claim 6, the obtaining of the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element specifically includes: If it is determined that the type of the map element is a line element, obtain the vector map rendering data of the map element whose vector representation form is a line according to the map data; If it is determined that the type of the map element is a rectangle element, obtain the vector map rendering data of the map element whose vector representation form is a rectangle according to the map data; If it is determined that the type of the map element is a surface element, obtain the vector map rendering data of the map element whose vector representation form is a triangular mesh according to the map data.
8. The method according to claim 7, the if it is determined that the type of the map element is a line element, obtain the vector map rendering data of the map element whose vector representation form is a line according to the map data, specifically includes: Determine that the type of the lane line of the road in the map element is a line element; Based on the position information of the roads included in the map data, the width of the roads, the number of lanes of the roads, and the one-way or two-way nature of the roads, the vector representation of the lane lines of the roads is obtained as vector map rendering data in the form of lines. The vector map rendering data includes the feature point data of the lane lines, and the first width on the first side and the second width on the second side corresponding to the feature points. The connection line of the feature points is parallel to the lane lines, and the sum of the first width and the second width matches the width of the lane lines.
9. The method according to claim 8, wherein the vector map rendering data further includes any one of the following texture information of the lane lines: Solid yellow line, dashed yellow line, double solid yellow line, yellow with a solid line on the first side and a dashed line on the second side, solid white line, dashed white line, double solid white line, white with a solid line on the first side and a dashed line on the second side.
10. The method according to claim 7, wherein if it is determined that the type of the map element is a rectangular element, obtaining the vector map rendering data of the map element in the form of a rectangle according to the map data specifically includes: Determining that the type of the zebra crossing and / or the intersection turning arrow on the road in the map element is a rectangular element; Obtaining the vector map rendering data of each zebra crossing in the form of a rectangle according to the position information of the zebra crossing and the road width in the map data; and / or, obtaining the vector map rendering data of the intersection turning arrow in the form of a rectangle according to the position information and the pointing information of the intersection turning arrow in the map data.
11. The method according to claim 7, wherein if it is determined that the type of the map element is a surface element, obtaining the vector map rendering data of the map element in the form of a triangular mesh according to the map data specifically includes: Determining that the type of the road surface in the map element is a surface element; Based on the position information of the roads, the road width, and the connectivity relationship between the roads in the map data, establishing the vector map rendering data of the road surface in the form of a triangular mesh.
12. A rendering method, comprising: The client requests image rendering data from the server; The client receives the vector map rendering data of the image elements returned by the server according to the request; If the type of the image element is a line element, the vector representation of the vector map rendering data of the image element is a line; if the type of the image element is a rectangular element, the vector representation of the vector map rendering data of the image element is a rectangle; if the type of the image element is a surface element, the vector representation of the vector map rendering data of the image element is a triangular mesh; The client converts the vector map rendering data of the image element into triangular mesh data according to the vector representation of the image element, and renders the image element based on the triangular mesh data.
13. A rendering method, comprising: The server obtains the vector map rendering data of the image element whose vector representation matches the type according to the type of the image element; If the type of the image element is a line element, the vector representation form of the vector map rendering data of the image element is a line; if the type of the image element is a rectangle element, the vector representation form of the vector map rendering data of the image element is a rectangle; if the type of the image element is a surface element, the vector representation form of the vector map rendering data of the image element is a triangular mesh; based on the image rendering data acquisition request of the client, provide the vector map rendering data of the image element to the client for the client to convert the vector map rendering data of the image element into triangular mesh data according to the vector representation form of the image element.
14. A rendering device, comprising: A sending module, configured to request map rendering data from a server; A receiving module, configured to receive the vector map rendering data of map elements returned by the server according to the request; If the type of the map element is a line element, the vector representation form of the vector map rendering data of the map element is a line; if the type of the map element is a rectangle element, the vector representation form of the vector map rendering data of the map element is a rectangle; if the type of the map element is a surface element, the vector representation form of the vector map rendering data of the map element is a triangular mesh; A rendering module, configured to convert the vector map rendering data of the map element into triangular mesh data according to the vector representation form of the map element, and render the map element based on the triangular mesh data.
15. A rendering device, comprising: An obtaining module, configured to obtain the vector map rendering data of the map element whose vector representation form matches the type according to the type of the map element; If the type of the map element is a line element, the vector representation form of the vector map rendering data of the map element is a line; if the type of the map element is a rectangle element, the vector representation form of the vector map rendering data of the map element is a rectangle; if the type of the map element is a surface element, the vector representation form of the vector map rendering data of the map element is a triangular mesh; A sending module, configured to provide the vector map rendering data of the map element to the client based on the map rendering data acquisition request of the client for the client to convert the vector map rendering data of the map element into triangular mesh data according to the vector representation form of the map element.
16. A rendering system, comprising a server and at least one client; The server is provided with the rendering device as described in claim 15, and the client is provided with the rendering device as described in claim 14.
17. A computer-readable storage medium having computer instructions stored thereon, characterized in that, When the instruction is executed by a processor, the rendering method described in any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Map data processing method and device, and three-dimensional map generation method and device
CN106780736A