Trajectory data-based auxiliary road detection method and device at road section level, equipment and medium
By training a trajectory feature recognition model to identify lane change trajectories, determine abrupt change intervals and cluster centers, the problem of inaccurate identification of main and auxiliary roads in existing technologies is solved, and efficient and accurate road network information collection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2024-05-28
- Publication Date
- 2026-07-07
Smart Images

Figure CN118656663B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of road network detection technology, and in particular to a method, device, equipment and medium for detecting road sections at the auxiliary road level based on trajectory data. Background Technology
[0002] Currently, existing urban arterial roads often consist of main roads and auxiliary roads. Main roads, which only allow motor vehicles, generally include elevated roads and highways. Auxiliary roads, which allow motor vehicles, non-motor vehicles, and pedestrians to travel together, are adjacent to the main roads and connect with other side roads. Main roads and auxiliary roads are important components of the urban road network. The accurate detection of auxiliary roads directly affects the connectivity and topological correctness of the road network. The entrances and exits between main roads and auxiliary roads are key points for the construction and updating of the urban navigation road network.
[0003] Traditional technologies typically extract main and auxiliary road information from road networks through manual surveying and professional data collection, which is costly and time-consuming. Furthermore, traditional machine learning methods using remote sensing imagery have poor transferability; the accuracy of the output depends heavily on the model's parameter settings, failing to provide stable and rapid identification results. While GPS trajectory data can also be used to collect road network information, extracting auxiliary road information from trajectory data has several drawbacks: the trajectory data itself is spatially and temporally heterogeneous and noisy, requiring deduplication, noise reduction, and anomaly handling before feature extraction, making data processing difficult; auxiliary road extraction demands high data accuracy and road network quality, requiring preprocessing of road network data such as OSM data during map matching, leading to additional computational costs, and its reliance on data accuracy makes stable identification of road network data impossible; and because main-auxiliary road transitions share similar characteristics with turning and lane-changing behaviors, they are difficult to distinguish using GPS trajectory data. Therefore, the accuracy of road network information collected using GPS trajectory data is relatively low. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium to address the shortcomings of related technologies, such as the inability to accurately and efficiently collect road network information and the difficulty in distinguishing between main roads and auxiliary roads based on trajectory data. The technical solution is as follows:
[0005] In a first aspect, embodiments of this application provide a method for detecting road segments at the auxiliary road level based on trajectory data, including:
[0006] Multiple driving trajectories within the target detection section are acquired, and the trajectory type of each driving trajectory is identified through a trained trajectory feature recognition model; the trajectory type includes lane-changing trajectories and non-lane-changing trajectories.
[0007] Based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment, the abrupt change interval of the lane change trajectory is determined, and the abrupt change trajectory points within the abrupt change interval are extracted.
[0008] Based on the set of mutation trajectory points, the clustering characteristics of the mutation trajectory points are determined, and based on the clustering characteristics, the mutation intervals where auxiliary paths exist are determined;
[0009] Based on the density of mutation trajectory points in the mutation interval where auxiliary roads exist, the cluster centers of mutation trajectory points are extracted, and the positions of the main and auxiliary road entry and exit points in the target detection road segment are determined based on the cluster centers.
[0010] In one alternative embodiment of the first aspect, after determining the locations of the main and auxiliary road entry / exit points within the target detection road segment based on the cluster centers, the method further includes:
[0011] The type of the corresponding abrupt change trajectory point is determined based on the relative positional relationship between all abrupt change trajectory points within a preset range centered on the main and auxiliary road entry / exit points and the target detection road segment; wherein, the type of abrupt change trajectory point includes main road to auxiliary road trajectory points and auxiliary road to main road trajectory points;
[0012] Calculate the ratio of the trajectory points from the main road to the auxiliary road or from the auxiliary road to the main road to the total number of all the trajectory points with abrupt changes;
[0013] The type of the main and auxiliary road entry and exit points is determined based on the ratio.
[0014] In one alternative embodiment of the first aspect, identifying the trajectory type of each driving trajectory through a trained trajectory feature recognition model includes:
[0015] Determine the projected distance of each driving trajectory to the target detection road segment, and calculate the angle between the direction angle of each trajectory point in the driving trajectory and the driving direction of the target detection road segment;
[0016] Calculate the range and standard deviation of the projected distances corresponding to each trajectory point in the driving trajectory, and obtain the maximum value of the included angle distance;
[0017] The range, standard deviation, and maximum value are input into the trajectory feature recognition model. If the range, standard deviation, and maximum value are all greater than the corresponding threshold, the type of the driving trajectory is determined to be the lane change trajectory; otherwise, the type of the driving trajectory is determined to be the non-lane change trajectory.
[0018] In one alternative embodiment of the first aspect, after acquiring multiple driving trajectories within the target detection section, trajectory cleaning is performed on the multiple driving trajectories, including:
[0019] Duplicate driving trajectories are deleted based on the time and location corresponding to each driving trajectory;
[0020] And / or, delete driving trajectories whose driving speed does not fall within the preset speed range;
[0021] The process of identifying the trajectory type of each driving trajectory using a trained trajectory feature recognition model includes:
[0022] The trajectory type of the cleaned driving trajectory is identified by a trained trajectory feature recognition model.
[0023] In one alternative embodiment of the first aspect, determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment includes:
[0024] The trajectory point corresponding to the maximum angle distance in the lane change trajectory is taken as the initial trajectory point of the corresponding sudden change interval;
[0025] Obtain the time sequence of all trajectory points in the lane change trajectory, select each trajectory point after the time corresponding to the initial trajectory point according to the time sequence, until the included angle distance of any trajectory point meets the preset condition, and output the first sudden change interval.
[0026] According to the time sequence, select each trajectory point before the time corresponding to the initial trajectory point until the included angle distance of any trajectory point meets the preset condition, and output the second mutation interval;
[0027] The first mutation interval and the second mutation interval are merged into the mutation interval;
[0028] The preset conditions include: the included angle distance between the trajectory points is less than a preset included angle distance threshold or the included angle distance between the trajectory points is less than the included angle distance between the trajectory points adjacent to the trajectory points.
[0029] In one alternative embodiment of the first aspect, after determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment, the method further includes:
[0030] Obtain drift trajectory points in the lane change trajectory whose projected distance is greater than the preset trajectory point projection distance, and remove the drift intervals corresponding to multiple drift trajectory points from the sudden change interval.
[0031] In one alternative embodiment of the first aspect, extracting the mutation trajectory points within the mutation interval includes:
[0032] If there are an odd number of trajectory points within the mutation interval, the trajectory points within the mutation interval are sorted according to the direction of the driving trajectory, and the middle trajectory point corresponding to the median number is selected as the mutation trajectory point.
[0033] If there are an even number of trajectory points within the mutation interval, then the geometric center of the trajectory points with the two middle numbers in the sorting is selected as the mutation trajectory point.
[0034] In one alternative embodiment of the first aspect, after determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment, the method further includes:
[0035] Obtain the direction angle corresponding to each trajectory point in the turning section;
[0036] Calculate the change in direction angle of multiple trajectory points in the turning section;
[0037] If the change amplitude is greater than a preset direction angle threshold, the corresponding abrupt change interval is determined to be a turning interval, and the turning interval is deleted.
[0038] Secondly, embodiments of this application also provide a road segment-level auxiliary road detection device based on trajectory data, comprising:
[0039] The trajectory classification module is used to acquire multiple driving trajectories within the target detection road segment and identify the trajectory type of each driving trajectory through a trained trajectory feature recognition model; the trajectory types include lane change trajectories and non-lane change trajectories.
[0040] The first identification module is used to determine the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment, and to extract the abrupt change trajectory points within the abrupt change interval;
[0041] The first identification module is further configured to determine the clustering characteristics of the mutation trajectory points based on the set of mutation trajectory points, and determine the mutation interval where there is an auxiliary path based on the clustering characteristics;
[0042] The second identification module is used to extract the cluster center of the mutation trajectory points based on the mutation trajectory point density of the mutation interval where the auxiliary road exists, and to determine the location of the main and auxiliary road entrance and exit points in the target detection road segment based on the cluster center.
[0043] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method provided by the first aspect or any implementation thereof of the embodiments of this application.
[0044] Fourthly, this application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided by the first aspect of the embodiments of this application or any implementation thereof.
[0045] This application provides a method, apparatus, device, and medium for detecting auxiliary roads at the road segment level based on trajectory data. By using a trained trajectory feature recognition model to distinguish between lane-changing trajectories and non-lane-changing trajectories, it can effectively filter out non-lane-changing trajectories, thereby reducing the computational load of identifying auxiliary roads based on lane-changing trajectories. Furthermore, it determines abrupt change intervals based on the relative positional relationship between trajectory points and the target detection road segment, and then accurately determines the existence of auxiliary roads based on the clustering characteristics (clustering / dispersion degree) of abrupt trajectory points within the abrupt change interval. Since only the clustering / dispersion degree needs to be calculated, this method has a low computational load and can simply and accurately identify intervals where auxiliary roads exist. Finally, it determines the location of the main and auxiliary road entry and exit points based on the cluster center of abrupt trajectory points, which has a more accurate effect in distinguishing between behaviors such as noise-induced turning, non-auxiliary road lane changes, and intersection turns and main and auxiliary road lane changes. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic flowchart of a road segment-level auxiliary road detection method based on trajectory data according to an embodiment of this application;
[0048] Figure 2 This is a schematic diagram of the projection distance and azimuth angle provided in the embodiments of this application;
[0049] Figure 3 This is a schematic diagram of an included angular distance provided in an embodiment of this application;
[0050] Figure 4 This is a schematic diagram of the structure of a road segment-level auxiliary road detection device based on trajectory data provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not limited to the steps or modules listed, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to such process, method, product, or apparatus.
[0054] It should be noted that the terms "first" and "second" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permitted. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in an order other than those described or illustrated herein.
[0055] It is understood that the road segment-level auxiliary road detection method based on trajectory data provided in this application embodiment can be applied to scenarios such as lane-level navigation, urban road network mapping, and traffic planning. After completing the auxiliary road detection of the target detection road segment, the detected main road, auxiliary road, and main road-auxiliary road entry and exit point information can be updated to the urban road network, and then used in lane-level navigation services, or as technical support for road network recognition in autonomous driving technology. The acquired information can also be updated to the urban road network. This application embodiment does not limit this.
[0056] It is understood that the road segment-level auxiliary road detection method based on trajectory data provided in this application embodiment can be implemented through a combination of one or more entities such as in-vehicle infotainment systems, various terminal devices (including but not limited to personal computers, mobile terminals, etc.), navigation devices, and satellites. For example, the driving trajectory within the target detection road segment can be acquired via satellite, and calculations can be performed on the terminal device based on the extracted driving trajectory data to identify the entry and exit points of the main and auxiliary roads. The identification results can be saved to the server of the navigation service provider or uploaded to the vehicle network platform. This application embodiment does not limit this.
[0057] The present application will now be described in detail with reference to specific embodiments.
[0058] Next, combine Figure 1 Taking the method of detecting road segments based on trajectory data using a terminal device as an example, this application introduces the method for detecting road segments based on trajectory data provided in its embodiments. Please refer to [link to relevant documentation] for details. Figure 1 The method for detecting road segments based on trajectory data includes the following steps:
[0059] S101, acquire multiple driving trajectories within the target detection section, and identify the trajectory type of each driving trajectory through a trained trajectory feature recognition model; trajectory types include lane change trajectories and non-lane change trajectories.
[0060] Specifically, the target detection road segment can be a segment to be detected extracted from existing road network information, or all driving trajectories of the corresponding road segment can be obtained from the navigation service provider, or the driving trajectory of the vehicle traveling on the corresponding road segment can be obtained from the vehicle network platform. This application embodiment does not limit this.
[0061] Specifically, the trajectory feature recognition model can be trained according to the following steps:
[0062] The projected distance from each trajectory point in the sample's driving trajectory to the target detection segment is obtained, which is the perpendicular distance from the trajectory point to the straight line segment formed by connecting the first and last points of the target detection segment.
[0063] For example, such as Figure 2 As shown, the driving trajectory S1 includes trajectory points s1, s2, s3, s4 and s5. The starting point of the target detection segment is R1 and the ending point is R2. Perpendicular segments can be drawn from trajectory points s1, s2, s3, s4 and s5 to the line connecting R1 and R2 respectively. Then, the actual distance corresponding to the perpendicular segment can be calculated according to the coordinates and the map scale, which is the projected distance.
[0064] Understandably, the straight line segment connecting the beginning and end points of the target detection segment can be the centerline of the target detection segment, or any straight line segment parallel to the centerline can be selected as a reference for calculating the projected distance.
[0065] Understandably, some target detection sections have curves, and a curved line segment parallel to the road edge can be set as a reference for calculating the projected distance.
[0066] The angular distance between each trajectory point in the sample's driving trajectory and the driving direction of the target detection road segment is obtained. The angular distance can be calculated based on the azimuth angle of each trajectory point.
[0067] For example, such as Figure 2 As shown, the angle between the line connecting trajectory points s1 and s2 and the line connecting R1 and R2 is the azimuth angle p_α of trajectory point s1. For any trajectory point i, the azimuth angle p_α of trajectory point i can be used as a basis for... i Calculate the included angular distance d_αi Apply the formula:
[0068]
[0069] Where r_α is the direction of travel for the target detection segment, and d_α i That is, the angular distance corresponding to the trajectory point i, which is also the cosine distance.
[0070] Further, based on the statistical results of the included angle distance and projection distance in the trajectory data, lane change trajectories and non-lane change trajectories are filtered out, and the trained trajectory feature recognition model in S101 is obtained.
[0071] Specifically, multiple driving trajectories within the target detection segment can be input into the above-trained trajectory feature recognition model. The projected distance from each driving trajectory to the target detection segment can be determined through the trained trajectory feature recognition model. The angular distance between the direction angle of each trajectory point in the driving trajectory and the driving direction of the target detection segment can be calculated respectively.
[0072] Calculate the range and standard deviation of the projected distances corresponding to each trajectory point in the driving trajectory, and obtain the maximum value of the included angle distance;
[0073] The range, standard deviation, and maximum value are input into the trajectory feature recognition model. If the range, standard deviation, and maximum value are all greater than the corresponding threshold, the driving trajectory is determined to be a lane change trajectory; otherwise, the driving trajectory is determined to be a non-lane change trajectory.
[0074] For example, the driving trajectory D can be denoted as the set of projected distances of trajectory point i as D = {d1, d2, ..., d...} n Let A_D = {d_α1, d_α2, ..., d_α} (n≥3), where A_D is the set of angular distances between points i in the trajectory D. n (n≥3).
[0075] The range of the projected distance in the driving trajectory D is ptp(D), the standard deviation of the projected distance in the driving trajectory D is std(D), and the maximum value of the angular distance in the driving trajectory D is max(A_D).
[0076] The following conditions can be set:
[0077] (ptp(D)>10∧(std(D)>3)∧(max(A_D)>0.2, where the symbol ∧ means "and", that is, the range of array D is greater than 10 and the standard deviation of array D is greater than 3 and the maximum value of array A_D is greater than 0.2. The trajectory that satisfies this condition is the lane change trajectory.
[0078] Alternatively, another condition can be set as follows:
[0079] (ptp(D)≤10∨(std(D)≤3)∨(max(A_D)≤0.2, where the symbol ∨ means "or", that is, the range of array D is not greater than 10 or the standard deviation of array D is not greater than 3 or the maximum value of array A_D is not greater than 0.2. The trajectory that satisfies this condition is a non-lane change trajectory.
[0080] Understandably, the threshold for the range is set to 10, the threshold for the standard deviation is set to 3, and the threshold for the maximum value is set to 0.2. The size of the threshold can be adjusted based on experience, considering factors such as road segment, average driving speed, and number of trajectory points. This application does not limit this.
[0081] In some embodiments, trajectory cleaning can be performed on multiple measured driving trajectories based on at least one of the following methods, including:
[0082] Duplicate driving trajectories are deleted based on the time and location corresponding to each driving trajectory, and / or trajectories with speeds higher than the upper limit or lower than the lower limit are deleted based on the average driving speed of the driving trajectory.
[0083] After completing trajectory cleaning, the step of identifying trajectory type using the trained trajectory feature recognition model in S101 above is then executed.
[0084] S102, Based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment, determine the abrupt change interval of the lane change trajectory, and extract the abrupt change trajectory points within the abrupt change interval.
[0085] Specifically, the initial trajectory point can be determined based on the angular distance between each trajectory point in the lane change trajectory, that is, the trajectory point corresponding to the maximum angular distance in the lane change trajectory is the initial trajectory point of the corresponding sudden change interval.
[0086] For example, such as Figure 3 The graph shown is a curve representing the angular distance between each trajectory point and the order of the trajectory points in a lane change trajectory. The horizontal axis is plotted as the order of the trajectory points 0-30, and the angular distance is plotted as the vertical axis. Figure 3 It can be clearly observed that the maximum value of the included angle distance is O3. The trajectory point corresponding to O3 can be selected as the initial trajectory point to generate the sudden change interval.
[0087] Specifically, all trajectory points in the lane change trajectory can be sorted according to the time sequence, and each trajectory point after the time corresponding to the initial trajectory point can be selected according to the time sequence until the included angle distance of any trajectory point meets the preset condition, and the first sudden change interval is output.
[0088] For example, the angle distance between trajectory points j, j+1, ..., j+m can be traversed sequentially from the initial trajectory point j to the right along the time axis of the time sequence. If the angle distance between trajectory points j+m meets the preset condition, then the interval between trajectory point j and trajectory point j+m is recorded as the first mutation interval.
[0089] Specifically, each trajectory point before the time corresponding to the initial trajectory point is selected according to the time sequence until the included angle distance of any trajectory point meets the preset condition, and the second mutation interval is output.
[0090] For example, the angle distance between trajectory points j, j-1, ..., jk can be traversed sequentially from the initial trajectory point j to the left along the time axis of the time sequence. If the angle distance between trajectory points jk and jk satisfies the preset condition, then the interval between trajectory points j and jk is recorded as the second mutation interval.
[0091] Where j, m, and k are all positive integers.
[0092] Furthermore, the first mutation interval and the second mutation interval are merged into a single mutation interval.
[0093] The preset conditions include: the angular distance between trajectory points is less than a preset angular distance threshold or the angular distance between trajectory points is less than the angular distance between trajectory points adjacent to the trajectory point.
[0094] Understandably, for the first mutation interval, the trajectory point immediately adjacent to trajectory point j is trajectory point j+1, and the preset condition can be expressed as the following formula:
[0095] (d_α j <0.1)∨(d_α j <d_α j+1 );
[0096] For the second mutation interval, the trajectory point immediately adjacent to trajectory point j is trajectory point j-1, and the preset condition can be expressed as the following formula:
[0097] (d_α j <0.1)∨(d_α j <d_α j-1 );
[0098] The preset angle distance threshold can be set to 0.1 based on historical measurement data, or it can be adjusted according to the actual situation. This application does not limit this.
[0099] In some embodiments, for a lane change trajectory, the point where the rate of change of the included angle distance is 0 can be obtained as the extreme point. The lane change trajectory can be divided into multiple connected sub-trajectories based on the extreme points, and the trajectory point corresponding to the maximum included angle distance in each sub-trajectory can be taken as the initial trajectory point.
[0100] Optionally, after selecting the trajectory point corresponding to the maximum angle distance of a lane change trajectory as the initial trajectory point and generating the sudden change interval, the trajectory point corresponding to the maximum angle distance among the remaining trajectory points in the lane change trajectory can be selected as the initial trajectory point to generate the sudden change interval until the maximum angle distance is less than the corresponding threshold.
[0101] For example, such as Figure 3 The image shows a graph of the angular distance between each trajectory point and the order of the trajectory points in a lane change trajectory. The order of the trajectory points is plotted on the horizontal axis, and the angular distance is plotted on the vertical axis. Figure 3 Three extreme points of angular distance, O1, O2, and O3, can be clearly observed. Points O1, O2, and O3 can be selected as initial trajectory points to generate abrupt change intervals. Among them, the angular distance at O1 is less than 0.2, so point O1 can be excluded, and only O2 and O3 can be selected as initial trajectory points to generate abrupt change intervals.
[0102] In some embodiments, certain mutation segments may be identified as two mutation intervals. Two mutation intervals that meet the merging criteria can be merged. The merging criteria can be set as: mutation interval Q h The final trajectory point and the abrupt change interval Q h+1 The first trajectory point is consistent, and the trend of the change in the projection distance from the trajectory point to the target detection section in the two abrupt change intervals is consistent, either increasing or decreasing.
[0103] In some embodiments, after determining the abrupt change interval, considering that turning behavior may also be identified as an abrupt change interval due to the intersection of some road segments with multiple branch roads and forks, it is necessary to filter out the abrupt change intervals corresponding to turning behavior. Whether an abrupt change interval is a turning interval containing turning behavior can be determined by the magnitude of the change in the azimuth angle of the trajectory point, including:
[0104] Obtain the direction angle corresponding to each trajectory point of the lane change trajectory, and calculate the change range of the direction angle of multiple trajectory points of the lane change trajectory.
[0105] For example, the change in the direction angle can be intuitively reflected based on the correspondence between the time and the direction angle of the corresponding trajectory point, or the difference in the direction angle between every two trajectory points can be calculated to reflect the trend of the change in the direction angle. This application does not limit this.
[0106] If the change is greater than the preset direction angle threshold, the corresponding abrupt change interval is determined to be a turning interval, and the turning interval is deleted.
[0107] For example, the change range of the azimuth angle of the trajectory point in the lane change behavior of the main and auxiliary roads is generally around 15°, while in the turning behavior, the change range of the azimuth angle is generally close to 90°, thus filtering the turning behavior and filtering the abrupt change range containing the turning behavior.
[0108] Understandably, the preset azimuth angle threshold for turning behavior can be set according to actual road conditions, and this application embodiment does not limit this.
[0109] In some embodiments, after determining the mutation interval, the mutation interval can be processed according to the projection distance to extract drift trajectory points in the lane change trajectory whose projection distance is greater than the projection distance of a preset trajectory point, and the drift intervals corresponding to multiple drift trajectory points can be removed from the mutation interval.
[0110] Specifically, the trajectory point in the middle can be determined as the mutation trajectory point based on the sorting of trajectory points within the mutation interval. If there is an odd number of trajectory points within the mutation interval, the middle trajectory point corresponding to the median number is selected as the mutation trajectory point based on the sorting result. For example, for trajectory points 1, 2, 3, 4, 5, 6, and 7, the middle trajectory point with the index 4 is selected as the mutation trajectory point.
[0111] If there is an even number of trajectory points within the mutation interval, then based on the sorting result, the geometric center of the trajectory point with the two middle indices in the sort is selected as the mutation trajectory point. This can be understood as: for 2p trajectory points with middle indices p and p+1, the geometric center of trajectory point p and trajectory point p+1, i.e., the midpoint of the line connecting the two, is selected as the mutation trajectory point. For example, for trajectory points 1, 2, 3, 4, 5, 6, 7, 8, with two middle indices 4 and 5, trajectory points 4 and 5 are selected, and the midpoint between them is calculated to obtain the mutation trajectory point.
[0112] S103, determine the clustering characteristics of the mutation trajectory points based on the set of mutation trajectory points, and determine the mutation interval where there is an auxiliary road based on the clustering characteristics.
[0113] Specifically, a set of abrupt change trajectory points for each lane change trajectory can be obtained. The distribution of all trajectory points can be calculated based on the coordinates of the abrupt change trajectory points. A circular search window of a preset size can be set. Based on Ripley's K function, the clustering / discrete characteristics of the abrupt change trajectory points are analyzed sequentially along the lane change trajectory based on the given search window. This can be understood as follows: when the density of abrupt change trajectory points in the search window is less than the density threshold, it is determined that the trajectory points in the corresponding search window are discretely distributed; when the density of abrupt change trajectory points in the search window is greater than the density threshold, it is determined that the trajectory points in the corresponding search window are clustered.
[0114] Optionally, the horizontal axis can be set to the distance between the center of the search window and the starting point of the target detection segment, and the horizontal axis can be the result of Ripley's K function output, which represents the density of trajectory points within each search window.
[0115] Specifically, if a significantly clustered distribution is determined to exist, then an auxiliary path exists within the corresponding mutation interval.
[0116] S104. Based on the density of mutation trajectory points in the mutation interval with auxiliary roads, extract the cluster center of the mutation trajectory points, and determine the location of the main and auxiliary road entrances and exits in the target detection section based on the cluster center.
[0117] Specifically, a set of abrupt change trajectory points corresponding to the target detection road segment can be established based on the abrupt change interval where there are auxiliary roads, and the density distribution of the abrupt change trajectory points can be calculated using kernel density estimation.
[0118] Specifically, the cluster center of the mutation trajectory point can be determined by the density peak clustering method. The cluster center is the main and auxiliary road entrance and exit point within the target detection section.
[0119] Optionally, a raster map can be generated based on the target detection road segment to determine the location coordinates of the main and auxiliary road entrances and exits.
[0120] In some embodiments, the types of main and auxiliary road entry and exit points can be further determined. The types of main and auxiliary road entry and exit points include a first type, a second type, and a third type. The first type is a node that only allows the main road to turn into the auxiliary road, i.e., the main road exit and the auxiliary road entrance. The second type is a node that only allows the auxiliary road to turn into the main road, i.e., the auxiliary road exit and the main road entrance. The third type is a node that allows both the main road to turn into the auxiliary road and the auxiliary road to turn into the main road.
[0121] Specifically, the type of the corresponding abrupt change trajectory point can be determined based on the relative positional relationship between all abrupt change trajectory points within a preset range centered on the main and auxiliary road entry / exit points and the target detection road segment; among which, the types of abrupt change trajectory points include main road to auxiliary road trajectory points and auxiliary road to main road trajectory points.
[0122] Optionally, a preset range can be set as a circle with a radius of 10m centered at the main and auxiliary road entrance / exit points.
[0123] Understandably, the direction of travel can be determined by the changing trends of the trajectory point's direction angle, projected distance, and included angle distance. It can be determined whether the corresponding driving direction is to leave the auxiliary road and enter the main road or leave the main road and enter the auxiliary road. This application does not limit this.
[0124] Specifically, the ratio of the trajectory points from the main road to the auxiliary road or from the auxiliary road to the main road to the total number of all abrupt change trajectory points can be calculated.
[0125] For example, taking the calculation of the ratio of the trajectory points from the main road to the auxiliary road to the total number of all abrupt change trajectory points as an example, the formula is as follows:
[0126]
[0127] Where, n type=0 The number of trajectory points from the main road to the auxiliary road, N type=1 N represents the number of trajectory points from the auxiliary road to the main road. type=0 + type=1 This is the total number of all mutation trajectory points, and P_T_index is the index used to determine the type of entry and exit points of the main and auxiliary roads, i.e., the ratio mentioned above.
[0128] For example, if P_T_index is greater than or equal to 0.9, the corresponding main and auxiliary road entry / exit points are determined to be of the first type, that is, nodes that only allow the main road to turn into the auxiliary road, i.e., main road exits and auxiliary road entrances; if P_T_index is less than or equal to 0.1, the corresponding main and auxiliary road entry / exit points are determined to be of the second type, that is, nodes that only allow the auxiliary road to turn into the main road, i.e., auxiliary road exits and main road entrances; if P_T_index is within the range (0.1, 0.9), the corresponding main and auxiliary road entry / exit points are determined to be of the third type, that is, nodes that allow the main road to turn into the auxiliary road and the auxiliary road to turn into the main road.
[0129] The following are apparatus embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of this application.
[0130] Please see below. Figure 4 This is a schematic diagram of a road segment-level auxiliary road detection device based on trajectory data, provided as an exemplary embodiment of this application. This device can be implemented as all or part of a terminal through software, hardware, or a combination of both, or it can be integrated as an independent module on a server. The road segment-level auxiliary road detection device based on trajectory data in this embodiment can be applied to a terminal or the cloud. The device 40 includes a trajectory classification module 410, a first identification module 420, and a second identification module 430, wherein:
[0131] The trajectory classification module 410 is used to acquire multiple driving trajectories within the target detection road segment and identify the trajectory type of each driving trajectory through a trained trajectory feature recognition model; the trajectory type includes lane change trajectory and non-lane change trajectory.
[0132] The first identification module 420 is used to determine the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment, and to extract the abrupt change trajectory points within the abrupt change interval;
[0133] The first identification module 420 is further configured to determine the clustering characteristics of the mutation trajectory points based on the set of mutation trajectory points, and determine the mutation interval where there is an auxiliary path based on the clustering characteristics;
[0134] The second identification module 430 is used to extract the cluster center of the mutation trajectory points based on the mutation trajectory point density of the mutation interval where the auxiliary road exists, and to determine the location of the main and auxiliary road entrance and exit points in the target detection road segment based on the cluster center.
[0135] It should be noted that the device 40 provided in the above embodiments, when executing the road segment-level auxiliary road detection method based on trajectory data, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiments and the road segment-level auxiliary road detection method embodiments based on trajectory data belong to the same concept, and its implementation process is detailed in the method embodiments, which will not be repeated here.
[0136] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0137] Please see Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0138] like Figure 5 As shown, the electronic device 500 includes a processor 501 and a memory 502.
[0139] In this embodiment, the processor 501 is the control center of the computer system, and can be a processor of a physical machine or a processor of a virtual machine. The processor 501 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 501 can be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array).
[0140] Processor 501 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake-up state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state.
[0141] Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments of this application, the non-transitory computer-readable storage media in memory 502 is used to store at least one instruction, which is executed by processor 501 to implement the method in the embodiments of this application.
[0142] In some embodiments, the electronic device 500 further includes a peripheral device interface 503 and at least one peripheral device. The processor 501, memory 502, and peripheral device interface 503 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 503 via a bus, signal line, or circuit board. Specifically, the peripheral devices include: the display screen 504, camera 505, and audio circuitry 506. The peripheral device interface 503 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 501 and memory 502.
[0143] In some embodiments of this application, the processor 501, memory 502, and peripheral device interface 503 are integrated on the same chip or circuit board; in other embodiments of this application, any one or two of the processor 501, memory 502, and peripheral device interface 503 can be implemented on separate chips or circuit boards. This application does not specifically limit the implementation in this regard.
[0144] Display screen 504 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 504 is a touch display, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 501 for processing. In this case, display screen 504 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard.
[0145] In some embodiments of this application, there may be one display screen 504, disposed on the front panel of the electronic device 500; in other embodiments, there may be at least two display screens 504, disposed on different surfaces of the electronic device 500 or in a folded design; in still other embodiments, the display screen 504 may be a flexible display screen, disposed on a curved or folded surface of the electronic device 500. Furthermore, the display screen 504 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. The display screen 504 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0146] Camera 505 is used to capture images or videos. Optionally, camera 505 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device, and the rear-facing camera is located on the back of the electronic device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments of this application, camera 505 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0147] The audio circuit 506 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 501 for processing. For stereo acquisition or sound reduction purposes, there may be multiple microphones, which are respectively located in different parts of the electronic device 500. The microphone may also be an array microphone or an omnidirectional acquisition microphone.
[0148] Power supply 507 is used to supply power to the various components in electronic device 500. Power supply 507 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 507 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0149] The block diagram of the electronic device shown in the embodiments of this application does not constitute a limitation on the electronic device 500. The electronic device 500 may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0150] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the methods in any of the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting road segments as auxiliary roads based on trajectory data, characterized in that, include: Multiple driving trajectories within the target detection section are acquired, and the trajectory type of each driving trajectory is identified through a trained trajectory feature recognition model; The trajectory types include lane-change trajectories and non-lane-change trajectories. The steps for identifying trajectory types include: Determine the projected distance of each driving trajectory to the target detection road segment, and calculate the angle between the direction angle of each trajectory point in the driving trajectory and the driving direction of the target detection road segment; Calculate the range and standard deviation of the projected distances corresponding to each trajectory point in the driving trajectory, and obtain the maximum value of the included angle distance; The range, standard deviation, and maximum value are input into the trajectory feature recognition model. If the range, standard deviation, and maximum value are all greater than the corresponding threshold, the type of the driving trajectory is determined to be the lane change trajectory; otherwise, the type of the driving trajectory is determined to be the non-lane change trajectory. Based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment, the abrupt change interval of the lane change trajectory is determined, and the abrupt change trajectory points within the abrupt change interval are extracted. Based on the set of mutation trajectory points, the clustering characteristics of the mutation trajectory points are determined, and based on the clustering characteristics, the mutation intervals where auxiliary paths exist are determined; Based on the density of mutation trajectory points in the mutation interval where there are auxiliary roads, the cluster centers of mutation trajectory points are extracted, and the positions of the main and auxiliary road entry and exit points in the target detection road segment are determined based on the cluster centers. Determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment includes: The trajectory point corresponding to the maximum angle distance in the lane change trajectory is taken as the initial trajectory point of the corresponding sudden change interval; Obtain the time sequence of all trajectory points in the lane change trajectory, select each trajectory point after the time corresponding to the initial trajectory point according to the time sequence, until the included angle distance of any trajectory point meets the preset condition, and output the first sudden change interval. According to the time sequence, select each trajectory point before the time corresponding to the initial trajectory point until the included angle distance of any trajectory point satisfies the preset condition, and output the second mutation interval; The first mutation interval and the second mutation interval are merged into the mutation interval; The preset conditions include: the included angle distance between the trajectory points is less than a preset included angle distance threshold or the included angle distance between the trajectory points is less than the included angle distance between the trajectory points adjacent to the trajectory points.
2. The method for detecting road segments based on trajectory data according to claim 1, characterized in that, After determining the locations of the main and auxiliary road entry and exit points within the target detection road segment based on the cluster centers, the method further includes: The type of the corresponding abrupt change trajectory point is determined based on the relative positional relationship between all abrupt change trajectory points within a preset range centered on the main and auxiliary road entry / exit points and the target detection road segment; wherein, the type of abrupt change trajectory point includes main road to auxiliary road trajectory points and auxiliary road to main road trajectory points; Calculate the ratio of the trajectory points from the main road to the auxiliary road or from the auxiliary road to the main road to the total number of all the trajectory points with abrupt changes; The type of the main and auxiliary road entry and exit points is determined based on the ratio.
3. The method for detecting road segments based on trajectory data according to claim 1, characterized in that, After acquiring multiple driving trajectories within the target detection section, trajectory cleaning is performed on these multiple driving trajectories, including: Duplicate driving trajectories are deleted based on the time and location corresponding to each driving trajectory; And / or, delete driving trajectories whose driving speed does not fall within the preset speed range; The process of identifying the trajectory type of each driving trajectory using a trained trajectory feature recognition model includes: The trajectory type of the cleaned driving trajectory is identified by a trained trajectory feature recognition model.
4. The method for detecting road segments based on trajectory data according to claim 1, characterized in that, After determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection segment, the method further includes: Obtain drift trajectory points in the lane change trajectory whose projected distance is greater than the preset trajectory point projection distance, and remove the drift intervals corresponding to multiple drift trajectory points from the sudden change interval.
5. The method for detecting road segments based on trajectory data according to claim 1 or 4, characterized in that, The extraction of mutation trajectory points within the mutation interval includes: If there are an odd number of trajectory points within the mutation interval, the trajectory points within the mutation interval are sorted according to the direction of the driving trajectory, and the middle trajectory point corresponding to the median number is selected as the mutation trajectory point. If there are an even number of trajectory points within the mutation interval, then the geometric center of the trajectory points with the two middle numbers in the sorting is selected as the mutation trajectory point.
6. The method for detecting road segments based on trajectory data according to claim 1, characterized in that, After determining the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment, the method further includes: Obtain the orientation angle corresponding to each trajectory point within the mutation interval; Calculate the magnitude of the change in the orientation angle of multiple trajectory points within the abrupt change interval; If the change amplitude is greater than a preset direction angle threshold, the corresponding abrupt change interval is determined to be a turning interval, and the turning interval is deleted.
7. An apparatus for a road segment-level auxiliary road detection method based on trajectory data as described in any one of claims 1-6, characterized in that, The device includes: The trajectory classification module is used to acquire multiple driving trajectories within the target detection road segment and identify the trajectory type of each driving trajectory through a trained trajectory feature recognition model; the trajectory types include lane change trajectories and non-lane change trajectories. The first identification module is used to determine the abrupt change interval of the lane change trajectory based on the relative positional relationship between each trajectory point in the lane change trajectory and the target detection road segment, and to extract the abrupt change trajectory points within the abrupt change interval; The first identification module is further configured to determine the clustering characteristics of the mutation trajectory points based on the set of mutation trajectory points, and determine the mutation interval where an auxiliary path exists based on the clustering characteristics; The second identification module is used to extract the cluster center of the mutation trajectory points based on the mutation trajectory point density of the mutation interval where the auxiliary road exists, and to determine the location of the main and auxiliary road entrance and exit points in the target detection road segment based on the cluster center.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the road segment-level auxiliary road detection method based on trajectory data as described in any one of claims 1 to 6.