Map data processing methods, apparatus, equipment, and media based on model reconstruction

By generating a building model mesh and dividing it into proxy cubes, which are then replaced with the target building model, the problem of a single building model in 3D maps is solved, achieving high-precision building data reconstruction and improving the detail representation of map data and modeling efficiency.

CN120707771BActive Publication Date: 2025-10-28CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511187929.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-28
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing 3D maps feature building models that are monotonous, lacking diversity and detail, resulting in a high degree of homogenization in appearance and negatively impacting user experience and application effectiveness.

Method used

By generating a building model mesh, constructing a directed bounding box and dividing it into proxy cubes, and replacing the target building model from the building model library according to the neighborhood state, high-precision building data is generated.

Benefits of technology

It improves the detail of map data, solves the problem of building homogenization, reduces the complexity of manual modeling and improves modeling efficiency, thereby enhancing the quality of map services and expanding their application areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707771B_ABST
    Figure CN120707771B_ABST
Patent Text Reader

Abstract

This invention relates to a map data processing method, apparatus, device, and medium based on model reconstruction. The method includes: after acquiring map data to be processed, generating a building model mesh based on the map data, wherein the building model mesh represents the geometry of a building complex; constructing a directed bounding box for each independent building based on the splitting result of the building model mesh; dividing the directed bounding box into multiple proxy cubes for model reconstruction according to a preset splitting size; and replacing each proxy cube with a target building model based on the neighborhood state of the proxy cube to obtain a model reconstruction result, thereby generating new map data based on the model reconstruction result. This method effectively solves the problems of monotonous building model forms and severe homogenization in map data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to a map data processing method, apparatus, device, and medium based on model reconstruction. Background Technology

[0002] In recent years, with the continuous advancement of geographic information technology and the increasing demands of users, map services have gradually transitioned from traditional two-dimensional (2D) planar displays to three-dimensional (3D) stereoscopic presentations. This transformation provides users with a richer, more intuitive, and immersive geographic information experience.

[0003] However, while 3D maps have significant advantages in displaying the spatial relationships between terrain and buildings, they still have some shortcomings in the detailed representation of building models. Currently, many 3D map applications generate building models through automated tools, which can quickly generate basic building outlines, but these models are of a single form, resulting in a serious homogenization of building appearances on the map, lacking diversity and building details. Summary of the Invention

[0004] The purpose of this invention is to provide a map data processing method, apparatus, equipment and medium based on model reconstruction, which can effectively solve the problems of monotonous building model forms and serious homogenization in appearance in map data.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] According to a first aspect of the present invention, a map data processing method based on model reconstruction is provided, comprising:

[0007] After obtaining the map data to be processed, a building model mesh is generated based on the map data. The building model mesh represents the geometry of the building complex.

[0008] Based on the splitting results of the building model mesh, construct a bounding box (such as a directed bounding box) for each individual building.

[0009] According to the preset segmentation size, the directed bounding box is segmented into multiple proxy cubes for model reconstruction;

[0010] For each proxy cube, based on the neighborhood state of the proxy cube, the proxy cube is replaced with the target building model to obtain the model reconstruction result, and new map data is generated based on the model reconstruction result;

[0011] The neighborhood state is used to indicate whether there are buildings in the neighboring agent cubes of the agent cube in each direction;

[0012] The step of replacing the proxy cube with the target building model based on the neighborhood state of the proxy cube includes:

[0013] Based on the neighborhood state of the proxy cube, the target building model corresponding to the neighborhood state is searched from the building model library to obtain the query result; wherein the building model library is used to store modular models of various predefined building types;

[0014] Based on the query results, the proxy cube is replaced with the target building model.

[0015] In one implementation, generating a building model mesh based on the map data includes:

[0016] Obtain the vertex position array and vertex index array of the original building model from the map data; wherein, the vertex position array includes the three-dimensional coordinates of all vertices in the original building model, and the vertex index array is used to define the vertices in the vertex position array for constructing the triangular facets;

[0017] Identify overlapping vertices located in the same spatial position from all vertices, and merge the overlapping vertices to obtain a merged vertex position array and vertex index array;

[0018] The building model mesh is generated based on the merged vertex position array and vertex index array.

[0019] In one implementation, the splitting result includes building units for each individual building, each building unit including its own vertex position array and vertex index array;

[0020] The step of constructing a directed bounding box for each individual building based on the splitting result of the building model mesh includes:

[0021] For each building unit, determine the main axis direction, first dimension, and center point coordinates of the building unit;

[0022] The orientation of the directed bounding box is determined based on the principal axis direction, the second dimension of the directed bounding box is determined based on the first dimension, and the directed bounding box is constructed based on the orientation, the second dimension, and the center point coordinates.

[0023] In one embodiment, determining the principal axis direction, first dimension, and center point coordinates of the building unit includes:

[0024] Based on the vertex position array in the building unit, obtain the minimum height of the vertices in the building unit, and remove all vertices that do not have the minimum height to obtain the first vertex;

[0025] Based on the vertex index array of the building unit, determine the second vertex in the first vertex that is used to form a line segment;

[0026] From the line segments formed by the second vertex, select the line segment with the longest distance, and determine the vector formed by the line segment as the direction of the principal axis;

[0027] The first dimension is determined based on the maximum and minimum coordinate values ​​of the vertices on the main axis, and the height of the vertices.

[0028] The coordinates of the center point are determined based on the average of the maximum and minimum coordinates of the vertices on the main axis, and the average of the maximum and minimum heights.

[0029] In one embodiment, determining the principal axis direction, first dimension, and center point coordinates of the building unit includes:

[0030] By performing principal component analysis on the building unit, the main axis direction, first dimension, and center point coordinates of the building unit are determined.

[0031] In one embodiment, determining the principal axis direction, first dimension, and center point coordinates of the building unit by performing principal component analysis includes:

[0032] The coordinates of the center point are determined by the mean of the coordinates of all vertices based on the vertex position array of the building unit.

[0033] After decentralizing the coordinates of all vertices in the building unit, a covariance matrix of the decentralized vertex coordinates is constructed, and the eigenvectors of the covariance matrix are solved to determine the direction of the principal axis.

[0034] The eigenvectors are orthogonalized using the Schmitt method to obtain orthogonal eigenvectors, and all vertices of the building unit are projected onto the orthogonal eigenvectors to obtain the projected coordinates.

[0035] The first dimension is determined based on the maximum coordinate value in the projected coordinates.

[0036] In one implementation, the preset segmentation size is determined based on the size of the corresponding independent building in the original building model.

[0037] In one implementation, the step of searching for a target building model corresponding to the neighborhood state of the proxy cube from a building model library includes:

[0038] Based on the neighborhood state of the proxy cube, the encoding information of the proxy cube is determined. The encoding information adopts a bitmap format, which includes the bits corresponding to the proxy cube in each direction. Each bit is used to indicate the state information of whether there is a building in the corresponding direction.

[0039] Based on the encoded information, the target building model corresponding to the neighborhood state is searched from the building model library.

[0040] In one implementation, before replacing the proxy cube with the target building model based on the neighborhood state of the proxy cube, the method further includes:

[0041] Based on the center coordinates of the proxy cubes, determine whether all proxy cubes are inside the building;

[0042] When all proxy cubes are inside the building, the proxy cubes are replaced with the target building model based on their neighborhood state; wherein the target building model is a modular model corresponding to the original building model.

[0043] In one implementation, the method for determining the center coordinates of the proxy cube includes:

[0044] Based on the directed bounding box and the segmentation size, determine the position index of the proxy cube in the directed bounding box with respect to the length, height, and width directions;

[0045] The center coordinates of the proxy cube are determined based on the location index and the size of the proxy cube; wherein the size of the proxy cube is determined based on the size of the directed bounding box and the number of proxy cubes.

[0046] According to a second aspect of the present invention, a map data processing apparatus based on model reconstruction is provided, comprising:

[0047] The grid generation module is used to generate a building model grid based on the map data after acquiring the map data to be processed. The building model grid represents the geometry of the building complex.

[0048] The bounding box construction module is used to construct a directed bounding box for each individual building based on the splitting result of the building model mesh;

[0049] The segmentation module is used to segment the directed bounding box into multiple proxy cubes for model reconstruction according to a preset segmentation size;

[0050] The model reconstruction module is used to, for each proxy cube, search for a target building model corresponding to the neighborhood state from the building model library, obtain the query result, and replace the proxy cube with the target building model according to the query result to obtain the model reconstruction result, so as to generate new map data based on the model reconstruction result; wherein, the neighborhood state is used to indicate the status information of whether there are buildings in the neighboring proxy cubes of the proxy cube in each direction, and the building model library is used to store modular models of various predefined building types.

[0051] According to a third aspect of the present invention, an electronic device is provided, comprising:

[0052] At least one processor; and

[0053] A memory communicatively connected to the at least one processor; wherein,

[0054] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the model-based map data processing method provided in any of the first aspects above.

[0055] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are configured to cause the computer to perform a model-based map data processing method provided according to any of the first aspects above.

[0056] According to a fifth aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the model-based map data processing method provided in any of the first aspects above.

[0057] This invention provides a map data processing method, apparatus, device, and medium based on model reconstruction. After acquiring the map data to be processed, it generates a building model mesh based on the map data. The building model mesh represents the geometry of a building complex. Based on the mesh's splitting results, a directed bounding box is constructed for each individual building. Then, according to a preset splitting size, the directed bounding box is divided into multiple proxy cubes for model reconstruction. For each proxy cube, based on its neighborhood state, the proxy cube is replaced with a target building model to generate new map data based on the model reconstruction results. In this process, by constructing directed bounding boxes for individual buildings, these boxes are divided into multiple proxy cubes as the basic unit of model reconstruction. Replacement operations are performed based on their neighborhood states, replacing them with target building models that more closely resemble the actual building shapes. This efficiently realizes the reconstruction of building data within the map data, resulting in a high-precision reconstructed building model that enhances the detail of the map data, solves the problem of building homogenization in map data, and reduces the complexity of manual modeling while improving modeling efficiency. This is of great significance for improving map service quality and expanding map application areas. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating the map data processing method based on model reconstruction provided in an embodiment of the present invention.

[0059] Figure 2 This is a flowchart illustrating the method for reconstructing the vertex position array and vertex index array in an embodiment of the present invention.

[0060] Figure 3 This is a flowchart illustrating the method for splitting the building model mesh in an embodiment of the present invention;

[0061] Figure 4 This is an example diagram of the proxy cube and its neighborhood state in an embodiment of the present invention;

[0062] Figure 5 To be Figure 4 Example diagram showing the replacement of the proxy cube with the target building model;

[0063] Figure 6 A schematic flowchart of a map data processing method based on model reconstruction provided in another embodiment of the present invention;

[0064] Figure 7 This is a rendering of the new map data according to an embodiment of the present invention;

[0065] Figure 8 A schematic diagram of the structure of a map data processing device based on model reconstruction provided in an embodiment of the present invention;

[0066] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0067] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0068] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0069] Currently, the generation of buildings in 3D maps primarily employs a method of stretching 2D data to a specific height to create simple rectangular boxes. For example, related technologies determine the bottom polygon vertices corresponding to the building data, configure the corresponding height data for these bottom polygon vertices, determine the corresponding top polygon vertices, and then use these bottom and top polygon vertices to determine the set of side parameters corresponding to the building data in the 3D map. Finally, triangulation of the top polygon vertices and side parameter sets generates a building data index that matches the building in the original 2D map data. While this method can quickly generate basic building outlines in large quantities, the model is monotonous and lacks information such as materials and textures, resulting in highly homogenized building appearances on the map, lacking individuality and aesthetic appeal. This lack of detail and diversity limits the display effect of 3D maps in certain application scenarios and affects user experience. For example, in vehicle navigation systems, users need to quickly identify the features of their surroundings to make timely driving decisions. Overly simplified building models may make it difficult for users to accurately determine the true appearance and location of buildings. Alternatively, in immersive applications such as virtual reality (VR) and augmented reality (AR), users have higher requirements for the realism and detail of the visual effects of map data. 3D building models that lack detail weaken the user's immersive experience and result in a poor user experience.

[0070] To enhance the diversity and realism of buildings in 3D maps, related technologies often employ traditional manual modeling methods to process buildings, resulting in more realistic architectural models in 3D maps. However, the scale of architectural data is enormous, encompassing high-precision 3D information on various shapes and types of buildings. Due to this massive data volume, even though traditional manual modeling can significantly increase realism, it is extremely inefficient and struggles to handle the demands of processing large-scale data. Furthermore, these architectural models are typically stored in map tiles, with all data stored as vertices. To reduce data transmission, the data is further stored in binary format, which necessitates extensive computation to reorganize the received tile data into the mesh data used for rendering, further increasing system complexity and processing time.

[0071] In view of this, embodiments of the present invention provide a map data processing method, apparatus, device, and medium based on model reconstruction. After acquiring the map data to be processed, a building model mesh is generated based on the map data. The building model mesh represents the geometry of a building complex. Based on the splitting results of the building model mesh, a directed bounding box is constructed for each independent building. Then, according to a preset splitting size, the directed bounding box is divided into multiple proxy cubes for model reconstruction. For each proxy cube, based on its neighborhood state, the proxy cube is replaced with a target building model to generate new map data based on the model reconstruction results. In this process, by constructing directed bounding boxes for independent buildings, these directed bounding boxes are divided into multiple proxy cubes as the basic unit of model reconstruction, and a replacement operation is performed based on their neighborhood state to replace them with target building models that more closely resemble the actual building shapes. Thus, the reconstruction process of building data within the map data is efficiently realized, resulting in a high-precision reconstructed building model that enhances the detail of the map data, solves the problem of building homogenization in map data, and simultaneously reduces the complexity of manual modeling and improves modeling efficiency. This is of great significance for improving the quality of map services and expanding the application areas of maps.

[0072] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that these specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0073] First, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0074] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a map data processing method based on model reconstruction proposed in an embodiment of the present invention. The executing entity of this method can be a server, more specifically, a server belonging to a map provider or an automaker. In some embodiments, the executing entity can also be other electronic devices; this embodiment does not impose any particular limitations on this. Figure 1 As shown, the method includes steps S101-S104.

[0075] Step S101: After obtaining the map data to be processed, generate a building model mesh based on the map data. The building model mesh represents the geometry of the building complex.

[0076] In this embodiment, the map data to be processed can be raw map data provided by a map provider. For example, the building models in this map data only have basic building outlines. Optionally, the building complex can refer to a group of multiple building structures (such as buildings) clustered together.

[0077] In one optional implementation, the process of generating the building model mesh can involve obtaining the vertex position array and vertex index array of the original building model from map data. The vertex position array includes the 3D coordinates of all vertices in the original building model, and the vertex index array is used to construct the vertices in the vertex position array of the triangular facets. By traversing the vertex position array, overlapping vertices located in the same spatial position are identified from all vertices, and these overlapping vertices are merged. The building model mesh is then generated based on the merged vertex position array and vertex index array.

[0078] For example, during the generation of the building model mesh, considering the large range of map data, the original building model within the target tile can be processed through user interaction based on the target tile in the map data determined by the user, thereby achieving flexible processing of the map data.

[0079] For example, after obtaining map data, the vertex position (VertexPosition) array and vertex index (Index) array of the building (i.e., the original building model) can be directly obtained from the map data, and overlapping vertices can be merged to construct an optimized building model mesh. If it is not directly carried, it can be obtained through methods such as... Figure 2 The method described includes: S1011, parsing and storing the vertex position array of buildings in the map data. S1012, parsing and storing the point index array of buildings in the map data. S1013, by traversing all vertices, determining whether there are overlapping vertices at the same location; if so, merging the overlapping vertices and reconstructing the merged vertex position array. The merged vertex position array and vertex index array are then used to generate the building model mesh.

[0080] In a specific example, the vertex information of buildings can be read first from the map data. This is done by extracting the vertex position data for each building (vertex positions can be represented by 3D coordinates (x, y, z)) and storing the parsed vertex positions in an array, i.e., a vertex position array. Correspondingly, the vertex index array can be obtained by extracting vertex index information from the map data. This vertex index is used to define the faces of polygons or meshes and is an index pointing to the vertex position array. This parsed vertex index is stored in an array, i.e., a vertex index array, which can be used to define the geometry of the building model. By traversing all vertices in the vertex position array, the position of each vertex is checked. For each pair of vertices, their positions are checked to see if they are the same (i.e., their coordinates are exactly the same). For overlapping vertices, these vertices are merged into one vertex, i.e., only the position of one vertex is retained. In some embodiments, the merged vertex can also be used to update the vertex index array, updating all indices pointing to the merged vertex to point to the retained vertex, reflecting the new vertex index. For example, after merging vertices, the vertex index array can also be updated accordingly. This can be achieved by establishing a mapping for each original vertex when merging overlapping vertices, pointing to the merged vertex (e.g., using a dictionary or array where the keys are the indices of the original vertices and the values ​​are the indices of the merged vertices). By iterating through the original vertex index array and replacing each index with its corresponding value in the mapping, all triangles (also known as triangle faces) reference vertices that are the merged vertices.

[0081] This method effectively processes building vertex information in map data to generate optimized building model meshes. Especially when dealing with large-scale map data, selectively processing building-related vertex data reduces vertex redundancy, lowers data processing volume, and improves data accuracy, providing data support for subsequent model splitting and reconstruction.

[0082] Step S102: Based on the splitting result of the building model mesh, construct a directed bounding box for each independent building (this embodiment uses a directed bounding box as an example, but in some embodiments it can also be a bounding box without direction).

[0083] In this embodiment, the splitting result of the building model mesh may include building units for each independent building, and each building unit includes its own vertex position array and vertex index array.

[0084] For example, the building cluster model (i.e., the building model mesh) within a tile can be split into multiple independent buildings, and an array of vertex positions and indices can be constructed for each independent building. Each independent building is composed of multiple consecutive triangles, and this property can be used to determine whether two triangles are consecutive by judging whether they share indices.

[0085] As a further example, such as Figure 3 As shown, the process of splitting the building model mesh can be as follows:

[0086] Read the vertex index array A1 of the building model mesh, create a boolean array boolArray of the same length as vertex index array A1 (initialize all values ​​to False, where False represents unread and True represents read), and create an index list Ln.

[0087] Starting from the vertex index array A1, arbitrarily select an unvisited element (e.g., the 0th element) and add it to list Ln. Then, use a depth-first search algorithm to find all other index array elements that form a triangle with this element, add these elements to Ln as well, and mark these searched vertex indices as read (True) in boolean array A2. Starting from an element in list Ln, recursively call the depth-first search algorithm, arbitrarily selecting an unvisited element from vertex index array A1 and adding it to list Ln, marking it as read in boolean array A2. Obtain the other two indices that form a triangle with this element and add them sequentially to list Ln and the adjacent index list NL, marking the element as read in boolean array A2. Next, check if the adjacent index list NL is empty: if not empty, take an element 'a' from NL, check if there is an element with the same value as 'a' in vertex index array A1. If so, repeat the process of obtaining and marking the other two indices of the triangle, continuously expanding the index associations.

[0088] Repeat the above steps until all vertex indices have been accessed (by checking whether the boolean array A2 is marked as read). If all are marked as read, the split is complete, and you obtain the vertex index array for all independent buildings.

[0089] In other words, this embodiment creates a Boolean array of the same length as the vertex index array and initializes all values ​​to False. This array records whether a vertex index has been visited; False represents unvisited, and True represents visited. By randomly selecting an unvisited element from the vertex index array, a depth-first search algorithm is used to search for all other index array elements that form a triangle with the selected element. The results are stored in an integer array (i.e., a list Ln, used to store the set of vertex indices of the current independent building), and the searched vertex indices are marked as True. The depth-first search algorithm is recursively called to search for other unvisited index array elements that form a triangle with the elements in this integer array, and the results are also stored in an integer array, until the function converges. The resulting array is the vertex index array of an independent building.

[0090] In this way, the building complex model can be divided into building units of independent buildings, each containing its own vertex position array and vertex index array, so that each building unit can be reconstructed independently, reflecting the personalization and diversity of the building model.

[0091] Specifically, step 102 above, which involves constructing a directed bounding box for each independent building based on the splitting results of the building model mesh, can be achieved by determining the principal axis direction, first dimension, and center point coordinates of each building unit. The orientation of the directed bounding box is determined based on the principal axis direction, the second dimension is determined based on the first dimension, and the directed bounding box is constructed based on the orientation, second dimension, and center point coordinates.

[0092] In this embodiment, the principal axis refers to the main direction axis of the building unit itself, which may have an angle with the X-axis, Y-axis, and Z-axis of the world coordinate system, and is used to characterize the main extension direction of the building unit.

[0093] In this embodiment, the orientation of the directed bounding box can be the same as the principal axis direction. The first dimension can be the same as the second dimension, and the center point coordinates of the directed bounding box can be directly taken from the center coordinates of the building unit. In some embodiments, when determining the size of the directed bounding box, it can be slightly larger than the size of the building unit. This embodiment does not particularly exemplify this. The orientation of the directed bounding box can be determined based on the angle between the principal axis direction of the building unit and the reference axis of the world coordinate system.

[0094] Next, this embodiment further describes the calculation process of the principal axis direction, dimensions, and center coordinates of the building unit. Optionally, the principal axis direction, dimensions, and center coordinates can be determined by performing principal component analysis on the building unit or by utilizing the geometric properties of the building unit. Dimensions include length, width, and height.

[0095] Method 1 utilizes the geometric features of building units for calculation: Based on the vertex position array within the building unit, obtain the minimum height of each vertex in the unit, and remove all vertices that do not have a minimum height to obtain the first vertex. Based on the vertex index array of the building unit, determine the second vertex from the first vertex that forms the line segment. From the line segments formed by the second vertex, select the longest line segment and determine the vector formed by the line segment as the principal axis direction. Based on the maximum and minimum coordinates of the vertices on the principal axis, and the vertex height, determine the first dimension. Based on the average of the maximum and minimum coordinates of the vertices on the principal axis, and the average of the maximum and minimum heights, determine the coordinates of the center point.

[0096] In this approach, considering that the shapes of buildings are all 3D models generated by stretching the height of 2D, the model can be dimensionality reduced to reduce the amount of computation. The data information of the 2D horizontal plane (corresponding to the bounding box of the 2D horizontal plane) can be calculated first, and the data information used to determine the 3D oriented bounding box can be obtained by stretching the height.

[0097] For example, the maximum and minimum heights can be found by traversing all vertices of a building unit. Traversing all vertices of an individual building, all vertices whose height is not at the minimum are removed and designated as the first vertex. Based on the vertex index array, the vertices within the first vertex that can be used to form line segments are determined and designated as the second vertex. In this process, removing vertices whose height is not at the minimum is equivalent to simplifying the 3D model to a set of vertices on a 2D horizontal plane, as only the vertices with the lowest heights are retained, reducing the dimensions that need to be processed.

[0098] Next, the lengths of all line segments are compared, the longest line segment is found, and the vector formed by the origin and destination of this line segment is taken as the positive X-axis direction of the model space coordinate system, i.e., the principal axis direction. This process only needs to consider the vertices of the horizontal plane, and is a 2D plane processing procedure. Optionally, the orientation of the bounding box can be determined by calculating the angle between the positive X-axis direction of the model space coordinate system and the positive X-axis direction of the world space coordinate system (the orientation of the bounding box refers to the rotation state of the bounding box relative to the world coordinate system, calculated by taking the longest line segment of the building as the positive X-axis direction of the model space). All vertices can then be transformed from world space to model space, facilitating more accurate geometric analysis of the building in model space.

[0099] By traversing all vertices, the maximum and minimum coordinate values ​​along the X and Y axes are found. Subtracting the minimum coordinate value from the maximum coordinate value along the height, X-axis, and Y-axis respectively yields the length, width, and height of the building unit (or bounding box). Then, adding the minimum coordinate value to the maximum coordinate value along the height, X-axis, and Y-axis and dividing by two gives the coordinates of the center point of the building unit (or bounding box).

[0100] For example, taking the case where the first and second dimensions are the same, based on the above data, the coordinates of the eight vertices of the directed bounding box of the building's model space can be obtained as follows:

[0101] (Center.x-XLength*0.5f, Center.y-YLength*0.5f,Center.z-ZLength*0.5f)(Center.x-XLength*0.5f, Center.y+YLength*0.5f,Center.z-ZLength*0.5f)(Center.x+XLength*0.5f, Center.y+YLength*0.5f,Center.z+ZLength*0.5f)(Center.x+XLength*0.5f, Center.y-YLength*0.5f,Center.z+ZLength*0.5f)(Center.x-XLength*0.5f,Center.y-YLength*0.5f,Center.z-ZLength*0.5f)(Center.x-XLength*0.5f, Center.y+YLength*0.5f,Center.z-ZLength*0.5f)(Center.x+XLength*0.5f, Center.y+YLength*0.5f,Center.z+ZLength*0.5f)(Center.x+XLength*0.5f, Center.y-YLength*0.5f,Center.z+ZLength*0.5f)

[0102] In the formula, Center.x represents the X-axis coordinate of the center point, Center.y represents the Y-axis coordinate of the center point, Center.z represents the Z-axis coordinate of the center point, XLength represents the length of the bounding box, YLength represents the height of the bounding box, and ZLength represents the width of the bounding box.

[0103] In the above process, by simplifying the 3D model to a 2D horizontal plane, removing height information, performing the main geometric calculations on the 2D plane, and applying the results to the 3D space, the computational complexity can be effectively reduced, which is especially suitable for scenarios that require processing large amounts of architectural data.

[0104] Method two involves performing principal component analysis on the building unit to determine its principal axis direction, first dimension, and center point coordinates. Specifically, the center point coordinates can be determined from the vertex position array of the building unit by using the mean of all vertex coordinates. After decentering all vertex coordinates in the building unit, a covariance matrix of the decentered vertex coordinates is constructed, and the eigenvectors of the covariance matrix are solved to determine the principal axis direction. The eigenvectors are then subjected to Schmitt orthogonalization to obtain orthogonal eigenvectors, and all vertices of the building unit are projected onto these orthogonal eigenvectors to obtain projected coordinates. The first dimension is determined based on the maximum coordinate value in the projected coordinates.

[0105] In this embodiment, the covariance matrix can be constructed first, and the eigenvectors of the covariance matrix can be solved using the Jacobi iteration method (and the eigenvalues ​​can be solved). The three principal axes (eigenvectors) can be orthogonalized using the Schmidt method, and then each point can be projected onto each orthogonalized axis to obtain the maximum value. This determines the first dimension (axis length) of the building unit (or directed bounding box), and then the semi-axis lengths of the three axes can be determined (the semi-axis length can be used to conveniently represent the central symmetry of the bounding box, and the boundary of the bounding box in space can be obtained by adding or subtracting the semi-axis length from the center coordinate point of the bounding box).

[0106] Specifically, the coordinates of all vertices of the building unit are obtained. The mean of all vertex coordinates is calculated to obtain the center point, i.e., the center coordinate point. The data is centralized by subtracting the mean from the coordinates of each vertex. The covariance matrix is ​​then calculated using the centralized vertex coordinates, reflecting the distribution of vertex data in various directions. Next, the Jacobi iteration method is used to solve for the eigenvalues ​​and eigenvectors of the covariance matrix. The eigenvectors represent the principal axis directions of the data, and the eigenvalues ​​represent the variance of the data in these directions. Then, the calculated eigenvectors are orthogonalized using the Schmitt trigger to ensure they are orthogonal (i.e., mutually perpendicular), so that the axes of the final bounding box are orthogonal. By projecting each vertex of the building onto the orthogonalized eigenvectors (i.e., the projection axes), the maximum and minimum coordinate values ​​of the projected coordinates can be found on each projection axis. Subtracting the minimum coordinate value from the maximum coordinate value gives the length of the building unit on each axis, and dividing it by 2 gives the length of the semi-major axis.

[0107] Compared to dimensionality reduction methods that utilize the geometric properties of building units, principal component analysis is more accurate, but also has a higher processing complexity.

[0108] Step S103: According to the preset segmentation size, the directed bounding box is segmented into multiple proxy cubes for model reconstruction.

[0109] In one alternative implementation, the preset segmentation dimensions can be determined based on the dimensions of the corresponding independent buildings in the original building model.

[0110] In one example, the segmentation size can be determined by scaling the overall dimensions of the corresponding independent building (i.e., the independent building corresponding to the directed bounding box to be segmented) in the original building model. This can be done by using the longest side or volume of the independent building as a baseline and setting the segmentation size as a percentage of that. Alternatively, a fixed number of divisions can be set to divide each dimension of the independent building equally. For example, if you want to divide the independent building into 10 parts in each dimension, the segmentation size would be 1 / 10 of the length of each dimension.

[0111] In another example, the segmentation size can be determined based on the level of detail required for each individual building, such as the level of detail needed to reconstruct it. A smaller segmentation size is used for areas requiring high detail, while a larger segmentation size is used for areas with lower detail requirements. Alternatively, adaptive segmentation can be performed based on the geometric complexity of the building. For example, a smaller segmentation size is used in complex areas, while a larger segmentation size is used in simpler areas.

[0112] Optionally, the proxy cube can be divided by calculating the number of divisions along the X, Y, and Z axes of the directed bounding box. In this embodiment, a division size of 10 meters is used as the base unit. The formula for calculating the number of divisions is: divide the axial length by ten. If the remainder is greater than five, the number of divisions is the quotient plus one; if the remainder is less than or equal to five, the number of divisions is the quotient. Based on the dimensions of the directed bounding box determined in the above steps, the length, width, and height of each proxy cube can be obtained by dividing the bounding box's length, width, and height by the number of divisions. To facilitate the processing of proxy cubes, the length, width, and height of the proxy cube can also be divided by the base unit (e.g., 10) to obtain the scaling value of the proxy cube.

[0113] In this way, by using the dimensions of the independent buildings to determine the segmentation dimensions, it is possible to effectively use proxy cubes to approximate and process the independent buildings in the original building model during the model reconstruction process. This ensures that the shape of the model composed of the segmented proxy cubes is consistent with the original building model data, which facilitates the replacement of the model in the future, reduces complexity, and minimizes the problem of model incompatibility.

[0114] Step S104: For each proxy cube, based on the neighborhood state of the proxy cube, search for the target building model corresponding to the neighborhood state in the building model library to obtain the query result. Based on the query result, replace the proxy cube with the target building model to obtain the model reconstruction result, and generate new map data based on the model reconstruction result. The neighborhood state is used to indicate whether there is a building status information of the proxy cube's neighboring proxy cubes in each direction. The building model library is used to store modular models of various predefined building types.

[0115] The neighborhood state is used to indicate whether there is building status information among the neighboring agent cubes in each direction. Optionally, the target building model is a modular model corresponding to the original building model, that is, a modular model that is split or created by combining the shape of the original building model. For example, if the original building model is one or more buildings, the modular model can include modular component models such as windows, balconies, and air conditioners.

[0116] For example, after splitting the directed bounding box, the shape formed by the resulting proxy cubes and their neighboring proxy cubes can be fitted to the shape of the building in the original building model. Specifically, by examining the neighborhood states of the proxy cubes, it can be determined how each proxy cube should be replaced or adjusted during the reconstruction process, so that the shape formed by the proxy cube and its neighboring proxy cubes can more accurately fit the shape of the original building model. The proxy cube can correspond to a building, or the entirety of the proxy cube and its neighboring proxy cubes can correspond to a building; this embodiment does not impose any particular limitation on this. Taking a balcony as an example, assuming that the balcony is located on the exterior of the entire building and can be composed of one or more cubes, if there are multiple proxy cubes, these proxy cubes are open in certain directions. By checking the neighborhood states of the proxy cubes in six directions (front, back, left, right, up, down), it can be determined whether the shape formed by the proxy cubes is a balcony. After identifying these proxy cubes as balcony proxy cubes, the proxy cubes can be replaced with the balcony model.

[0117] Optionally, modular models in the building model library can be designed based on common building structures (such as balconies, windows, and walls), with accuracy matching the segmentation dimensions of the proxy cube, ensuring that the error between the replaced and original building outlines is limited to within a certain range (e.g., 5cm). Based on the query results, the proxy cube is then replaced with the target building model.

[0118] In this embodiment, the neighborhood state of each proxy cube can include the relationships with neighboring proxy cubes in six directions (front, back, left, right, up, and down). Specifically, it detects whether there are buildings in each direction and obtains the arrangement and connection of these neighboring cubes. By traversing all proxy cubes in the building model, the neighborhood state information of each cube is collected to facilitate subsequent queries in the building model library. This building model library stores a variety of predefined modular building models, which can be designed based on common building shapes, styles, and connection methods (in one example, the building models in the building model library can be directly obtained from building data, or they can be models containing various states made based on architectural reference drawings. Optionally, during the production process, building models can be reduced according to symmetry properties, such as XX can be obtained by mirroring XX along the X-axis), to cover different building types. Based on the neighborhood state of each proxy cube, the system queries the model library to find the building model module that best matches the current neighborhood state, and replaces the proxy cube with the matched target building model, so that the replaced building model can accurately reflect the geometric features of the original building. During the matching process, the found modular model can be replaced at the corresponding position, which can be the position corresponding to the center coordinate of the proxy cube. The modular model is scaled in combination with the scaling value of the proxy cube (if any) so that the size of the modular model is consistent with that of the proxy cube. The rotation angle of the model can also be determined by combining the orientation of the oriented bounding box (i.e., the angle between the principal axis direction and the positive X-axis direction of the world space coordinate system mentioned above) to optimize the replacement effect of the modular model.

[0119] For example, such as Figure 4 and Figure 5 As shown, Figure 4 The diagram shows the proxy cube and its different neighborhood states. Figure 5 The diagram shows the result after replacing the proxy cube and its adjacent proxy cubes. Thus, by performing similar replacement operations on all proxy cubes, a complete building model can be quickly reconstructed.

[0120] In an optional implementation, to further improve model reconstruction efficiency, this embodiment searches for the target building model corresponding to the neighborhood state of the proxy cube from the building model library, which can be done in the following way:

[0121] Based on the neighborhood state of the proxy cube, the encoding information of the proxy cube is determined. The encoding information adopts a bitmap format, which includes the bits corresponding to each direction of the proxy cube. Each bit is used to indicate the state information of whether there is a building in the corresponding direction.

[0122] Based on the encoding information, the target building model corresponding to the neighborhood state is searched from the building model library.

[0123] As mentioned above, each proxy cube has six directions: front, back, left, right, up, and down. Each direction has two neighborhood states: with a building or without a building. Based on this characteristic, this embodiment uses a bitmap to encode the neighborhood states of the proxy cube. The state information of the six directions is recorded sequentially in the first to sixth bits of a Byte type data, with a building being recorded as 1 and no building being recorded as 0.

[0124] In some embodiments, in addition to the bits corresponding to each direction, more bits may be included to record information other than state information. For example, for special methods of building model creation, such as using a mirroring method, the mirror state of the YX and YZ planes can be recorded in the 7th and 8th bits of the byte data. In other words, the models in the building model library can contain more bit pairs to record possible mirror states. During the query process, the neighboring state codes of the first 6 bits can be identified to see if they are the same. If there is no directly matching model, the model library can be further checked to see if there is a model that can be matched through mirroring. That is, the 7th and 8th bits of the code are used to determine whether a match can be obtained through mirroring of the YX or YZ plane.

[0125] Using the above encoding method, state information in six directions can be recorded using only one byte. Through simple bit operations, the neighborhood states of different agent cubes can be quickly compared, supporting efficient model library queries. Furthermore, bit operations can quickly check and modify state information, making it particularly suitable for applications involving large-scale building data.

[0126] In some embodiments, considering that the segmented proxy cubes are not necessarily located inside the building—for example, for some irregularly shaped buildings, not all gaps contain buildings, but rather spatial gaps—the segmented proxy cubes may be located in these spatial gaps, not inside the building. Therefore, after segmenting the directed bounding box into multiple proxy cubes, it is possible to first identify whether the proxy cubes are inside the building, and then perform model replacement on the proxy cubes located inside the building to further improve the processing efficiency and accuracy of the model. Figure 6 As shown, in addition to steps S101-S104, this embodiment also includes step S601 before step S104.

[0127] Step S601: Based on the center coordinates of the proxy cubes, determine whether all proxy cubes are inside the building. If all proxy cubes are inside the building, execute step S104 to replace the proxy cubes with the target building model based on their neighborhood states. If the proxy cubes are not inside the building, these proxy cubes can be removed. Then, execute step S104 based on the removed proxy cubes, comparing their neighborhood states to replace the target building model. This effectively solves the error problem caused by proxy cubes not inside the building and improves the model's processing efficiency. In this embodiment, by determining whether the center coordinates of the proxy cubes are inside the building, it is possible to accurately determine whether a proxy cube is inside the building. All proxy cubes inside the building can form a fitted building corresponding to the original building model. It can be understood that the building here refers to the independent building corresponding to the directed bounding box.

[0128] For example, the ray casting method can be used to determine whether the center coordinates of the proxy cube are inside the building. Specifically, starting from the center coordinates of the proxy cube, a ray is drawn in any direction towards the building, and then the number of intersections between the ray and the polygon is calculated. If the number of intersections is even, the point is outside the polygon; if the number of intersections is odd, the point is inside the polygon. Specifically, the number of intersections between the ray emanating from the center coordinates of the proxy cube and the original model is calculated. The number of intersections can be calculated by checking whether the ray intersects with each triangle in the original model; the number of intersecting triangles is the number of intersections between the ray emanating from the center of the proxy cube and the original model. The intersecting triangles can be calculated using the Möller-Trumbore algorithm.

[0129] In some examples, besides the methods described above, other ways can be used to determine whether the center coordinates of the proxy cube are inside the building. For instance, since map data typically contains basic outline information and vertices of buildings, the basic outline information or vertex information can be compared with the center coordinates of the proxy cube to determine whether the proxy cube is inside the building.

[0130] In one optional implementation, the center coordinates of the proxy cube can be determined as follows: based on the directed bounding box and the partitioning size, determine the position index of the proxy cube in the directed bounding box with respect to the length, height, and width directions; based on the position index and the size of the proxy cube, determine the center coordinates of the proxy cube; wherein, the size of the proxy cube is determined based on the size of the directed bounding box and the number of proxy cubes.

[0131] Specifically, based on the directed bounding box and the partitioning dimensions, the position index of the proxy cube within the directed bounding box is calculated. This position index represents the specific location of the proxy cube along the length, width, and height directions of the directed bounding box. For example, based on the dimensions of the directed bounding box and the partitioning dimensions, the number of proxy cubes can be calculated. Then, based on the dimensions of the directed bounding box and the number of proxy cubes, the dimensions of the proxy cubes are calculated, i.e., the length, width, and height of the directed bounding box are divided into several segments, each corresponding to one proxy cube. Finally, by combining the dimensions and position index of the proxy cubes, the center coordinates of the proxy cubes can be calculated.

[0132] For example: Calculate the center point coordinates of each proxy cube using the formula (x + 0.5)*xpreSliceLength, (y + 0.5)*ypreSliceLength, (z + 0.5)*zpreSliceLength.

[0133] Where x is the position index along the length direction, used to identify the position of the proxy cube along the length direction in the directed bounding box, and xpreSliceLength is the length of the proxy cube; y is the position index along the height direction, used to identify the position of the proxy cube along the height direction in the directed bounding box, and ypreSliceLength is the height of the proxy cube; z is the position index along the width direction, used to identify the position of the proxy cube along the width direction in the directed bounding box, and zpreSliceLength is the width of the proxy cube. In this way, the center coordinates of each proxy cube can be calculated efficiently.

[0134] To verify the effectiveness of the technical solutions in the embodiments of the present invention, Figure 7 The image shows the effect of rendering the map data generated by the technical solution provided in the embodiments of the present invention using a rendering tool. It can be seen that although the two-dimensional display lacks some details compared to the three-dimensional display, the building models in the map image no longer contain only simple lines, but also contain more building details (such as balconies, lights, etc.), and the buildings are more diverse.

[0135] In summary, the technical solution provided by this invention, compared to traditional map rendering schemes, selectively processes received building model data, handling only the vertex positions and index information required by the user. A series of algorithms replaces the original building model with a similarly shaped proxy model, eliminating the need to calculate and store UV coordinates and normal information associated with each vertex, thus saving computational resources for processing UV and normal information. Simultaneously, the modular design of the building models significantly reduces the complexity and workload of manually creating various building shapes. By combining modular models into complex buildings, the realism and aesthetics of the building rendering are effectively improved, solving the problem of large-scale real-time map building rendering consisting only of white films or basic color materials. Furthermore, the modular models can be replaced with models of any style, meeting the personalized and customized needs of customers without altering the original map data. Multiple sets of these modular models can be created; adding specific tags during the preprocessing stage or randomly selecting different modular models with the same encoding reduces repetition.

[0136] Furthermore, it should be noted that the implementation of this invention supports both preprocessing and real-time processing. The preprocessing scheme eliminates the need to process the vertex data provided by the map provider. Instead, it allows for the creation of high-precision building models by querying pre-processed data based on map data, such as tile IDs. This approach can achieve good rendering results even on low-end hardware systems.

[0137] Figure 8 This is a schematic diagram of the structure of a map data processing device based on model reconstruction provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the device 800 includes a mesh generation module 801, a bounding box construction module 802, a segmentation module 803, and a model reconstruction module 804, wherein,

[0138] The mesh generation module 801 is used to generate a building model mesh based on the map data after acquiring the map data to be processed. The building model mesh represents the geometry of the building complex.

[0139] Bounding box building module 802 is used to construct directed bounding boxes for each individual building based on the splitting results of the building model mesh;

[0140] The segmentation module 803 is used to segment the directed bounding box into multiple proxy cubes for model reconstruction according to a preset segmentation size;

[0141] The model reconstruction module 804 is used to search for the target building model corresponding to the neighborhood state of each proxy cube from the building model library, obtain the query result, and replace the proxy cube with the target building model according to the query result to obtain the model reconstruction result, so as to generate new map data based on the model reconstruction result. The neighborhood state is used to indicate the status information of whether there are buildings in the neighboring proxy cubes of the proxy cube in each direction, and the building model library is used to store modular models of various predefined building types.

[0142] In one embodiment, the mesh generation module 801 includes:

[0143] The vertex acquisition unit is used to obtain the vertex position array and vertex index array of the original building model from the map data; wherein, the vertex position array includes the three-dimensional coordinates of all vertices in the original building model, and the vertex index array is used to construct the vertices in the vertex position array of the triangle patch;

[0144] The vertex processing unit is used to traverse the vertex position array, identify overlapping vertices located in the same spatial position from all vertices, and merge the overlapping vertices.

[0145] The generation unit is used to generate the building model mesh based on the merged vertex position array and vertex index array.

[0146] In one implementation, the splitting result includes building units for each individual building, each building unit including its own vertex position array and vertex index array; the bounding box construction module 802 includes:

[0147] The first determining unit is used to determine the main axis direction, first dimension, and center point coordinates of each building unit.

[0148] The building unit is used to determine the orientation of the directed bounding box based on the main axis direction, determine the second dimension of the directed bounding box based on the first dimension, and construct the directed bounding box based on the orientation, the second dimension, and the center point coordinates.

[0149] In one implementation, the first determining unit is specifically used for:

[0150] Based on the vertex position array in the building unit, obtain the minimum height of the vertices in the building unit, and remove all vertices that are not at the minimum height to obtain the first vertex;

[0151] Based on the vertex index array of the building unit, determine the second vertex in the first vertex that is used to form the line segment;

[0152] From the line segments formed by the second vertex, select the line segment with the longest distance, and determine the direction of the vector formed by the line segment as the main axis;

[0153] The first dimension is determined based on the maximum and minimum coordinate values ​​of the vertices on the principal axis, as well as the height of the vertices.

[0154] The coordinates of the center point are determined by averaging the maximum and minimum coordinates of the vertices on the main axis, as well as averaging the maximum and minimum heights.

[0155] In one implementation, the first determining unit is specifically used for:

[0156] By performing a principal component analysis on the building unit, the main axis direction, first dimension, and center point coordinates of the building unit can be determined.

[0157] In one implementation, the principal component analysis of the building unit is performed to determine the principal axis direction, first dimension, and center point coordinates of the building unit, including:

[0158] The center point coordinates are determined by the mean of all vertex coordinates based on the vertex position array of the building unit.

[0159] After decentralizing the coordinates of all vertices in the building unit, a covariance matrix of the decentralized vertex coordinates is constructed, and the eigenvectors of the covariance matrix are solved to determine the principal axis direction.

[0160] The eigenvectors are orthogonalized by the Schmitt method to obtain orthogonal eigenvectors. All vertices of the building unit are then projected onto the orthogonal eigenvectors to obtain the projected coordinates.

[0161] The first dimension is determined based on the maximum coordinate value in the projected coordinates.

[0162] In one implementation, the preset segmentation size is determined based on the size of the corresponding independent building in the original building model.

[0163] In one implementation, the query unit is specifically used for:

[0164] Based on the neighborhood state of the proxy cube, the encoding information of the proxy cube is determined. The encoding information adopts a bitmap format, which includes the bits corresponding to each direction of the proxy cube. Each bit is used to indicate the state information of whether there is a building in the corresponding direction.

[0165] Based on the encoding information, the target building model corresponding to the neighborhood state is searched from the building model library.

[0166] In one embodiment, the apparatus further includes:

[0167] The identification module is used to determine whether all proxy cubes are inside the building based on the center coordinates of the proxy cubes;

[0168] The execution module is used to replace the proxy cubes with the target building model based on the neighborhood state of the proxy cubes when all proxy cubes are inside the building; where the target building model is a modular model corresponding to the original building model.

[0169] In one implementation, the identification module is further used for:

[0170] Based on the directed bounding box and the partitioning dimensions, determine the position index of the proxy cube in the directed bounding box with respect to the length, height, and width directions;

[0171] The center coordinates of the proxy cube are determined based on the location index and the size of the proxy cube; where the size of the proxy cube is determined based on the size of the directed bounding box and the number of proxy cubes.

[0172] Figure 9 An electronic device provided as an embodiment of the present invention, such as Figure 9 As shown, the electronic device includes:

[0173] At least one processor 901; and

[0174] Memory 902 is communicatively connected to at least one processor; wherein,

[0175] The memory 902 stores instructions that can be executed by at least one processor, which is executed by at least one processor 901 to enable at least one processor 901 to perform the model-based map data processing method provided in the above method embodiments.

[0176] The present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the model-based map data processing method provided in the above method embodiments.

[0177] The present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the model-based map data processing method provided in the above method embodiments.

[0178] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0179] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0180] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0181] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0182] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0183] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0184] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0185] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

[0186] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention.

Claims

1. A map data processing method based on model reconstruction, characterized in that, include: After obtaining the map data to be processed, a building model mesh is generated based on the map data. The building model mesh represents the geometry of the building complex. Based on the splitting results of the building model mesh, construct a bounding box for each individual building; According to the preset segmentation size, the bounding box is segmented into multiple proxy cubes for model reconstruction; For each proxy cube, based on the neighborhood state of the proxy cube, a target building model corresponding to the neighborhood state is searched from the building model library to obtain a query result. Based on the query result, the proxy cube is replaced with the target building model to obtain a model reconstruction result, and new map data is generated based on the model reconstruction result. The neighborhood state is used to indicate whether there is a building status information of the proxy cube's neighboring proxy cubes in each direction. The building model library is used to store modular models of various predefined building types.

2. The method according to claim 1, characterized in that, The step of generating a building model mesh based on the map data includes: Obtain the vertex position array and vertex index array of the original building model from the map data; wherein, the vertex position array includes the three-dimensional coordinates of all vertices in the original building model, and the vertex index array is used to define the vertices in the vertex position array for constructing the triangular facets; Identify overlapping vertices located in the same spatial position from all vertices, and merge the overlapping vertices to obtain a merged vertex position array and vertex index array; The building model mesh is generated based on the merged vertex position array and vertex index array.

3. The method according to claim 1 or 2, characterized in that, The splitting result includes building units for each independent building, and each building unit includes its own vertex position array and vertex index array; The step of constructing a bounding box for each individual building based on the splitting result of the building model mesh includes: For each building unit, determine the main axis direction, first dimension, and center point coordinates of the building unit; The orientation of the bounding box is determined based on the main axis direction, the second dimension of the bounding box is determined based on the first dimension, and the bounding box is constructed based on the orientation, the second dimension, and the center point coordinates.

4. The method according to claim 3, characterized in that, Determining the main axis direction, first dimension, and center point coordinates of the building unit includes: Based on the vertex position array in the building unit, obtain the minimum height of the vertices in the building unit, and remove all vertices that do not have the minimum height to obtain the first vertex; Based on the vertex index array of the building unit, determine the second vertex in the first vertex that is used to form a line segment; From the line segments formed by the second vertex, select the line segment with the longest distance, and determine the vector formed by the line segment as the direction of the principal axis; The first dimension is determined based on the maximum and minimum coordinate values ​​of the vertices on the main axis, and the height of the vertices. The coordinates of the center point are determined based on the average of the maximum and minimum coordinates of the vertices on the main axis, and the average of the maximum and minimum heights.

5. The method according to claim 3, characterized in that, Determining the main axis direction, first dimension, and center point coordinates of the building unit includes: By performing principal component analysis on the building unit, the main axis direction, first dimension, and center point coordinates of the building unit are determined.

6. The method according to claim 5, characterized in that, The step of determining the principal axis direction, first dimension, and center point coordinates of the building unit by performing principal component analysis includes: The coordinates of the center point are determined by the mean of the coordinates of all vertices based on the vertex position array of the building unit. After decentralizing the coordinates of all vertices in the building unit, a covariance matrix of the decentralized vertex coordinates is constructed, and the eigenvectors of the covariance matrix are solved to determine the direction of the principal axis. The eigenvectors are orthogonalized using the Schmitt method to obtain orthogonal eigenvectors, and all vertices of the building unit are projected onto the orthogonal eigenvectors to obtain the projected coordinates. The first dimension is determined based on the maximum coordinate value in the projected coordinates.

7. The method according to any one of claims 1, 2, 4-6, characterized in that, The preset segmentation dimensions are determined based on the dimensions of the corresponding independent buildings in the original building model.

8. The method according to any one of claims 1, 2, 4-6, characterized in that, The step of searching for the target building model corresponding to the neighborhood state of the proxy cube from the building model library includes: Based on the neighborhood state of the proxy cube, the encoding information of the proxy cube is determined. The encoding information adopts a bitmap format, which includes the bits corresponding to the proxy cube in each direction. Each bit is used to indicate the state information of whether there is a building in the corresponding direction. Based on the encoded information, the target building model corresponding to the neighborhood state is searched from the building model library.

9. The method according to any one of claims 1, 2, 4-6, characterized in that, Before replacing the proxy cube with the target building model based on the neighborhood state of the proxy cube, the method further includes: Based on the center coordinates of the proxy cubes, determine whether all proxy cubes are inside the building; When all proxy cubes are inside the building, the proxy cubes are replaced with the target building model based on their neighborhood state; wherein the target building model is a modular model corresponding to the original building model.

10. The method according to claim 9, characterized in that, The method for determining the center coordinates of the proxy cube includes: Based on the bounding box and the segmentation dimensions, determine the position index of the proxy cube within the bounding box in terms of length, height, and width. The center coordinates of the proxy cube are determined based on the location index and the size of the proxy cube; wherein the size of the proxy cube is determined based on the size of the bounding box and the number of proxy cubes.

11. A map data processing device based on model reconstruction, characterized in that, include: The grid generation module is used to generate a building model grid based on the map data after acquiring the map data to be processed. The building model grid represents the geometry of the building complex. The bounding box building module is used to construct bounding boxes for each individual building based on the splitting results of the building model mesh; The segmentation module is used to segment the bounding box into multiple proxy cubes for model reconstruction according to a preset segmentation size; The model reconstruction module is used to, for each proxy cube, search for a target building model corresponding to the neighborhood state from the building model library, obtain the query result, and replace the proxy cube with the target building model according to the query result to obtain the model reconstruction result, so as to generate new map data based on the model reconstruction result; wherein, the neighborhood state is used to indicate the status information of whether there are buildings in the neighboring proxy cubes of the proxy cube in each direction, and the building model library is used to store modular models of various predefined building types.

12. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the model-based map data processing method according to any one of claims 1-10.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the map data processing method based on model reconstruction according to any one of claims 1-10.

Citation Information

Patent Citations

  • Rapid identification method and system for complex engineering three-dimensional model

    CN115619932A

  • Method and device for generating directed bounding box of grid model, equipment and medium

    CN120198614A