Map data processing method and device based on model reconstruction, equipment and medium

By generating a building model grid and dividing it into proxy cubes, and replacing them with the target building model, the problem of a single building model in the 3D map is solved, high-precision building data reconstruction is achieved, and user experience and modeling efficiency are improved.

CN120707771AActive Publication Date: 2025-09-26CHONGQING CHANGAN AUTOMOBILE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The building models in existing 3D maps are of a single form and lack diversity and details, resulting in a poor user experience. Traditional manual modeling is inefficient and difficult to process large-scale data.

Method used

By generating a building model grid, constructing a directed bounding box and dividing it into proxy cubes, the target building model is replaced from the building model library according to the neighborhood status to generate high-precision building data.

Benefits of technology

It improves the detail of map data, solves the problem of building homogeneity, reduces the complexity of manual modeling and improves modeling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707771A_ABST
    Figure CN120707771A_ABST
Patent Text Reader

Abstract

The invention relates to a map data processing method and device based on model reconstruction, equipment and a medium, and the method comprises the steps: generating a building model grid according to map data after the to-be-processed map data is obtained, and enabling the building model grid to represent the geometric shape of a building group; according to the splitting result of the building model grid, constructing a directed bounding box about each independent building; according to a preset segmentation size, segmenting the directed bounding box into a plurality of proxy cubes for model reconstruction; and for each proxy cube, replacing the proxy cube with a target building model according to the neighborhood state of the proxy cube to obtain a model reconstruction result, and generating new map data according to the model reconstruction result. Through the method, the problems of single building model form, serious appearance homogenization and the like in map data can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a map data processing method, device, equipment and medium based on model reconstruction. Background Art

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

[0003] However, while 3D maps offer significant advantages in displaying the spatial relationships between terrain and buildings, they still struggle with detail in architectural models. Currently, many 3D map applications use automated tools to generate architectural models, quickly generating basic building outlines. However, these models are often monolithic, resulting in a highly homogenized appearance of buildings on the map, lacking diversity and detail. Summary of the Invention

[0004] The purpose of the present invention is to provide a map data processing method, device, equipment and medium based on model reconstruction, which can effectively solve the problems of single form and serious homogeneity of appearance of building models in map data.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

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

[0007] After obtaining the map data to be processed, generating a building model grid according to the map data, wherein the building model grid represents the geometric shape of the building complex;

[0008] Constructing a bounding box (such as a directed bounding box) for each independent building based on the splitting result of the building model grid;

[0009] Dividing the directed bounding box into a plurality of proxy cubes for model reconstruction according to a preset segmentation size;

[0010] For each proxy cube, according to the neighborhood state of the proxy cube, the proxy cube is replaced with a target building model to obtain a model reconstruction result, so as to generate new map data according to the model reconstruction result;

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

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

[0013] According to the neighborhood state of the proxy cube, searching for a target building model corresponding to the neighborhood state from a building model library to obtain a query result; wherein the building model library is used to store predefined modular models of multiple building types;

[0014] According to the query result, the proxy cube is replaced by the target building model.

[0015] In one embodiment, generating a building model grid according to the map data includes:

[0016] Obtaining a vertex position array and a 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 vertices in the vertex position array for constructing a triangular facet;

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

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

[0019] In one embodiment, the splitting result includes a building unit for each independent building, and the building unit includes its own vertex position array and vertex index array;

[0020] The step of constructing a directed bounding box for each independent building according to the splitting result of the building model grid comprises:

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

[0022] The orientation of the directed bounding box is determined according to the main axis direction, the second size of the directed bounding box is determined according to the first size, and the directed bounding box is constructed according to the orientation, the second size and the center point coordinates.

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

[0024] According to the vertex position array in the building unit, obtaining the minimum height value of the vertices in the building unit, and eliminating the vertices that do not belong to the minimum height value from all vertices to obtain the first vertex;

[0025] Determining, according to the vertex index array of the building unit, a second vertex among the first vertices for forming a line segment;

[0026] Selecting a line segment with the longest distance from the line segments formed by the second vertices, and determining a vector formed by the line segments as the principal axis direction;

[0027] determining the first size according to the maximum coordinate value and the minimum coordinate value of the vertex on the main axis and the height of the vertex;

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

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

[0030] The principal component analysis is performed on the building unit to determine the main axis direction, the first size and the center point coordinates of the building unit.

[0031] In one embodiment, performing principal component analysis on the building unit to determine the main axis direction, the first size, and the center point coordinates of the building unit includes:

[0032] According to the vertex position array of the building unit, the center point coordinates are determined by the mean of all vertex coordinates;

[0033] After decentralizing all vertex coordinates in the building unit, constructing a covariance matrix about the decentralized vertex coordinates, and solving the eigenvector of the covariance matrix to determine the principal axis direction;

[0034] Performing Schmidt orthogonalization on the eigenvector to obtain an orthogonal eigenvector, and projecting all vertices of the building unit onto the orthogonal eigenvector to obtain projection coordinates;

[0035] The first size is determined according to a maximum coordinate value in the projection coordinates.

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

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

[0038] Determining encoding information of the proxy cube according to a neighborhood state of the proxy cube, wherein the encoding information is in a bitmap format, and the bitmap format includes bits corresponding to each direction of the proxy cube, each bit being used to indicate status information of whether there is a building in the corresponding direction;

[0039] According to the coding information, a target building model corresponding to the neighborhood state is searched from a building model library.

[0040] In one embodiment, before replacing the proxy cube with the target building model according to the neighborhood status of the proxy cube, the method further includes:

[0041] Determining whether all proxy cubes are inside the building according to the center coordinates of the proxy cubes;

[0042] When all proxy cubes are inside the building, the proxy cubes are replaced with target building models according to the neighborhood states of the proxy cubes; wherein the target building model is a modular model corresponding to the original building model.

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

[0044] Determining, according to the directed bounding box and the segmentation size, a position index of the proxy cube in the directed bounding box with respect to a length direction, a height direction, and a width direction;

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

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

[0047] A grid generation module is used to generate a building model grid according to the map data after acquiring the map data to be processed, wherein the building model grid represents the geometric shape of the building complex;

[0048] A bounding box construction module, configured to construct a directed bounding box for each independent building according to the splitting result of the building model grid;

[0049] A segmentation module, configured to segment the directed bounding box into a plurality of proxy cubes for model reconstruction according to a preset segmentation size;

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

[0051] According to a third aspect of the present invention, there is provided an electronic device, 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, and the instructions are executed by the at least one processor to enable the at least one processor to execute the map data processing method based on model reconstruction provided by any one 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 used to enable the computer to execute the map data processing method based on model reconstruction provided according to any one of the first aspects above.

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

[0057] The present invention provides a method, apparatus, device, and medium for processing map data based on model reconstruction. After acquiring map data to be processed, the method generates a building model grid based on the map data. The building model grid represents the geometric shape of a building complex. Based on the segmentation results of the building model grid, a directed bounding box is constructed for each individual building. The directed bounding box is then divided into multiple proxy cubes for model reconstruction according to a preset segmentation size. For each proxy cube, the proxy cube is replaced with a target building model based on its neighborhood status, thereby generating new map data based on the model reconstruction results. In this process, directed bounding boxes for individual buildings are constructed. These directed bounding boxes are then divided into multiple proxy cubes, serving as the basic units for model reconstruction. These proxy cubes are then replaced with target building models that more closely resemble the actual building shapes based on their neighborhood status. This process efficiently reconstructs building data within the map data, resulting in high-precision reconstructed building models that enhance the detailed representation of the map data, addressing the problem of building homogeneity within the map data, while reducing the complexity of manual modeling and improving modeling efficiency. This is of great significance for improving the quality of map services and expanding the scope of map applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic flow chart of a map data processing method based on model reconstruction provided by an embodiment of the present invention;

[0059] Figure 2 1 is a flow chart of a method for reconstructing a vertex position array and a vertex index array according to an embodiment of the present invention;

[0060] Figure 3 Schematic diagram of the process of splitting a building model grid in an embodiment of the present invention;

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

[0062] Figure 5 For the general Figure 4 Example image where the proxy cube is replaced with the target building model;

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

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

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

[0066] Figure 9 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following describes the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will readily appreciate the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the various details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are intended only to illustrate the present invention and are not intended to limit the scope of protection of the present invention.

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

[0069] Currently, the primary method for generating buildings in 3D maps is to create simple boxes by stretching 2D data to a specific height. For example, in related art, the base polygon vertices corresponding to the building data are determined based on the building data. The top polygon vertices corresponding to the building data are then assigned corresponding height data to determine the corresponding top polygon vertices. The corresponding bottom and top polygon vertices are then used to determine the corresponding side parameter set in the 3D map data. Finally, the top polygon vertices and side parameter set are triangulated to generate 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 format is monotonous and lacks information such as material and texture. This results in a highly homogenized appearance of buildings on the map, lacking individuality and aesthetic appeal. This lack of detail and diversity limits the effectiveness of 3D maps in certain application scenarios and impacts the user experience. For example, in car navigation systems, users need to quickly identify features of their surroundings to make timely driving decisions. Overly simplified building models can make it difficult for users to accurately judge 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 details weaken the user's immersive experience, resulting in a poor user experience.

[0070] In order to improve the diversity and realism of buildings in 3D maps, related technologies use traditional manual modeling to process buildings, making the building models in 3D maps more realistic. However, the scale of building data is extremely large, covering high-precision three-dimensional information of buildings of various shapes and types. Due to the huge amount of data, even though the traditional manual modeling method can greatly increase the realism, it is very inefficient and difficult to cope with the processing needs of large-scale data. In addition, these building models are usually stored in units of map slices, and all data is stored in the form of vertices. In order to reduce the amount of data transmission, the data will be further saved in binary format, which results in a lot of calculations required to reorganize the received slice data into mesh data used for rendering, further increasing the complexity and processing time of the system.

[0071] In light of this, embodiments of the present invention provide a map data processing method, apparatus, device, and medium based on model reconstruction. After acquiring map data to be processed, a building model grid is generated based on the map data. The building model grid represents the geometric shape of a building complex. Based on the segmentation results of the building model grid, a directed bounding box is constructed for each individual building. The directed bounding box is then divided into multiple proxy cubes for model reconstruction according to a preset segmentation size. For each proxy cube, the proxy cube is replaced with a target building model based on its neighborhood status, thereby generating new map data based on the model reconstruction results. In this process, directed bounding boxes are constructed for individual buildings. These directed bounding boxes are then divided into multiple proxy cubes, serving as the basic units for model reconstruction. These proxy cubes are then replaced with target building models that more closely resemble the actual building shapes based on their neighborhood status. This process efficiently reconstructs building data within the map data, resulting in high-precision reconstructed building models that enhance the detailed representation of the map data, addressing the problem of building homogeneity within the map data while reducing the complexity of manual modeling and improving modeling efficiency. This is of great significance for improving the quality of map services and expanding the application areas of maps.

[0072] The following is a detailed description of the technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems in conjunction with 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 repeated in some embodiments.

[0073] First of all, 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, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances must be provided for users to choose to authorize or refuse.

[0074] Please refer to Figure 1 , Figure 1 This is a flowchart of a map data processing method based on model reconstruction proposed in an embodiment of the present invention. The execution subject of this method can be a server, more specifically, a server of a map vendor or a car manufacturer. In some embodiments, the execution subject can also be other electronic devices, which is not particularly limited in this embodiment. Figure 1 As shown, the method includes steps S101-S104.

[0075] Step S101: After obtaining the map data to be processed, a building model grid is generated according to the map data, where the building model grid represents the geometric shape of the building complex.

[0076] In this embodiment, the map data to be processed may be original map data provided by a map provider. For example, the building model in the map data only has basic building outlines. Alternatively, the building complex may refer to a cluster of multiple building structures (such as buildings) gathered together.

[0077] In an optional embodiment, the building model mesh generation process can obtain the vertex position array and vertex index array of the original building model from the 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 triangle patch. By traversing the vertex position array, overlapping vertices at the same spatial location are identified from all vertices, and these overlapping vertices are merged. The building model mesh is generated based on the merged vertex position array and vertex index array.

[0078] For example, during the generation of the building model grid, considering the large range of map data, user interaction can be used to process the original building model within the target tile in the map data determined by the user, thereby achieving flexible processing of the map data.

[0079] For example, after obtaining the map data, you can directly obtain the vertex position array (VertexPosition) and vertex index array (Index) of the building (i.e. the original building model) from the map data, and merge the overlapping vertices to construct an optimized building model mesh. If you do not directly carry it, you can use Figure 2 The method shown includes: S1011, parsing and storing the vertex position array of the building in the map data. S1012, parsing and storing the point index array of the building in the map data. S1013, traversing all vertices to determine whether there are overlapping vertices at the same position. If so, merging the overlapping vertices to reconstruct a merged vertex position array. The merged vertex position array and vertex index array are then used to generate a building model mesh.

[0080] In a specific example, building vertex information can be first read from map data. Vertex positions for each building can be extracted (vertex positions can be represented by three-dimensional coordinates (x, y, z)). The parsed vertex positions are then stored in an array, also known as a vertex position array. Accordingly, a vertex index array can be obtained by extracting vertex index information from the map data. These vertex indices are used to define polygons or mesh faces and are indices into the vertex position array. By storing the parsed vertex indices in an array, also known as a vertex index array, the array can be used to define the geometry of the building model. All vertices in the vertex position array are iterated over, and for each pair of vertices, their positions are checked. For overlapping vertices, these vertices are merged into a single vertex, retaining only the position of one vertex. In some embodiments, the merged vertex can be used to update the vertex index array, updating all indices pointing to the merged vertex to point to the retained vertex to reflect the new vertex index. For example, after merging vertices, the vertex index array can also be updated accordingly. For example, when merging overlapping vertices, a mapping relationship is established for each original vertex, pointing to the merged vertex (such as through a dictionary or array, where the key is the index of the original vertex and the value is the index of the merged vertex). By traversing the original vertex index array and replacing each index with its corresponding value in the mapping relationship, the vertex referenced by all triangles (also known as triangle patches) is the merged vertex.

[0081] This approach effectively processes building vertex information in map data to generate optimized building model meshes. This is especially true when processing large-scale map data. By selectively processing vertex data related to buildings, redundancy is reduced, data processing volume is minimized, and data accuracy is improved, providing data support for subsequent model splitting and reconstruction.

[0082] Step S102: construct a directed bounding box for each independent building based on the splitting result of the building model grid (this embodiment takes a directed bounding box as an example, and in some embodiments, a bounding box without direction may also be used).

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

[0084] For example, a building model within a tile (i.e., a building model mesh) can be split into multiple independent buildings, and a vertex position array and index array can be constructed for each independent building. Each independent building is composed of multiple continuous triangles. This property can be used to determine whether two triangles are continuous by determining whether the triangle indices are shared.

[0085] By way of further example, Figure 3 As shown in the figure, the process of splitting the building model grid can be:

[0086] Read the vertex index array A1 of the building model mesh, create a Boolean array boolArray with the same length as the vertex index array A1 (all initial values ​​are set to False, False means unread, True means read), and create an index list Ln.

[0087] Randomly select an unvisited element from vertex index array A1 (for example, element 0) and add it to list Ln. Then, using a depth-first search algorithm, search for all other index array elements that form triangles with this element. These elements are also added to Ln, and the searched vertex indices are marked as read (True) in Boolean array A2. Starting from an element in list Ln, recursively call the depth-first search algorithm, randomly select an unread element from vertex index array A1, add it to list Ln, and mark this element as read in Boolean array A2. Then, obtain the other two indices that form a triangle with this element and add them, in order, to list Ln and the adjacent index list NL, marking this element as read in Boolean array A2. Next, check whether adjacent index list NL is empty. If it is, extract an element a from NL and determine whether 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, continuing to expand the index association.

[0088] Repeat the above steps until all vertex indexes are accessed (by checking whether all Boolean array A2 are marked as read). If all are marked as read, the split is completed and the vertex index arrays of all independent buildings are obtained.

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

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

[0091] Specifically, step 102 constructs a directed bounding box for each independent building based on the splitting results of the building model grid. For each building unit, the principal axis direction, first size, and center coordinates of the building unit are determined. The orientation of the directed bounding box is determined based on the principal axis direction, and the second size of the directed bounding box is determined based on the first size. Finally, the directed bounding box is constructed based on the orientation, second size, and center coordinates.

[0092] In this embodiment, the main 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 represent the main extension direction of the building unit.

[0093] In this embodiment, the orientation of the oriented bounding box can be the same as the principal axis. The first size can be the same as the second size, and the center coordinates of the oriented bounding box can be directly the center coordinates of the building unit. In some embodiments, when determining the size of the oriented bounding box, it can be slightly larger than the size of the building unit, which is not particularly typical in this embodiment. The orientation of the oriented bounding box can be determined based on the angle between the principal axis of the building unit and the reference axis of the world coordinate system.

[0094] Next, this embodiment further describes the calculation process for the principal axis direction, dimensions, and center coordinates of a building unit. Alternatively, 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 characteristics of the building unit. Dimensions include length, width, and height.

[0095] Method 1 uses the geometric characteristics of the building unit for calculation: Based on the vertex position array in the building unit, obtain the minimum height of the vertices in the building unit, and eliminate 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 used to form the line segment in the first vertex, and from the line segment formed by the second vertex, filter out the line segment with the longest distance, and determine the vector formed by the line segment as the main axis direction. Based on the maximum and minimum coordinate values ​​of the vertices on the main axis and the height of the vertex, determine the first size, and based on the average of the maximum and minimum coordinate values ​​of the vertices on the main axis and the average of the maximum and minimum heights, determine the center point coordinates.

[0096] In this method, considering that the shapes of the buildings are all 3D models generated by 2D stretching, in order to reduce the amount of calculation, the model can be reduced in dimensionality. The data information of the 2D horizontal plane (corresponding to the bounding box of the 2D horizontal plane) can be calculated first, and then stretched by height to obtain the data information used to determine the 3D directional bounding box.

[0097] For example, the maximum and minimum heights can be found by traversing all vertices of the building unit. All vertices of the individual buildings are traversed, and all vertices whose heights are not the minimum are removed. These are recorded as the first vertex. Based on the vertex index array, the vertices within the first vertex that can be used to form a line segment are determined and recorded as the second vertex. This process, by removing vertices whose heights are not the minimum, is equivalent to simplifying the 3D model into a set of vertices on a 2D horizontal plane. This reduces the number of dimensions to be processed by retaining only the vertices with the lowest heights.

[0098] Next, compare the lengths of all line segments, find the longest line segment, and use the vector formed from the starting point to the end point of this line segment as the positive direction of the X-axis of the model space coordinate system, that is, the main axis direction. This process only needs to consider the vertices of the horizontal plane, and is a processing process performed on the 2D plane. Optionally, the orientation of the directed bounding box can be determined by calculating the angle between the positive direction of the X-axis of the model space coordinate system and the positive direction of the X-axis 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, by calculating the longest line segment of the building and using it as the positive direction of the X-axis of the model space). All vertices can also be converted from world space to model space, facilitating more accurate geometric analysis of buildings in model space.

[0099] By traversing all vertices, we find the maximum and minimum coordinates along the X and Y axes, respectively. Subtracting the minimum coordinate from the maximum coordinates along the height, X, and Y axes will yield the length, width, and height of the building unit (or bounding box). Next, we add the maximum coordinates along the height, X, and Y axes, and divide by two to obtain the center coordinates of the building unit (or bounding box).

[0100] For example, taking the first size and the second size as the same, based on the above data, the coordinates of the eight vertices of the directed bounding box of the building 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] Where 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 processing on a 2D horizontal plane, eliminating height information, performing major geometric calculations on the 2D plane, and applying the results to 3D space, the computational complexity can be effectively reduced. This is especially suitable for scenarios that require processing large amounts of building data.

[0104] Method 2: Principal component analysis is performed on the building unit to determine the principal axis direction, first dimension, and center coordinates of the building unit. Specifically, the center coordinates can be determined by taking the mean of all vertex coordinates based on the vertex position array of the building unit. After decentralizing all vertex coordinates in the building unit, a covariance matrix for the decentralized vertex coordinates is constructed, and the eigenvectors of the covariance matrix are solved to determine the principal axis direction. The eigenvectors are Schmidt-orthogonalized to obtain orthogonal eigenvectors, and all vertices of the building unit are projected onto the 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, a covariance matrix can be constructed first, and the Jacobi iteration method can be used to solve the eigenvectors of the covariance matrix (and the eigenvalues ​​can be solved). The three calculated main axes (eigenvectors) can be Schmidt orthogonalized, and then each point can be projected onto each orthogonalized axis to obtain the maximum value. This can determine the first size (axis length) of the building unit (or directed bounding box), and then determine the semi-axis lengths of the three axes (the semi-axis lengths can be used to conveniently represent the central symmetry of the bounding box. The boundary of the bounding box in space can be obtained by adding or subtracting the semi-axis lengths from the center coordinate point of the bounding box).

[0106] Specifically, the coordinates of all vertices of the building unit are obtained and the mean of these vertex coordinates is calculated to determine the center point, also known as the central coordinate point. The data are then centered by subtracting the mean from the coordinates of each vertex. The covariance matrix is ​​then calculated using these centered vertex coordinates. This covariance matrix reflects the distribution of the vertex data in various directions. Next, the Jacobi iteration method is used to determine the eigenvalues ​​and eigenvectors of the covariance matrix. The eigenvectors represent the principal axis directions of the data, while the eigenvalues ​​represent the variance of the data in these directions. The calculated eigenvectors are then Schmidt orthogonalized to ensure they are orthogonal (i.e., perpendicular to each other) so that the axes of the resulting bounding box are orthogonal. Each vertex of the building is projected onto the orthogonalized eigenvectors (i.e., projection axes). The maximum and minimum values ​​of the projected coordinates are then found along each projection axis. Subtracting the minimum value from the maximum value yields the length of the building unit along each axis, which is then divided by 2 to obtain the semi-major axis length.

[0107] Compared with the dimensionality reduction method that utilizes the geometric characteristics of building units, the principal component analysis method is more accurate and correspondingly more complex.

[0108] Step S103: Divide the directed bounding box into a plurality of proxy cubes for model reconstruction according to a preset segmentation size.

[0109] In an optional implementation, the preset segmentation size may be determined based on the size of the corresponding independent building in the original building model.

[0110] In one example, the segmentation size can be determined based on the overall size of the corresponding independent building in the original building model (i.e., the independent building corresponding to the directed bounding box to be segmented), scaling it by a certain ratio. For example, the segmentation size can be set as a certain percentage of the longest side or volume of the independent building as a reference. Alternatively, a fixed number of segments can be set to divide the independent building into equal parts along each dimension. For example, if the independent building is to be divided into 10 parts along each dimension, the segmentation size can 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 of individual buildings, such as the level of detail required for reconstruction of an individual building. A smaller segmentation size can be used for areas requiring high detail, while a larger segmentation size can be used for areas requiring less detail. Alternatively, adaptive segmentation can be performed based on the geometric complexity of the building, for example, using a smaller segmentation size in complex areas and a larger segmentation size in simpler areas.

[0112] Optionally, the proxy cube can be divided by calculating the number of axial divisions of the directed bounding box XYZ. In this embodiment, the division size is 10 meters as the base unit, and the calculation formula for the number of divisions is the axial length divided 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 size 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 length, width and height of the bounding box by the number of divisions respectively. To facilitate the processing of the proxy cube, the length, width and height of the proxy cube can also be divided by the base unit (such as 10) to obtain the scaling value of the proxy cube.

[0113] In this way, using the size of independent buildings to determine the segmentation size can effectively use proxy cubes to approximate and process independent buildings in the original building model during the model reconstruction process, so that the model shape composed of the segmented proxy cubes can be consistent with the original building model data, which facilitates subsequent model replacement, reduces complexity, and alleviates model incompatibility issues.

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

[0115] The neighborhood state indicates whether there are buildings adjacent to the proxy cube in each direction. Optionally, the target building model is a modular model corresponding to the original building model, i.e., a modular model that is split or created based on the shape of the original building model. For example, if the original building model is one or more buildings, the modular model may 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 proxy cubes obtained by the splitting and their adjacent proxy cubes can be fitted to the shape of the building in the original building model. Specifically, the neighborhood state of the proxy cubes can be used to determine how each proxy cube should be replaced or adjusted during the reconstruction process so that the shape formed by the proxy cube and its adjacent proxy cubes more accurately fits the shape of the original building model. The proxy cube can correspond to a single building, or the entirety of the proxy cube and its adjacent proxy cubes can correspond to a single building, which is not particularly limited in this embodiment. For example, assuming that the building is a balcony, the balcony can be composed of one or more cubes. If there are multiple proxy cubes, these proxy cubes are open in certain directions. By examining the neighborhood states of the proxy cubes in six directions (front, back, left, right, top, and bottom), 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] Alternatively, 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 proxy cube's segmented dimensions, ensuring that the error between the replaced and original building outlines is within a certain tolerance (e.g., 5 cm). Based on the query results, the proxy cube is replaced with the target building model.

[0118] In this embodiment, the neighborhood state of each proxy cube includes the relationship between it and its neighboring proxy cubes in six directions (front, back, left, right, up, and down). Specifically, the presence of buildings in each direction is detected, and the arrangement and connection pattern of these neighboring cubes can be obtained. By traversing all proxy cubes in the building model, the neighborhood state information of each cube is collected to facilitate subsequent querying of the building model library. This building model library stores a variety of predefined modular building models. These building models can be designed based on common building shapes, styles, and connection patterns. (In one example, the building models in the building model library can be directly obtained from building data or constructed based on building reference drawings to include various states. Optionally, during the construction process, the building models can be reduced based on symmetry properties, for example, 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. The matching target building model replaces the proxy cube, ensuring that the replaced building model accurately reflects the geometric characteristics 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 coordinates of the proxy cube. It can also be scaled in combination with the scaling value of the proxy cube (if any) to make the modular model consistent in size with the proxy cube. The model rotation angle can also be determined in combination with the orientation of the directed bounding box (i.e., the angle between the main axis direction and the positive direction of the X-axis of the world space coordinate system in the above text) to optimize the replacement effect of the modular model.

[0119] For example, Figure 4 and Figure 5 As shown, Figure 4 The proxy cube and the different neighborhood states corresponding to the proxy cube are shown. Figure 5 FIG2 shows a schematic diagram of replacing a proxy cube and its adjacent proxy cubes. In this way, by performing similar replacement operations on all proxy cubes, a complete building model can be quickly reconstructed.

[0120] In an optional implementation, in order to further improve the efficiency of model reconstruction, this embodiment searches for a target building model corresponding to the neighborhood state from a building model library based on the neighborhood state of the proxy cube, and the following method can be used:

[0121] Determine encoding information of the proxy cube according to the neighborhood status of the proxy cube, wherein the encoding information adopts a bitmap format. The bitmap format includes bits corresponding to the proxy cube in each direction, and each bit is used to indicate whether there is a building status information in the corresponding direction;

[0122] According to the coding 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 neighborhood states: front, back, left, right, up, and down. Each state has two possible neighborhood states: presence or absence of a building. Based on this characteristic, this embodiment encodes the neighborhood state of the proxy cube using a bitmap. The state information for the six directions is sequentially recorded in bits 1-6 of the byte data type, with presence of a building being recorded as 1 and absence of a building being recorded as 0.

[0124] In some embodiments, in addition to including bits corresponding to each direction, more bits may be included to record other information besides status information. For example, for a special production method of a building model, such as using a mirroring method, the YX and YZ plane mirroring states may be recorded in the 7th and 8th bits of the byte data. In other words, the models in the building model library may contain more bit pairs to record possible mirroring states. During the query process, it is possible to identify whether the neighborhood state codes of the first 6 bits are the same. If there is no directly matching model, it is possible to further check whether there is a model in the model library that can be matched through a mirroring operation, that is, using the 7th and 8th bits of the code to determine whether a match can be achieved through mirroring of the YX or YZ plane.

[0125] This encoding method allows a single byte to record state information in six directions. Simple bitwise operations allow for rapid comparison of the neighborhood states of different proxy cubes, supporting efficient model library queries. Bitwise operations can also rapidly check and modify state information, making them particularly suitable for applications involving large-scale building data.

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

[0127] Step S601: Determine whether all proxy cubes are inside the building based on the center coordinates of the proxy cubes. If all proxy cubes are inside the building, execute step S104 to replace the proxy cubes with the target building model based on the neighborhood status of the proxy cubes. If the proxy cubes are not inside the building, these proxy cubes that are not inside the building can be eliminated, and step S104 can be executed based on the eliminated proxy cubes. The neighborhood status is compared using the eliminated proxy cubes, and then the target building model is replaced. This can effectively solve the error problem caused by the proxy cubes that are not inside the building, while improving the processing efficiency of the model. In this embodiment, by determining whether the center coordinates of the proxy cubes are inside the building, it is possible to accurately determine whether the proxy cubes are inside the building. For all proxy cubes inside the building, a fitted building corresponding to the original building model can be constructed. It can be understood that the building here is an independent building corresponding to the directed bounding box.

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

[0129] In some examples, in addition to the above determination methods, other methods can be used to determine whether the center coordinates of the proxy cube are inside the building. For example, since map data typically contains basic building outline information, vertex information, and other information, 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 an optional embodiment, the center coordinates of the proxy cube may be determined as follows: based on the directed bounding box and the segmentation size, the position index of the proxy cube in the directed bounding box with respect to the length, height, and width directions is determined; based on the position index and the size of the proxy cube, the center coordinates of the proxy cube are determined; 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 segmentation size, the position index of the proxy cube within the directed bounding box is calculated. This position index represents the specific position of the proxy cube in the length, width, and height directions of the directed bounding box. For example, the number of proxy cubes can be calculated based on the size of the directed bounding box and the segmentation size. Furthermore, the size of the proxy cube is calculated based on the size of the directed bounding box and the number of proxy cubes. Specifically, the length, width, and height of the directed bounding box are divided into several segments, each corresponding to a proxy cube. Next, the proxy cube's center coordinates can be calculated by combining its size and position index.

[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] Here, x is the position index in 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 in 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 in 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 efficiently calculated.

[0134] In order to verify the effect of the technical solution of the embodiment of the present invention, Figure 7 This is the effect diagram after using a rendering tool to render the map data generated by the technical solution provided by the embodiment of the present invention. It can be seen that although the two-dimensional display lacks some details compared to the three-dimensional display, it can still be seen from the map screen that the building model no longer contains only simple lines, but contains more building details (such as balconies, lights, etc.), and the buildings are also more diverse.

[0135] In summary, the technical solution provided by the embodiment of the present invention, compared with the traditional map rendering and drawing solution, selectively processes the received building model data, only processes the vertex position and index information required by the user, and replaces the original building model with a proxy model of similar shape through a series of algorithms, without the need to calculate and store the UV coordinates and normal information related to each vertex, saving the computational complexity of processing UV, normal and other information. At the same time, the modular split production method of the building model greatly reduces the complexity and workload of manually producing buildings of various shapes. By combining modular models into complex buildings, the realism and aesthetics of the building rendering are effectively improved, and the problem of large-scale real-time map building rendering being only a square box with white film or basic color material is solved. In addition, the modular model can be replaced with a model of any style to meet the customer's personalized and customized needs without changing the original map data. These modular models can be produced in multiple sets, and the sense of repetition can be reduced by adding specific tags in the preprocessing stage, or randomly selecting different modular models with the same encoding.

[0136] In addition, it should be noted that the implementation method of the present invention supports both preprocessing and real-time processing. The preprocessing solution does not require processing the vertex data provided by the map provider. It only needs to query the pre-processed data based on the map data, such as through the tile identifier (TileID), to draw a high-precision building model. Good rendering effects can also be achieved in low-end hardware systems.

[0137] Figure 8 A structural diagram of a map data processing device based on model reconstruction provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the apparatus 800 includes a grid generation module 801, a bounding box construction module 802, a segmentation module 803 and a model reconstruction module 804, wherein:

[0138] The grid generation module 801 is used to generate a building model grid according to the map data after obtaining the map data to be processed, where the building model grid represents the geometric shape of the building complex;

[0139] The bounding box construction module 802 is used to construct a directed bounding box for each independent building according to the splitting result of the building model grid;

[0140] A segmentation module 803 is configured to segment the directed bounding box into a plurality of proxy cubes for model reconstruction according to a preset segmentation size;

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

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

[0143] A vertex acquisition unit, configured to acquire a vertex position array and a 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 vertices in the vertex position array of the triangle patch;

[0144] The vertex processing unit is used to traverse the vertex position array, identify the coincident vertices at the same spatial position from all vertices, and merge the coincident vertices;

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

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

[0147] A first determining unit is configured to determine, for each building unit, a main axis direction, a first size, and center point coordinates of the building unit;

[0148] The construction unit is configured to determine the orientation of the directed bounding box according to the main axis direction, determine the second size of the directed bounding box according to the first size, and construct the directed bounding box according to the orientation, the second size, and the center point coordinates.

[0149] In one embodiment, the first determining unit is specifically configured to:

[0150] According to the vertex position array in the building unit, obtain the minimum height value of the vertices in the building unit, and eliminate all vertices that do not belong to the minimum height value to obtain the first vertex;

[0151] Determine, according to the vertex index array of the building unit, a second vertex used to form a line segment among the first vertices;

[0152] 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 main axis direction;

[0153] Determine a first size based on the maximum coordinate value and the minimum coordinate value of the vertex on the main axis and the height of the vertex;

[0154] The center point coordinates are determined based on the average of the maximum and minimum coordinate values ​​of the vertices on the main axis, and the average of the maximum and minimum height values.

[0155] In one embodiment, the first determining unit is specifically configured to:

[0156] The principal component analysis of the building unit is performed to determine the main axis direction, the first dimension and the center point coordinates of the building unit.

[0157] In one embodiment, performing principal component analysis on the building unit to determine the main axis direction, the first dimension, and the center point coordinates of the building unit includes:

[0158] According to the vertex position array of the building unit, the center point coordinates are determined by the mean of all vertex coordinates;

[0159] After decentralizing the coordinates of all vertices in the building unit, the covariance matrix of the decentralized vertex coordinates is constructed, and the eigenvector of the covariance matrix is ​​solved to determine the principal axis direction;

[0160] Perform Schmidt orthogonalization on the eigenvector to obtain the orthogonal eigenvector, and project all vertices of the building unit onto the orthogonal eigenvector to obtain the projected coordinates;

[0161] The first size is determined according to the maximum coordinate value in the projection coordinates.

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

[0163] In one embodiment, the query unit is specifically configured to:

[0164] Determine encoding information of the proxy cube according to the neighborhood status of the proxy cube, wherein the encoding information adopts a bitmap format. The bitmap format includes bits corresponding to the proxy cube in each direction, and each bit is used to indicate whether there is a building status information in the corresponding direction;

[0165] According to the coding information, the target building model corresponding to the neighborhood state is searched from the building model library.

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

[0167] an identification module, 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 according to the neighborhood status of the proxy cubes when all the proxy cubes are inside the building; wherein the target building model is a modular model corresponding to the original building model.

[0169] In one embodiment, the identification module is further configured to:

[0170] According to the directed bounding box and the segmentation size, determine the position index of the proxy cube in the directed bounding box in terms of length, height, and width.

[0171] The center coordinates of the proxy cube are determined according to the position index and the size of the proxy cube; wherein the size of the proxy cube is determined according to the size of the directed bounding box and the number of the proxy cubes.

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

[0173] at least one processor 901; and

[0174] A memory 902 in communication with at least one processor; wherein,

[0175] The memory 902 stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the map data processing method based on model reconstruction provided by the above method embodiment.

[0176] An embodiment of the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the map data processing method based on model reconstruction provided by the above method embodiment.

[0177] An embodiment of the present invention also provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the map data processing method based on model reconstruction provided by the above method embodiment is implemented.

[0178] The readable storage medium may be implemented by any type of volatile or non-volatile memory 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 may be any available medium that can be accessed by a general-purpose or special-purpose computer.

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

[0180] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, whether electrical, mechanical, or otherwise, through some interface.

[0181] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0182] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may 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 the present invention, or the portion that contributes to the prior art, or a portion 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 for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0184] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps in 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 those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.

[0186] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or modification made by those skilled in the art based on the present invention is within the protection scope 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, generating a building model grid according to the map data, wherein the building model grid represents the geometric shape of the building complex; Constructing a bounding box for each independent building according to the splitting result of the building model grid; According to a preset segmentation size, the bounding box is divided into a plurality of proxy cubes for model reconstruction; For each proxy cube, according to the neighborhood status of the proxy cube, a target building model corresponding to the neighborhood status is searched from a building model library to obtain a query result, and according to the query result, the proxy cube is replaced with the target building model to obtain a model reconstruction result, so as to generate new map data according to the model reconstruction result; wherein, the neighborhood status 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 predefined modular models of multiple building types.

2. The method according to claim 1, characterized in that Generating a building model grid according to the map data includes: Obtaining a vertex position array and a 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 vertices in the vertex position array for constructing a triangular facet; Identify coincident vertices located at the same spatial position from all vertices, and merge the coincident vertices to obtain a merged vertex position array and a vertex index array; The building model mesh is generated according to 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 a building unit for each independent building, and the building unit includes its own vertex position array and vertex index array; The step of constructing a bounding box for each independent building according to the splitting result of the building model grid includes: For each building unit, determining the main axis direction, first size, and center point coordinates of the building unit; The orientation of the bounding box is determined according to the main axis direction, the second size of the bounding box is determined according to the first size, and the bounding box is constructed according to the orientation, the second size and the center point coordinates.

4. The method according to claim 3, characterized in that Determining the main axis direction, the first size, and the center point coordinates of the building unit includes: According to the vertex position array in the building unit, obtaining the minimum height value of the vertices in the building unit, and eliminating the vertices that do not belong to the minimum height value from all vertices to obtain the first vertex; Determining, according to the vertex index array of the building unit, a second vertex among the first vertices for forming a line segment; Selecting a line segment with the longest distance from the line segments formed by the second vertices, and determining a vector formed by the line segments as the principal axis direction; determining the first size according to the maximum coordinate value and the minimum coordinate value of the vertex on the main axis and the height of the vertex; The center point coordinates are determined based on the average of the maximum coordinate value and the minimum coordinate value of the vertices on the main axis, and the average of the maximum height value and the minimum height value.

5. The method according to claim 3, characterized in that Determining the main axis direction, the first size, and the center point coordinates of the building unit includes: The principal component analysis is performed on the building unit to determine the main axis direction, the first size and the center point coordinates of the building unit.

6. The method according to claim 5, characterized in that The performing of principal component analysis on the building unit to determine the principal axis direction, the first dimension, and the center point coordinates of the building unit includes: According to the vertex position array of the building unit, the center point coordinates are determined by the mean of all vertex coordinates; After decentralizing all vertex coordinates in the building unit, constructing a covariance matrix about the decentralized vertex coordinates, and solving the eigenvector of the covariance matrix to determine the principal axis direction; Performing Schmidt orthogonalization on the eigenvector to obtain an orthogonal eigenvector, and projecting all vertices of the building unit onto the orthogonal eigenvector to obtain projection coordinates; The first size is determined according to a maximum coordinate value in the projection coordinates.

7. The method according to any one of claims 1, 2, 4-6, characterized in that: The preset segmentation size is determined based on the size of the corresponding independent building 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 a target building model corresponding to the neighborhood state of the proxy cube from a building model library according to the neighborhood state of the proxy cube comprises: Determining encoding information of the proxy cube according to a neighborhood state of the proxy cube, wherein the encoding information is in a bitmap format, and the bitmap format includes bits corresponding to each direction of the proxy cube, each bit being used to indicate status information of whether there is a building in the corresponding direction; According to the coding information, a target building model corresponding to the neighborhood state is searched from a 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 according to the neighborhood state of the proxy cube, the method further includes: Determining whether all proxy cubes are inside the building according to the center coordinates of the proxy cubes; When all proxy cubes are inside the building, the proxy cubes are replaced with target building models according to the neighborhood states of the proxy cubes; 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: Determining, according to the bounding box and the segmentation size, a position index of the proxy cube in the length direction, the height direction, and the width direction of the bounding box; The center coordinates of the proxy cube are determined according to the position index and the size of the proxy cube; wherein the size of the proxy cube is determined according to 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: A grid generation module is used to generate a building model grid according to the map data after acquiring the map data to be processed, wherein the building model grid represents the geometric shape of the building complex; A bounding box construction module, configured to construct a bounding box for each independent building according to the splitting result of the building model grid; A segmentation module, configured to segment the bounding box into a plurality of proxy cubes for model reconstruction according to a preset segmentation size; A model reconstruction module is used to search for a target building model corresponding to the neighborhood state of each proxy cube from a building model library according to the neighborhood state of the proxy cube, obtain a query result, and replace the proxy cube with the target building model according to the query result to obtain a model reconstruction result, so as to generate new map data according to the model reconstruction result; wherein the neighborhood state is used to indicate the state information of whether there are buildings adjacent to the proxy cubes in each direction of the proxy cube, and the building model library is used to store predefined modular models of multiple 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. The instructions are executed by the at least one processor to enable the at least one processor to perform the map data processing method based on model reconstruction according to any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the map data processing method based on model reconstruction according to any one of claims 1 to 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

  • Method of Traversing a Hierarchical Acceleration Structure

    US20250191278A1

Cited By

  • Virtual building construction method and system, product, equipment and storage medium

    CN121349335A

  • A method, system, product, device and storage medium for constructing a virtual building

    CN121349335B