Point cloud data processing, elevation determination method, device and storage medium
By geospatial encoding and meshing of point cloud data and generating fixed mesh, the problem of insufficient grid elevation accuracy in the existing technology is solved, and higher meshing accuracy and elevation determination accuracy are achieved, which is suitable for map data processing and elevation restoration.
Patent Information
- Application Number
- CN202310341816.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-03-31
AI Technical Summary
When dividing target areas, the existing grid generation method has the problem of poor elevation accuracy, especially when the road surface is blocked or inclined, resulting in inaccurate determination of the elevation of the grid.
By geospatially encoding the latitude and longitude of point cloud data, point cloud data with the same address is divided into a grid, a fixed grid is generated, and grid objects, including elevation, are obtained through point cloud data in the grid, avoiding the problems of road surface being blocked and grid tilt.
It improves the accuracy of meshing and the accuracy of elevation determination, ensures the smoothness of the target area and the reliability of elevation, and is suitable for a variety of business scenarios.
Smart Images

Figure CN116358527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of electronic maps, and in particular, to a method, device, and storage medium for processing point cloud data and determining elevation. Background Art
[0002] During the process of map data processing, for map elements whose coordinates only include longitude and latitude, elevation information can be added to the coordinates of the map elements through elevation restoration. Currently, the existing elevation restoration methods mainly include: dividing the target area where the above map elements are located into multiple grids, and using the elevation of the grid where the map elements are located as the elevation of the map elements.
[0003] Among them, the current existing method for dividing the target area into grids is: extracting the point cloud data in the target area as the vertices of triangles, and randomly generating multiple non-fixed triangular grids covering the target area. However, the accuracy of the elevation of the grids determined based on the existing grid generation method is relatively poor. Summary of the Invention
[0004] This application provides a method, device, and storage medium for processing point cloud data and determining elevation, which can improve the accuracy of the elevation of grids.
[0005] In a first aspect, this application provides a method for processing point cloud data, the method including:
[0006] Obtaining the point cloud data of the collected target area;
[0007] Performing geospatial encoding on the longitude and latitude of the point cloud data to obtain the encoded address of the point cloud data; the geospatial encoding enables the encoded addresses of the point cloud data located within a preset range in space to be the same;
[0008] Dividing the point cloud data with the same address into one grid to obtain at least one grid of the target area;
[0009] According to the point cloud data in the grid, obtaining the grid object of the grid, the grid object at least including the elevation of the grid.
[0010] In a second aspect, this application provides an elevation determination method, the method including:
[0011] Obtaining a grid query tree of the target area; the grid query tree includes the grid objects of at least one grid of the target area, and the grid objects are obtained by using the method described in any item of the first aspect;
[0012] Obtaining the longitude and latitude of the target point of the map element located in the target area in the map;
[0013] Perform geospatial encoding on the longitude and latitude of the target point to obtain the encoded address of the target point;
[0014] According to the encoded address of the target point, use the grid query tree to obtain the grid objects of at least one target grid corresponding to the target point;
[0015] Determine the elevation of the target point according to the grid objects of the at least one target grid.
[0016] In a third aspect, the present application provides a point cloud data processing device, and the device includes:
[0017] An acquisition module, configured to acquire point cloud data of a target area collected;
[0018] An encoding module, configured to perform geospatial encoding on the longitude and latitude of the point cloud data to obtain the encoded address of the point cloud data; the geospatial encoding makes the encoded addresses of the point cloud data located within a preset range in space the same;
[0019] A partitioning module, configured to partition the point cloud data with the same address into one grid to obtain at least one grid of the target area;
[0020] A processing module, configured to obtain the grid object of the grid according to the point cloud data in the grid, and the grid object includes at least the elevation of the grid.
[0021] In a fourth aspect, the present application provides an elevation determination device, and the device includes:
[0022] A first acquisition module, configured to acquire a grid query tree of a target area; the grid query tree includes grid objects of at least one grid of the target area, and the grid objects are obtained by using the method described in any item of the first aspect;
[0023] A second acquisition module, configured to acquire the longitude and latitude of the target point of the map elements located in the target area in the map;
[0024] An encoding module, configured to perform geospatial encoding on the longitude and latitude of the target point to obtain the encoded address of the target point;
[0025] A third acquisition module, configured to use the grid query tree to obtain the grid objects of at least one target grid corresponding to the target point according to the encoded address of the target point;
[0026] A processing module, configured to determine the elevation of the target point according to the grid objects of the at least one target grid.
[0027] Fifth aspect, the present application provides an electronic device, including: a processor and a memory; the processor is communicatively connected to the memory;
[0028] the memory stores computer instructions;
[0029] the processor executes the computer instructions stored in the memory to implement the method described in any one of the first aspect or the second aspect.
[0030] Sixth aspect, the present application provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method described in any one of the first aspect or the second aspect is implemented.
[0031] Seventh aspect, the present application provides a computer program product, including a computer program, which implements the method described in any one of the first aspect or the second aspect when executed by a processor.
[0032] The point cloud data processing, elevation determination method, device and storage medium provided by the present application can obtain the encoded address of the point cloud data by performing geospatial encoding on the longitude and latitude of the point cloud data in the target area, realizing the encoding of the longitude and latitude of the point cloud data, so that the encoded address can be used subsequently to perform grid division on the target area. By dividing the point cloud data with the same address into one grid, the point cloud data adjacent in the geospatial position is divided into one grid, and thus at least one grid of the target area can be obtained. Then, through the point cloud data in the grid, a grid object "including at least the elevation of the grid" of the grid can be obtained. Through the above method, based on the address after geospatial encoding of the point cloud data in the target area, at least one grid of the target area is determined, without extracting the point cloud data as the grid vertices, avoiding the problem of large grids caused by road surface occlusion and the problem of grid inclination, so the accuracy of grid division is improved, and the accuracy of determining the elevation of the grid based on the grid division result is improved. By improving the accuracy of the elevation of the grid, the accuracy of determining the elevation of the target point based on the above grid object subsequently can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 It is a schematic flowchart of a point cloud data processing method provided by an embodiment of the present application;
[0035] Figure 2 A schematic diagram of grid fission processing provided for this application;
[0036] Figure 3 A schematic flowchart of an elevation determination method provided for this application;
[0037] Figure 4 A schematic flowchart of another point cloud data processing method provided for this application;
[0038] Figure 5 A schematic diagram of a grid division result provided for this application;
[0039] Figure 6 A schematic flowchart of another elevation determination method provided for this application;
[0040] Figure 7 A schematic diagram of the double-array result and the AC automaton in the AC automaton double-array trie;
[0041] Figure 8 A schematic diagram of array indexing for the AC automaton double-array trie;
[0042] Figure 9 A schematic diagram of at least one target grid corresponding to a target point provided for this application;
[0043] Figure 10 A schematic structural diagram of a point cloud data processing device provided for this application;
[0044] Figure 11 A schematic structural diagram of an elevation determination device provided for this application;
[0045] Figure 12 A schematic hardware structure diagram of an electronic device provided for this application.
[0046] Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Apparently, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.
[0048] When collecting map data for a target area, point cloud data of the target area can be collected. Then, the map data processing platform can identify map elements (such as lane lines, ground arrow signs, etc.) based on the above point cloud data and determine the three-dimensional coordinates of the map elements. Usually, after determining the three-dimensional coordinates of the map elements, the three-dimensional coordinates of the map elements can also be corrected to improve the accuracy of the three-dimensional coordinates of the map elements.
[0049] Currently, the common method for correcting the three-dimensional coordinates of map elements is mainly to place the above three-dimensional map elements in the point cloud data of the target area and perform manual intervention and correction through manual observation. Taking the above map element as a lane line as an example, the three-dimensional lane line can be placed in the point cloud data of the target area, and through manual observation, the three-dimensional lane line can be fitted to the point cloud data to change the coordinates of the three-dimensional lane line. However, the process of operating the above process in three-dimensional space is complex and inefficient.
[0050] In order to improve the correction efficiency of the above map elements, currently, the elevation of the three-dimensional map elements and the elevation of the three-dimensional point cloud data can also be removed, that is, the three-dimensional map elements and the three-dimensional point cloud data are projected onto a two-dimensional plane (such as projection based on pyramid slicing technology), and the longitude and latitude of the two-dimensional map elements are corrected in the two-dimensional plane. Still taking the above map element as a lane line as an example, manually operating the lane line in the two-dimensional plane and fitting the lane line to the two-dimensional point cloud data can achieve the correction of the longitude and latitude within the two-dimensional plane of the lane line. However, the map elements obtained by correcting through the above method are map elements that have lost their elevation.
[0051] In addition, during the above correction process, manually, map elements that were not recognized during the automatic recognition process can also be added to the two-dimensional plane, or, incomplete map elements recognized during the automatic recognition process can be completed in the two-dimensional plane. However, the above newly added map elements also only have two-dimensional coordinates and no elevation map elements.
[0052] Therefore, how to restore the elevation of the map elements in the above two-dimensional plane is an urgent problem to be solved.
[0053] Currently, the existing methods for elevation restoration are mainly: dividing the target area into multiple grids and using the elevation of the grid as the elevation of the map elements located within the grid. Among them, the current existing method for dividing the target area grid is: extracting the point cloud data in the target area as the vertices of a triangle and randomly generating multiple non-fixed triangular grids covering the target area.
[0054] However, when generating a grid by the above existing method, if there is an object blocking the road surface during point cloud data collection (for example, another vehicle may block the road surface), it will cause the triangular grid corresponding to the blocked area to be relatively large. That is to say, the entire blocked area corresponds to only one triangular grid. However, there may be elevation changes in the entire blocked area. Therefore, using the elevation of this one triangular grid to represent the elevation of the entire blocked area has poor accuracy. In addition, there are also positions such as road shoulders (or curb stones, etc.) on the road surface. The triangular grid at this position may have one vertex on the ground and the other vertices on the road shoulder, resulting in the triangular grid being an inclined grid. As a result, the elevation of this triangular grid may be neither on the ground nor on the road shoulder, so the accuracy of the elevation of the grid obtained based on this grid generation method is also poor.
[0055] Considering that the reason for the above-mentioned poor accuracy problem in the existing grid generation method is that point cloud data is extracted as the vertices of the triangular grid to construct a non-fixed triangular grid. Therefore, the present application proposes a point cloud data processing method for generating a fixed grid based on the geographical location of the point cloud data in the target area and determining the elevation of each grid. Optionally, the execution subject of this point cloud data processing method can be any data processing platform (such as a map data processing platform), or any electronic device with processing functions (such as a terminal, or a server, etc.).
[0056] It should be understood that the grid object obtained by the point cloud data processing method proposed by the present application can not only be used for restoring the elevation of two-dimensional map elements, but also for other scenarios. That is to say, the present application does not limit the application scenarios of the above grid object. For example, the map data processing platform can also use the elevation of the above grid as the road surface benchmark and determine the elevation of other map elements (such as street lights, signs, etc.) on the road surface based on this road surface benchmark. The present application will not elaborate here.
[0057] Below, taking the execution subject of the above point cloud data processing method as an electronic device as an example, the technical solution of the present application will be described in detail in combination with specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0058] Figure 1 It is a schematic flowchart of a point cloud data processing method provided by an embodiment of the present application. As Figure 1 shown, the method may include the following steps:
[0059] S101. Obtain the point cloud data of the collected target area.
[0060] Optionally, the above target area can be an area at any position and of any shape, and the present application does not limit this. For example, the target area may include at least one target road segment. In addition, the present application does not limit the type of device for collecting the above point cloud data, nor the quantity of the point cloud data in the target area. For example, the above point cloud data can be collected by any type of lidar.
[0061] Optionally, an electronic device can receive, for example, the point cloud data of the above target area input by a user through a Graphical User Interface (GUI) or an Application Programming Interface (API). Or, the electronic device can also receive, for example, the point cloud data of the target area sent by a map data collection vehicle after collecting the above point cloud data set. Or, the electronic device can also first receive the identifier of the above target area input by the user, and obtain the point cloud data of the target area from the point cloud data set according to the identifier of the target area.
[0062] S102. Perform geospatial encoding on the longitude and latitude of the point cloud data to obtain the encoded address of the point cloud data.
[0063] The encoded address of the above point cloud data can be used to represent the spatial position of the point cloud data.
[0064] Among them, the above geospatial encoding can make the encoded addresses of the point cloud data located within a preset range in space the same. Exemplarily, an electronic device can receive, for example, the identifier input by the user for representing the preset range, and through the above geospatial encoding, make the encoded addresses of the point cloud data located within the preset range in space the same.
[0065] For example, an electronic device can receive the geohash (the name of a geospatial encoding algorithm) encoding level identifier input by the user (the level identifier can be used to represent the above preset range), and input the longitude and latitude of the above point cloud data into the geohash encoding algorithm. Then, the electronic device can perform geohash encoding on the longitude and latitude of the point cloud data based on the above level identifier, obtain the geohash encoding corresponding to the longitude and latitude of the point cloud data, and use the geohash encoding as the encoded address of the point cloud data. Taking the longitude and latitude of the point cloud data as [31.1932993, 121.43960190000007] as an example, exemparily, the electronic device can perform geospatial encoding on the longitude and latitude through geohash encoding to obtain an encoded address wtw37q with a string length of 6 (a preset value assumed).
[0066] S103. Divide the point cloud data with the same address into one grid to obtain at least one grid of the target area.
[0067] If the encoded addresses of multiple point cloud data are the same, it indicates that the multiple point cloud data are adjacent in the geographical space. Therefore, the electronic device can divide the point cloud data with the same address into one grid to divide the target area into at least one grid. Taking the target area corresponding to multiple grids as an example, optionally, the sizes of the above different grids can be the same or different.
[0068] It should be understood that the present application does not limit the number of grids, the shape of the grids, and the size of the grids in the target area. Optionally, the electronic device can receive a parameter input by the user for characterizing the size of the grid. Then, the electronic device can perform geographical space encoding on the longitude and latitude of the point cloud data according to the parameter to obtain the encoded address of the point cloud data, and divide the point cloud data with the same address into one grid to obtain at least one grid of the target area.
[0069] S104. Obtain the grid object of the grid according to the point cloud data in the grid.
[0070] Among them, the above grid object at least includes the elevation of the grid. In some embodiments, for any grid, the grid object of the grid may further include at least one of the following: the size of the grid, the number of point cloud data used when determining the elevation of the grid, the confidence level of the grid, etc. Among them, the confidence level of the grid can be used to characterize the flatness of the grid, for example.
[0071] Optionally, for any grid, the electronic device can directly calculate the average value of the elevations of all the point cloud data in the grid as the elevation of the grid and add the elevation of the grid to the grid object of the grid. Or, for any grid, the electronic device can first delete the noisy point cloud data in the grid by any existing method for removing noisy point cloud data to obtain the point cloud data after removing the noise. Then, the electronic device can use the average value of the elevations of the point cloud data after removing the noise as the elevation of the grid and add the elevation of the grid to the grid object of the grid.
[0072] In this embodiment, by performing geospatial encoding on the longitude and latitude of the point cloud data of the target area, the address after encoding the point cloud data can be obtained, realizing the encoding of the longitude and latitude of the point cloud data, so that the encoded address can be used subsequently to divide the target area into grids. By dividing the point cloud data with the same address into one grid, the point cloud data adjacent in the geospatial position is divided into one grid, and thus at least one grid of the target area can be obtained. Then, through the point cloud data in the grid, a grid object "including at least the elevation of the grid" of the grid can be obtained. Through the above method, based on the address after geospatial encoding of the point cloud data of the target area, at least one grid of the target area is determined, without extracting the point cloud data as the grid vertices, avoiding the problem of large grids caused by road surface occlusion and the problem of grid inclination, so the accuracy of grid division is improved, and the accuracy of determining the elevation of the grid based on the grid division result is also improved. In addition, compared with the method of representing the target area by point cloud data (usually the point cloud data is scattered and has thickness), the method provided in this application of using grids to represent the target area, each grid can be regarded as a plane, so the smoothness of the target area in the visual effect is improved.
[0073] As a possible implementation, for any grid, the grid object of the grid may further include at least one of the following: the confidence of the grid, the size of the grid, and the number of point cloud data used when determining the elevation of the grid, etc.
[0074] The confidence of the above grid can be used to represent the accuracy of the elevation of the grid. The size of the above grid can be characterized by the level of the grid. The smaller the size of the grid with a higher level, and the larger the size of the grid with a lower level. The number of point cloud data used when determining the elevation of the grid can also be used to represent the accuracy of the elevation of the grid. The more the number of point cloud data used when determining the elevation of the grid, the higher the accuracy of the elevation of the grid; the less the number of point cloud data used when determining the elevation of the grid, the lower the accuracy of the elevation of the grid.
[0075] Taking the grid object further including the confidence of the grid as an example, in some embodiments, the electronic device can determine the confidence of the grid based on the elevation flatness of the grid.
[0076] For example, for any grid, the electronic device can first obtain the elevation flatness of the grid according to the elevation of the point cloud data in the grid. Optionally, the electronic device can, for example, take the difference obtained by subtracting the minimum value of the elevation of the point cloud data in the grid from the maximum value of the elevation of the point cloud data in the grid as the elevation flatness of the grid. Or, the elevation flatness of the grid can also be positively correlated with the difference between the above-mentioned maximum value and the minimum value. That is to say, the larger the difference obtained by subtracting the minimum value from the maximum value, the worse the flatness of the area covered by the grid, and the larger the elevation flatness of the grid. The smaller the difference obtained by subtracting the minimum value from the maximum value, the better the flatness of the area covered by the grid, and the smaller the elevation flatness of the grid.
[0077] After the electronic device obtains the elevation flatness of the grid, it can obtain the confidence level of the grid according to the elevation flatness of the grid. Among them, the elevation flatness of the grid is negatively correlated with the confidence level of the grid. That is to say, the larger the elevation flatness (indicating that the flatness of the area covered by the grid is worse), the smaller the confidence level of the grid. The smaller the elevation flatness (indicating that the flatness of the area covered by the grid is better), the larger the confidence level of the grid.
[0078] In this embodiment, because the elevation change in a flatter (smaller flatness) grid is smaller, therefore, the accuracy of using the elevation of the grid to represent the elevation of any point in the grid is higher, and thus, the confidence level of the grid can be higher. Through the above method, based on the elevation of the point cloud data in the grid, the elevation flatness of the grid is obtained, and based on this flatness, the confidence level of the grid is determined, improving the accuracy of determining the confidence level of the grid.
[0079] Optionally, the electronic device can, for example, obtain the confidence level of the grid according to the elevation flatness of the grid and the slope of the grid. Or, the electronic device can also obtain the confidence level of the grid according to the elevation flatness of the grid and the number of point cloud data in the grid. Or, the electronic device can also obtain the confidence level of the grid according to the elevation flatness of the grid, the slope of the grid, and the number of point cloud data in the grid. Through the above method, on the basis of the elevation flatness of the grid, the confidence level of the grid can also be determined based on the slope of the grid and / or the number of point cloud data in the grid, further improving the accuracy of determining the confidence level of the grid.
[0080] Taking the example that the electronic device obtains the confidence level of the grid according to the elevation flatness of the grid, the slope of the grid, and the number of point cloud data in the grid, exemplarily, the electronic device can obtain the slope of the grid according to any existing slope calculation method. Then, the electronic device can, for example, calculate the weighted sum of the elevation flatness of the grid, the slope of the grid, and the number of point cloud data in the grid, and take the weighted sum as the confidence level of the grid.
[0081] Alternatively, in the electronic device, a mapping relationship between the elevation flatness range and the confidence of the grid may also be stored, for example. In this implementation, the electronic device can determine the elevation flatness range where the elevation flatness is located according to the elevation flatness of the grid. Then, the electronic device can determine the confidence of the grid according to the elevation flatness range where the elevation flatness is located and the above mapping relationship between the elevation flatness range and the confidence of the grid.
[0082] Exemplarily, the mapping relationship between the elevation flatness range and the confidence of the grid may be as shown in Table 1 below:
[0083] Table 1
[0084] Elevation flatness range Confidence of grid Less than 1 centimeter (cm) 1 Greater than or equal to 1 cm and less than 2.5 cm 0.9 Greater than or equal to 2.5 cm and less than 5 cm 0.6 Greater than or equal to 5 cm 0
[0085] Taking Table 1 as an example, assuming that the elevation flatness range where the elevation flatness is located is "greater than or equal to 1 cm and less than 2.5 cm", the electronic device can determine that the confidence of the grid is 0.9 according to the mapping relationship shown in Table 1.
[0086] In some embodiments, the electronic device can determine the confidence of the grid based on the slope of the grid and / or the number of point cloud data in the grid. Alternatively, the confidence of the grid may also be related to the level of the grid. Exemplarily, Table 2 is an example of the confidence of a grid, the slope of the grid, the level of the grid, and the flatness of the grid:
[0087] Table 2
[0088] Grade of grid Flatness of grid Confidence of grid Slope of grid 10 - level grid Flatness < 1 cm 1 Slope < 3% 10 - level grid Flatness < 2.5 cm 0.9 Slope < 5% 10 - level grid Flatness < 5 cm 0.6 Slope < 10% 10 - level grid Flatness ≥ 5 cm 0 Slope > 15% 11 - level grid Flatness < 0.5 cm 1 Slope about 3% 11 - level grid Flatness < 1 cm 0.7 Slope about 5% 11 - level grid Flatness < 2 cm 0.5 Slope about 10% 11 - level grid Flatness ≥ 2 cm 0 Slope about 15% 11.5 - level grid Flatness < 0.25 cm 1 Slope about 3% 11.5 - level grid Flatness < 1 cm 0.2 Slope about 10% 11.5 - level grid Flatness ≥ 1 cm 0 Slope > 15%
[0089] Taking the example that the electronic device determines the confidence of the grid according to the slope of the grid, the confidence of the grid and the slope of the grid may be negatively correlated. The larger the slope of the grid, the greater the elevation change in the area covered by the grid. Therefore, the confidence of the grid can be lower. The smaller the slope of the grid, the smaller the elevation change in the area covered by the grid. Therefore, the confidence of the grid can be higher. Exemplarily, a mapping relationship between the slope range and the confidence of the grid may also be stored in the electronic device, for example. In this implementation, the electronic device can determine the slope range where the slope of the grid is located according to the slope of the grid. Then, the electronic device can determine the confidence of the grid according to the slope range where the slope of the grid is located and the above mapping relationship between the slope range and the confidence of the grid.
[0090] Exemplarily, the mapping relationship between the slope range and the confidence of the grid may be as shown in Table 3 below:
[0091] Table 3
[0092] Slope range Confidence of grid Less than 3% 1 Greater than or equal to 3% and less than 5% 0.9 Greater than or equal to 5% and less than 10% 0.6 Greater than or equal to 10% 0
[0093] Taking Table 3 as an example, assuming that the slope range where the slope of the grid is located is "greater than or equal to 3% and less than 5%", the electronic device can determine that the confidence level of the grid is 0.9 according to the mapping relationship shown in Table 3.
[0094] Taking the example that the electronic device determines the confidence level of the grid according to the number of point cloud data in the grid, the confidence level of the grid and the number of point cloud data in the grid can be positively correlated. The larger the number of point cloud data in the grid, the higher the accuracy of the elevation of the grid determined based on the point cloud data in the grid. Therefore, the confidence level of the grid can be higher. The smaller the number of point cloud data in the grid, the lower the accuracy of the elevation of the grid determined based on the point cloud data in the grid. Therefore, the confidence level of the grid can be lower.
[0095] The following will detail how the electronic device obtains the grid object of the grid according to the point cloud data in the grid:
[0096] As a possible implementation manner, the electronic device can perform weighted average processing on the elevations of the point cloud data in the grid to obtain the elevation of the grid.
[0097] Optionally, the electronic device can first obtain the weights corresponding to the elevations of the respective point cloud data in the grid, and then use the weights corresponding to the elevations of the respective point cloud data to perform weighted average processing on the elevations of the point cloud data in the grid. Exemplarily, the electronic device can, for example, first calculate the normal distribution of the elevations of the respective point cloud data in the grid, and determine the elevation dense distribution range according to the normal distribution. Then, the electronic device can determine the weight corresponding to the elevation of the point cloud data according to whether the elevation of the point cloud data is located within the elevation dense distribution range. For example, the weight of the elevation of the point cloud data located within the elevation dense distribution range is greater than the weight of the elevation of the point cloud data located outside the elevation dense distribution range.
[0098] In this implementation manner, by performing weighted average processing on the elevations of the point cloud data in the grid to obtain the elevation of the grid, the influence degrees of different elevations on the elevation of the grid are different, which improves the flexibility of determining the elevation of the grid, and further improves the accuracy of obtaining the above grid object.
[0099] As another possible implementation manner, the electronic device can also sort the elevations of the point cloud data in the grid in ascending order, and determine the elevation of the grid according to the elevation of the point cloud data located at a preset position in the sorting order.
[0100] Among them, the above preset position can be pre-stored in the electronic device. Exemplarily, the preset position can be determined by the user based on the service usage scenario of the grid object and stored in the electronic device.
[0101] For example, assume that the grid object is used to restore the elevation of map elements (such as lane lines, etc.) on the road surface of a driving lane. Since the elevation of this road surface is usually lower than that of the pedestrian passage on the road shoulder, therefore, the above preset position can be a position close to the elevation of the lower point cloud data, for example, at the lower one-third in the above sorting order. In this example, the electronic device can, for example, sort the elevations of the point cloud data in the grid in ascending order, and use the elevation of the point cloud data located in the lower one-third according to the sorting order as the elevation of this grid.
[0102] In this implementation manner, the elevation of the grid is determined by the elevation of the point cloud data located at the preset position through the above sorting order, so that the elevation of this grid conforms to the service scenario to which the grid object is applied, thus improving the accuracy of subsequent use of the grid object.
[0103] As another possible implementation manner, before obtaining the grid object of the grid according to the point cloud data in the grid, the electronic device can also perform denoising processing on the point cloud data in this grid. By performing denoising processing on the point cloud data in the grid, abnormal point cloud data in this grid can be removed, thus improving the accuracy of the point cloud data in this grid, and further improving the accuracy of the grid object determined based on the denoised point cloud data. In this implementation manner, optionally, the electronic device can also use the number of the denoised point cloud data in the above grid as the number of the point cloud data used when determining the elevation of the grid.
[0104] Optionally, the electronic device can, for example, perform denoising processing on the point cloud data in this grid based on the elevation of the point cloud data in the grid. For example, the electronic device can first calculate the normal distribution of the elevations of the point cloud data in the grid, and determine the elevation dense distribution range according to this normal distribution. Then, the electronic device can use the point cloud data with an elevation outside this elevation dense distribution range as the noisy point cloud data and delete this noisy point cloud data to implement denoising processing on the point cloud data in this grid.
[0105] After the electronic device performs denoising processing on the point cloud data in this grid, it can obtain the grid object of the grid according to the denoised point cloud data in this grid. Optionally, the specific implementation manner for the electronic device to obtain the grid object of the grid according to the denoised point cloud data in this grid can refer to the method for obtaining the grid object of the grid according to the point cloud data in the grid described in the foregoing embodiments, and will not be elaborated here.
[0106] As another possible implementation, before obtaining the grid object of the grid based on the point cloud data in the grid, the electronic device may also determine whether to perform fission processing on the grid based on the elevation of the point cloud data in the grid.
[0107] For example, the electronic device may obtain the elevation difference of the grid according to the elevation of the point cloud data in the grid, and then determine whether the elevation difference of the grid is greater than a preset threshold. Optionally, the preset threshold may be, for example, pre-stored in the electronic device.
[0108] Optionally, the electronic device may use the difference obtained by subtracting the minimum elevation from the maximum elevation among the elevations of all the point cloud data in the grid as the elevation difference of the grid. Or, for example, the electronic device may also use the difference obtained by subtracting the minimum elevation from the maximum elevation among the elevations of the point cloud data after denoising processing in the grid as the elevation difference of the grid to improve the accuracy of determining the elevation difference of the grid.
[0109] If the elevation difference of the grid is less than or equal to the above preset threshold, it means that the grid of this level (or the grid of this size, in the concept of the grid level involved in this application, the larger the level of the grid, the smaller the size, and the smaller the level of the grid, the larger the size) can be used to represent an isometric surface of a road surface. Therefore, optionally, the electronic device may not perform fission processing on the grid and directly obtain the grid object of the grid according to the point cloud data in the grid.
[0110] If the elevation difference of the grid is greater than the above preset threshold, it means that the grid of this level is not sufficient to represent an isometric surface of a road surface. Therefore, optionally, the electronic device may perform fission processing on the grid until the elevation difference of the fissioned grid is less than or equal to the above preset threshold. Among them, the size of the fissioned grid is smaller than the size of the fissioned grid before.
[0111] Or, the electronic device may also pre-store the maximum level threshold of the grid. In this implementation, when the electronic device "performs fission processing on the grid with an elevation difference greater than the above preset threshold until the elevation difference of the fissioned grid is less than or equal to the above preset threshold", when the level of the fissioned grid is equal to the above maximum level threshold, the grid fission stops.
[0112] Exemplarily, Figure 2 is a schematic diagram of a grid fission process provided by this application. As Figure 2 shown, assume that the unfissioned grid is an N-level grid, and the size of each N-level grid is the same. As Figure 2As shown, if the elevation difference of the N-level grid 2 is greater than the above preset threshold, the electronic device can perform fission processing on the N-level grid 2 to obtain multiple N+1-level grids. Then, for the N+1-level grids with an elevation difference greater than the above preset threshold, the electronic device can perform fission processing on the N+1-level grids to obtain multiple N+2-level grids.
[0113] It should be understood that this application does not limit the number of grids obtained by splitting the grid with an elevation difference greater than the above preset threshold into several grids. In addition, optionally, the number of grids obtained by splitting the grid may be the same as or different from the number of grids obtained by splitting any of the split grids again. For example, still taking the Figure 2 N-level grid shown in as an example, the electronic device can split one N-level grid into 32 N+1-level grids, and then split the N+1-level grids with an elevation difference greater than the above preset threshold into 4 N+2-level grids.
[0114] Optionally, in this implementation manner, taking the above grid object further including the size of the grid as an example, the electronic device can, for example, determine the size of the grid according to whether fission processing has been performed on the grid. For example, if fission processing has not been performed on the grid, the electronic device can determine that the size of the grid can be the size corresponding to the above preset range. If fission processing has been performed on the grid, the electronic device can determine that the size of the grid can be the size after the grid fission. Through the above method, based on whether the grid is split and according to the size of the split grid, the grid object is determined, which improves the accuracy of determining the size of the grid of the grid object, and further improves the accuracy of subsequent data processing based on the grid object.
[0115] In this implementation manner, by splitting the grid with an elevation difference greater than the preset threshold, it is ensured that each grid in the target area is sufficient to represent an isometric surface of a road surface, so the flatness of each grid is ensured, and further the accuracy of grid division of the target area is improved, and thus the accuracy of subsequent data processing using the grid object of the target area is improved.
[0116] As mentioned above, this application does not limit the application scenario of the above grid object. It should be understood that the execution subject for performing business processing based on the above grid object can be any electronic device or data processing platform with processing functions. In addition, it should be understood that the execution subject for performing business processing based on the above grid object may be the same as or different from the execution subject for obtaining the grid object of the grid based on the point cloud data of the target area mentioned above.
[0117] Next, taking the above grid object for determining the elevation of the map elements in the target area and the execution subject being an electronic device as an example, an exemplary description of the application scenario of the grid object will be given.
[0118] As a possible implementation, Figure 3 is a schematic flowchart of an elevation determination method provided by this application. As Figure 3 shown, this method may include the following steps:
[0119] S201. Obtain a grid query tree of the target area.
[0120] Among them, the grid query tree may include grid objects of at least one grid in the above target area. The grid object may be obtained by using the point cloud data processing method described in any of the foregoing embodiments.
[0121] Optionally, the grid query tree of the above target area may be pre-stored in the electronic device. That is to say, the electronic device may obtain the grid query tree from the data stored in itself. Or, the electronic device may also generate a grid query tree of the target area according to the grid objects of the grids.
[0122] S202. Obtain the longitude and latitude of the target point of the map element located in the target area in the map.
[0123] Optionally, the map element in the above target area may be any map element in the target area. A map element may include at least one target point.
[0124] Optionally, the electronic device may receive the longitude and latitude of the above target point input by the user through, for example, a GUI or an API. Or, the electronic device may also receive the three-dimensional coordinates of the above target point input by the user and read the longitude and latitude of the above target point from the three-dimensional coordinates. Or, the electronic device may also first obtain the longitude and latitude of multiple points of the above map element and then extract the longitude and latitude of the target point of the above map element from the longitude and latitude of the multiple points.
[0125] S203. Perform geospatial encoding on the longitude and latitude of the target point to obtain the encoded address of the target point.
[0126] Optionally, the specific implementation of the electronic device "performing geospatial encoding on the longitude and latitude of the target point to obtain the encoded address of the target point" may refer to the foregoing step S102 and will not be elaborated here.
[0127] S204. According to the encoded address of the target point, use the above grid query tree to obtain the grid objects of at least one target grid corresponding to the target point.
[0128] Taking the example that the above target point corresponds to a target grid, optionally, the target grid may be: the grid where the point cloud data with the same address as the encoded address of the target point is located. Taking the example that the above target point corresponds to multiple target grids, optionally, the multiple target grids may include: the grid where the point cloud data with the same address as the encoded address of the target point is located, and other grids near the grid, etc.
[0129] S205. Determine the elevation of the target point according to the grid objects of at least one target grid.
[0130] Exemplarily, the electronic device may, for example, determine the elevation of the target point based on the elevation of the above at least one target grid. For example, the electronic device may use the average value of the elevations of the above at least one target grid as the elevation of the target point.
[0131] In this embodiment, by performing geospatial encoding on the longitude and latitude of the target point of the map elements in the target area, the encoded address of the target point can be obtained. By obtaining the encoded address of the target point, it is possible to subsequently, based on the encoded address of the target point, use the grid query tree of the above target area to obtain the grid objects of at least one target grid corresponding to the target point, and determine the elevation of the target point based on the grid objects of the at least one target grid. By using the grid query tree of the above target area to obtain the grid objects of at least one target grid, the efficiency of obtaining the grid objects of the at least one target grid is improved, and thus the efficiency of determining the elevation of the target point is improved. By the method described in any of the foregoing embodiments, the accuracy of the grid object is improved, and thus the accuracy of the elevation of the target point determined based on the grid object with higher accuracy is improved.
[0132] The following will elaborate on how the electronic device obtains the grid query tree of the target area:
[0133] As a possible implementation manner, after the electronic device obtains the grid object of the grid according to the point cloud data in the grid, it may further generate a grid query tree of the target area according to the grid object of the grid, so that the electronic devices in subsequent various service scenarios can perform service processing based on the grid query tree. Through the grid query tree of the target area, the efficiency of querying the grid object required for service processing from the multiple grid objects corresponding to the target area in the subsequent service processing can be improved.
[0134] Optionally, an electronic device may, for example, generate a grid query tree for the target area based on grid objects of the grid using an Aho Corasick Double Array Trie (hereinafter referred to as Aho Corasick DAWG). Exemplarily, the electronic device may input grid objects of at least one grid in the target area into an Aho Corasick DAWG generation algorithm to obtain a grid query tree for the target area. In this implementation, an edge connecting each node in the grid query tree may be used to represent a character of the identifier of the grid object.
[0135] Generating the grid query tree for the target area through the above Aho Corasick DAWG enables the grid query tree to be stored in the form of an array, thereby reducing the storage space required to store the grid query tree. When querying the grid query tree in a subsequent service processing process, the required grid object can be obtained by querying the array, thus further improving the efficiency of subsequent service processing.
[0136] Alternatively, the electronic device may also obtain a grid query tree for the target area based on grid objects of the grid through any existing grid query tree construction method. For example, the electronic device may input grid objects of the grid into a trie (a name of a query tree construction algorithm) query tree construction algorithm to obtain a grid query tree for the target area.
[0137] Or, the electronic device may directly store grid objects of the target area in the form of key-value pairs (k, v). In this implementation, k in the key-value pair may be used to represent the identifier of the grid object, and v in the key-value pair may include information such as the elevation of the grid included in the grid object and the size of the grid.
[0138] The following details how an electronic device obtains grid objects of at least one target grid corresponding to a target point using a grid query tree of a target area based on the encoded address of the target point:
[0139] As a possible implementation, the electronic device may determine grid objects of at least one target grid based on the encoded address of the target point and at least one auxiliary point within a preset range of the target point.
[0140] For example, the electronic device may first obtain the longitude and latitude of at least one auxiliary point within a preset range of the target point from a map.
[0141] Optionally, the preset range can be, for example, pre-stored in the electronic device. Optionally, the number of the at least one auxiliary point can also be pre-stored in the electronic device. For example, assuming that the longitude and latitude of the target point is (x, y), exemplarily, the electronic device can use four points with longitude and latitude of (x-i, y), (x, y-i), (x+i, y), and (x, y+i) as the auxiliary points of the target point.
[0142] After the electronic device obtains the longitude and latitude of the auxiliary point, it can perform geospatial encoding on the longitude and latitude of the auxiliary point to obtain the encoded address of the auxiliary point. Optionally, the specific implementation manner of the electronic device "performing geospatial encoding on the longitude and latitude of the auxiliary point to obtain the encoded address of the auxiliary point" can refer to the foregoing step S102, which will not be elaborated here.
[0143] Then, the electronic device can obtain at least one grid object of the target grid with the same prefix as "the encoded address of the target point and the encoded address of the auxiliary point" from the above grid query tree in the target area.
[0144] Exemplarily, for the encoded address of the above target point and the encoded address of any auxiliary point, assuming that the above geospatial encoding is geohash encoding and the address is wx4gd8g4wbp7, the electronic device can use this address to perform matching in the above grid query tree in the order of each character, and obtain at least one grid object of the target grid with the same prefix as this address. At least one grid object of the target grid with the same prefix as this address can include, for example: grid objects of the target grid with addresses of wx4gd8g4, wx4gd8g4w, wx4gd8g4wb, or wx4gd8g4wbp.
[0145] In this embodiment, the electronic device can obtain at least one grid object of the target grid with the same prefix from the above grid query tree according to the encoded address corresponding to at least one auxiliary point within the preset range of the target point and the encoded address of the target point. Through the above method, the query of the target grid plane where the target point and the auxiliary point are located is converted into the matching of the index prefix of the grid, so that the index result (that is, the at least one grid object of the target grid) can include at least one level of grids (the prefixes of grids at different levels can be the same). Therefore, through the above method, the richness of determining at least one grid object of the target grid is improved, and further the accuracy of determining the elevation of the target point based on the at least one grid object of the target grid is improved.
[0146] As another possible implementation, the electronic device may first obtain the grid object of the target grid that is the same as the encoded address of the target point from the above-mentioned grid query tree in the target area. Then, the electronic device may obtain the grid objects of at least one grid that is geographically adjacent to the target grid from the above-mentioned grid query tree, and use the grid objects of the at least one grid and the grid object of the above-mentioned target grid as the grid objects of at least one target grid corresponding to the target point. It should be understood that this application does not limit how the electronic device obtains the grid objects of at least one grid that is geographically adjacent to the target grid from the above-mentioned grid query tree.
[0147] In this implementation, through the encoded address of the target point, the grid object of the target grid that is the same as the encoded address of the target point can be obtained from the above-mentioned grid query tree. Through the grid object of the target grid, the grid objects of other target grids of the target point can be obtained, realizing obtaining the grid objects of at least one target grid corresponding to the target point by using the grid query tree in the target area based on the encoded address of the target point, laying a foundation for subsequent determination of the elevation of the target point.
[0148] The following details how the electronic device determines the elevation of the target point according to the grid objects of at least one target grid:
[0149] As a possible implementation, the electronic device may determine whether there are grids with the same identifier among the grid objects of the at least one target grid, and determine the elevation of the target point according to the judgment result. Optionally, for any grid, the identifier of the grid may be the encoded address of the point cloud data in the grid.
[0150] If there are no grids with the same identifier among the at least one target grid, it means that the areas covered by the at least one target grid are all areas where the point cloud data has been collected once. Optionally, the electronic device may determine the elevation of the target point according to the weighted sum of the elevations of the grid objects of the at least one target grid. Among them, the weights used in the weighted sum may be related to the confidence levels of the grid objects of the target grid. For example, the weight of the elevation corresponding to the grid object with a higher confidence level may be larger, and the weight of the elevation corresponding to the grid object with a lower confidence level may be smaller. Exemplarily, the electronic device may directly use the weighted sum of the elevations of the grid objects of the at least one target grid as the elevation of the target point.
[0151] If there are grids with the same identifier in at least one of the above target grids, it indicates that the area covered by the grids with the same identifier may have been collected with point cloud data multiple times at different times. Therefore, optionally, the electronic device can determine the elevation and weight corresponding to the grids with the same identifier, and determine the elevation of the target point based on the weighted sum of "the elevation corresponding to the grids with the same identifier" and "the elevation of the grid objects of other target grids".
[0152] In some embodiments, for example, the electronic device can determine the elevation and weight corresponding to the grids with the same identifier according to whether the grids with the same identifier include grids of different levels. For example:
[0153] If all the grids with the same identifier are grids of the same level, optionally, the electronic device can use the elevation of the grid with a high confidence level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of this grid. For example, the higher the confidence level of this grid, the greater the weight corresponding to the grids with the same identifier can be. The lower the confidence level of this grid, the smaller the weight corresponding to the grids with the same identifier can be.
[0154] By the above method, using the elevation of the grid with a high confidence level as the elevation corresponding to the grids with the same identifier, and the weight corresponding to the grids with the same identifier is related to the confidence level of this grid, which improves the accuracy of determining the elevation and weight corresponding to the grids with the same identifier, and further improves the accuracy of the elevation of the target point determined based on the elevation and weight corresponding to the grids with the same identifier.
[0155] If the grids with the same identifier include grids of different levels, optionally, the electronic device can use the elevation of the grid with the lowest level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of this grid.
[0156] Because among the grids with the same identifier, the grid with the lowest level has the largest size, indicating that the number of point cloud data in this grid is large and the flatness is good, that is, the reliability of this grid is high. Therefore, by using the elevation of the grid with the lowest level as the elevation corresponding to the grids with the same identifier, the accuracy of determining the elevation corresponding to the grids with the same identifier is improved. Optionally, the implementation manner and technical effect of the electronic device determining the weight corresponding to the grids with the same identifier according to the confidence level of this grid can refer to the above embodiments and will not be elaborated here.
[0157] In some embodiments, the electronic device may also, for example, use the average of the elevations of the grids in the grid with the same identifier as the elevation corresponding to the grid with the same identifier, and determine the weight corresponding to the grid with the same identifier according to the average of the confidence levels of the grids. For example, the higher the average of the confidence levels of the grids, the greater the weight corresponding to the grid with the same identifier can be. The lower the average of the confidence levels of the grids, the smaller the weight corresponding to the grid with the same identifier can be.
[0158] Exemplarily, after the electronic device determines the elevation and weight corresponding to the grid with the same identifier as described above, for example, it may directly use the weighted sum of "the elevation corresponding to the grid with the same identifier" and "the elevation of the grid object of other target grids" as the elevation of the target point.
[0159] In this embodiment, when there is no grid with the same identifier in the at least one target grid, the elevation of the target point can be directly determined according to the weighted sum of the elevations of the grid objects of the at least one target grid, which improves the efficiency of determining the elevation of the target point. When there is a grid with the same identifier in the at least one target grid, the elevation and weight corresponding to the grid with the same identifier can be determined first, and then the elevation of the target point can be determined according to the weighted sum of the elevation corresponding to the grid with the same identifier and the elevation of the grid objects of other target grids. Through the above method, different situations where the grid coverage area is scanned by point cloud data once and scanned by point cloud data multiple times are considered, and the elevation of the target point is obtained through different processing procedures according to different situations, which improves the accuracy of obtaining the elevation of the target point while ensuring the efficiency of obtaining the elevation of the target point.
[0160] As another possible implementation, the electronic device may also determine the elevation of the target point according to the grid objects of the at least one target grid and the historical candidate elevation of the target point.
[0161] For example, the electronic device may first obtain the candidate elevation of the target point according to the grid objects of the at least one target grid. Optionally, the implementation manner for the electronic device to obtain the candidate elevation of the target point may refer to the method of determining the elevation of the target point according to the grid objects of at least one target grid described in the foregoing embodiments, and will not be elaborated herein.
[0162] Then, the electronic device can use the candidate elevation of the target point and the historical candidate elevation of the target point to determine the elevation of the target point. Wherein, the historical candidate elevation of the target point is the elevation obtained by using the "grid query tree of the target area constructed from the point cloud data of the target area collected historically". Optionally, the method of constructing the grid query tree of the target area by using the point cloud data of the target area collected historically can refer to the method of constructing the grid fork village described in the foregoing embodiments, which will not be elaborated here. Optionally, there may be at least one historical candidate elevation for the target point. For example, each time the point cloud data of the target area is collected, a grid query tree can be constructed based on the point cloud data of the target area collected this time, and the elevation of the target point can be determined as the historical candidate elevation of the target point required for the next determination of the target point.
[0163] In some embodiments, the electronic device can determine the elevation of the target point according to the weighted sum of the candidate elevation of the target point and the historical candidate elevation of the target point.
[0164] Optionally, the electronic device can, for example, determine the weight corresponding to the candidate elevation of the target point and the weight corresponding to the historical candidate elevation of the target point according to the confidence of the grid of the grid object of at least one target grid "for determining the candidate elevation of the target point" and the confidence of the grid of the grid object of at least one target grid "for determining the historical candidate elevation of the target point".
[0165] Alternatively, the electronic device can, for example, first calculate the normal distribution of the candidate elevation of the target point and the historical candidate elevation of the target point, and determine the elevation dense distribution range according to this normal distribution. Then, the electronic device can determine the weight of the candidate elevation within the elevation dense distribution range, and calculate the weighted sum of the candidate elevations within the elevation dense distribution range based on this weight as the elevation of the target point.
[0166] In some embodiments, the electronic device can, for example, directly calculate the average value of the candidate elevation of the target point and the historical candidate elevation of the target point as the elevation of the target point.
[0167] In this embodiment, the candidate elevation of the target point can be obtained through the grid object of at least one target grid. Then, the elevation of the target point can be determined based on the candidate elevation of the target point and the historical candidate elevation of the target point. Through the above method, when the point cloud data of the target area has been collected multiple times, the influence of the historical candidate elevation determined according to the historically collected point cloud data on the elevation of the target point is considered, and the accuracy of determining the elevation of the target point is further improved.
[0168] Taking the above geospatial encoding as the geohash encoding as an example, an exemplary description of the point cloud data processing method provided by this application is given. This point cloud data processing method can be mainly divided into two parts: grid generation and grid usage. First, corresponding to the grid generation process, Figure 4 is a schematic flowchart of another point cloud data processing method provided by this application. As Figure 4 shown, as a possible implementation, this method may include the following steps:
[0169] Step 1: Obtain the point cloud data of the target area collected.
[0170] Step 2: Perform geohash encoding on the longitude and latitude of the above point cloud data to obtain the encoded address of the point cloud data, and perform grid division according to this address to obtain at least one grid of the target area.
[0171] Geohash is a Z-order curve, which has the advantages of local order preservation, and the index strings near the points have a common prefix, etc. Taking a longitude and latitude coordinate [31.1932993, 121.43960190000007] as an example, an exemplary description of the encoding process of geohash encoding is given as follows:
[0172] 1. The user determines the initial size of the grid, and then determines the number of levels of the geohash encoding corresponding to this initial size by querying the relevant geohash encoding table, and inputs it into the electronic device.
[0173] 2. Process the longitude and latitude. Taking the latitude as an example, the latitude range is [-90, 90]. Divide this range into two parts, that is, [-90, 0), [0, 90]. The above latitude coordinate 31.1932993 is located in the interval (0, 90], that is, the right interval, and is marked as 1. Then continue to divide the interval (0, 90] into two equal parts, [0, 45), [45, 90]. The latitude coordinate 31.1932993 is located in the interval [0, 45), that is, the left interval, and is marked as 0. And so on, the electronic device divides continuously according to the above number of levels (as shown in Table 4 below):
[0174] Table 4
[0175]
[0176]
[0177] As shown in Table 4, the electronic device can obtain that the binary corresponding to the latitude is **********.
[0178] Taking longitude as an example, the longitude range is [-180, 180], and the processing method is the same as that of latitude, which will not be elaborated here. As shown in Table 5 below, the electronic device can obtain that the binary corresponding to the longitude is 110101100101101.
[0179] Table 5
[0180] Left interval Median Right interval Binary result -180 0 180 1 0 90 180 1 90 135 180 0 0 112.5 135 1 112.5 123.75 135 0 112.5 118.125 123.75 1 118.125 120.9375 123.75 1 120.9375 122.34375 123.75 0 120.9375 121.640625 122.34375 0 120.9375 121.289062 121.640625 1 121.289062 121.464844 121.640625 0 121.289062 121.376953 121.464844 1 121.376953 121.420898 121.464844 1 121.420898 121.442871 121.464844 0 121.420898 121.431885 121.442871 1
[0181] 3. Recombine the binary string. According to the rule of "putting the longitude in the even positions and the latitude in the odd positions", recombine the binary strings of longitude and latitude to generate a new binary string: 111001100111100000110011110110.
[0182] 4. Convert to a string. The electronic device can convert this binary string into characters by looking up the Base32 table corresponding to the geohash code. 11100 11001 11100 00011 00111 10110 is converted to decimal as 28 25 28 3 722. Among them, the Base32 table can be shown in Table 6 and Table 7 as follows:
[0183] Table 6
[0184] Decimal number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Base32 0 1 2 3 4 5 6 7 8 9 b c d e f g h
[0185] Table 7
[0186] Decimal number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Base32 j k m n p q r s t u v w x y z
[0187] According to Table 6 and Table 7, the string wtw37q can be determined. The electronic device can use this string as the geohash coding result of this longitude and latitude coordinate.
[0188] The electronic device can achieve grid division by dividing the point cloud data with the same geohash coding result into the same grid. For any grid, the electronic device can use the geohash coding corresponding to the point cloud data in this grid as the identifier of this grid.
[0189] Step 3. Determine whether the elevation difference of the grid is greater than a preset threshold, and perform fission processing on the grid with the elevation difference greater than the preset threshold.
[0190] Among them, the operation of determining whether the elevation difference of the grid is greater than the preset threshold can also be called slope inspection.
[0191] Exemplarily, Table 8 below shows the sizes and geohash coding examples of different-level grids:
[0192] Table 8
[0193] Grid grade Size of grid (meter, m) Geohash code of point cloud data in grid Level 7 ≤ 153 m × 153 m For example: wx4gd8g Level 8 ≤ 38.2 m × 19.1 m For example: wx4gd8g4 Level 9 ≤ 4.77 m × 4.77 m For example: wx4gd8g4w Level 10 ≤ 1.19 m × 0.596 m For example: wx4gd8g4wc Level 11 ≤ 0.149 m × 0.149 m For example: wx4gd8g4wcb Level 11.5 ≤ 0.0745 m × 0.0745 m For example: wx4gd8g4wcb_00 Level 12 ≤ 0.0372 m × 0.0186 m For example: wx4gd8g4wbp7
[0194] As shown in Table 8, among them, an 11-level grid can be split into 4 11.5-level grids, or 32 12-level grids.
[0195] Taking the map element to be restored in elevation as the lane line as an example, since the interval of target points on the lane line is about 1-2 meters, the range of selecting the point cloud candidate set (auxiliary points) for each target point is 1 square meter. If the 9th level is selected, the range of 4.77m * 4.77m is relatively large and will cover multiple target points on the lane line. Therefore, the grid before fission can be determined as a 10-level grid. Taking the grids before fission as 10-level grids as an example, the electronic device can sort the elevation of the point cloud data within each 10-level grid, and take the range where the main elevation distribution is relatively dense (that is, the aforementioned elevation dense distribution range), and treat the point cloud data outside the elevation dense distribution range as noise. For the elevation within the above-mentioned elevation dense distribution range, if the difference obtained by subtracting the minimum elevation from the maximum elevation is greater than 5 centimeters, it means that the slope of this 10-level grid does not meet the accuracy requirements and needs to be split. Therefore, the electronic device can split this grid into an 11-level grid. Then, continue to check the slope of the elevation of the point cloud for each 11-level grid to determine whether to continue the fission process. That is to say, if a certain level of grid generated is not sufficient to represent the contour surface of a road surface, especially in a slope scenario, then the grid of this level needs to be split into multiple levels of grids.
[0196] Exemplarily, Figure 5 is a schematic diagram of the grid division result provided by this application. As Figure 5 shown, there can be multiple grids of different levels (that is, different sizes) in this section of the road. For example, the size of the N-level grid is larger than the size of the N + 1-level grid.
[0197] The Google s2 geospatial encoding method requires a total of 5 levels of grids from level 22 to level 26 to represent the grids of level 10 to level 11 of the geohash encoding. Therefore, implementing grid division for the target area based on geohash encoding improves the grid division efficiency and reduces the data volume of grid objects.
[0198] Step 4: Obtain the elevation of the grid, the confidence of the grid, etc., to obtain the grid object of the grid and realize grid generation.
[0199] The elevation of the above grid can be used to represent the elevation of the road surface in the target area. Optionally, the above grid object may include the identifier of the grid (which can be used as a geohash index), the confidence of the grid, the size of the grid (since the sizes of grids at different levels are different, the size of this grid can be represented by the level level of this grid), and the number of point cloud data used when determining the elevation of this grid, etc.
[0200] Through the above method, in the business scenario of road surface calculation in a high-precision map, the grids in the target area have the following characteristics: 1. The number of grids is small. Compared with the large number of fragmented files stored by Google's S2 geospatial coding method, which has 30 levels of coding and a large number of grid files generated for the same section of road, Geohash coding can have 12 levels of grids. Relatively speaking, the number of grid files is less than that of Google S2, thus improving the efficiency of business processing based on the grids in the target area. 2. The ability of multi-level coverage. Compared with the relatively poor multi-level coverage ability of Uber's H3 coding method, which has problems such as jumps in multi-level coding at the edges, Geohash coding has better multi-level coverage ability in grid division, improving the accuracy of grid division for the target area. 3. The universality of Geohash coding.
[0201] Regarding the process of using grids, Figure 6 is a schematic flowchart of another elevation determination method provided by this application. As Figure 6 shown, as a possible implementation, the method may include the following steps:
[0202] Step 1: According to the grid objects of the grids, generate a grid query tree for the target area by using an AC automaton double-array trie.
[0203] The AC automaton double-array trie is an implementation of a trie + double-array + AC automaton. Based on the grid query tree constructed by this AC automaton double-array trie, it is possible to utilize the characteristics of similar coordinates and the same prefix to perform grid matching and recall (that is, determine the grid objects of at least one target grid corresponding to the target point).
[0204] Exemplarily, Figure 7 is a schematic diagram of the double-array result and the AC automaton in an AC automaton double-array trie. Figure 8 is a schematic diagram of array indexing for an AC automaton double-array trie. As Figure 7 and Figure 8 shown, in the grid query tree constructed by the above AC automaton double-array (base array and check array) trie, the edges of the tree = characters, the characters = j - base[i], and, the characters = j - check[j], and the characters are stored in the corresponding ASCII codes. As Figure 7 shown, the base refers to the base array, and the base array stores the position information for finding child nodes; check refers to the check array, and the check array is used to store the parent subscript of the child node; index refers to the index pointer, which is used to represent the subscript in the base array; root represents the root node. As Figure 7As shown in the figure, taking the input BACEZQ as an example, through this AC automaton double-array trie, results such as AC, ACE, and ZQ can be matched. Figure 8 Taking strings AC, ACE, ACEF, AD, CD, CF, and ZQ as examples, an exemplary description is given of the trie, base array calculation, and state calculation (i.e., array indexing). Among them, the meanings of root, base, index, the edges and nodes of the tree are the same as those Figure 7 shown in [reference], and will not be elaborated here.
[0205] The value in the node of this tree represents the array subscript corresponding to the double array, and the relationship value corresponding to each subscript. The calculation rule of this relationship is as follows: base[0] = 1, check[0] = 0, base[i] = check[j], where j is the child node of i. To restore the trie from the double array, it can be judged according to base[i] = check[j], and the child nodes of each layer can be determined. For example, when base = 1, all nodes with check = 1 are the child nodes of the previous level.
[0206] The double-array trie combined with the AC automaton can compress the space occupied by the grid query tree. Two arrays represent a tree, which has advantages in single-pattern matching, that is, matching a single string. In addition, the double-array trie combined with the AC automaton can reduce the matching complexity.
[0207] The process of the AC automaton solving the single-pattern matching of the double-array trie can be shown as follows: Success: Successfully transfer to another state, as shown by the solid line in Figure 7 [reference]. Failure: If it is not possible to jump along the string, then jump to a specific node, and the path from the root node to this specific node is exactly a part of the text before failure (as shown by the dashed line in Figure 7 [reference]). Emits: Hit a pattern string (as shown by the darker-colored nodes in Figure 7 [reference]).
[0208] Step 2: Obtain the longitude and latitude of the target point of the map element located in the target area in the map, and perform geohash encoding on the longitude and latitude of the target point to obtain the encoded address of the target point.
[0209] Step 3: According to the encoded address of the target point, use the above-mentioned grid query tree to obtain the grid object of at least one target grid corresponding to the target point.
[0210] Based on the address encoded according to the target point in any of the foregoing embodiments, by using the above grid query tree to obtain the implementation manner of the grid objects of at least one target grid corresponding to the target point, at least one target grid can be obtained. Taking obtaining about 4 target grids as an example, this process can be called four-grid grid recall. Taking obtaining about 9 target grids as an example, this process can be called nine-grid grid recall. By using the above geohash encoding as the encoding method for geospatial encoding, the mutation problem at the corner can also be solved by filtering the grid.
[0211] Exemplarily, Figure 9 is a schematic diagram of at least one target grid corresponding to a target point provided by this application. As Figure 9 shown, assuming the address encoded for the target point, the at least one target grid corresponding to the target point obtained by using the above grid query tree are respectively four target grids: upper left, upper right, lower left, and lower right. Exemplarily, the latitude and longitude coordinates and the geohash-encoded addresses of these four target grids can be as shown in Table 9 below:
[0212] Table 9
[0213] Target grid Latitude and longitude coordinates Encoded address Upper - left target grid (39.994783046100004,116.481471366) wx4gd8g4rp Upper - right target grid (39.9947850461,116.481471366) wx4gd8g4x0 Lower - left target grid (39.994783046100004,116.481469366) wx4gd8g4qz Lower - right target grid (39.9947850461,116.481469366) wx4gd8g4wb
[0214] By the above method, the target grid plane where the query target point and the auxiliary point are located is converted into an index prefix match of the grid (converting the mode of calculating elevation by point cloud to spatial query), so that the index result (that is, the grid objects of the above at least one target grid) can include grids of at least one level (the prefixes of grids of different levels can be the same), which can also be called multi-mode prefix match.
[0215] As Figure 9 shown, where multiple observations mean that the area covered by the target grid may have been collected with point cloud data multiple times at different times. Therefore, multiple layers of grids in this area can be queried according to the above grid query tree. Among them, 11, 10, 00, 0111, 0110, 0100, 0101 are all used to represent the identifiers of each target grid.
[0216] Step 4: Perform grid fusion on the grid objects of the above at least one target grid to determine the elevation of the target point.
[0217] Optionally, for the specific implementation manner of performing grid fusion on the grid objects of the above at least one target grid to determine the elevation of the target point, reference can be made to the method described in the foregoing embodiments, which will not be elaborated here. Exemplarily, taking the address encoded for the target point as wx4gd8g4wbp7, according to the address encoded for the target point, the grid objects of the following four target grids can be determined, for example:
[0218] Grid object of target grid 1: id = 12361, tag = 1, indexName = 'wx4gd8g4', indexLevel = 8, zValue = 26.668, score = 0, where id represents the serial number of the grid in the target area. tag = 1 indicates the business scenario for which the grid object is used. indexName represents the identifier of the grid, that is, the address after encoding the point cloud data in the grid. indexLevel represents the level of the grid. zValue represents the elevation of the grid. Score represents the confidence of the grid.
[0219] Grid object of target grid 2: id = 12347, tag = 1, indexName = 'wx4gd8g4w', indexLevel = 9, zValue = 26.633, score = 0;
[0220] Grid object of target grid 3: id = 12346, tag = 1, indexName = 'wx4gd8g4wb', indexLevel = 10, zValue = 26.659, score = 1.0;
[0221] Grid object of target grid 4: id = 12345, tag = 1, indexName = 'wx4gd8g4wbp', indexLevel = 11, zValue = 26.637, score = 0.5.
[0222] By comparing the grid objects of the above four target grids, the confidence of target grid 3 is the highest. Optionally, the electronic device can determine, for example, that the elevation of the target point is zValue = 26.659.
[0223] In this embodiment, through geohash encoding, the longitude and latitude of the point cloud data in the target area are geospatially encoded, the point cloud data with the same address is divided into a grid, and the elevation of the grid is calculated and encapsulated into a grid object. An index tree (grid query tree) is established for the grid object using the AC automaton double-array trie. The longitude and latitude of the target point to be calculated are geohash encoded, and at least one target grid in the area where the target point is located is recalled through the above index tree. Through the above method, when there are reasons such as road surface occlusion, the grids near the area where the target point is located can be recalled, and grid fusion is used to perform fusion calculation on the elevation, and finally the elevation of the target point is obtained. Through the above method, the encapsulated grid object can be precipitated into reusable road surface information, which can be applied to multiple business scenarios and improves the reusability of the grid object. By storing the grid object, instead of storing the point cloud data (the spatial size of the point cloud data becomes the grid is reduced by 99%, which can be understood as a kind of thinning). In addition, the grid of the target area determined by the above method is a fixed grid, the calculated index values of the coordinates within the same grid are the same, the obtained grid is the same grid, and the grid recalled by the index value calculated by the same coordinate is the same grid. Compared with the triangular grid in the prior art, which is a non-fixed grid, and the triangular grid representation ranges and sizes formed by multiple acquisitions in the same area are not fixed, and the obtained triangular grids are different grids, the present application improves the accuracy and stability of grid division for the target area.
[0224] Figure 10 The structural schematic diagram of a point cloud data processing device provided by the present application. As Figure 10 shown, the device includes: an acquisition module 31, an encoding module 32, a division module 33, and a processing module 34. Among them,
[0225] The acquisition module 31 is used to acquire the point cloud data of the target area collected.
[0226] The encoding module 32 is used to perform geospatial encoding on the longitude and latitude of the point cloud data to obtain the encoded address of the point cloud data. Among them, the geospatial encoding makes the encoded addresses of the point cloud data located within a preset range in space the same.
[0227] The division module 33 is used to divide the point cloud data with the same address into a grid to obtain at least one grid of the target area.
[0228] The processing module 34 is used to obtain the grid object of the grid according to the point cloud data in the grid. Among them, the grid object at least includes the elevation of the grid.
[0229] Optionally, the processing module 34 is specifically configured to perform weighted average processing on the elevations of the point cloud data in the grid to obtain the elevation of the grid. Alternatively, the processing module 34 is specifically configured to sort the elevations of the point cloud data in the grid in ascending order, and determine the elevation of the grid according to the elevation of the point cloud data located at a preset position in the sorting order.
[0230] Optionally, the grid object further includes at least one of the following: the confidence level of the grid, the size of the grid, and the number of point cloud data used when determining the elevation of the grid.
[0231] Taking the grid object further including the confidence level of the grid as an example, optionally, the processing module 34 is specifically configured to obtain the elevation flatness of the grid according to the elevations of the point cloud data in the grid; and obtain the confidence level of the grid according to the elevation flatness of the grid. Wherein, the elevation flatness is negatively correlated with the confidence level.
[0232] Optionally, the processing module 34 is specifically configured to obtain the confidence level of the grid according to the elevation flatness of the grid, and the slope of the grid and / or the number of point cloud data in the grid.
[0233] Optionally, the processing module 34 is further configured to perform denoising processing on the point cloud data in the grid before obtaining the grid object of the grid according to the point cloud data in the grid.
[0234] Optionally, the processing module 34 is further configured to obtain the elevation difference of the grid according to the elevations of the point cloud data in the grid before obtaining the grid object of the grid according to the point cloud data in the grid; when the elevation difference of the grid is greater than a preset threshold, perform fission processing on the grid until the elevation difference of the fissioned grid is less than or equal to the preset threshold. Wherein, the size of the fissioned grid is smaller than the size of the grid before fission.
[0235] Taking the grid object further including the size of the grid as an example, optionally, the processing module 34 is further configured that when the grid is not subjected to fission processing, the size of the grid is the size corresponding to the preset range; when the grid is subjected to fission processing, the size of the grid is the size after the grid is fissioned.
[0236] The map point cloud data processing device provided in this application is used to execute the foregoing embodiments of the map point cloud data processing method, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0237] Figure 11 It is a schematic structural diagram of an elevation determination device provided in this application. As Figure 11As shown in the figure, the device includes: a first acquisition module 41, a second acquisition module 42, an encoding module 43, a third acquisition module 44, and a processing module 45. Among them,
[0238] The first acquisition module 41 is configured to acquire a grid query tree of a target area. Among them, the grid query tree includes grid objects of at least one grid in the target area, and the grid objects are obtained by using the point cloud data processing method described in any of the foregoing embodiments.
[0239] The second acquisition module 42 is configured to acquire the longitude and latitude of the target point of the map element located in the target area.
[0240] The encoding module 43 is configured to perform geospatial encoding on the longitude and latitude of the target point to obtain the encoded address of the target point.
[0241] The third acquisition module 44 is configured to, according to the encoded address of the target point, use the grid query tree to acquire grid objects of at least one target grid corresponding to the target point.
[0242] The processing module 45 is configured to determine the elevation of the target point according to the grid objects of the at least one target grid.
[0243] Optionally, the third acquisition module 44 is specifically configured to acquire the longitude and latitude of at least one auxiliary point within a preset range of the target point from the map; perform geospatial encoding on the longitude and latitude of the auxiliary point to obtain the encoded address of the auxiliary point; and acquire grid objects of at least one target grid having the same prefix as the encoded address of the target point and the encoded address of the auxiliary point from the grid query tree of the target area.
[0244] Optionally, the processing module 45 is specifically configured to, when there is no grid with the same identifier in the at least one target grid, determine the elevation of the target point according to the weighted sum of the elevations of the grid objects of the at least one target grid; when there is a grid with the same identifier in the at least one target grid, determine the elevation and weight corresponding to the grid with the same identifier, and determine the elevation of the target point according to the weighted sum of the elevation corresponding to the grid with the same identifier and the elevations of the grid objects of other target grids. Among them, the weight used in the weighted sum is related to the confidence of the grid object of the target grid.
[0245] Optionally, the processing module 45 is specifically configured to, when the grids with the same identifier are all grids of the same level, use the elevation of the grid with a high confidence level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of the grid; or, when the grids with the same identifier include grids of different levels, use the elevation of the grid with the lowest level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of the grid.
[0246] Optionally, the processing module 45 is specifically configured to obtain the candidate elevation of the target point according to the grid object of the at least one target grid; use the candidate elevation of the target point and the historical candidate elevation of the target point to determine the elevation of the target point. Wherein, the historical candidate elevation of the target point is the elevation obtained by querying the grid tree of the target area constructed by using the point cloud data of the target area collected historically.
[0247] The elevation determination device provided in this application is used to execute the foregoing elevation determination method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0248] Figure 12 This is a schematic hardware structure diagram of an electronic device provided in this application. Figure 12 The illustrated electronic device 50 includes a memory 51, a processor 52, and a communication interface 53. The memory 51, the processor 52, and the communication interface 53 are communicatively connected to each other. For example, the memory 51, the processor 52, and the communication interface 53 can be communicatively connected by means of a network connection. Alternatively, the foregoing electronic device 50 may further include a bus 54. The memory 51, the processor 52, and the communication interface 53 are communicatively connected to each other through the bus 54. Figure 12 The electronic device 50 is such that the memory 51, the processor 52, and the communication interface 53 are communicatively connected to each other through the bus 54.
[0249] The memory 51 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 51 may store a program. When the program stored in the memory 51 is executed by the processor 52, the processor 52 and the communication interface 53 are used to execute the map point cloud data processing method described in any of the foregoing embodiments, and / or the elevation determination method. The memory may also store the data required by the map point cloud data processing method, and / or the elevation determination method.
[0250] The processor 52 can be a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.
[0251] The processor 52 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, the data processing function of this application can be completed through the integrated logic circuit in the hardware of the processor 52 or instructions in the form of software. The above-mentioned processor 52 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, which can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments below of this application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments below of this application can be directly embodied as being executed and completed by a hardware decoding processor, or can be executed and completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 51, and the processor 52 reads the information in the memory 51 and combines its hardware to complete the data processing function of this application.
[0252] The communication interface 53 uses a transceiver module such as, but not limited to, a transceiver to achieve communication between the electronic device 50 and other devices or communication networks. For example, a data set can be obtained through the communication interface 53.
[0253] When the above-mentioned electronic device 50 includes a bus 54, the bus 54 can include a path for transmitting information between various components of the electronic device 50 (for example, the memory 51, the processor 52, the communication interface 53).
[0254] This application also provides a computer-readable storage medium, which can include: various media that can store program codes such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc. Specifically, the computer-readable storage medium stores program instructions for the methods in the above embodiments.
[0255] The present application further provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of the electronic device can read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor enables the electronic device to implement the map point cloud data processing method and / or the elevation determination method provided by the above various embodiments.
[0256] The term "a plurality of" herein refers to two or more. The term "and / or" herein merely describes the associated relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: the sole existence of A, the simultaneous existence of A and B, and the sole existence of B. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after; in a formula, the character " / " represents a "division" relationship between the associated objects before and after. In addition, it should be understood that in the description of the present application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0257] It can be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and do not limit the scope of the embodiments of the present application.
[0258] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing point cloud data, characterized in that, The method includes: Obtaining the point cloud data of the target area collected; Performing geospatial encoding on the longitude and latitude of the point cloud data to obtain the address after encoding the point cloud data; the geospatial encoding makes the addresses after encoding the point cloud data within a preset range in space the same; Dividing the point cloud data with the same address into one grid to obtain at least one grid of the target area; According to the point cloud data in the grid, obtaining the grid object of the grid, and the grid object at least includes the elevation of the grid.
2. The method according to claim 1, wherein The obtaining the grid object of the grid according to the point cloud data in the grid includes: Performing weighted average processing on the elevations of the point cloud data in the grid to obtain the elevation of the grid; Alternatively, sorting the elevations of the point cloud data in the grid in ascending order, and determining the elevation of the grid according to the elevation of the point cloud data located at a preset position in the sorting order.
3. The method according to claim 2, wherein The grid object further includes at least one of the following: The confidence of the grid, the size of the grid, the number of point cloud data used when determining the elevation of the grid.
4. The method according to claim 3, wherein The grid object further includes the confidence of the grid; the obtaining the grid object of the grid according to the point cloud data in the grid includes: Obtaining the elevation flatness of the grid according to the elevation of the point cloud data in the grid; Obtaining the confidence of the grid according to the elevation flatness of the grid; the elevation flatness is negatively correlated with the confidence.
5. The method according to claim 4, wherein The obtaining the confidence of the grid according to the elevation flatness of the grid includes: Obtaining the confidence of the grid according to the elevation flatness of the grid, and the slope of the grid and / or the number of point cloud data in the grid.
6. The method according to any one of claims 3 to 5, characterized in that, Before obtaining the grid object of the grid according to the point cloud data in the grid, the method further includes: Obtaining the elevation difference of the grid according to the elevation of the point cloud data in the grid; If the elevation difference of the grid is greater than a preset threshold, performing fission processing on the grid until the elevation difference of the fissioned grid is less than or equal to the preset threshold; the size of the fissioned grid is smaller than the size of the grid before fission.
7. The method according to claim 6, wherein The grid object further includes the size of the grid; the obtaining the grid object of the grid according to the point cloud data in the grid includes: If no fission processing is performed on the grid, the size of the grid is the size corresponding to the preset range; If fission processing is performed on the grid, the size of the grid is the size after fission of the grid.
8. A method for determining elevation, characterized in that, The method includes: Obtaining the grid query tree of the target area; the grid query tree includes the grid objects of at least one grid of the target area, and the grid objects are obtained by using the method described in any one of claims 1-7; Obtaining the longitude and latitude of the target point of the map elements located in the target area in the map; Performing geospatial encoding on the longitude and latitude of the target point to obtain the address after encoding the target point; According to the address after encoding the target point, using the grid query tree to obtain the grid objects of at least one target grid corresponding to the target point; Determine the elevation of the target point according to the grid objects of the at least one target grid.
9. The method according to claim 8, wherein The step of obtaining the grid objects of at least one target grid corresponding to the target point by using the grid query tree according to the address of the target point after encoding includes: Obtain the longitude and latitude of at least one auxiliary point within a preset range of the target point from the map; Perform geospatial encoding on the longitude and latitude of the auxiliary point to obtain the address of the auxiliary point after encoding; Obtain the grid objects of at least one target grid having the same prefix as the address of the target point after encoding and the address of the auxiliary point after encoding from the grid query tree of the target area.
10. The method according to claim 8, characterized in that The step of determining the elevation of the target point according to the grid objects of the at least one target grid includes: If there is no grid with the same identifier in the at least one target grid, determine the elevation of the target point according to the weighted sum of the elevations of the grid objects of the at least one target grid; wherein, the weights used in the weighted sum are related to the confidence levels of the grid objects of the target grid; If there is a grid with the same identifier in the at least one target grid, determine the elevation and weight corresponding to the grid with the same identifier, and determine the elevation of the target point according to the weighted sum of the elevation corresponding to the grid with the same identifier and the elevations of the grid objects of other target grids.
11. The method according to claim 10, wherein The step of determining the elevation and weight corresponding to the grid with the same identifier includes: If the grids with the same identifier are all grids of the same level, use the elevation of the grid with a high confidence level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of this grid; or, If the grids with the same identifier include grids of different levels, use the elevation of the grid with the lowest level as the elevation corresponding to the grids with the same identifier, and determine the weight corresponding to the grids with the same identifier according to the confidence level of this grid.
12. The method according to claim 8, characterized in that The step of determining the elevation of the target point according to the grid objects of the at least one target grid includes: Obtain the candidate elevation of the target point according to the grid objects of the at least one target grid; Determine the elevation of the target point by using the candidate elevation of the target point and the historical candidate elevation of the target point; the historical candidate elevation of the target point is the elevation obtained by using the grid query tree of the target area constructed from the point cloud data of the target area collected historically.
13. An electronic device, characterized in that, It includes: A processor and a memory; The processor is communicatively connected to the memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory to implement the method according to any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, Computer executable instructions are stored on the computer-readable storage medium, and when the computer executable instructions are executed by the processor, the method according to any one of claims 1-12 is implemented.
Citation Information
Patent Citations
Point cloud data processing method and device, electronic equipment and storage medium
CN113971221A
Transform-based point cloud geometric coding and decoding method
CN114422806A