Map data clustering method, device, equipment and storage medium
By acquiring and processing map data clusters and determining and building matching map data clusters, the problem of inaccurately distinguishing two arrows in the lane in the prior art is solved, and the accuracy and clustering effect of map data clusters are improved.
Patent Information
- Application Number
- CN202310595390.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-05-24
AI Technical Summary
When making high-precision maps for autonomous driving, the existing technology cannot accurately distinguish the two arrows in a lane, resulting in clustering errors.
By obtaining the target map data cluster, the first map object and the second map object are determined, and the first map data cluster and the second map data cluster are constructed under the condition of satisfying the length threshold, the error map object is eliminated, and the map data cluster is merged or split to improve accuracy.
It realizes the accurate distinction between arrows in a special scenario where two arrows are in one lane, improving the accuracy and clustering effect of map data clusters.
Smart Images

Figure CN116701967B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a map data clustering method, device, equipment and storage medium. Background Art
[0002] Nowadays, in order to create high-precision maps for autonomous driving, crowdsourcing maps are used to obtain photo data including arrows in lanes taken by sensors on vehicles while the vehicles are driving. The large amount of photo data obtained is then clustered to achieve the classification of arrows in lanes in the large amount of photo data.
[0003] However, in the related technology, due to the special scenario of two arrows in one lane and the inaccurate recognition of the type of arrow by the vehicle, the existing technology has clustering errors in the special scenario of two arrows in one lane and is unable to distinguish the two arrows in one lane. Summary of the Invention
[0004] This application provides a map data clustering method, device, equipment, and storage medium to at least solve the technical problem in related technologies of being unable to distinguish between two arrows in a lane. The technical solution of this application is as follows:
[0005] According to a first aspect of the present application, a map data clustering method is provided, comprising: obtaining a target map data cluster; the target map data cluster comprising a map data cluster obtained by clustering a map object set, wherein the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first threshold; determining a first map object and a second map object from the target map data cluster; wherein a first condition satisfied by the first map object comprises: a distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; and the second map object is a map object other than the first map object in the target map data cluster; constructing the first map object in the map data cluster as a first map data cluster, and constructing a second map data cluster based on the second map object in the map data cluster. Furthermore, if the lengths of both the first map data cluster and the second map data cluster are greater than the first length threshold, determining the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set.
[0006] Based on the above technical means, the present application can obtain a target map data cluster, determine a first map object and a second map object from the target map data cluster, construct a first map data cluster based on the first map object in the target map data cluster, and construct a second map data cluster based on the second map object in the map data cluster. Furthermore, if the lengths of both the first and second map data clusters exceed a first length threshold, the first and second map data clusters are determined as map data clusters in the clustering result of the map object set. In this way, by splitting the map data cluster obtained after clustering the map object set, and determining that the split is successful if the lengths of the first and second map data clusters after the split meet a certain threshold, the two split data clusters can be re-verified to ensure the accuracy of the split map data clusters. Furthermore, since the split first and second map data clusters correspond to two different arrow data clusters, in the special scenario of two arrows in a lane, it is possible to distinguish between the two arrows in a lane.
[0007] In one possible implementation, constructing the second map data cluster based on the second map object in the map data cluster includes: constructing the second map object in the map data cluster as an initial map data cluster; and deleting the third map object in the initial map data cluster to obtain the second map data cluster; wherein the second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
[0008] According to the above technical means, the present application can construct the second map object in the map data cluster as the initial map data cluster and delete the third map object in the initial map data cluster to obtain the second map data cluster. In this way, since the map objects in the clustered map data cluster should be close to each other, the second distance threshold and the second quantity threshold can be used to eliminate the erroneous map objects in the initial map data cluster, and the second map data cluster obtained will be more accurate.
[0009] In one possible implementation, the method further includes: clustering the map object set to obtain multiple map data clusters; determining a third map data cluster and a fourth map data cluster from the multiple map data clusters; wherein the third map data cluster and the fourth map data cluster satisfy a third condition including: the average elevation difference between the two map data clusters is within a preset range, and the overlapping area of the two map data clusters is greater than a first area threshold. Furthermore, the third map data cluster and the fourth map data cluster are merged to obtain a target map data cluster.
[0010] According to the above technical means, the present application can cluster a set of map objects to obtain multiple map data clusters; and then determine a third map data cluster and a fourth map data cluster from the multiple map data clusters. Furthermore, the third map data cluster and the fourth map data cluster are merged to obtain a target map data cluster. Thus, if the average elevation difference between two map data clusters is outside a preset range, it indicates that the two map data clusters are map data clusters of two different lanes. The average elevation difference between the two map data clusters in the multiple map data clusters is determined; and if the two map data clusters are determined to be in the same lane, it is determined whether the overlapping area of the two map data clusters is greater than a first area threshold. Thus, if the average elevation difference between the two map data clusters is within the preset range and the overlapping area of the two map data clusters is greater than the first area threshold, the two map data clusters are merged. This allows merging the multiple map data clusters obtained from the initial clustering of the acquired map objects, thereby improving clustering accuracy.
[0011] In one possible implementation, the method further includes: clustering the map object set to obtain multiple map data clusters; and determining a fifth map data cluster and a sixth map data cluster from the multiple map data clusters; wherein the fifth map data cluster and the sixth map data cluster satisfy a fourth condition including: the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the length of either map data cluster is greater than a second length threshold, and the distance between the two map data clusters is less than a third distance threshold. Furthermore, the fifth map data cluster and the sixth map data cluster are merged to obtain a target map data cluster.
[0012] Based on the above technical means, the present application can cluster a set of map objects to obtain multiple map data clusters; and then determine a fifth map data cluster and a sixth map data cluster from the multiple map data clusters. Furthermore, the fifth map data cluster and the sixth map data cluster are merged to obtain a target map data cluster. In this way, if the average elevation difference between the two map data clusters is within a preset range and the overlapping area of the two map data clusters is less than a first area threshold, and if the length of either map data cluster is greater than a second length threshold and the distance between the two map data clusters is less than a third distance threshold, the two map data clusters are merged, thus implementing another method for determining the target map data cluster.
[0013] In one possible embodiment, the method further includes: clustering the map object set to obtain multiple map data clusters; and determining a seventh map data cluster and an eighth map data cluster from the multiple map data clusters; wherein the seventh map data cluster and the eighth map data cluster satisfy a fifth condition including: the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of the two map data clusters are both less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, the distance between the two map data clusters is less than a fourth distance threshold, and the angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold. Furthermore, the seventh map data cluster and the eighth map data cluster are merged, and the resulting map data cluster is used as the map data cluster in the clustering result of the map object set.
[0014] According to the above technical means, the present application can obtain multiple map data clusters by clustering a map object set; determine a seventh map data cluster and an eighth map data cluster from the multiple map data clusters; merge the seventh map data cluster and the eighth map data cluster, and use the merged map data cluster as the map data cluster in the clustering result of the map object set. In this way, if the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of the two map data clusters are less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, if the distance between the two map data clusters is less than a fourth distance threshold, and the angle between the two map data clusters is less than a preset angle threshold, then the two map data clusters are merged. By determining the distance and angle between the two map data clusters, another method of merging two map data clusters is achieved.
[0015] According to a second aspect of the present application, a map data clustering apparatus is provided, comprising an acquiring unit, a determining unit, and a constructing unit. The acquiring unit is configured to acquire a target map data cluster, wherein the target map data cluster comprises a map data cluster obtained by clustering a map object set, wherein the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first threshold. The determining unit is configured to determine a first map object and a second map object from the target map data cluster, wherein a first condition satisfied by the first map object comprises: a distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; and the second map object is a map object other than the first map object in the target map data cluster. The constructing unit is configured to construct a first map data cluster from the first map object in the map data cluster, and to construct a second map data cluster from the second map object in the map data cluster. The determining unit is further configured to, when the lengths of both the first map data cluster and the second map data cluster are greater than the first threshold, determine the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set.
[0016] In a possible implementation, the construction unit is specifically configured to: construct the second map object in the map data cluster into an initial map data cluster; and delete the third map object in the initial map data cluster to obtain a second map data cluster; wherein the second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
[0017] In one possible embodiment, the apparatus further includes: a processing unit configured to cluster the map object set to obtain a plurality of map data clusters; a determining unit configured to determine a third map data cluster and a fourth map data cluster from the plurality of map data clusters; the third condition satisfied by the third map data cluster and the fourth map data cluster comprising: an average elevation difference between the two map data clusters being within a preset range, and an overlapping area between the two map data clusters being greater than a first area threshold; and the processing unit configured to merge the third map data cluster and the fourth map data cluster to obtain a target map data cluster.
[0018] In one possible embodiment, the apparatus further includes: a processing unit configured to perform clustering processing on the map object set to obtain a plurality of map data clusters; a determining unit configured to determine a fifth map data cluster and a sixth map data cluster from the plurality of map data clusters; wherein the fourth condition satisfied by the fifth map data cluster and the sixth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, a length of any one of the two map data clusters is greater than a second length threshold, and a distance between the two map data clusters is less than a third distance threshold; and the processing unit further configured to merge the fifth map data cluster and the sixth map data cluster to obtain a target map data cluster.
[0019] In one possible embodiment, the apparatus further includes: a processing unit configured to cluster the map object set to obtain a plurality of map data clusters; a determining unit configured to determine a seventh map data cluster and an eighth map data cluster from the plurality of map data clusters; wherein the fifth condition satisfied by the seventh map data cluster and the eighth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range; an overlapping area of the two map data clusters is less than a first area threshold; lengths of the two map data clusters are both less than a second length threshold, or a distance between the two map data clusters is greater than a third distance threshold; the distance between the two map data clusters is less than a fourth distance threshold; an angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold; the processing unit further configured to merge the seventh map data cluster and the eighth map data cluster; and the determining unit further configured to use the merged map data cluster as the map data cluster in the clustering result of the map object set.
[0020] According to the third aspect provided by the present application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation method thereof.
[0021] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device is enabled to execute the method in the above-mentioned first aspect and any possible implementation method thereof.
[0022] According to the fifth aspect provided by the present application, a computer program product is provided, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation method thereof.
[0023] It should be noted that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.
[0024] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0025] Therefore, the above technical features of this application have the following beneficial effects:
[0026] (1) The map data cluster obtained after clustering the map object set is split, and the split is determined to be successful if the lengths of the first map data cluster and the second map data cluster obtained after the split meet the conditions. The two split data clusters can be re-checked to ensure the accuracy of the split map data clusters. In addition, since the first map data cluster and the second map data cluster obtained after the split correspond to two different arrow data clusters, in the special scenario of two arrows in one lane, it is possible to distinguish the two arrows in one lane.
[0027] (2) The second map object in the map data cluster is constructed as an initial map data cluster, and the third map object in the initial map data cluster is deleted to obtain a second map data cluster. In this way, since the map objects in the clustered map data cluster should be close to each other, the error map objects in the initial map data cluster can be eliminated by using the second distance threshold and the second quantity threshold, and the second map data cluster obtained will be more accurate.
[0028] (3) A plurality of map data clusters are obtained by clustering the map object set; and a third map data cluster and a fourth map data cluster are determined from the plurality of map data clusters. Further, the third map data cluster and the fourth map data cluster are merged to obtain a target map data cluster. In this way, if the average elevation difference between two map data clusters is outside a preset range, it indicates that the two map data clusters are map data clusters of two different lanes, and the average elevation difference between the two map data clusters in the plurality of map data clusters is determined; and when it is determined that the two map data clusters are in the same lane, it is determined whether the overlapping area of the two map data clusters is greater than a first area threshold. In this way, when the average elevation difference between the two map data clusters is within a preset range and the overlapping area of the two map data clusters is greater than the first area threshold, the two map data clusters are merged, thereby merging the plurality of map data clusters obtained by the initial clustering of the acquired map objects, thereby improving the accuracy of clustering.
[0029] (4) A plurality of map data clusters are obtained by clustering the map object set; and a fifth map data cluster and a sixth map data cluster are determined from the plurality of map data clusters. Further, the fifth map data cluster and the sixth map data cluster are merged to obtain a target map data cluster. In this way, when the average elevation difference between the two map data clusters is within a preset range and the overlapping area of the two map data clusters is less than a first area threshold, if the length of any one of the two map data clusters is greater than a second length threshold and the distance between the two map data clusters is less than a third distance threshold, the two map data clusters are merged, thereby realizing another method for determining the target map data cluster.
[0030] (5) A plurality of map data clusters are obtained by clustering the map object set; a seventh map data cluster and an eighth map data cluster are determined from the plurality of map data clusters; the seventh map data cluster and the eighth map data cluster are merged, and the map data cluster obtained by the merged process is used as the map data cluster in the clustering result of the map object set. In this way, when the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of the two map data clusters are less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, if the distance between the two map data clusters is less than a fourth distance threshold, and the angle between the two map data clusters is less than a preset angle threshold, the two map data clusters are merged. By judging the distance and angle between the two map data clusters, another method of merging two map data clusters is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0032] Figure 1 is a flowchart of a map data clustering method according to an exemplary embodiment;
[0033] Figure 2 is a flowchart of another map data clustering method according to an exemplary embodiment;
[0034] Figure 3 is a flowchart of another map data clustering method according to an exemplary embodiment;
[0035] Figure 4 is a flowchart of another map data clustering method according to an exemplary embodiment;
[0036] Figure 5is a flowchart of another map data clustering method according to an exemplary embodiment;
[0037] Figure 6 is a flowchart of another map data clustering method according to an exemplary embodiment;
[0038] Figure 7 is a block diagram of a map data clustering device according to an exemplary embodiment;
[0039] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0040] In order to enable ordinary people in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0041] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0042] For ease of understanding, the map data clustering method provided in this application is specifically introduced below with reference to the accompanying drawings.
[0043] Figure 1 is a flow chart showing a map data clustering method according to an exemplary embodiment. Figure 1 As shown, the map data clustering method includes the following steps:
[0044] S101: The electronic device obtains the number of map objects corresponding to the same timestamp in a map data cluster obtained after clustering a set of map objects.
[0045] The map objects include arrows in the vehicle's lane. Each map object includes a timestamp when the map object is acquired. A density-based spatial clustering (DBSCAN) process is performed on the map object set to obtain multiple map data clusters.
[0046] As a possible implementation manner, the electronic device calculates the number of map objects corresponding to the same timestamp in a map data cluster obtained after clustering the map object set, and obtains the number of map objects corresponding to multiple different timestamps.
[0047] For example, the map object may be an arrow in the vehicle's driving lane.
[0048] S102: If the number of map objects corresponding to any time stamp in the map data cluster is greater than a first quantity threshold, the electronic device determines the map data cluster as a target map data cluster.
[0049] As a possible implementation manner, the electronic device determines whether the number of map objects corresponding to a plurality of different time stamps in the map data cluster is greater than a first number threshold.
[0050] If the number of map objects corresponding to any time stamp in the map data cluster is greater than a first quantity threshold, the electronic device determines the map data cluster as a target map data cluster.
[0051] If there is no map object with a timestamp in the map data cluster and the number of the map objects corresponding to the timestamp is greater than the first threshold, the electronic device determines the map data cluster as a non-target map data cluster.
[0052] For example, if the first quantity threshold is 2, and the number of map objects corresponding to a timestamp in the map data cluster is 3, the electronic device determines that the map data cluster is the target map data cluster.
[0053] S103: The electronic device obtains a target map data cluster.
[0054] The target map data cluster includes a map data cluster obtained by clustering the map object set, and the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first number threshold.
[0055] S104: The electronic device determines a first map object and a second map object from the target map data cluster.
[0056] The first condition satisfied by the first map object includes: the distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; and the second map object is a map object in the target map data cluster other than the first map object.
[0057] As one possible implementation, the electronic device calculates distances between a map object in a target map data cluster and other map objects in the target map data cluster other than the map object, obtaining multiple distances. If a first distance threshold exists among the multiple distances, the electronic device determines the map object as a first map object and determines the map objects in the target map data cluster other than the first map object as second map objects.
[0058] For example, the first distance threshold is 0.1, and there are three map objects in the target map data cluster. If the distances between one of the map objects in the target map data cluster and the other two map objects are 0.2 and 0.05, respectively, the electronic device determines the map object as the first map object. If the distances between one of the map objects in the target map data cluster and the other two map objects are 0.2 and 0.3, respectively, the electronic device determines the map object as the second map object.
[0059] S105: The electronic device constructs the first map object in the map data cluster into a first map data cluster.
[0060] The first map data cluster includes the first map object in the target map data cluster.
[0061] S106: The electronic device constructs a second map data cluster according to the second map object in the map data cluster.
[0062] The second map data cluster includes the second map object in the target map data cluster.
[0063] S107: The electronic device determines whether the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold.
[0064] As a possible implementation manner, the electronic device determines the length of the first map data cluster according to the length of each map object in the first map data cluster.
[0065] The electronic device determines the length of the second map data cluster according to the length of each map object in the second map data cluster.
[0066] The electronic device determines whether the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold.
[0067] For example, if the first length threshold is 3, and the length of the first map data cluster is 4 and the length of the second map data cluster is 5, the electronic device determines that the lengths of the first map data cluster and the second map data cluster are both greater than the first length threshold; if the length of the first map data cluster is 2 and the length of the second map data cluster is 5, the electronic device determines that the lengths of the first map data cluster and the second map data cluster are both greater than the first length threshold.
[0068] S108: When the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold, the electronic device determines the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set.
[0069] In actual application, when the length of either the first map data cluster or the second map data cluster is less than the first length threshold, the electronic device determines the target map data cluster as the map data cluster in the clustering result of the map object set.
[0070] As can be understood, the technical solution provided by the embodiments of the present application obtains a target map data cluster, determines a first map object and a second map object from the target map data cluster, constructs the first map object in the target map data cluster into a first map data cluster, and constructs a second map data cluster based on the second map object in the map data cluster. Furthermore, if the lengths of both the first and second map data clusters exceed a first length threshold, the first and second map data clusters are determined as map data clusters in the clustering result of the map object set. In this way, by splitting the map data cluster obtained after clustering the map object set, and determining that the split is successful if the lengths of the first and second map data clusters after the split meet a certain threshold, the two split data clusters can be re-verified to ensure the accuracy of the split map data clusters. Furthermore, since the split first and second map data clusters correspond to two different arrow data clusters, in the special scenario of two arrows in a lane, it is possible to distinguish between the two arrows in the same lane.
[0071] In some embodiments, in order to ensure the accuracy of obtaining the second map data cluster, and further ensure the accuracy of splitting the target map data cluster, as shown in FIG. Figure 2 As shown, in the map data clustering method provided in the embodiment of the present application, the above S106 includes the following steps:
[0072] S201: The electronic device constructs a second map object in a map data cluster into an initial map data cluster.
[0073] The initial map data cluster includes a plurality of second map objects of the target map data cluster.
[0074] S202: The electronic device determines a third map object from the initial map data cluster.
[0075] The second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than or equal to a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
[0076] As one possible implementation, the electronic device calculates distances between one of the map objects in the initial map data cluster and other map objects to obtain multiple distances. If the number of the multiple distances that are less than a second distance threshold is less than or equal to a second number threshold, the electronic device determines the map object as the third map object.
[0077] Exemplarily, the second quantity threshold is 2, and the second distance threshold is 0.1; an initial map data cluster includes five map objects. If a map object in the initial map data cluster has distances from other map objects of 0.1, 0.05, 0.04, and 0.2, respectively, the electronic device determines the map object as the third map object; if a map object in the initial map data cluster has distances from other map objects of 0.1, 0.05, 0.04, and 0.08, respectively, the electronic device does not determine the map object as the third map object.
[0078] S203: The electronic device deletes the third map object in the initial map data cluster to obtain a second map data cluster.
[0079] Exemplarily, the second quantity threshold is 2, and the second distance threshold is 0.1; an initial map data cluster includes five map objects. If a map object in the initial map data cluster has distances from other map objects of 0.1, 0.05, 0.04, and 0.2, respectively, the electronic device deletes the map object from the initial map data cluster; if a map object in the initial map data cluster has distances from other map objects of 0.1, 0.05, 0.04, and 0.08, respectively, the electronic device retains the map object in the initial map data cluster.
[0080] It will be appreciated that the technical solution provided in the embodiments of the present application constructs the second map object in the map data cluster as the initial map data cluster and deletes the third map object in the initial map data cluster to obtain the second map data cluster. Thus, since the map objects in the clustered map data cluster should be close to each other, the second distance threshold and the second quantity threshold can be used to eliminate the erroneous map objects in the initial map data cluster, resulting in a more accurate second map data cluster.
[0081] In some embodiments, in order to obtain the target map data cluster, such as Figure 3 As shown, the map data clustering method provided in the embodiment of the present application further includes the following steps:
[0082] S301: The electronic device performs clustering processing on a map object set to obtain a plurality of map data clusters.
[0083] As a possible implementation manner, the electronic device performs DBSCAN clustering processing on the map object set to obtain multiple map data clusters.
[0084] S302: The electronic device determines a third map data cluster and a fourth map data cluster from a plurality of map data clusters.
[0085] The third condition satisfied by the third map data cluster and the fourth map data cluster includes: the average elevation difference between the two map data clusters is within a preset range, and the overlapping area of the two map data clusters is greater than a first area threshold.
[0086] As a possible implementation manner, the electronic device obtains a geometric polygon object of each map data cluster in the multiple map data clusters.
[0087] The electronic device calculates the average elevation of each map data cluster based on the elevations of all map objects in each map data cluster. Furthermore, the electronic device calculates a plurality of average elevations corresponding to each map data cluster.
[0088] The electronic device calculates the average elevation difference between two map data clusters among the plurality of map data clusters according to the average elevations of the two map data clusters.
[0089] The electronic device determines whether an average elevation difference between two map data clusters among a plurality of map data clusters is within a preset range.
[0090] When the average elevation difference between two map data clusters among the multiple map data clusters is within a preset range, the electronic device calculates the overlapping area of the two map data clusters according to the polygon objects of the two map data clusters.
[0091] The electronic device determines whether the overlapping area is greater than a first area threshold.
[0092] When the average elevation difference between two map data clusters among the multiple map data clusters is within a preset range and the overlapping area is greater than a first area threshold, the electronic device determines that the two map data clusters are the third map data cluster and the fourth map data cluster, respectively.
[0093] It should be noted that the polygon object is a polygon vector object corresponding to the map data cluster.
[0094] The following describes a method for an electronic device to determine whether the average elevation difference between two map data clusters among a plurality of map data clusters is within a preset range with reference to a specific example.
[0095] Illustratively, the preset range is 0-5 meters. If the average elevation difference between two of the multiple map data clusters is 4 meters, the electronic device determines that the average elevation difference between the two of the multiple map data clusters is within the preset range.
[0096] The following describes a method for an electronic device to determine whether the overlapping area is greater than the first area threshold with reference to a specific example.
[0097] Exemplarily, the electronic device calculates that the overlapping area of the two map data clusters is 0.5, and the first area threshold is 0.3. The electronic device determines whether the overlapping area of the two map data clusters is greater than the first area threshold.
[0098] In practical applications, the above overlapping area can also be called the covering area.
[0099] S303: The electronic device merges the third map data cluster and the fourth map data cluster to obtain a target map data cluster.
[0100] The target map data cluster includes a plurality of map data clusters obtained by merging map objects in the third map data cluster and map objects in the fourth map data cluster.
[0101] It will be appreciated that the technical solution provided in the embodiments of the present application clusters a set of map objects to obtain multiple map data clusters; then determines a third map data cluster and a fourth map data cluster from the multiple map data clusters. Furthermore, the third map data cluster and the fourth map data cluster are merged to obtain a target map data cluster. Thus, if the average elevation difference between two map data clusters is outside a preset range, it indicates that the two map data clusters are map data clusters for two different lanes. The average elevation difference between the two map data clusters in the multiple map data clusters is determined; and if the two map data clusters are determined to be in the same lane, the overlapping area of the two map data clusters is determined to be greater than a first area threshold. Thus, if the average elevation difference between the two map data clusters is within the preset range and the overlapping area between the two map data clusters is greater than the first area threshold, the two map data clusters are merged. This allows merging the multiple map data clusters obtained from the initial clustering of the acquired map objects, thereby improving clustering accuracy.
[0102] In some embodiments, in order to obtain the target map data cluster, such as Figure 4 As shown, the map data clustering method provided in the embodiment of the present application further includes the following steps:
[0103] S401: The electronic device performs clustering processing on a map object set to obtain a plurality of map data clusters.
[0104] As a possible implementation manner, the electronic device performs density-based spatial clustering of applications with noise (DBSCAN) processing on the map object set to obtain multiple map data clusters.
[0105] S402: The electronic device determines a fifth map data cluster and a sixth map data cluster from a plurality of map data clusters.
[0106] The fourth condition satisfied by the fifth map data cluster and the sixth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, a length of any one of the two map data clusters is greater than a second length threshold, a distance between the two map data clusters is less than a third distance threshold, and the distance between the two map data clusters is the minimum distance between the two map data clusters.
[0107] As a possible manner, the electronic device obtains a polygon object and an average elevation of each map data cluster in the plurality of map data clusters.
[0108] The electronic device calculates the average elevation difference between two map data clusters among the plurality of map data clusters according to the average elevations of the two map data clusters.
[0109] The electronic device determines whether an average elevation difference between two map data clusters among a plurality of map data clusters is within a preset range.
[0110] When the average elevation difference between two map data clusters among the multiple map data clusters is within a preset range, the electronic device calculates the overlapping area of the two map data clusters according to the polygon objects of the two map data clusters.
[0111] The electronic device determines whether the overlapping area is greater than a first area threshold.
[0112] When the average elevation difference between two of the multiple map data clusters is within a preset range and the overlapping area is less than a first area threshold, the electronic device calculates the length of one of the map data clusters based on the lengths of all map objects in the one of the map data clusters. Furthermore, the electronic device calculates the length of another of the map data clusters.
[0113] The electronic device determines the coordinate information of the closest map objects in the two map data clusters and calculates the minimum distance between the two map data clusters according to the coordinate information of the two map objects and a Euclidean distance calculation formula.
[0114] When the average elevation difference between two map data clusters among the multiple map data clusters is within a preset range and the overlapping area is less than a first area threshold, the electronic device determines whether the length of any one of the two map data clusters is greater than a second length threshold, and determines whether the minimum distance between the two map data clusters is less than a third distance threshold.
[0115] When the average elevation difference between two map data clusters among the multiple map data clusters is within a preset range, the overlapping area is less than a first area threshold, the length of one of the two map data clusters is greater than a second length threshold, and the minimum distance between the two map data clusters is less than a third distance threshold, the electronic device determines the two map data clusters as the fifth map data cluster and the sixth map data cluster, respectively.
[0116] The following describes, with reference to specific examples, how the electronic device determines whether one of the two lengths is greater than the second length threshold, and determines whether the minimum distance between two map data clusters is less than the third distance threshold.
[0117] Exemplarily, the above two lengths are represented by L1 and L2 respectively. If the second length threshold is 3 meters, if L1 is 2 meters and L2 is 3.5 meters, the electronic device determines that one of the above two lengths is greater than the second length threshold; if the second length threshold is 3 meters, if L1 is 2 meters and L2 is 2.5 meters, the electronic device determines that neither of the above two lengths is greater than the second length threshold.
[0118] The third distance threshold is 0.5. If the minimum distance between the two map data clusters is 0.4, the electronic device determines that the minimum distance between the two map data clusters is less than the third distance threshold. If the minimum distance between the two map data clusters is 0.8, the electronic device determines that the minimum distance between the two map data clusters is greater than the third distance threshold.
[0119] S403: The electronic device merges the fifth map data cluster and the sixth map data cluster to obtain a target map data cluster.
[0120] The target map data cluster includes a plurality of map data clusters obtained by merging map objects in the fifth map data cluster and map objects in the sixth map data cluster.
[0121] It will be appreciated that the technical solution provided in the embodiments of the present application clusters a set of map objects to obtain multiple map data clusters; then determines a fifth map data cluster and a sixth map data cluster from the multiple map data clusters. Furthermore, the fifth map data cluster and the sixth map data cluster are merged to obtain a target map data cluster. Thus, if the average elevation difference between the two map data clusters is within a preset range and the overlapping area of the two map data clusters is less than a first area threshold, and if the length of either map data cluster is greater than a second length threshold and the distance between the two map data clusters is less than a third distance threshold, the two map data clusters are merged, thus implementing another method for determining a target map data cluster.
[0122] In some embodiments, in order to perform a re-merging process on the multiple map data clusters obtained by clustering the map object set, as shown in FIG. Figure 5 As shown, the map data clustering method provided in the embodiment of the present application further includes the following steps:
[0123] S501: The electronic device performs clustering processing on a map object set to obtain a plurality of map data clusters.
[0124] S502: The electronic device determines a seventh map data cluster and an eighth map data cluster from a plurality of map data clusters.
[0125] Among them, the fifth condition satisfied by the seventh map data cluster and the eighth map data cluster includes: the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of the two map data clusters are less than a second length threshold or the distance between the two map data clusters is greater than a third distance threshold, the distance between the two map data clusters is less than a fourth distance threshold, the angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold.
[0126] As a possible implementation manner, when the average elevation difference between two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of both map data clusters are less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, the electronic device calculates the angle and distance between the two map data clusters, and determines whether the angle between the two map data clusters is less than a preset angle threshold, and determines whether the distance between the two map data clusters is less than a fourth distance threshold.
[0127] When the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of the two map data clusters are less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, and when the angle between the two map data clusters is less than a preset angle threshold, and the distance between the two map data clusters is less than a fourth distance threshold, the electronic device determines the two map data clusters as the seventh data cluster and the eighth data cluster, respectively.
[0128] The following describes how to calculate the angle between two map data clusters:
[0129] The electronic device obtains the centroid coordinates of the two map data clusters respectively, and determines a connecting line between the two centroid coordinates, where the centroid connecting line is represented by L12.
[0130] The electronic device determines the longer length of the two map data clusters, L1 and L2.
[0131] If the longer of the two map data clusters is L1, the electronic device determines the angle between L1 and L12 as the angle between the two map data clusters; if the longer of the two map data clusters is L2, the electronic device determines the angle between L2 and L12 as the angle between the two map data clusters.
[0132] The electronic device calculates the angle formed by L1 and L12, or L2 and L12.
[0133] Exemplarily, the preset angle threshold is 30 degrees, and the fourth distance threshold is 3 meters; when the average elevation difference between the two map data clusters is within the preset range, the overlapping area of the two map data clusters is less than the first area threshold, the lengths of the two map data clusters are less than the second length threshold, or the distance between the two map data clusters is greater than the third distance threshold, if the angle between the two map data clusters is 20 degrees and the distance between the two map data clusters is 2.5 meters, the two map data clusters are respectively determined as the seventh data cluster and the eighth data cluster.
[0134] S503: The electronic device merges the seventh map data cluster and the eighth map data cluster.
[0135] S504: The electronic device uses the map data cluster obtained by the merging process as a map data cluster in the clustering result of the map object set.
[0136] It can be understood that the technical solution provided in the embodiments of the present application obtains multiple map data clusters by clustering a map object set; determines a seventh map data cluster and an eighth map data cluster from the multiple map data clusters; merges the seventh map data cluster and the eighth map data cluster, and uses the merged map data cluster as the map data cluster in the clustering result of the map object set. Thus, if the average elevation difference between the two map data clusters is within a preset range, the overlapping area of the two map data clusters is less than a first area threshold, the lengths of both map data clusters are less than a second length threshold, or the distance between the two map data clusters is greater than a third distance threshold, the two map data clusters are merged if the distance between the two map data clusters is less than a fourth distance threshold, and the angle between the two map data clusters is less than a preset angle threshold. By determining the distance and angle between the two map data clusters, another method for merging two map data clusters is achieved.
[0137] Figure 6 FIG. 1 is a flow chart showing a map data clustering method in an actual application process according to an exemplary embodiment. Figure 6 As shown, the map data clustering method includes the following steps:
[0138] S601: The electronic device clusters map objects to obtain multiple map data clusters.
[0139] In actual application, multiple map data clusters are stored in the data list list_data_features.
[0140] S602: The electronic device obtains a geometric polygon object, a maximum elevation value, a minimum elevation value, and an average elevation of each map data cluster in a plurality of map data clusters, and stores the obtained information of each map data cluster.
[0141] In actual application, the electronic device loops through the data list list_data_features, obtains the polygon object, maximum elevation value, minimum elevation value, and average elevation of each map data cluster in the multiple map data clusters, and stores the obtained information of each map data cluster in the data list group_merge_count.
[0142] S603: The electronic device obtains two map data clusters from the plurality of map data clusters.
[0143] In actual application, the electronic device loops through the data list group_merge_count to obtain a map data cluster i and a map data cluster j from the plurality of map data clusters.
[0144] The map data cluster i and the map data cluster j are any two map data clusters among the multiple map data clusters.
[0145] S604: The electronic device calculates an average elevation difference between two map data clusters.
[0146] In actual application, the electronic device calculates the average elevation difference between the map data cluster i and the map data cluster j.
[0147] S605: The electronic device determines whether the average elevation difference between two map data clusters is less than 5 meters.
[0148] In actual application, the electronic device determines whether the average elevation difference between the map data cluster i and the map data cluster j is less than 5 meters.
[0149] S606: When the average elevation difference between two map data clusters is greater than or equal to 5 meters, the electronic device obtains the other two map data clusters from the multiple map data clusters.
[0150] In actual application, when the average elevation difference between map data cluster i and map data cluster j is greater than or equal to 5 meters, the electronic device loops through the data list group_merge_count and obtains map data cluster m and map data cluster n from the multiple map data clusters.
[0151] The map data cluster m and the map data cluster n are map data clusters other than the map data cluster i and the map data cluster j among the plurality of map data clusters.
[0152] S607: When the average elevation difference between the two map data clusters is less than 5 meters, the electronic device calculates the overlapping area of the two map data clusters.
[0153] In actual application, when the average elevation difference between the map data cluster i and the map data cluster j is less than 5 meters, the electronic device calculates the overlapping area of the map data cluster i and the map data cluster j.
[0154] S608: When the average elevation difference between the two map data clusters is less than 5 meters, the electronic device determines whether the overlapping area of the two map data clusters is greater than 0.5.
[0155] In actual application, when the average elevation difference between the map data cluster i and the map data cluster j is less than 5 meters, the electronic device determines whether the overlapping area between the map data cluster i and the map data cluster j is greater than 0.5.
[0156] S609: When the average elevation difference between the two map data clusters is less than 5 meters and the overlapping area of the two map data clusters is greater than 0.5, the electronic device merges the two map data clusters, stores the merged map data cluster, and sets an identifier as a target identifier.
[0157] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters and the overlapping area between map data cluster i and map data cluster j is greater than 0.5, the electronic device merges map data cluster i and map data cluster j, stores the merged map data cluster in list_cluster, and sets the flag is_ok=true.
[0158] S610: When the average elevation difference between the two map data clusters is less than 5 meters and the overlapping area of the two map data clusters is less than or equal to 0.5, the electronic device calculates the length of one of the two map data clusters, the length of the other map data cluster, and the distance between the two map data clusters.
[0159] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters and the overlapping area of map data cluster i and map data cluster j is less than or equal to 0.5, the electronic device calculates the length L1 of map data cluster i and the length L2 of map data cluster j, as well as the distance D between map data cluster i and map data cluster j.
[0160] S611: When the average elevation difference between the two map data clusters is less than 5 meters and the overlapping area of the two map data clusters is less than or equal to 0.5, if the length of any one of the two map data clusters is greater than 3 meters and the distance between the two map data clusters is less than 0.5 meters, the electronic device merges the two map data clusters, stores the merged map data cluster, and sets an identifier as a target identifier.
[0161] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters and the overlapping area between map data cluster i and map data cluster j is less than or equal to 0.5, if the length of L1 or L2 is greater than 3 meters and the distance D is less than 0.5 meters, the electronic device merges map data cluster i and map data cluster j, stores the merged map data cluster in list_cluster, and sets the flag is_ok=true.
[0162] S612: When the average elevation difference between the two map data clusters is less than 5 meters, the overlapping area is less than or equal to 0.5, and the lengths of the two map data clusters are both less than 3 meters or the distance between the two map data clusters is greater than 0.5 meters, the electronic device calculates the angle between the two map data clusters.
[0163] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters, the overlapping area of map data cluster i and map data cluster j is less than or equal to 0.5, and the lengths of L1 and L2 are both less than 3 meters, or the distance D is greater than 0.5 meters, the electronic device calculates the angle between the line connecting the centroids of the two map data clusters and the longer map data cluster.
[0164] S613: When the average elevation difference between the two map data clusters is less than 5 meters, the overlapping area is less than or equal to 0.5, and the lengths of the two map data clusters are both less than 3 meters or the distance D is greater than 0.5 meters, if the angle between the two map data clusters is less than 30 degrees and the distance D is less than 3 meters, the electronic device merges the two map data clusters, stores the merged map data cluster, and sets an identifier as a non-target identifier.
[0165] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters, the overlapping area of map data cluster i and map data cluster j is less than or equal to 0.5, and the lengths of L1 and L2 are both less than 3 meters, or the distance D is greater than 0.5 meters, if the angle between the centroids of the two map data clusters and the longer map data cluster is less than 30 degrees, and the distance D is less than 3 meters, the electronic device merges map data cluster i and map data cluster j, stores the merged map data cluster in list_cluster, and sets the flag is_ok=false.
[0166] S614: If the average elevation difference between the two map data clusters is less than 5 meters, the overlapping area is less than or equal to 0.5, and the lengths of the two map data clusters are both less than 3 meters or the distance between the two map data clusters is greater than 0.5 meters, and if the angle between the two map data clusters is greater than or equal to 30 degrees and the distance between the two map data clusters is greater than or equal to 3 meters, the electronic device obtains the other two map data clusters from the multiple map data clusters.
[0167] In actual application, when the average elevation difference between map data cluster i and map data cluster j is less than 5 meters, the overlapping area of map data cluster i and map data cluster j is less than or equal to 0.5, and the lengths of L1 and L2 are both less than 3 meters, or the distance D is greater than 0.5 meters, if the angle between the centroids of the two map data clusters and the longer map data cluster is greater than or equal to 30 degrees, and the distance D is greater than or equal to 3 meters, the electronic device loops through the data list group_merge_count to obtain map data cluster m and map data cluster n from the multiple map data clusters.
[0168] S615: The electronic device determines whether the identifier of the merged map data cluster is a target identifier.
[0169] In actual application, the electronic device determines whether the identifier of the map data cluster obtained by merging in list_cluster is is_ok=true.
[0170] S616: When the identifier of the merged map data cluster is the target identifier, the electronic device calculates a timestamp list of all map objects in the merged map data cluster, and calculates the maximum number of map objects corresponding to the same timestamp in the timestamp list.
[0171] In actual application, when is_ok=true in list_cluster, the electronic device calculates a timestamp list of all map objects in the merged map data cluster, and calculates the maximum number of map objects corresponding to the same timestamp in the timestamp list.
[0172] S617: When the maximum number of map objects corresponding to the same timestamp in the timestamp list is greater than 2, the electronic device splits the map data cluster obtained by merging.
[0173] S618: The electronic device defines a collection for temporary storage and a list for storing the split map data clusters.
[0174] In actual application, the electronic device defines the sets current_id and a_time_car for temporary storage, and the list cluster_a for storing the split map data clusters.
[0175] S619: The electronic device obtains the first map object in the merged map data cluster, obtains the next map object, and calculates the distance between the two map objects. If the distance is less than 0.1, the first object is constructed as the first map data cluster. This process continues until all map objects are compared one by one with other map objects to obtain a final first map data cluster.
[0176] In actual application, the electronic device obtains the first map object in list_cluster, loops list_cluster, obtains the next map object, and calculates the distance between the two map objects; if the distance is less than 0.1, the first object is stored in cluster_a, until all map objects are compared one by one with other map objects, and the final cluster_a is obtained.
[0177] S620: The electronic device constructs the second map object in the map data cluster into an initial map data cluster.
[0178] In actual application, the electronic device stores the map data cluster obtained by subtracting cluster_a from list_cluster in cluster_b.
[0179] S621: The electronic device deletes the third map object in the initial map data cluster to obtain a second map data cluster.
[0180] In actual application, the electronic device calculates the distance between any two map objects in cluster_b. If the number of map objects with a distance less than 0.1 between one of the map objects and the other is greater than 2, the map object is retained in cluster_b. Otherwise, the map object is identified as an error point and deleted from cluster_b. Ultimately, two data lists, cluster_a and cluster_b, are obtained.
[0181] S622: The electronic device determines whether the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold.
[0182] The electronic device determines whether the lengths of the two data lists, cluster_a and cluster_b, are both greater than 3.
[0183] S623: When the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold, the electronic device determines the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set.
[0184] In actual application, when the lengths of the two data lists cluster_a and cluster_b are both greater than 3, the electronic device stores the two data lists cluster_a and cluster_b in the list_ret_data list.
[0185] It should be noted that the list_ret_data list includes map data clusters in the clustering results of the map object set.
[0186] S624: If the identifier of the merged map data cluster is not the target identifier, the maximum number of map objects corresponding to the same timestamp in the timestamp list is less than or equal to 2, and the length of one of the first map data cluster and the second map data cluster is less than 3, the electronic device determines the merged map data cluster as a map data cluster in the clustering result of the map object set.
[0187] In actual application, when the flag of the map data cluster obtained by merging in list_cluster is is_ok=false, the maximum number of map objects corresponding to the same timestamp in the timestamp list is less than or equal to 2, and the lengths of the two data lists cluster_a and cluster_b are less than 3, the electronic device stores the map data cluster obtained by merging in the list_cluster data list in the list_ret_data list.
[0188] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the map data clustering device or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0189] The embodiments of the present application can, according to the above method, exemplarily divide the functional modules of the map data clustering device or electronic device. For example, the map data clustering device or electronic device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0190] Figure 7 FIG. 1 is a block diagram of a map data clustering device according to an exemplary embodiment. Figure 7 The map data clustering device 700 includes: an acquisition unit 701, a determination unit 702 and a construction unit 703.
[0191] The acquisition unit 701 is configured to acquire a target map data cluster; the target map data cluster comprises a map data cluster obtained by clustering a map object set, and the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first threshold.
[0192] A determining unit 702 is configured to determine a first map object and a second map object from a target map data cluster. The first map object satisfies a first condition including: a distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; and the second map object is a map object in the target map data cluster other than the first map object.
[0193] The constructing unit 703 is configured to construct the first map object in the map data cluster into a first map data cluster, and to construct a second map data cluster according to the second map object in the map data cluster.
[0194] The determining unit 702 is further configured to determine the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set when the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold.
[0195] Optionally, the constructing unit 703 provided in the embodiment of the present application is specifically configured to construct the second map object in the map data cluster into an initial map data cluster.
[0196] The third map object in the initial map data cluster is deleted to obtain a second map data cluster; the second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
[0197] Optionally, the map data clustering device 700 provided in the embodiment of the present application further includes: a processing unit 704.
[0198] The processing unit 704 is configured to perform clustering processing on the map object set to obtain a plurality of map data clusters.
[0199] The determining unit 702 is further configured to determine a third map data cluster and a fourth map data cluster from the plurality of map data clusters; the third map data cluster and the fourth map data cluster satisfying a third condition including: an average elevation difference between the two map data clusters being within a preset range, and an overlapping area between the two map data clusters being greater than a first area threshold.
[0200] The processing unit 704 is further configured to merge the third map data cluster and the fourth map data cluster to obtain a target map data cluster.
[0201] Optionally, the map data clustering device 700 provided in the embodiment of the present application further includes: a processing unit 704.
[0202] The processing unit 704 is configured to perform clustering processing on the map object set to obtain a plurality of map data clusters.
[0203] The determining unit 702 is further configured to determine a fifth map data cluster and a sixth map data cluster from the plurality of map data clusters; the fourth condition satisfied by the fifth map data cluster and the sixth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range; an overlapping area of the two map data clusters is less than a first area threshold; a length of either map data cluster is greater than a second length threshold; and a distance between the two map data clusters is less than a third distance threshold.
[0204] The processing unit 704 is further configured to merge the fifth map data cluster and the sixth map data cluster to obtain a target map data cluster.
[0205] Optionally, the map data clustering device 700 provided in the embodiment of the present application further includes: a processing unit 704.
[0206] The processing unit 704 is configured to perform clustering processing on the map object set to obtain a plurality of map data clusters.
[0207] The determining unit 702 is further configured to determine a seventh map data cluster and an eighth map data cluster from the plurality of map data clusters; the fifth condition satisfied by the seventh map data cluster and the eighth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range; an overlapping area of the two map data clusters is less than a first area threshold; the lengths of the two map data clusters are both less than a second length threshold or the distance between the two map data clusters is greater than a third distance threshold; the distance between the two map data clusters is less than a fourth distance threshold; and an angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold.
[0208] The processing unit 704 is further configured to merge the seventh map data cluster and the eighth map data cluster.
[0209] The determining unit 702 is further configured to use the map data cluster obtained by the merging process as a map data cluster in the clustering result of the map object set.
[0210] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0211] Figure 8 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 8As shown, the electronic device 800 includes but is not limited to: a processor 801 and a memory 802 .
[0212] The memory 802 is used to store executable instructions of the processor 801. It is understandable that the processor 801 is configured to execute instructions to implement the map data clustering method in the above embodiment.
[0213] It should be noted that those skilled in the art can understand that Figure 8 The electronic device structure shown in the figure does not limit the electronic device, and the electronic device may include Figure 8 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0214] The processor 801 is the control center of the electronic device. It connects the various parts of the entire electronic device using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 801 may include one or more processing units. Optionally, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly handles wireless communications. It is understood that the above-mentioned modem processor may not be integrated into the processor 801.
[0215] The memory 802 can be used to store software programs and various data. The memory 802 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and application programs required by at least one functional module (such as a determination unit, a processing unit, etc.). Furthermore, the memory 802 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0216] In an exemplary embodiment, a computer-readable storage medium including instructions is further provided, such as a memory 802 including instructions. The above instructions can be executed by the processor 801 of the electronic device 800 to implement the map data clustering method in the above embodiment.
[0217] In actual implementation, Figure 7 The functions of the acquisition unit 701, the determination unit 702, the construction unit 703 and the processing unit 704 in Figure 8 The processor 801 in the embodiment calls the computer program stored in the memory 802. The specific execution process can be referred to the description of the map data clustering method in the above embodiment, which will not be repeated here.
[0218] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0219] In an exemplary embodiment, the present application also provides a computer program product including one or more instructions, which can be executed by the processor 801 of the electronic device to implement the map data clustering method in the above embodiment.
[0220] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, the various processes of the above-mentioned map data clustering method embodiment are implemented, and the same technical effect as the above-mentioned map data clustering method can be achieved. To avoid repetition, they will not be described here.
[0221] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete the full classification or partial functions described above.
[0222] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0223] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0224] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0225] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute the full classification part or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0226] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A map data clustering method, characterized in that: include: Get the target map data cluster; The target map data cluster includes a map data cluster obtained by clustering a map object set, and the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first number threshold; determining a first map object and a second map object from the target map data cluster; The first condition satisfied by the first map object includes: a distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; The second map object is a map object in the target map data cluster except the first map object; constructing the first map object in the map data cluster into a first map data cluster, and constructing a second map data cluster according to the second map object in the map data cluster; When the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold, the first map data cluster and the second map data cluster are determined as map data clusters in the clustering result of the map object set.
2. The method according to claim 1, characterized in that The step of constructing a second map data cluster according to the second map object in the map data cluster includes: constructing the second map object in the map data cluster as an initial map data cluster; The third map object in the initial map data cluster is deleted to obtain the second map data cluster; the second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
3. The method according to claim 1, characterized in that The method further comprises: performing clustering processing on the map object set to obtain a plurality of map data clusters; determining a third map data cluster and a fourth map data cluster from the plurality of map data clusters; wherein the third map data cluster and the fourth map data cluster satisfy a third condition including: an average elevation difference between the two map data clusters is within a preset range, and an overlapping area of the two map data clusters is greater than a first area threshold; The third map data cluster and the fourth map data cluster are merged to obtain the target map data cluster.
4. The method according to claim 1, wherein The method further comprises: performing clustering processing on the map object set to obtain a plurality of map data clusters; determining a fifth map data cluster and a sixth map data cluster from the plurality of map data clusters; wherein the fifth map data cluster and the sixth map data cluster satisfy a fourth condition including: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, a length of any one of the two map data clusters is greater than a second length threshold, and a distance between the two map data clusters is less than a third distance threshold; The fifth map data cluster and the sixth map data cluster are merged to obtain the target map data cluster.
5. The method according to claim 1, wherein The method further comprises: performing clustering processing on the map object set to obtain a plurality of map data clusters; determining a seventh map data cluster and an eighth map data cluster from the plurality of map data clusters; wherein the seventh map data cluster and the eighth map data cluster satisfy a fifth condition including: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, lengths of the two map data clusters are less than a second length threshold, or a distance between the two map data clusters is greater than a third distance threshold, the distance between the two map data clusters is less than a fourth distance threshold, and an angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold; The seventh map data cluster and the eighth map data cluster are merged, and the resulting map data cluster is used as the map data cluster in the clustering result of the map object set.
6. A map data clustering device, characterized in that: include: Acquire units, identify units, and construct units; The acquisition unit is used to acquire the target map data cluster; The target map data cluster includes a map data cluster obtained by clustering a map object set, and the number of map objects corresponding to the same timestamp in the target map data cluster is greater than a first number threshold; The determining unit is configured to determine a first map object and a second map object from the target map data cluster; The first condition satisfied by the first map object includes: a distance between any map object in the target map data cluster and the first map object is less than a first distance threshold; the second map object is a map object in the target map data cluster other than the first map object; The constructing unit is configured to construct the first map object in the map data cluster into a first map data cluster, and to construct a second map data cluster according to the second map object in the map data cluster; The determining unit is further configured to determine the first map data cluster and the second map data cluster as map data clusters in the clustering result of the map object set when the lengths of the first map data cluster and the second map data cluster are both greater than a first length threshold.
7. The device according to claim 6, characterized in that The building block is specifically used for: constructing the second map object in the map data cluster as an initial map data cluster; deleting the third map object in the initial map data cluster to obtain the second map data cluster; The second condition satisfied by the third map object includes: the number of fourth map objects in the initial map data cluster is less than a second number threshold, and the distance between the fourth map object and the third map object is less than a second distance threshold.
8. The device according to claim 6, characterized in that The device further comprises: a processing unit; The processing unit is used to perform clustering processing on the map object set to obtain multiple map data clusters; The determining unit is further configured to determine a third map data cluster and a fourth map data cluster from the plurality of map data clusters; the third map data cluster and the fourth map data cluster satisfying a third condition including: an average elevation difference between the two map data clusters being within a preset range, and an overlapping area between the two map data clusters being greater than a first area threshold; The processing unit is further configured to merge the third map data cluster and the fourth map data cluster to obtain the target map data cluster.
9. The device according to claim 6, characterized in that The device further comprises: a processing unit; The processing unit is used to perform clustering processing on the map object set to obtain multiple map data clusters; The determining unit is further configured to determine a fifth map data cluster and a sixth map data cluster from the plurality of map data clusters; the fourth condition satisfied by the fifth map data cluster and the sixth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, a length of any one of the two map data clusters is greater than a second length threshold, and a distance between the two map data clusters is less than a third distance threshold; The processing unit is further configured to merge the fifth map data cluster and the sixth map data cluster to obtain the target map data cluster.
10. The device according to claim 6, characterized in that The device further comprises: a processing unit; The processing unit is used to perform clustering processing on the map object set to obtain multiple map data clusters; The determining unit is further configured to determine a seventh map data cluster and an eighth map data cluster from the plurality of map data clusters; the fifth condition satisfied by the seventh map data cluster and the eighth map data cluster includes: an average elevation difference between the two map data clusters is within a preset range, an overlapping area of the two map data clusters is less than a first area threshold, lengths of the two map data clusters are both less than a second length threshold, or a distance between the two map data clusters is greater than a third distance threshold, the distance between the two map data clusters is less than a fourth distance threshold, and an angle between the two map data clusters is less than a preset angle threshold; and the fourth distance threshold is greater than the third distance threshold. The processing unit is further configured to merge the seventh map data cluster and the eighth map data cluster; The determining unit is further configured to use the map data cluster obtained by the merging process as the map data cluster in the clustering result of the map object set.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that When the computer-executable instructions stored in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data classification and identification method, apparatus, computer apparatus, and readable storage medium
CN109635104A
Map data processing method, server and storage medium
CN115035264A