A method, system, computer device and storage medium for rendering a three-dimensional map

By splitting and transforming the coordinates of the 3D map, the rendering accuracy of the 3D map in OpenGL ES 3.0 is improved by using single-precision and double-precision transformation matrices, and the problem of poor compatibility of OpenGL ES 3.0 in double-precision calculation is solved.

CN116245988BActive Publication Date: 2026-06-12GUANGZHOU XIAOMA HUIXING TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU XIAOMA HUIXING TECH CO LTD
Filing Date
2022-09-05
Publication Date
2026-06-12

Smart Images

  • Figure CN116245988B_ABST
    Figure CN116245988B_ABST
Patent Text Reader

Abstract

The application relates to a three-dimensional map rendering method, system, computer device and storage medium. The method comprises the following steps: splitting a to-be-rendered map to obtain a plurality of to-be-rendered sub-maps, selecting a center point for each to-be-rendered sub-map, and obtaining a first coordinate; obtaining a corresponding first conversion matrix according to the first coordinates; obtaining a second coordinate, obtaining a third coordinate according to the second coordinate and the first coordinate; obtaining a fourth coordinate, obtaining a second conversion matrix according to the fourth coordinate, obtaining a corresponding fifth coordinate according to the first conversion matrix, the second conversion matrix and the third coordinate, rendering the to-be-rendered sub-maps according to the fifth coordinate, and obtaining a three-dimensional map. The method can calculate the first conversion matrix and the second conversion matrix with single-precision and double-precision, and store the fifth coordinate in the form of single-precision, thereby improving the compatibility of the precision calculation in the three-dimensional map rendering process and improving the drawing precision of the three-dimensional map to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D rendering technology, and in particular to a method, system, computer device, and storage medium for rendering three-dimensional maps. Background Technology

[0002] 3D rendering is the process by which a computer extracts raw information from a 3D scene and calculates the final result. The output is usually a single image or a series of images rendered and compiled together. The Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. However, OpenGL for Embedded Systems (OpenGL ES) often suffers from poor compatibility. For example, the Graphics Processing Unit (GPU) in OpenGL ES 3.0 supports single-precision calculations but struggles with double-precision calculations, and its floating-point precision is low. Furthermore, precision loss occurs when drawing large maps, thus reducing the accuracy of map rendering. Summary of the Invention

[0003] Based on this, a method, system, computer device, and storage medium for 3D map rendering are provided to improve the compatibility of 3D map rendering.

[0004] On the one hand, a method for rendering a three-dimensional map is provided, the method comprising:

[0005] The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0006] Obtain the second coordinates, and based on the second coordinates and the first coordinates, obtain the third coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point;

[0007] A fourth coordinate is obtained, and a second transformation matrix is ​​obtained based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The sub-map to be rendered is rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0008] In one embodiment, the first transformation matrix includes single-precision and double-precision storage methods, the second transformation matrix includes single-precision and double-precision storage methods, and the fifth coordinate includes single-precision storage method.

[0009] In one embodiment, the step of obtaining a second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes:

[0010] Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system;

[0011] Based on the fourth coordinate, the position of the electronic device, and the upward direction vector, the view matrix of the three-dimensional map model is obtained;

[0012] Obtain a projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model;

[0013] The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

[0014] In one embodiment, the step of obtaining the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system, includes:

[0015] The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling;

[0016] Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0017] In one embodiment, the step of obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes:

[0018] Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0019] If so, then obtain the product of the third coordinate and the transformation matrix to determine the corresponding fifth coordinate;

[0020] If not, it is determined that the distance between the electronic device and the map to be rendered is too far;

[0021] Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0022] The product of the third coordinate, the first transformation matrix, and the second transformation matrix is ​​obtained to determine the fifth coordinate.

[0023] In one embodiment, the step of splitting the map to be rendered into several sub-maps to be rendered includes:

[0024] The preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained.

[0025] The splitting diameter is obtained by calculating the value of the preprocessed bit depth as the base n, where n > 1;

[0026] The map to be rendered is split according to the splitting diameter to obtain several sub-maps to be rendered.

[0027] In one embodiment, the step of obtaining the first coordinates, wherein the first coordinates are the world coordinates of the center point corresponding to the sub-map to be rendered, includes:

[0028] Based on the second coordinate and the splitting diameter, the first coordinate is obtained, and the mathematical expression for the first coordinate is:

[0029] C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};

[0030] Where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

[0031] On the other hand, a system for rendering three-dimensional maps is provided, the system comprising:

[0032] The splitting module is used to split the map to be rendered into several sub-maps to be rendered, select a center point for each sub-map to be rendered and obtain a first coordinate, and obtain a corresponding first transformation matrix based on each first coordinate, wherein the first coordinate is the world coordinate of the center point corresponding to the sub-map to be rendered.

[0033] The acquisition module is used to acquire a second coordinate and obtain a third coordinate based on the second coordinate and the first coordinate, wherein the second coordinate is the world coordinate of the point to be rendered in each of the sub-maps to be rendered, and the third coordinate is the relative coordinate of each point to be rendered to the center point;

[0034] The processing module is used to obtain a fourth coordinate, and obtain a second transformation matrix based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The fifth coordinate is used to render the sub-map to be rendered to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0035] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0036] The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0037] Obtain the second coordinates, and based on the second coordinates and the first coordinates, obtain the third coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point;

[0038] A fourth coordinate is obtained, and a second transformation matrix is ​​obtained based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The sub-map to be rendered is rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0039] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0040] The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0041] Obtain the second coordinates, and based on the second coordinates and the first coordinates, obtain the third coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point;

[0042] A fourth coordinate is obtained, and a second transformation matrix is ​​obtained based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The sub-map to be rendered is rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0043] The aforementioned method, system, computer equipment, and storage medium for rendering 3D maps involve splitting a map to be rendered into several sub-maps, selecting a center point for each sub-map, and obtaining first coordinates (world coordinates of the center point of the sub-map), and obtaining a corresponding first transformation matrix based on each first coordinate. Next, second coordinates (world coordinates of points to be rendered in each sub-map) are obtained, and third coordinates (relative coordinates of each point to be rendered from the center point) are obtained based on the second and first coordinates. A fourth coordinate is obtained, and a second transformation matrix is ​​used to transform the third coordinates to the screen coordinate system based on the fourth coordinate. A fifth coordinate is obtained based on the first, second, and third coordinates, and the fifth coordinate is used to render the sub-maps to obtain a 3D map. The fourth coordinate is the world coordinate of the electronic device used to capture the map, and the fifth coordinate is the coordinate of the point to be rendered in the 3D map.

[0044] The first transformation matrix, the second transformation matrix, and the third coordinate are obtained through the aforementioned steps. The third coordinate can be stored and calculated in single-precision form. The first transformation matrix and the second transformation matrix can be single-precision or double-precision, and their product can be stored and calculated in single-precision form. Multiplying the product of the first transformation matrix and the second transformation matrix with the third coordinate yields the fifth coordinate used to render the map to be rendered. The fifth coordinate can also be stored in single-precision form. Using the relative coordinates of the point to be rendered also ensures the accuracy of the 3D map drawing to a certain extent.

[0045] The aforementioned steps are performed in the Central Processing Unit (CPU) of OpenGL ES 3.0. The resulting fifth coordinate can be stored as single precision. Single precision data processing and calculation can be performed in the GPU layer of OpenGL ES 3.0. Therefore, the data in the CPU layer can be either single precision or double precision. Compared to processing and calculating only single precision data in the CPU layer, this improves the compatibility of precision calculation in the 3D map rendering process. During the drawing process, double precision data, single precision data, or a combination of single and double precision data can be used for calculation, which improves the drawing accuracy of 3D maps to a certain extent. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating a method for rendering a 3D map in one embodiment;

[0047] Figure 2 This is a flowchart illustrating the step of obtaining the second transformation matrix in one embodiment;

[0048] Figure 3 This is a flowchart illustrating the steps for obtaining the model matrix in one embodiment;

[0049] Figure 4 This is a flowchart illustrating the step of obtaining the fifth coordinate in one embodiment;

[0050] Figure 5 This is a flowchart illustrating the step of splitting the map to be rendered in one embodiment;

[0051] Figure 6 A block diagram of a 3D map rendering system in one embodiment;

[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] It should be noted that the illustrations provided in this embodiment are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show components relevant to the present invention and are not drawn according to the actual number, shape, and size of components in implementation. In actual implementation, the form, quantity, and proportion of each component can be arbitrarily changed, and the component layout may be more complex. The structures, proportions, sizes, etc., depicted in the accompanying drawings are only for illustrative purposes to aid those skilled in the art and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effects and objectives of the present invention, should still fall within the scope of the technical content disclosed in the present invention. Furthermore, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are only for clarity of description and are not intended to limit the scope of the present invention. Changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the present invention.

[0055] OpenGL ES has poor compatibility in rendering 3D maps. For example, it is difficult to perform single-precision calculations, and there is also a loss of precision when drawing large maps, which reduces the accuracy of map drawing.

[0056] Therefore, this application proposes a method for rendering a 3D map. This method involves obtaining a first transformation matrix, a second transformation matrix, and a third coordinate, and calculating the product of these three transformation matrices to obtain a fifth coordinate. This fifth coordinate is then used as the coordinate for drawing the map to be rendered. Rendering is performed based on this fifth coordinate to obtain a 3D map. The third coordinate can be stored and calculated in single-precision form. The first and second transformation matrices can be single-precision or double-precision, and their product can be stored and calculated in single-precision form. The fifth coordinate, obtained by multiplying the product of the first and second transformation matrices with the third coordinate using single-precision multiplication, can also be stored in single-precision form.

[0057] The aforementioned process runs in the Central Processing Unit (CPU) of OpenGL ES, and the resulting fifth coordinate can be stored as single-precision data. Single-precision data processing and computation can then be performed at the GPU layer of OpenGL ES 3.0. Therefore, single-precision data processing and computation can also be performed at the Graphics Processing Unit (GPU). Thus, the data at the CPU layer can be either single-precision or double-precision. Compared to processing and calculating only single-precision data at the CPU layer, this improves the compatibility of precision calculations during 3D map rendering. During the rendering process, double-precision data, single-precision data, or a combination of both can be used for calculations, thereby improving the rendering accuracy of 3D maps to a certain extent.

[0058] In one embodiment, such as Figure 1 As shown, a method for creating a 3D map is provided, including the following steps:

[0059] S1: The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0060] In this embodiment, the map to be rendered is divided into several sub-maps to be rendered. A center point is selected in each sub-map, and the world coordinates of the center point corresponding to the sub-map are obtained, denoted as the first coordinates. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained. Specifically, the mathematical expression of the first transformation matrix is ​​as follows:

[0061] ;

[0062] Among them, T (C) Let C be the first transformation matrix. (x) C (y) and C (z) These are the x-axis, y-axis, and z-axis coordinates of the first coordinate system, respectively.

[0063] S2: Obtain the second coordinates, and obtain the third coordinates based on the second coordinates and the first coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point.

[0064] It should be noted that by dividing the map to be rendered into several sub-maps and selecting a center point for each sub-map, the coordinates of the center point are taken as the origin in the world coordinate system of the sub-map. Therefore, other points besides the center point need to be represented by their relative coordinates to the center point. In this embodiment, the second coordinate is the world coordinate of the point to be rendered in each sub-map. The third coordinate is obtained by calculating the difference between the second coordinate and the first coordinate, which is the relative coordinate of each point to be rendered to the center point.

[0065] S3: Obtain the fourth coordinate, and obtain the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate. Obtain the corresponding fifth coordinate based on the first transformation matrix, the second transformation matrix and the third coordinate. Render the sub-map to be rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0066] It should be noted that OpenGL ES has a virtual electronic device for capturing the map to be rendered. The virtual electronic device can be a device with camera function, such as a camera or video camera. This virtual camera is similar to a real camera. Different observation results can be obtained by adjusting the position, orientation and other parameters of the virtual camera. Then, the observed results can be converted to the screen coordinate system by obtaining the transformation matrix, and different rendering images can be obtained on the display screen.

[0067] In this embodiment of the application, the world coordinates of the electronic device, i.e. the fourth coordinates, are obtained, and a second transformation matrix for transforming the third coordinates to the screen coordinate system is obtained based on the fourth coordinates. The corresponding fifth coordinates are obtained by multiplying the first transformation matrix, the second transformation matrix, and the third coordinates. The sub-map to be rendered is rendered based on the fifth coordinates. Once each sub-map to be rendered is drawn, the three-dimensional map is obtained.

[0068] As a preferred embodiment of the foregoing, the first transformation matrix includes both single-precision and double-precision storage methods, the second transformation matrix includes both single-precision and double-precision storage methods, and the fifth coordinate includes single-precision storage. For example, when both the first and second transformation matrices are stored as double-precision, their product can be stored as single-precision, and the fifth coordinate obtained by multiplying their product by the third coordinate can also be stored as single-precision. The aforementioned calculations are all performed at the CPU layer of OpenGL ES 3.0. Therefore, the single-precision fifth coordinate can be processed or calculated at the GPU layer, which improves the compatibility of precision calculations compared to the CPU layer, which can only process or calculate single-precision data.

[0069] The above-described process involves dividing the map to be rendered into several sub-maps. A center point is selected in each sub-map, and the world coordinates of the center point, i.e., the first coordinates, are obtained. A first transformation matrix is ​​then obtained based on the first coordinates. Next, the world coordinates of the points to be rendered in each sub-map are obtained, i.e., the second coordinates. A third coordinate, i.e., the relative coordinates of the point to be rendered to the center point, is obtained based on the first and second coordinates. Finally, the world coordinates of the electronic device used to capture the map are obtained, i.e., the fourth coordinates. A second transformation matrix is ​​obtained based on the fourth coordinates to transform the third coordinates to the screen coordinate system. A fifth coordinate, i.e., the coordinates of the point to be rendered in the 3D map, is obtained by multiplying the first, second, and third coordinates. The sub-maps are then rendered based on the fifth coordinates. The aforementioned steps are repeated for each sub-map until a 3D map is obtained.

[0070] The aforementioned steps of 3D map rendering are executed in the Central Processing Unit (CPU) of OpenGL ES 3.0. The first and second transformation matrices calculated through the aforementioned steps are double-precision data, and their product can be stored in single-precision form. The third coordinate can also be stored in single-precision form. Then, the product of the first and second transformation matrices is multiplied by the third coordinate in single-precision form, and the resulting fifth coordinate can also be stored in single-precision form. Therefore, single-precision data processing and calculation can be performed in the Graphics Processing Unit (GPU) subsequently. Thus, the data at the CPU layer can be either single-precision or double-precision. Compared to processing and calculating only single-precision data at the CPU layer, this improves the compatibility of precision calculation during 3D map rendering. During the drawing process, double-precision data, single-precision data, or a combination of single-precision and double-precision data can be used for calculation, which improves the drawing accuracy of 3D maps to a certain extent.

[0071] In one implementation, such as Figure 2 As shown, the step of obtaining the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes:

[0072] S31: Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system;

[0073] S32: Obtain the view matrix of the three-dimensional map model based on the fourth coordinate, the position of the electronic device, and the upward direction vector;

[0074] S33: Obtain the projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model;

[0075] S34: The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

[0076] It should be noted that OpenGL ES includes a world coordinate system. The map to be rendered is located in the world coordinate system, while the 3D map model used for rendering the map is located in the model coordinate system, which is not the same coordinate system as the map to be rendered. Therefore, the 3D map model first needs to be transformed from the model coordinate system to the world coordinate system. Then, a view transformation is required. By determining the various viewpoint states of the 3D map model, the 3D map model can be rendered from various viewpoints based on the map to be rendered. Finally, a projection transformation is also required, including orthographic projection and / or perspective projection. This needs to be adjusted according to the actual situation of the map to be rendered, and is not limited here.

[0077] As a specific implementation of the above embodiments, a model matrix is ​​obtained for transforming the 3D map model from the model coordinate system to the world coordinate system; a view matrix of the 3D map model is obtained based on the fourth coordinate, the position of the electronic device, and the upward direction vector; a projection matrix is ​​obtained for performing orthogonal projection and / or perspective projection on the 3D map model; and a second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix. After transformation using the model matrix, the 3D map model is now located in the world coordinate system; after transformation using the view matrix, the 3D map model is now located in the view coordinate system; and after transformation using the projection matrix, the 3D map model is now located in the clipping coordinate system.

[0078] Therefore, by calculating the product of the model matrix, the view matrix, and the projection matrix, the second transformation matrix is ​​obtained. This second transformation matrix performs transformations on the 3D map model from the model coordinate system to the world coordinate system, from the world coordinate system to the view coordinate system, and from the view coordinate system to the clipping coordinate system. This allows the map to be rendered, and the resulting 3D map model is displayed on the screen to obtain a 3D map. It should be noted that in other embodiments, the transformation steps may include, but are not limited to, clipping and standardization, which are not limited here.

[0079] In one implementation, such as Figure 3 As shown, the step of obtaining the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system, includes:

[0080] S311: The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling;

[0081] S312: Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0082] It should be noted that the aforementioned steps of transforming the 3D map model from the model coordinate system to the world coordinate system involve not only positional changes but also rotation and scaling. Therefore, the steps of transforming the 3D map model from the model coordinate system to the world coordinate system actually include: translation, rotation, and scaling; obtaining the corresponding translation matrix, rotation matrix, and scaling matrix; and obtaining the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0083] It should be noted that, in other embodiments, the step of transforming the 3D map model from the model coordinate system to the world coordinate system may include any one or two of translation, rotation, and scaling. During calculation, the corresponding matrices from each transformation step are obtained and multiplied to obtain the model matrix. For example, if the 3D map model is translated and rotated, the translation matrix and the rotation matrix are obtained, and their product is calculated to obtain the model matrix. The translation, rotation, and scaling steps can be combined arbitrarily, and the model matrix is ​​obtained accordingly based on the product of the matrices from the corresponding steps. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; however, as long as the combinations of these technical features do not contradict each other, they should be considered within the scope of this specification.

[0084] Preferably, in one embodiment, such as Figure 4 As shown, considering the situation where the distance between the electronic device and the map to be rendered is too far, causing abnormalities in the rendering of the 3D map and thus affecting the accuracy of the 3D map rendering, the step of obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes:

[0085] S301: Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication;

[0086] S302: If so, obtain the product of the third coordinate and the transformation matrix, and determine the corresponding fifth coordinate;

[0087] S303: If not, it is determined that the distance between the electronic device and the map to be rendered is too far;

[0088] S304: Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0089] S305: Obtain the product of the third coordinate, the first transformation matrix, and the second transformation matrix, and determine the fifth coordinate.

[0090] It should be noted that when calculating the product of the third coordinate, the first transformation matrix, and the second transformation matrix, the third coordinate is designated as a matrix with 1 row and 3 columns. Furthermore, when multiplying the matrix corresponding to the third coordinate, the first transformation matrix, and the second transformation matrix, the product of any two matrices is multiplied by the remaining matrix; the timing is not restricted. Before the operation, it is necessary to determine whether the conditions for matrix multiplication are met, i.e., whether the number of columns in the first matrix is ​​equal to the number of rows in the second matrix. If yes, matrix multiplication is performed to obtain the fifth coordinate. If not, it is determined that the distance between the electronic device and the map to be rendered is too far. The distance between the electronic device and the map to be rendered is adjusted so that the third coordinate, the first transformation matrix, and the second transformation matrix meet the conditions for matrix multiplication, thereby performing matrix multiplication to obtain the fifth coordinate. This effectively avoids abnormal rendering of the 3D map due to the distance between the electronic device and the map to be rendered, further ensuring the accuracy of the rendered 3D map.

[0091] As a specific implementation of the above-described embodiments, such as Figure 5 As shown, the step of splitting the map to be rendered into several sub-maps to be rendered includes:

[0092] S101: The preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained.

[0093] S102: The splitting diameter is obtained by calculating the value of the preprocessed bit depth as the base n, where n > 1;

[0094] S103: Based on the splitting diameter, the map to be rendered is split to obtain several sub-maps to be rendered.

[0095] It should be noted that the preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained. The effective number of bits to be retained can be determined according to the actual map to be rendered to adapt to various map rendering scenarios. The splitting diameter is obtained by calculating a value with n as the base and the value of the preprocessing bit depth as the exponent, where n>1, and the value of n can be determined according to the actual map to be rendered to adapt to various map rendering scenarios. According to the splitting diameter, the map to be rendered is split to obtain several sub-maps with a diameter equal to the splitting diameter.

[0096] For example, since the effective precision bits of a single-precision floating-point number are 24, assuming that the effective precision bits to be retained are 10, and n=2, then the preprocessing bit length is 14 bits, and the splitting diameter is equal to the value of 2^14, that is, 16384. In this embodiment of the application, the unit of the splitting diameter is meters. In other embodiments, the unit of the splitting diameter can also be centimeters, decimeters, or kilometers, etc., which are not limited here.

[0097] As a specific implementation of the above embodiments, the step of obtaining the first coordinates, wherein the first coordinates are the world coordinates of the center point corresponding to the sub-map to be rendered, includes:

[0098] Based on the second coordinate and the splitting diameter, the first coordinate is obtained, and the mathematical expression for the first coordinate is:

[0099] C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};

[0100] Where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

[0101] Obtain the world coordinates of the point to be rendered in the sub-map to be rendered, which is the second coordinate. Based on the second coordinate and the split diameter, obtain the first coordinate, which is the coordinate of the center point, through the aforementioned mathematical expression.

[0102] It should be understood that, although Figure 1-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0103] In one embodiment, such as Figure 6 As shown, a 3D map rendering system is provided, including: a splitting module, an acquisition module, and a processing module, wherein:

[0104] The splitting module is used to split the map to be rendered into several sub-maps to be rendered, select a center point for each sub-map to be rendered and obtain a first coordinate, and obtain a corresponding first transformation matrix based on each first coordinate, wherein the first coordinate is the world coordinate of the center point corresponding to the sub-map to be rendered.

[0105] The acquisition module is used to acquire a second coordinate and obtain a third coordinate based on the second coordinate and the first coordinate, wherein the second coordinate is the world coordinate of the point to be rendered in each of the sub-maps to be rendered, and the third coordinate is the relative coordinate of each point to be rendered to the center point;

[0106] The processing module is used to obtain a fourth coordinate, and obtain a second transformation matrix based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The fifth coordinate is used to render the sub-map to be rendered to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0107] In one embodiment, the step of the splitting module obtaining a second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes:

[0108] Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system;

[0109] Based on the fourth coordinate, the position of the electronic device, and the upward direction vector, the view matrix of the three-dimensional map model is obtained;

[0110] Obtain a projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model;

[0111] The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

[0112] In one embodiment, the splitting module obtains a model matrix, wherein the step of using the model matrix to transform the 3D map model from the model coordinate system to the world coordinate system includes:

[0113] The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling;

[0114] Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0115] In one embodiment, the step of the processing module obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes:

[0116] Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0117] If so, then obtain the product of the third coordinate and the transformation matrix to determine the corresponding fifth coordinate;

[0118] If not, it is determined that the distance between the electronic device and the map to be rendered is too far;

[0119] Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0120] The product of the third coordinate, the first transformation matrix, and the second transformation matrix is ​​obtained to determine the fifth coordinate.

[0121] In one embodiment, the step of the splitting module splitting the map to be rendered into several sub-maps to be rendered includes:

[0122] The preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained.

[0123] The splitting diameter is obtained by calculating the value of the preprocessed bit depth as the base n, where n > 1;

[0124] The map to be rendered is split according to the splitting diameter to obtain several sub-maps to be rendered.

[0125] In one embodiment, the step of the splitting module obtaining first coordinates, wherein the first coordinates are the world coordinates of the center point corresponding to the sub-map to be rendered, includes:

[0126] Based on the second coordinate and the splitting diameter, the first coordinate is obtained, and the mathematical expression for the first coordinate is:

[0127] C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};

[0128] Where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

[0129] For specific limitations regarding the 3D map rendering system, please refer to the limitations on the 3D map rendering method described above, which will not be repeated here. The various modules in the aforementioned 3D map rendering system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0130] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for rendering a three-dimensional map. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0131] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0132] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0133] S1: The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0134] S2: Obtain the second coordinates, and obtain the third coordinates based on the second coordinates and the first coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point;

[0135] S3: Obtain the fourth coordinate, and obtain the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate. Obtain the corresponding fifth coordinate based on the first transformation matrix, the second transformation matrix and the third coordinate. Render the sub-map to be rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0136] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0137] The step of obtaining the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes:

[0138] S31: Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system;

[0139] S32: Obtain the view matrix of the three-dimensional map model based on the fourth coordinate, the position of the electronic device, and the upward direction vector;

[0140] S33: Obtain the projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model;

[0141] S34: The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0143] The step of obtaining the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system, includes:

[0144] S311: The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling;

[0145] S312: Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] The step of obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes:

[0148] S301: Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication;

[0149] S302: If so, obtain the product of the third coordinate and the transformation matrix, and determine the corresponding fifth coordinate;

[0150] S303: If not, it is determined that the distance between the electronic device and the map to be rendered is too far;

[0151] S304: Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0152] S305: Obtain the product of the third coordinate, the first transformation matrix, and the second transformation matrix, and determine the fifth coordinate.

[0153] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0154] The step of splitting the map to be rendered into several sub-maps to be rendered includes:

[0155] S101: The preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained.

[0156] S102: The splitting diameter is obtained by calculating the value of the preprocessed bit depth as the base n, where n > 1;

[0157] S103: Based on the splitting diameter, the map to be rendered is split to obtain several sub-maps to be rendered.

[0158] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0159] The step of obtaining the first coordinates, wherein the first coordinates are the world coordinates of the center point corresponding to the sub-map to be rendered, includes:

[0160] Based on the second coordinate and the splitting diameter, the first coordinate is obtained, and the mathematical expression for the first coordinate is:

[0161] C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};

[0162] Where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

[0163] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0164] S1: The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered.

[0165] S2: Obtain the second coordinates, and obtain the third coordinates based on the second coordinates and the first coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point;

[0166] S3: Obtain the fourth coordinate, and obtain the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate. Obtain the corresponding fifth coordinate based on the first transformation matrix, the second transformation matrix and the third coordinate. Render the sub-map to be rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

[0167] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0168] The step of obtaining the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes:

[0169] S31: Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system;

[0170] S32: Obtain the view matrix of the three-dimensional map model based on the fourth coordinate, the position of the electronic device, and the upward direction vector;

[0171] S33: Obtain the projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model;

[0172] S34: The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

[0173] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0174] The step of obtaining the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system, includes:

[0175] S311: The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling;

[0176] S312: Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

[0177] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0178] The step of obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes:

[0179] S301: Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication;

[0180] S302: If so, obtain the product of the third coordinate and the transformation matrix, and determine the corresponding fifth coordinate;

[0181] S303: If not, it is determined that the distance between the electronic device and the map to be rendered is too far;

[0182] S304: Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication.

[0183] S305: Obtain the product of the third coordinate, the first transformation matrix, and the second transformation matrix, and determine the fifth coordinate.

[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0185] The step of splitting the map to be rendered into several sub-maps to be rendered includes:

[0186] S101: The preprocessing bit depth is obtained based on the difference between the effective number of bits of the single-precision floating-point number and the preset effective number of bits to be retained.

[0187] S102: The splitting diameter is obtained by calculating the value of the preprocessed bit depth as the base n, where n > 1;

[0188] S103: Based on the splitting diameter, the map to be rendered is split to obtain several sub-maps to be rendered.

[0189] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0190] The step of obtaining the first coordinates, wherein the first coordinates are the world coordinates of the center point corresponding to the sub-map to be rendered, includes:

[0191] Based on the second coordinate and the splitting diameter, the first coordinate is obtained, and the mathematical expression for the first coordinate is:

[0192] C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};

[0193] Where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

[0194] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0195] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0196] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for rendering a three-dimensional map, characterized in that, include: The map to be rendered is split into several sub-maps to be rendered. A center point is selected for each sub-map to be rendered and a first coordinate is obtained. Based on each first coordinate, a corresponding first transformation matrix is ​​obtained, wherein the first coordinate is the world coordinate of the center point of the sub-map to be rendered. Obtain the second coordinates, and based on the second coordinates and the first coordinates, obtain the third coordinates, wherein the second coordinates are the world coordinates of the points to be rendered in each of the sub-maps to be rendered, and the third coordinates are the relative coordinates of each point to be rendered to the center point; A fourth coordinate is obtained, and a second transformation matrix is ​​obtained based on the fourth coordinate to transform the third coordinate into the screen coordinate system. Based on the first transformation matrix, the second transformation matrix, and the third coordinate, the corresponding fifth coordinate is obtained. The sub-map to be rendered is rendered based on the fifth coordinate to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map. The step of splitting the map to be rendered into several sub-maps to be rendered includes: obtaining the preprocessing bit depth based on the difference between the effective number of bits of a single-precision floating-point number and the preset number of effective bits of precision to be retained; obtaining the splitting diameter by calculating a value with n as the base and the value of the preprocessing bit depth as the exponent, where n > 1; and splitting the map to be rendered into several sub-maps to be rendered according to the splitting diameter. The step of obtaining the first coordinate, wherein the first coordinate is the world coordinate of the center point corresponding to the sub-map to be rendered, includes: obtaining the first coordinate based on the second coordinate and the split diameter, wherein the mathematical expression for obtaining the first coordinate is: C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};where m is the splitting diameter, P (x) P (y) and P (z) Let x, y, and z be the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and let C be the first coordinate.

2. The method for rendering a three-dimensional map according to claim 1, characterized in that, The first transformation matrix includes single-precision and double-precision storage methods, the second transformation matrix includes single-precision and double-precision storage methods, and the fifth coordinate includes single-precision storage method.

3. The method for rendering a three-dimensional map according to claim 1, characterized in that, The step of obtaining the second transformation matrix for transforming the third coordinate to the screen coordinate system based on the fourth coordinate includes: Obtain the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system; Based on the fourth coordinate, the position of the electronic device, and the upward direction vector, the view matrix of the three-dimensional map model is obtained; Obtain a projection matrix, wherein the projection matrix is ​​used to perform orthogonal projection and / or perspective projection on the three-dimensional map model; The second transformation matrix is ​​obtained by calculating the product of the model matrix, the view matrix, and the projection matrix.

4. The method for rendering a three-dimensional map according to claim 3, characterized in that, The step of obtaining the model matrix, wherein the model matrix is ​​used to transform the 3D map model from the model coordinate system to the world coordinate system, includes: The steps for transforming the 3D map model from the model coordinate system to the world coordinate system include: translation, rotation, and scaling; Obtain the corresponding translation matrix, rotation matrix, and scaling matrix, and obtain the model matrix by calculating the product of the translation matrix, the rotation matrix, and the scaling matrix.

5. The method for rendering a three-dimensional map according to claim 1, characterized in that, The step of obtaining the corresponding fifth coordinate based on the third coordinate, the first transformation matrix, and the second transformation matrix includes: Determine whether the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication. If so, then obtain the product of the third coordinate and the transformation matrix to determine the corresponding fifth coordinate; If not, it is determined that the distance between the electronic device and the map to be rendered is too far; Adjust the distance between the electronic device and the map to be rendered so that the third coordinate, the first transformation matrix, and the second transformation matrix satisfy the conditions for matrix multiplication. The product of the third coordinate, the first transformation matrix, and the second transformation matrix is ​​obtained to determine the fifth coordinate.

6. A system for rendering three-dimensional maps, characterized in that, include: The splitting module is used to split the map to be rendered into several sub-maps to be rendered, select a center point for each sub-map to be rendered and obtain a first coordinate, and obtain a corresponding first transformation matrix based on each first coordinate, wherein the first coordinate is the world coordinate of the center point corresponding to the sub-map to be rendered. The step of splitting the map to be rendered into several sub-maps to be rendered includes: obtaining the preprocessing bit depth based on the difference between the effective number of bits of a single-precision floating-point number and the preset number of effective bits of precision to be retained; obtaining the splitting diameter by calculating a value with n as the base and the value of the preprocessing bit depth as the exponent, where n > 1; and splitting the map to be rendered into several sub-maps to be rendered according to the splitting diameter. The step of obtaining the first coordinate, wherein the first coordinate is the world coordinate of the center point corresponding to the sub-map to be rendered, includes: obtaining the first coordinate based on the second coordinate and the split diameter, wherein the mathematical expression for obtaining the first coordinate is: C={[round(P (x) / m)]*m,[round(P (y) / m)]*m,[round(P (z) / m)]*m};where m is the splitting diameter, P (x) P (y) and P (z) These are the x-axis, y-axis, and z-axis coordinates of the second coordinate, respectively, and C is the first coordinate. The acquisition module is used to acquire a second coordinate and obtain a third coordinate based on the second coordinate and the first coordinate, wherein the second coordinate is the world coordinate of the point to be rendered in each of the sub-maps to be rendered, and the third coordinate is the relative coordinate of each point to be rendered to the center point; The processing module is used to obtain a fourth coordinate, and obtain a second transformation matrix based on the fourth coordinate to transform the third coordinate to the screen coordinate system. Based on the first transformation matrix, the second transformation matrix and the third coordinate, the corresponding fifth coordinate is obtained. The fifth coordinate is used to render the sub-map to be rendered to obtain a three-dimensional map. The fourth coordinate is the world coordinate of the electronic device used to capture the map to be rendered, and the fifth coordinate is the coordinate of the point to be rendered in the three-dimensional map.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for rendering a three-dimensional map as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for rendering a three-dimensional map as described in any one of claims 1 to 5.