Map data updating method, electronic device, storage medium and program product
By dynamically determining the parameters of the clustering algorithm in map data update, the problem of clustering algorithm parameters depend on empirical values in the existing technology is solved, and the accuracy of map data is improved.
Patent Information
- Application Number
- CN202411868246.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-04
AI Technical Summary
In the existing map data update method, the clustering algorithm parameters mostly rely on the empirical value settings, resulting in inaccurate aggregation results, which in turn affects the accuracy of map data.
By obtaining the map data of the target road and the location information of the object, the optimal neighborhood radius of the target map element is dynamically determined, and then clustering is performed to update the map data.
Improve the accuracy of map data, and dynamically determine clustering parameters, enhance the accuracy of clustering results, ensuring that the updated map data is closer to the actual situation.
Smart Images

Figure CN119760459A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method for updating map data, an electronic device, a storage medium and a program product. Background Art
[0002] With the development of technology, standard maps or high-precision maps have been integrated into people's daily lives, and the accuracy of map data is particularly important.
[0003] At present, map data is mostly updated by first aggregating map element data from multiple sources based on a clustering algorithm, and then using the aggregated results to update the map data; however, the clustering algorithms used in this method, such as the density-based clustering method with noise (Density-Based Spatial Clustering of Applications with Noise, DBSCAN), mostly use fixed algorithm parameters, and the algorithm parameters are mostly set based on empirical values, resulting in inaccurate results after aggregation, and then resulting in inaccurate updated map data. Summary of the invention
[0004] The embodiments of the present application provide a method for updating map data, an electronic device, a storage medium, and a program product, so as to achieve the effect of improving the accuracy of map data.
[0005] In a first aspect, an embodiment of the present application provides a method for updating map data, comprising:
[0006] Acquire map data of a target road and location information of a plurality of objects of a target map element on the target road;
[0007] Determining an optimal neighborhood radius corresponding to the target map element according to the location information of the object;
[0008] According to the optimal neighborhood radius corresponding to the target map element, the map data of the target road is updated by clustering multiple objects of the target map element.
[0009] In a possible implementation, updating the map data of the target road by clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element includes:
[0010] Determining the minimum number of neighbors corresponding to the target map element according to the optimal neighborhood radius corresponding to the target map element;
[0011] According to the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element, clustering is performed on multiple objects of the target map element to obtain a clustering result of the target map element;
[0012] The map data of the target road is updated according to the clustering result of the target map elements.
[0013] In a possible implementation manner, determining the minimum number of neighbors corresponding to the target map element according to the optimal neighborhood radius corresponding to the target map element includes:
[0014] Determining an initial number of neighbors according to an optimal neighborhood radius corresponding to the target map element and a type of the target road;
[0015] If it is determined that the initial number of neighbors is less than or equal to a preset threshold, determining the preset threshold as the minimum number of neighbors corresponding to the target map element;
[0016] If it is determined that the initial number of neighbors is greater than the preset threshold, the initial number of neighbors is determined to be the minimum number of neighbors corresponding to the target map element.
[0017] In a possible implementation, determining the optimal neighborhood radius corresponding to the target map element according to the location information of the object includes:
[0018] Determine the position information of the center point of the object according to the position information of the object;
[0019] For each object's center point, obtain a set of adjacent points of the object according to the position information of the object's center point; wherein the elements in the set of adjacent points represent the distance between the object's center point and the center points of other objects;
[0020] An optimal neighborhood radius corresponding to the target map element is determined according to the neighboring point set of each object.
[0021] In a possible implementation, the elements in the neighboring point set are arranged in order of size; and determining the optimal neighborhood radius corresponding to the target map element according to the neighboring point set of each object includes:
[0022] Determine the i-th initial neighborhood radius according to the i-th element in the adjacent point set of each object; wherein i is an integer greater than 0;
[0023] Determine an average value of each of the initial neighborhood radii, and determine a deviation value of each of the initial neighborhood radii according to the average value of the initial neighborhood radii and each of the initial neighborhood radii;
[0024] According to the deviation value of each initial neighborhood radius, an optimal neighborhood radius corresponding to the target map element is determined.
[0025] In a possible implementation, determining the optimal neighborhood radius corresponding to the target map element according to the deviation value of each initial neighborhood radius includes:
[0026] Determine a candidate neighborhood radius from the initial neighborhood radii according to the deviation value of each initial neighborhood radius;
[0027] An optimal neighborhood radius corresponding to the target map element is determined according to the candidate neighborhood radius.
[0028] In a possible implementation manner, determining the position information of the center point of the object according to the position information of the object includes:
[0029] If it is determined that the target map element is a point element, the position information of the object is used as the position information of the center point of the object;
[0030] If it is determined that the target map element is a line element or a surface element, determining the location information of the center point of the object according to the coordinates of the multiple location points included in the location information of the object;
[0031] If it is determined that the target map element is a three-dimensional element, the position information of the center point of the object is determined according to a plurality of three-dimensional position coordinate points included in the position information of the object.
[0032] In a possible implementation manner, updating the map data of the target road according to the clustering result of the target map element includes:
[0033] According to the clustering result of the target map elements, the target map elements in the map data of the target road are subjected to differential processing to obtain updated map data.
[0034] In a second aspect, an embodiment of the present application provides a map data updating device, comprising:
[0035] An acquisition module, used for acquiring map data of a target road and location information of a plurality of objects of a target map element on the target road;
[0036] A determination module, used to determine the optimal neighborhood radius corresponding to the target map element according to the location information of the object;
[0037] The updating module is used to update the map data of the target road by clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0039] The memory stores computer-executable instructions;
[0040] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0043] The map data updating method, electronic device, storage medium and program product provided by the embodiment of the present application first use the location information of multiple objects of the target map element to determine the optimal neighborhood radius parameter corresponding to the target map element of the clustering algorithm, and then perform clustering processing on the multiple objects of the target map element according to the optimal neighborhood radius parameter corresponding to the target map element to update the map data of the target road. Through this method, the clustering parameters that meet the map element can be dynamically determined according to the type of the target map element and the location information of the object, thereby improving the accuracy of the clustering result of the map element and the accuracy of the map data. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] Figure 1 A schematic diagram of an application scenario provided for this application;
[0046] Figure 2 Schematic diagram of the process of updating the map data provided in this application Figure 1 ;
[0047] Figure 3 A curve diagram of the number of clusters after clustering provided in this application;
[0048] Figure 4 A schematic diagram of another application scenario provided for this application;
[0049] Figure 5 Schematic diagram of the process of updating the map data provided in this application Figure 2 ;
[0050] Figure 6 A schematic diagram of the structure of a map data updating device provided in this application;
[0051] Figure 7 A schematic diagram of the structure of the electronic device provided in this application.
[0052] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0054] Figure 1 A schematic diagram of an application scenario provided for this application, refer to Figure 1 As shown, the map element data from different data sources may be affected by the accuracy of the acquisition equipment, such as the positioning sensor or image acquisition device, resulting in deviations in the location information of the same object, for example Figure 1 The position of the "No Entry" sign shown in the data source 1 is different from that in the data source 2. Therefore, when updating the map data, the DBSCAN clustering algorithm can be used to cluster the map element data from multiple data sources, and then the map data can be updated using the clustering result.
[0055] The DBSCAN clustering algorithm is a density-based clustering algorithm with a key parameter, the neighborhood radius (Epsilon, Eps), which defines the neighborhood range or search radius of a data point. Specifically, for any point P in the data set, its Eps-neighborhood refers to the set of points whose Euclidean distance (or other specified distance metric) to P does not exceed the neighborhood radius.
[0056] The choice of neighborhood radius is crucial to the performance and results of the DBSCAN clustering algorithm. If the neighborhood radius is set too small, most points may not form a large enough Eps-neighborhood to meet the requirements of being a core object, which may cause the algorithm to identify too many noise points and the clustering results may be too fragmented. On the contrary, if the neighborhood radius is set too large, too many points may be included in the Eps-neighborhood of a single point, which may cause too many points to be incorrectly clustered into the same cluster, or even form a huge cluster containing all data points.
[0057] Currently, when using the DBSCAN clustering algorithm, the neighborhood radius is often set using empirical values, but this method leads to inaccurate results after aggregation, which in turn leads to inaccurate updated map data.
[0058] The map data updating method provided in the present application dynamically determines the algorithm parameters for clustering the map elements according to the type of the map elements to be clustered and the distribution position of the map elements, so that the algorithm parameters can be more suitable for the map element data to be processed, and a more accurate clustering result can be obtained, thereby improving the accuracy of the updated map data.
[0059] The execution subject of this application can be an electronic device with processing capabilities, such as a server, a computer, etc., and this application does not limit this.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] Figure 2 Schematic diagram of the process of updating the map data provided in this application Figure 1 ,like Figure 2 As shown, the method includes:
[0062] S101. Obtain map data of a target road and location information of multiple objects of a target map element on the target road.
[0063] Exemplarily, the above-mentioned target road represents a road to be updated, and may be any road type, such as a highway, ordinary highway, etc., which is not limited in this application. The map data of the above-mentioned target road represents the data currently used by the map of the target road. The above-mentioned target map elements represent map elements on the target road to be updated, and may be any map elements, such as speed limit signs, cameras, lane lines, zebra crossings, turn areas, etc., which are not limited in this application. The above-mentioned object represents an entity or feature point of a map element, and the object has location information, which may be, for example, longitude and latitude coordinates (lon, lat), or other forms of positioning information.
[0064] In some possible implementations, the electronic device may extract the map data of the target road from a map database or a map service. Alternatively, the electronic device receives the map data of the target road sent by other electronic devices. Alternatively, the electronic device receives the map data of the target road imported by an external device, such as a USB flash drive.
[0065] In some possible implementations, the electronic device may extract the location information of multiple objects of the target map element on the target road from multiple external data sources respectively; or the electronic device may extract the location information of multiple objects of the target map element on the target road from one data source, and the data source may include data from multiple external data sources; or the electronic device may receive the location information of multiple objects of the target map element on the target road imported by an external device, and the external device may be, for example, a USB flash drive. Alternatively, the electronic device may first obtain the location information of multiple objects of the target map element on multiple roads from multiple external data sources, and then group the location information of multiple objects of the target map element on multiple roads according to the identification of the target road to obtain the location information of multiple objects of the target map element on the target road.
[0066] Optionally, after acquiring the location information of multiple objects of the target map element, the electronic device may perform operations such as data cleaning and data normalization on the location information of the multiple objects, which is not limited in this application.
[0067] S102: Determine the optimal neighborhood radius corresponding to the target map element according to the location information of the object.
[0068] Exemplarily, the optimal neighborhood radius corresponding to the target map element represents a parameter of the DBSCAN clustering algorithm. The location information of the object can reflect the location distribution of the object, so the optimal neighborhood radius corresponding to the target map element of the DBSCAN clustering algorithm can be determined based on the location information of the object.
[0069] In one example, Figure 3 A curve diagram of the number of clusters after clustering provided by this application. Figure 3 As shown in the figure, the horizontal axis represents the K value in K-nearest neighbors, and the vertical axis represents the number of clusters after clustering. The K-nearest neighbors (KNN) distance represents the distance from the sample point to be classified or regressed to its K nearest neighbors. It can be seen that as the K value increases, the number of clusters after clustering gradually decreases, and when the K value is within a certain range in the middle, the number of clusters after clustering tends to converge ( Figure 3 As mentioned above, the neighborhood radius determines the neighborhood relationship between objects. Therefore, there is a mapping relationship between the neighborhood radius and the K-nearest neighbor distance. Furthermore, the optimal neighborhood radius can be determined by determining the value of K that makes the number of clusters converge after clustering.
[0070] For example, the electronic device can calculate the K-nearest neighbor distance between each object and other objects, where the value of K is an integer greater than or equal to 1. In other words, after calculating the distance between the object and other objects, the distance values are sorted in order of size, and the first distance value represents the nearest neighbor distance of the object when K=1, and so on. Furthermore, the neighborhood radius corresponding to the K value can be determined based on the mean of the K-nearest neighbor distance of each object. For example, the mean of the 1-nearest neighbor distance of each object is used as the 1-neighborhood radius, and the mean of the neighborhood radius corresponding to the K value can be used as the optimal neighborhood radius corresponding to the target map element.
[0071] S103: Update the map data of the target road by clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element.
[0072] Exemplarily, the electronic device may perform clustering processing on multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element to obtain a clustering result, and then use the clustering result to update the map data of the target road.
[0073] The above clustering results represent the classification results of the objects of the target map elements after clustering processing. For example, the clustering results may include multiple clusters of the target map elements, each cluster includes some objects, and each cluster has a cluster center, and the cluster center can represent the average location information of all objects in the cluster. After the clustering processing, the data of the target map elements from different data sources can be clustered, and the cluster center of each cluster obtained can reflect the location characteristics of multiple objects in the cluster, and obtain more accurate location information of the objects of the target map elements in reality. Then, the electronic device can compare the location information of the cluster center with the data of the original target map element in the map data of the target road, determine whether the attribute or position of the target map element has changed, and update the map data of the target road.
[0074] In one example, the electronic device may substitute the optimal neighborhood radius corresponding to the target map element into a DBSCAN clustering algorithm, and use the DBSCAN clustering algorithm to perform clustering processing on multiple objects of the target map element to obtain a clustering result of the target map element.
[0075] Optionally, when using the DBSCAN clustering algorithm for clustering, in addition to the optimal neighborhood radius corresponding to the target map element, other parameters, such as the minimum number of neighbors (MinPts), can be preset values, or the minimum number of neighbors corresponding to the target map element can be determined based on the optimal neighborhood radius corresponding to the target map element. For example, the ratio of the optimal neighborhood radius corresponding to the target map element to the sampling interval is used as the minimum number of neighbors corresponding to the target map element. The minimum number of neighbors can be used to determine whether an area is dense enough to form a minimum number of points for a cluster. If the number of points in the Eps-neighborhood of a point is greater than or equal to MinPts, the point is considered a core point.
[0076] Taking the minimum number of neighbors as the preset value as an example, before starting clustering, it is necessary to initialize the objects of all target map elements, such as assigning a unique identifier to each object and storing its location information; for each object in the target map, use the optimal neighborhood radius corresponding to the target map element to find all points in its neighborhood, such as by calculating the distance between each object and other objects, and regard the points whose distance is less than the optimal neighborhood radius corresponding to the target map element as neighborhood points; according to the minimum number of neighbors, mark the objects whose number of points in the neighborhood is greater than or equal to the minimum number of neighbors corresponding to the target map element as core points; starting from any core point, expand the cluster by continuously adding core points in its neighborhood until no more core points can be added to the current cluster, and obtain a complete cluster; for objects that have not been assigned to any cluster, repeat the above steps until all objects are assigned to a cluster or are regarded as noise points, and obtain the clustering results. Among them, noise points refer to points that are neither core points nor boundary points, that is, there are no core points in their neighborhood; boundary points refer to points that are not core points but have at least one core point in their neighborhood.
[0077] Figure 4 For another application scenario provided by this application, refer to Figure 4 As shown, after clustering multiple objects of speed limit signs on the target road, a clustering result of the speed limit signs can be obtained, and after clustering multiple objects of cameras on the target road, a clustering result of the cameras can be obtained.
[0078] The map data updating method provided in the embodiment of the present application first determines the optimal neighborhood radius parameter corresponding to the target map element of the clustering algorithm using the location information of multiple objects of the target map element for the target map element to be updated, and then clusters the multiple objects of the target map element according to the optimal neighborhood radius parameter corresponding to the target map element to update the map data of the target road. Through this method, the clustering parameters that meet the target map element can be dynamically determined according to the type of the target map element and the location information of the object, thereby improving the accuracy of the clustering result of the map element and the accuracy of the map data.
[0079] Figure 5 Schematic diagram of the process of updating the map data provided in this application Figure 2 ,like Figure 5 As shown, in this embodiment Figure 2 Based on the embodiment, a method for updating map data is described in detail, and the method includes:
[0080] S201: Acquire map data of a target road and location information of multiple objects of a target map element on the target road.
[0081] It should be noted that this step is similar to the aforementioned step S101 and will not be described again here.
[0082] S202: Determine the position information of the center point of the object according to the position information of the object.
[0083] Exemplarily, the object of the target map element has a center point, which may be the geometric center point of the target map element. The electronic device may adopt different calculation methods according to the type of the target map element to obtain the position information of the center point of the object of the target map element.
[0084] In some possible implementations, in the first case: if the target map element is determined to be a point element, the location information of the object is used as the location information of the center point of the object; wherein the target map element of the point element type may be, for example, a speed limit sign, a camera, or the like, which can be regarded as a point map element.
[0085] The second case: if the target map element is determined to be a line element or a surface element, the location information of the center point of the object is determined based on the multiple location point coordinates included in the location information of the object; wherein the target map element of the line element or surface element may be, for example, a zebra crossing, a lane line, a curbstone, or other map element that can be regarded as a line or a surface. The location information of the objects of these two types of map elements can be represented by a set of multiple location points, that is, the location information of the object includes multiple location coordinates, and then the location information of the center point of the object can be determined based on the multiple location point coordinates.
[0086] For example, a zebra crossing object may include the coordinates of n locations (lon1, lat1), ..., (lon n ,lat n ), then the position information of the center point of the object can be expressed as (Lon, Lat), where Lon=(lon1+lon2+…+lon n ) / n,Lat = (lat1+lat2+……+lat n ) / n.
[0087] The third case: if it is determined that the target map element is a three-dimensional element, the position information of the center point of the object is determined based on the multiple three-dimensional position coordinate points included in the position information of the object; wherein the map element of the three-dimensional element may be, for example, an elevated road, a building, or other map element that may have a height, and the position information of the object of this type of map element may include multiple three-dimensional position coordinate points, and then the position information of the center point of the object may be determined based on the multiple three-dimensional position coordinate points.
[0088] For example, the location information of an object includes n three-dimensional location coordinate points (lon1, lat1, z1), ..., (lon n ,lat n , z n ), then the position information of the center point of the object can be expressed as (Lon, Lat, Z), where Lon=(lon1+lon2+…+lon n ) / n,Lat=(lat1+lat2+……+lat n ) / n,Z=(z1+z2+……+z n ) / n. Among them, lon represents longitude, lat represents latitude, and z represents altitude.
[0089] S203 . For each center point of the object, obtain a set of adjacent points of the object according to the position information of the center point of the object.
[0090] Exemplarily, the elements in the above adjacent point set represent the distance between the center point of the object and the center points of other objects.
[0091] In one example, for the center point of each object, the electronic device can calculate the distance between the center point of the object and the center points of other objects based on the position information of the center point of the object and the position information of the center points of other objects. For example, if the coordinates of the center point of the object are (lon1, lat1) and the coordinates of the center point of another object are (lon2, lat2), the distance calculation formula can be, for example, distance = If the center point coordinates of the object are three-dimensional coordinates, the principle is similar and will not be repeated here.
[0092] In the above manner, the distance between the center point of the object and the center points of other objects can be obtained, and the distance is sorted in order of size to obtain the adjacent point set of the object. Taking the object c1 as an example, the adjacent point set of the object c1 can be expressed as {d2, d3, d4, …, dm}, where m represents the number of objects and d represents the distance.
[0093] S204: Determine the optimal neighborhood radius corresponding to the target map element according to the adjacent point set of each object.
[0094] For example, as mentioned above, the neighborhood radius is related to the K-nearest neighbor distance. Because the elements in the neighbor point set are arranged in order of size, the neighbor point set of each object mentioned above can be regarded as the K-nearest neighbor distance of the object. When K=1, the K-nearest neighbor distance can be expressed as the first element in the neighbor point set of the object. When K=i, the K-nearest neighbor distance can be expressed as the i-th element in the neighbor point set of the object. Therefore, the electronic device can determine the optimal neighborhood radius corresponding to the target map element based on the neighbor point set of each object.
[0095] In some possible implementations, the i-th initial neighborhood radius is determined according to the i-th element in the neighboring point set of each object; the average value of each initial neighborhood radius is determined, and the deviation value of each initial neighborhood radius is determined according to the average value of the initial neighborhood radius and each initial neighborhood radius; the optimal neighborhood radius corresponding to the target map element is determined according to the deviation value of each initial neighborhood radius, where i is an integer greater than 0.
[0096] For example, the adjacent point sets of each object have the same number of elements (s), and are arranged in order of size. Therefore, the average value of the i-th element in the adjacent point set of each object can be obtained, that is, , where Xi represents the ith element, as the ith initial neighborhood radius, the ith initial neighborhood radius can represent the average K-nearest neighbor distance of each object when K=i, and then the average value of the initial neighborhood radius is averaged to obtain the average value of the initial neighborhood radius, and the difference between each initial neighborhood radius and the average value of the initial neighborhood radius is determined as the deviation value of the initial neighborhood radius. The deviation value of the initial neighborhood radius can reflect the degree of deviation between the initial neighborhood radius and the overall initial neighborhood radius. In other words, it can reflect the degree of deviation between the initial neighborhood radius and the average value of the initial neighborhood radius. Then, according to the deviation value of each initial neighborhood radius, the optimal neighborhood radius corresponding to the target map element can be determined. This is because the smaller the deviation value, the closer the initial neighborhood radius is to the average value of the initial neighborhood radius, and because each initial neighborhood radius corresponds to the value of K one by one, that is, the closer the value of K is to the middle value range of K, refer to Figure 3 As shown, the number of clusters after clustering that tends to converge is obtained.
[0097] Optionally, the electronic device can directly use the initial neighborhood radius with the smallest deviation value as the optimal neighborhood radius corresponding to the target map element; the electronic device can also determine the candidate neighborhood radius from the initial neighborhood radius according to the deviation value of each initial neighborhood radius, for example, sorting each initial neighborhood radius in ascending order based on the deviation value, and selecting the initial neighborhood radius corresponding to the first q deviation values as the candidate neighborhood radius; and determine the optimal neighborhood radius corresponding to the target map element according to the candidate neighborhood radius, for example, using the average value of each candidate neighborhood radius as the optimal neighborhood radius corresponding to the target map element. In this way, the candidate neighborhood radius with a smaller deviation value can be first screened out, and the value of K corresponding to the candidate neighborhood radius is closer to the middle value range of K, and the average value of the candidate neighborhood radius is used as the optimal neighborhood radius corresponding to the target map element. At this time, the value of K corresponding to the optimal neighborhood radius corresponding to the target map element can be closer to the middle value range of K, thereby improving the accuracy of the optimal neighborhood radius corresponding to the target map element.
[0098] In some possible implementations, the i-th initial neighborhood radius is determined based on the i-th element in the neighboring point set of each object; if it is determined that the number of initial neighborhood radii is less than a preset threshold, the average value of the initial neighborhood radii can be directly used as the optimal neighborhood radius corresponding to the target map element.
[0099] S205. Determine the minimum number of neighbors corresponding to the target map element according to the optimal neighborhood radius corresponding to the target map element.
[0100] For example, as mentioned above, the minimum number of neighbors corresponding to the target map element determines the minimum number of neighbors in the neighborhood required to become a core point. The selection of the minimum number of neighbors also has a great impact on the clustering results. If the minimum number of neighbors is too large, it may lead to too few core points, thereby affecting the formation of clusters. On the contrary, it may lead to too many points being identified as core points, making the clustering results complicated. In other words, the minimum number of neighbors and the optimal neighborhood radius need to restrict and balance each other. Therefore, the minimum number of neighbors corresponding to the target map element can be determined according to the optimal neighborhood radius corresponding to the target map element.
[0101] In some possible implementations, the electronic device may first determine the initial number of neighbors based on the optimal neighborhood radius corresponding to the target map element and the type of the target road; if it is determined that the initial number of neighbors is less than or equal to a preset threshold, the preset threshold is determined to be the minimum number of neighbors corresponding to the target map element; if it is determined that the initial number of neighbors is greater than the preset threshold, the initial number of neighbors is determined to be the minimum number of neighbors corresponding to the target map element.
[0102] For example, the weight parameters of the road types are preset. Table 1 is a schematic diagram of the weight parameters of a road type provided in an embodiment of the present application.
[0103] Table 1 Weight parameters of road types
[0104] Road Type Weight high speed 1 City Express 2 national highway 3 Provincial Highway 4 County Road 5 Country Road 6 Other roads 7 Walking paths 8
[0105] Optionally, the initial number of neighbors can be calculated using the following formula:
[0106]
[0107] Among them, p represents the weight parameter of the road type, Indicates the sampling interval of the trajectory points. The sampling interval of the trajectory points indicates the sampling distance between two adjacent position coordinate points. For example, a position coordinate point may be collected every 5 meters.
[0108] Through the above formula, the electronic device can obtain the initial number of neighbors according to the type of the target road and the optimal neighborhood radius corresponding to the target map element. It should be understood that according to business requirements, the minimum number of neighbors has a minimum value, that is, the preset threshold. Therefore, after determining the initial number of neighbors, the minimum number of neighbors corresponding to the target map element can be obtained based on the relationship between the initial number of neighbors and the preset threshold.
[0109] S206: Clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element to obtain a clustering result of the target map element.
[0110] Exemplarily, the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element are substituted into the DBSCAN clustering algorithm, and the DBSCAN clustering algorithm is used to perform clustering processing on multiple objects of the target map element to obtain the clustering result of the target map element. This process is similar to the aforementioned step S103 and will not be repeated here.
[0111] S207 . Perform differential processing on the target map elements in the map data of the target road according to the clustering result of the target map elements to obtain updated map data.
[0112] Exemplarily, the electronic device may perform differential processing based on the target map elements in the map data of the clustering clusters and the target roads. For example, the newly added target map elements in the clustering results may be added to the map data; or the target map elements that no longer exist in the clustering results may be deleted from the map data; or, for the target map elements that have changed in the clustering results, their attributes or location information may be updated to obtain updated map data.
[0113] Optionally, the clustering results of the above-mentioned target map elements may include high-confidence clustering clusters, and low-confidence clustering clusters or isolated objects, wherein the high-confidence clustering clusters represent clusters in which the number of neighbors obtained after clustering is greater than or equal to the minimum number of neighbors corresponding to the target map element, the low-confidence clusters represent clusters in which the number of neighbors obtained after clustering is less than the minimum number of neighbors corresponding to the target map element, and the isolated objects represent objects that are not added to any cluster, such as noise points. The electronic device can perform update processing only based on the clustering results of the high-confidence clusters, and the low-confidence clustering clusters or isolated objects can be stored for subsequent manual processing.
[0114] The method for updating map data provided by the embodiment of the present application, for the target map element on the target road to be updated, firstly uses the location information of multiple objects of the target map element to determine the adjacent point set of each object, and then uses the adjacent point set of each object that can represent the K-nearest neighbor distance to obtain the initial neighborhood radius that can correspond to the K value one by one, and uses the initial neighborhood radius to determine the optimal neighborhood radius corresponding to the target map element, and according to the optimal neighborhood radius corresponding to the target map element and the type of the target road, determines the minimum number of neighbors corresponding to the target map element, uses the DBSCAN clustering algorithm substituted with the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element, performs clustering processing on multiple objects of the target map element, obtains the clustering result of the target map element, and performs differential processing on the target map element in the map data of the target road according to the clustering result of the target map element, and obtains the updated map data. Through this method, the electronic device can dynamically determine the algorithm parameters for clustering the map element according to the type of the target road, the type of the map element to be processed and the location distribution information of the object, so that the clustering result of the map element is more accurate, and the accuracy of the map data is improved.
[0115] Figure 6 A schematic diagram of the structure of the map data updating device provided in this application, such as Figure 6 As shown, the map data updating device 300 provided in this embodiment includes:
[0116] An acquisition module 301 is used to acquire map data of a target road and location information of multiple objects of a target map element on the target road;
[0117] A determination module 302, configured to determine an optimal neighborhood radius corresponding to the target map element according to the location information of the object;
[0118] The updating module 303 is used to update the map data of the target road by clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element.
[0119] In a possible implementation, the updating module 303 is specifically configured to:
[0120] Determining the minimum number of neighbors corresponding to the target map element according to the optimal neighborhood radius corresponding to the target map element;
[0121] According to the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element, clustering is performed on multiple objects of the target map element to obtain a clustering result of the target map element;
[0122] The map data of the target road is updated according to the clustering result of the target map elements.
[0123] In a possible implementation, the updating module 303 is specifically configured to:
[0124] Determining an initial number of neighbors according to an optimal neighborhood radius corresponding to the target map element and a type of the target road;
[0125] If it is determined that the initial number of neighbors is less than or equal to a preset threshold, determining the preset threshold as the minimum number of neighbors corresponding to the target map element;
[0126] If it is determined that the initial number of neighbors is greater than the preset threshold, the initial number of neighbors is determined to be the minimum number of neighbors corresponding to the target map element.
[0127] In a possible implementation, the determination module 302 is specifically configured to:
[0128] Determine the position information of the center point of the object according to the position information of the object;
[0129] For each object's center point, obtain a set of adjacent points of the object according to the position information of the object's center point; wherein the elements in the set of adjacent points represent the distance between the object's center point and the center points of other objects;
[0130] An optimal neighborhood radius corresponding to the target map element is determined according to the neighboring point set of each object.
[0131] In a possible implementation, the elements in the adjacent point set are arranged in order of size; the determination module 302 is specifically configured to:
[0132] Determine the i-th initial neighborhood radius according to the i-th element in the adjacent point set of each object; wherein i is an integer greater than 0;
[0133] Determine an average value of each of the initial neighborhood radii, and determine a deviation value of each of the initial neighborhood radii according to the average value of the initial neighborhood radii and each of the initial neighborhood radii;
[0134] According to the deviation value of each initial neighborhood radius, an optimal neighborhood radius corresponding to the target map element is determined.
[0135] In a possible implementation, the determination module 302 is specifically configured to:
[0136] Determine a candidate neighborhood radius from the initial neighborhood radii according to the deviation value of each initial neighborhood radius;
[0137] An optimal neighborhood radius corresponding to the target map element is determined according to the candidate neighborhood radius.
[0138] In a possible implementation, the determination module 302 is specifically configured to:
[0139] If it is determined that the target map element is a point element, the position information of the object is used as the position information of the center point of the object;
[0140] If it is determined that the target map element is a line element or a surface element, determining the location information of the center point of the object according to the coordinates of the multiple location points included in the location information of the object;
[0141] If it is determined that the target map element is a three-dimensional element, the position information of the center point of the object is determined according to a plurality of three-dimensional position coordinate points included in the position information of the object.
[0142] In a possible implementation, the updating module 303 is specifically configured to:
[0143] According to the clustering result of the target map elements, the target map elements in the map data of the target road are subjected to differential processing to obtain updated map data.
[0144] The map data updating device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0145] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 400 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the device 400 also includes a communication component 403. The processor 401, the memory 402 and the communication component 403 are connected via a bus 404.
[0146] In a specific implementation process, at least one processor 401 executes the computer-executable instructions stored in the memory 402, so that at least one processor 401 executes the above method.
[0147] The specific implementation process of the processor 401 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0148] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0149] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0150] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0151] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0152] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0153] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0154] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0155] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, 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 an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0158] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0159] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0160] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for updating map data, characterized in that: include: Acquire map data of a target road and location information of a plurality of objects of a target map element on the target road; Determining the optimal neighborhood radius corresponding to the target map element according to the location information of the object; According to the optimal neighborhood radius corresponding to the target map element, the map data of the target road is updated by clustering multiple objects of the target map element.
2. The method according to claim 1, characterized in that The updating of the map data of the target road by clustering multiple objects of the target map element according to the optimal neighborhood radius corresponding to the target map element includes: Determining the minimum number of neighbors corresponding to the target map element according to the optimal neighborhood radius corresponding to the target map element; According to the optimal neighborhood radius corresponding to the target map element and the minimum number of neighbors corresponding to the target map element, clustering is performed on multiple objects of the target map element to obtain a clustering result of the target map element; The map data of the target road is updated according to the clustering result of the target map elements.
3. The method according to claim 2, characterized in that The determining, according to the optimal neighborhood radius corresponding to the target map element, the minimum number of neighbors corresponding to the target map element comprises: Determining an initial number of neighbors according to an optimal neighborhood radius corresponding to the target map element and a type of the target road; If it is determined that the initial number of neighbors is less than or equal to a preset threshold, determining the preset threshold as the minimum number of neighbors corresponding to the target map element; If it is determined that the initial number of neighbors is greater than the preset threshold, the initial number of neighbors is determined to be the minimum number of neighbors corresponding to the target map element.
4. The method according to claim 1, characterized in that The determining, according to the location information of the object, an optimal neighborhood radius corresponding to the target map element includes: Determine the position information of the center point of the object according to the position information of the object; For each object's center point, obtain a set of adjacent points of the object according to the position information of the object's center point; wherein the elements in the set of adjacent points represent the distance between the object's center point and the center points of other objects; An optimal neighborhood radius corresponding to the target map element is determined according to the neighboring point set of each object.
5. The method according to claim 4, characterized in that The elements in the adjacent point set are arranged in order of size; and the optimal neighborhood radius corresponding to the target map element is determined according to the adjacent point set of each object, including: Determine the i-th initial neighborhood radius according to the i-th element in the adjacent point set of each object; wherein i is an integer greater than 0; Determine an average value of each of the initial neighborhood radii, and determine a deviation value of each of the initial neighborhood radii according to the average value of the initial neighborhood radii and each of the initial neighborhood radii; According to the deviation value of each initial neighborhood radius, an optimal neighborhood radius corresponding to the target map element is determined.
6. The method according to claim 5, characterized in that The step of determining the optimal neighborhood radius corresponding to the target map element according to the deviation value of each initial neighborhood radius includes: Determine a candidate neighborhood radius from the initial neighborhood radii according to the deviation value of each initial neighborhood radius; An optimal neighborhood radius corresponding to the target map element is determined according to the candidate neighborhood radius.
7. The method according to claim 4, characterized in that The step of determining the position information of the center point of the object according to the position information of the object includes: If it is determined that the target map element is a point element, the position information of the object is used as the position information of the center point of the object; If it is determined that the target map element is a line element or a surface element, determining the location information of the center point of the object according to the coordinates of the multiple location points included in the location information of the object; If it is determined that the target map element is a three-dimensional element, the position information of the center point of the object is determined according to a plurality of three-dimensional position coordinate points included in the position information of the object.
8. The method according to any one of claims 2 to 7, characterized in that: The updating of the map data of the target road according to the clustering result of the target map element comprises: According to the clustering result of the target map elements, the target map elements in the map data of the target road are subjected to differential processing to obtain updated map data.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
10. A computer-readable storage medium / computer program product, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor; and / or, The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.