Intersection virtual lane generation method and device, electronic equipment and storage medium
By generating virtual lanes that meet curvature and non-interference conditions and combining them with historical trajectory data, the problems of lane conflicts and dynamic environment adaptability caused by manually marked guide lines are solved, and efficient and safe passage of unmanned vehicles at intersections is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEOLIX TECH CO LTD
- Filing Date
- 2025-09-19
- Publication Date
- 2026-07-24
AI Technical Summary
In existing autonomous driving technologies, the reliance on manually marked turn lines leads to lane conflicts, makes it difficult to conform to human driving habits, and cannot adapt to dynamic traffic environments, affecting the efficiency and safety of autonomous vehicles at intersections.
Virtual lanes are generated based on intersection information. By fitting a virtual lane function, virtual lanes that meet the curvature and non-interference conditions are selected. Combined with historical trajectory data, the virtual lanes are dynamically adjusted to generate virtual lanes that conform to human driving habits.
To improve the efficiency and safety of autonomous vehicle traffic at intersections, avoid lane conflicts, adapt to dynamic traffic environments, and enhance the driving safety and efficiency of autonomous vehicles.
Smart Images

Figure CN120942327B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of autonomous driving technology, specifically relating to a method, device, electronic device, and storage medium for generating virtual lanes at intersections. Background Technology
[0002] Currently, autonomous driving heavily relies on manually drawn high-precision map lane lines, especially at intersections where there are no actual lane lines. Manually marked turn guide lines provide essential driving references for driverless vehicles. However, this method has the following significant drawbacks: 1. Manually marked turn guide lines may cause lane conflicts due to insufficient accuracy, such as overlapping left-turn lane lines in opposite directions, leading to trajectory interference for the driverless vehicle; 2. Preset lane lines are difficult to perfectly match human driving habits, resulting in inconsistent driving paths between the driverless vehicle and other vehicles, posing safety hazards when following or coordinating through intersections; 3. Static high-precision maps are difficult to adapt to dynamic traffic environments and lack the ability to learn real-time vehicle trajectories, limiting the efficiency and safety of driverless vehicles in complex intersection scenarios. Summary of the Invention
[0003] The purpose of this application is to provide a method, device, electronic device and storage medium for generating virtual lanes at intersections, so as to solve the defects of the existing technology in which unmanned vehicles rely on manually marked turn guide lines for autonomous driving.
[0004] To achieve the above objectives, the first aspect of this application provides a method for generating virtual lanes at intersections, comprising:
[0005] Obtain intersection information, which includes the coordinates and directions of the lane before turning and the lane after turning;
[0006] Based on the intersection information, the start and end point information of the virtual lane is obtained, including the start coordinate range, start vector, end coordinates and end vector of the virtual lane.
[0007] Based on the start and end point information of the virtual lane, a virtual lane function is fitted, and the virtual lane function is associated with the start coordinates of the virtual lane;
[0008] Based on the virtual lane function, the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates is calculated, and the starting coordinates with a maximum curvature less than the curvature threshold are filtered and collected into the first queue.
[0009] Based on the virtual lane function, it is determined whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the oncoming turning lane, and candidate virtual lanes that do not interfere with the oncoming turning lane are filtered and collected into the second queue.
[0010] Based on the second queue, the global virtual lane is obtained.
[0011] In one or more embodiments, the step of obtaining the start and end point information of the virtual lane based on the intersection information includes:
[0012] Based on the intersection information, a launch lane and a recovery lane are constructed. The launch lane is the follow-up straight lane in the same direction of the lane before turning, and the lane after turning is the preceding straight lane in the same direction of the lane after turning.
[0013] Obtain the starting coordinates of the launch lane and the intersection coordinates of the launch lane and the recovery lane to obtain the effective launch lane;
[0014] A mapping relationship between the starting coordinates of the virtual lane and the emissivity is constructed to obtain the range of the starting coordinates of the virtual lane. The emissivity is used to describe the position of the starting point of the virtual lane on the effective transmission lane.
[0015] The starting coordinates of the lane after the turn are used as the ending coordinates of the virtual lane;
[0016] The start-point vector and end-point vector of the virtual lane are obtained based on the vectors of the launch lane and the recovery lane, respectively.
[0017] In one or more embodiments, the step of fitting a virtual lane function based on the start and end point information of the virtual lane includes:
[0018] The start and end points of the virtual lane are used as anchor points;
[0019] Based on the starting coordinates, starting vector, and distance between the starting and ending points of the virtual lane, a first control point is constructed;
[0020] Based on the endpoint coordinates, endpoint vector, and distance between the start and end points of the virtual lane, a second control point is constructed;
[0021] Based on the anchor point, the first control point, and the second control point, a third-order Bézier curve is constructed to obtain the virtual lane function.
[0022] In one or more embodiments, the step of filtering the starting point coordinates where the maximum curvature is less than the curvature threshold includes:
[0023] Traverse the range of starting coordinates of the virtual lanes. When a target starting coordinate is reached, obtain candidate virtual lanes based on the virtual lane function.
[0024] Determine whether the maximum curvature of the candidate virtual lane is less than the curvature threshold;
[0025] If so, collect the target starting coordinates into the first queue, and traverse the next starting coordinates until the traversal is complete.
[0026] In one or more embodiments, the step of screening candidate virtual lanes that do not interfere with the oncoming turning lane includes:
[0027] Traverse the first queue, and when a target starting point coordinate is reached, obtain the candidate virtual lane based on the virtual lane function;
[0028] Determine whether the candidate virtual lane interferes with the oncoming turning lane;
[0029] If not, the candidate virtual lanes are collected into the second queue, and the next starting point coordinates are traversed until the traversal is complete.
[0030] In one or more embodiments, the method for calculating the maximum curvature of the candidate virtual lane includes:
[0031] The candidate virtual lanes are discretized at equal intervals to obtain discrete points;
[0032] Calculate the curvature of each discrete point in the candidate virtual lanes, sort them by size, and obtain the maximum curvature of the candidate virtual lanes.
[0033] In one or more embodiments, the step of determining whether the candidate virtual lane interferes with the oncoming turning lane includes:
[0034] The candidate virtual lanes are discretized at equal intervals to obtain discrete points;
[0035] Obtain the coordinates of the boundary points of the opposing turning lane, and construct several layers of quadtree nodes based on the range of the boundary point coordinates;
[0036] Traverse the discrete points, construct a circular region with the target discrete point as the center and a preset distance as the radius, and determine whether there is a quadtree node that intersects with the circular region.
[0037] If so, traverse the boundary points in the quadtree nodes to determine whether there are any boundary points located within the circular region;
[0038] If so, the alternative virtual lane interferes with the opposing turning lane.
[0039] In one or more embodiments, the method further includes: if there is no quadtree node intersecting with the circular region, then traversing the next discrete point until the traversal is complete.
[0040] In one or more embodiments, the method further includes: if none of the boundary points in the quadtree node are located within the circular region, then traversing the next discrete point until the traversal is complete.
[0041] In one or more embodiments, the step of equidistantly dispersing the candidate virtual lanes includes:
[0042] The total arc length of the candidate virtual lanes is calculated using numerical integration.
[0043] The total arc length is divided into equal parts, and the t value of discrete points is obtained by numerical solution.
[0044] Based on the t value of the discrete point, the coordinates of the discrete point are obtained.
[0045] In one or more embodiments, it further includes:
[0046] Obtain historical trajectory time series of multiple traffic flows, calculate the positional distance and heading angle distance between different historical trajectory time series, and obtain a custom distance;
[0047] Based on the custom distance, a cumulative cost matrix is constructed to obtain the DTW distance between different historical trajectory time series;
[0048] Sequence aggregation is performed based on DTW distance. In each sequence aggregation, two historical trajectory time series with a DTW distance less than a threshold are merged into a new trajectory cluster, and the DTW distance between the trajectory cluster and other historical trajectory time series or trajectory clusters is updated until a unique trajectory cluster is obtained, thus obtaining a historical aggregated trajectory cluster.
[0049] Based on the virtual lane function, the DTW distance between the candidate virtual lanes corresponding to different starting coordinates and the historical aggregated trajectory cluster is calculated. The candidate virtual lane with the smallest DTW distance is selected as the output to obtain the local virtual lane.
[0050] In one or more embodiments, the formula for calculating the location distance is as follows:
[0051] ;
[0052] The formula for calculating the heading angle distance is as follows:
[0053] ;
[0054] The formula for calculating the custom distance is as follows:
[0055] ;
[0056] in, , It is divided into the coordinates of trajectory points and the heading angle of trajectory points in the historical trajectory time series X. , It is divided into the historical trajectory time Y, the coordinates of the trajectory points, and the heading angle of the trajectory points. , As weight;
[0057] The cumulative cost matrix n×m is as follows:
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] In the formula, i=2…n, j=2…m, and the DTW distance is equal to .
[0063] To achieve the above objectives, a second aspect of this application provides an apparatus for generating virtual lanes at intersections, comprising:
[0064] An acquisition module is used to acquire intersection information, which includes the lane before turning and the lane after turning.
[0065] The initial module is used to obtain the start and end point information of the virtual lane based on the intersection information. The start and end point information includes the start coordinate range, start vector, end coordinates and end vector of the virtual lane.
[0066] The fitting module is used to fit a virtual lane function based on the start and end point information of the virtual lane, and the virtual lane function is associated with the start coordinates of the virtual lane.
[0067] The curvature filtering module is used to calculate the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates based on the virtual lane function, and filter the starting coordinates with the maximum curvature less than the curvature threshold and collect them into the first queue.
[0068] The overlap detection module is used to determine, based on the virtual lane function, whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the oncoming turning lane, and to filter out the candidate virtual lanes that do not interfere with the oncoming turning lane and collect them into the second queue.
[0069] The output module is used to obtain the global virtual lane based on the second queue.
[0070] To achieve the above objectives, a third aspect of this application provides an electronic device, comprising:
[0071] At least one processor; and
[0072] A memory that stores instructions, which, when executed by the at least one processor, cause the at least one processor to perform the method for generating virtual lanes at intersections as described in any of the above embodiments.
[0073] To achieve the above objectives, a fourth aspect of this application provides a machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the method for generating virtual lanes at intersections as described in any of the above embodiments.
[0074] The advantages of this application, which differ from existing technologies, are:
[0075] This application combines the intersection topology, curvature constraints, boundary constraints, and collision avoidance optimization at the global level to generate virtual lanes to guide unmanned vehicles to travel along the virtual lanes. The virtual lanes can meet the curvature requirements for normal driving and can effectively avoid conflicts with oncoming lanes, thereby improving the efficiency and safety of unmanned vehicles passing through intersections.
[0076] This application utilizes clustering algorithms to extract typical turning paths based on real-time perceived traffic flow trajectory data at the local level, dynamically generating virtual lanes that conform to human driving habits. This enables autonomous vehicles to adaptively follow traffic flow, improving the efficiency and safety of autonomous vehicle passage through intersections. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 This is a flowchart illustrating one implementation method of the method for generating virtual lanes at intersections in this application;
[0079] Figure 2 yes Figure 1 A flowchart illustrating one embodiment corresponding to S200;
[0080] Figure 3 This is a schematic diagram of the intersection lanes in this application;
[0081] Figure 4 yes Figure 1 A flowchart illustrating one embodiment corresponding to S400;
[0082] Figure 5 yes Figure 1 A flowchart of one embodiment corresponding to S500;
[0083] Figure 6 This is a schematic diagram of one embodiment of the virtual lane generation device for intersections in this application;
[0084] Figure 7 This is a schematic diagram of one embodiment of the electronic device of this application. Detailed Implementation
[0085] To enable those skilled in the art to better understand the technical solutions in this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.
[0086] Manually marked turn guide lines have obvious defects. In order to improve the traffic efficiency and safety of autonomous vehicles when turning at intersections, the applicant has developed a new method for generating virtual lanes at intersections. This method can generate virtual lanes based on actual intersection information to guide autonomous vehicles to travel along the virtual lanes. The virtual lanes can meet the curvature requirements for normal driving and can effectively avoid conflicts with oncoming lanes, thereby improving the efficiency and safety of autonomous vehicles passing through intersections.
[0087] Specifically, please refer to Figure 1 , Figure 1 This is a flowchart illustrating one implementation method of the method for generating virtual lanes at intersections in this application.
[0088] like Figure 1 As shown, the generation method includes:
[0089] S100, Obtain intersection information.
[0090] The intersection information includes the coordinates and directions of the lanes before and after turning. The lane before turning is the lane before a vehicle enters the intersection, and the lane after turning is the lane after a vehicle exits the intersection.
[0091] S200: Based on intersection information, the start and end point information of the virtual lane is obtained.
[0092] The start and end point information includes the start coordinate range, start vector, end coordinates, and end vector of the virtual lane.
[0093] Specifically, please refer to Figure 2 , Figure 2 yes Figure 1 A flowchart illustrating one embodiment corresponding to S200. (For example...) Figure 2 As shown, the methods for obtaining the start and end point information of the virtual lane include:
[0094] S201. Based on intersection information, construct launch lanes and recovery lanes.
[0095] The launch lane is the straight-ahead lane following the lane before the turn, and the lane after the turn is the straight-ahead lane preceding the lane after the turn.
[0096] S202. Obtain the starting coordinates of the launch lane and the coordinates of the intersection of the launch lane and the recovery lane to obtain the effective launch lane.
[0097] Please see Figure 3 , Figure 3 This is a schematic diagram of the intersection lanes in this application. For example... Figure 3 As shown, it is understandable that after a vehicle enters the intersection via the turning lane, it can enter the launch lane and start turning from any point on the valid launch lane until it enters the recovery lane, and finally leaves the recovery lane and enters the turning lane.
[0098] S203. Construct the mapping relationship between the starting coordinates of the virtual lane and the emissivity to obtain the range of the starting coordinates of the virtual lane.
[0099] The emission rate is used to describe the position of the starting point of the virtual lane on the effective emission lane.
[0100] In this embodiment, emissivity is introduced to describe the starting point of the virtual lane. Specifically, the formula for calculating emissivity η can be as follows:
[0101]
[0102] In the formula, As the starting point of the virtual lane, The starting point of the launch lane, This is the intersection of the launch lane and the recovery lane.
[0103] Since the starting point of the virtual lane can be any point on the valid launch lane, it is known that... Using emissivity to characterize the starting coordinate range of a virtual lane can effectively simplify the computation.
[0104] It should be noted that in other embodiments, the starting point of the virtual lane can also be defined directly by the coordinate range, which can also achieve the effect of this embodiment.
[0105] S204. Use the starting coordinates of the lane after turning as the ending coordinates of the virtual lane.
[0106] S205. Based on the vectors of the launch lane and the recovery lane, respectively, obtain the start-point vector and end-point vector of the virtual lane.
[0107] Understandably, the virtual lane turns from a point on the launch lane to the retraction lane, so the start vector and end vector of the virtual lane are consistent with the launch lane and the retraction lane, respectively.
[0108] S300. Based on the start and end point information of the virtual lane, the virtual lane function is obtained by fitting.
[0109] After obtaining the coordinates and vectors of the start and end points of the virtual lane, a virtual lane function can be fitted first, which is associated with the start coordinates of the virtual lane.
[0110] Specifically, in one implementation, fitting can be based on Bézier curves. First, the start and end points of the virtual lane can be used as anchor points. Then, a first control point is constructed based on the start coordinates, start vector, and distance between the start and end points of the virtual lane. Finally, a second control point is constructed based on the end coordinates, end vector, and distance between the start and end points of the virtual lane.
[0111] Based on the two anchor points and two control points obtained, a third-order Bézier curve can be constructed to obtain the virtual lane function.
[0112] Specifically, the anchor points and control points of a third-order Bézier curve are as follows:
[0113]
[0114]
[0115]
[0116]
[0117] In the formula, Let be the starting vector of the virtual lane. The length of the tangent at the starting point. Let be the endpoint vector of the virtual lane. The length of the tangent at the endpoint.
[0118] in, , d is the distance between the start and end points of the virtual lane, and k is the curvature.
[0119] Accordingly, the virtual lane function is as follows:
[0120]
[0121] S400. Based on the virtual lane function, calculate the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates, and filter the starting coordinates with a maximum curvature less than the curvature threshold, and collect them into the first queue.
[0122] After obtaining the virtual lane function, starting coordinates that meet the curvature requirements can be selected based on the known range of starting coordinates of the virtual lane, thereby ensuring that the virtual lane meets the curvature requirements for normal driving.
[0123] Specifically, in one implementation, filtering can be performed by traversing the range of starting coordinates of the virtual lanes. Each time a target starting coordinate is encountered, candidate virtual lanes are obtained based on the virtual lane function, and it is determined whether the maximum curvature of the candidate virtual lane is less than a curvature threshold. If so, the target starting coordinates are collected into a first queue, and the next starting coordinate is traversed until the traversal is complete.
[0124] The starting coordinates of the virtual lane can be represented by the emissivity.
[0125] The method for calculating the maximum curvature of the candidate virtual lanes is described in detail below. Please refer to [link / reference]. Figure 4 , Figure 4 yes Figure 1 A flowchart of one embodiment corresponding to S400.
[0126] like Figure 4 As shown, methods for calculating maximum curvature include:
[0127] S401. Diffusion of the candidate virtual lanes at equal intervals to obtain discrete points.
[0128] Among them, equidistant dispersion can be achieved by calculating the arc length of the virtual lane function. First, the total arc length of the candidate virtual lane is calculated by numerical integration; then, the total arc length is divided into equal parts, and the t value of the discrete point is calculated by numerical solution; finally, the coordinates of the discrete point are obtained based on the t value of the discrete point.
[0129] Specifically, for a third-order Bézier curve, its coordinate formula can be broken down as follows:
[0130]
[0131]
[0132] After differentiating each value separately, the resultant velocity can be obtained as:
[0133]
[0134] in, , , , , ; , , , .
[0135] By integrating the resultant velocity described above, we can obtain the integral function of the Bézier curve, i.e., the total arc length L. t Furthermore, the arc length is divided into equal parts to obtain the t-values of discrete points. The t-values are then input into the function of the candidate virtual lane to obtain the coordinates of the discrete points.
[0136] S402. Calculate the curvature of each discrete point in the candidate virtual lanes, sort them by size, and obtain the maximum curvature of the candidate virtual lanes.
[0137] For a third-order Bézier curve, the formula for calculating its curvature is:
[0138]
[0139] in, The first derivative along the x-axis, The second derivative along the x-axis. The first derivative along the y-axis, It is the second derivative along the y-axis.
[0140] Therefore, the t value of each discrete point can be input into the above formula to obtain the corresponding curvature, and sorted according to size to obtain the maximum curvature of the candidate virtual lane.
[0141] Determine if the maximum curvature is less than the curvature threshold. If it is, the emissivity corresponding to the starting coordinate can be collected into the first queue.
[0142] S500. Based on the virtual lane function, determine whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the opposite turning lane, and filter the candidate virtual lanes that do not interfere with the opposite turning lane and collect them into the second queue.
[0143] After selecting the starting coordinates that meet the curvature threshold requirements, it is possible to further determine whether the candidate virtual lanes corresponding to the starting coordinates interfere with the opposing turning lanes.
[0144] Specifically, in one implementation, this can be done by traversing the first queue. When a target starting point coordinate is reached, a candidate virtual lane is obtained based on the virtual lane function. It is then determined whether the candidate virtual lane interferes with the oncoming turning lane. If not, the candidate virtual lane is collected into the second queue, and the next starting point coordinate is traversed until the traversal is complete.
[0145] The following details the method for determining whether a candidate virtual lane interferes with an oncoming turning lane. Please refer to [link / reference]. Figure 5 , Figure 5 yes Figure 1 A flowchart of one embodiment corresponding to S500.
[0146] like Figure 5As shown, the method includes:
[0147] S501. Diffusion of the candidate virtual lanes at equal intervals to obtain discrete points.
[0148] The method of equidistant dispersion can be the same as that of S401, and will not be described in detail here.
[0149] S502. Obtain the boundary point coordinates of the opposing turning lane, and construct several layers of quadtree nodes based on the range of the boundary point coordinates.
[0150] In this embodiment, interference detection between opposing turning lanes and alternative virtual lanes is achieved based on a quadtree collision detection algorithm.
[0151] First, an initial quadtree node is constructed based on the range of coordinates of the boundary points of the opposing turning lane. For example, the maximum value of the x and y coordinates of the boundary points of the opposing turning lane is x. max and y max The minimum values are x min and y min The initial quadtree node region constructed is: [x min , x max ] × [x max , y max ];
[0152] Furthermore, when there are too many boundary points in a node region, the node region can be further divided into four child nodes, and this division can be performed multiple times until the number of boundary points in each node region exceeds a threshold, thus obtaining a multi-level quadtree node.
[0153] S503. Traverse the discrete points, construct a circular region with the target discrete point as the center and the preset distance as the radius, and determine whether there is a quadtree node that intersects with the circular region.
[0154] Iterate through the discretized points, constructing a circular region centered on each point. For example, for the discretized point (px, py), the radius is... The condition for determining whether a quadtree node intersects with a circular region is:
[0155] .
[0156] If the quadtree node exists, then
[0157] S504. Traverse the boundary points in the quadtree nodes and determine whether there are any boundary points located within the circular region.
[0158] Furthermore, we can traverse the quadtree nodes that intersect with the circular region to determine whether there are boundary points within the circular region.
[0159] For example, for a discrete point (px, py), the radius is Given a circular region, the condition for determining that a boundary point lies within the circular region is: .
[0160] If it exists, then:
[0161] S505, Interference between alternative virtual lanes and opposing turning lanes.
[0162] Understandably, if there are no quadtree nodes intersecting with the circular region, the next discrete point can be traversed until the traversal is complete; if the boundary points of the quadtree nodes intersecting with the circular region are not located within the circular region, the next discrete point can be traversed until the traversal is complete.
[0163] S600, based on the second queue, obtains the global virtual lane.
[0164] Based on the above S400~S500, alternative virtual lanes that meet the curvature requirements and do not interfere with the opposing turning lanes are obtained.
[0165] In one implementation, when there is only one candidate virtual lane in the second queue, it can be used as the global virtual lane; in another implementation, when there are multiple candidate virtual lanes in the second queue, the candidate virtual lane with the smallest maximum curvature can be selected as the global virtual lane.
[0166] In one implementation, a mapping relationship can be established between the global virtual lane and the original lane, which facilitates subsequent invocation.
[0167] In the above embodiments, virtual lanes are generated at the global level by combining the intersection topology structure, curvature constraints, boundary constraints, and collision avoidance optimization, and a mapping relationship between them and lanes in high-precision maps is established to replace the traditional manually drawn fixed lane lines, thereby avoiding lane overlap problems.
[0168] Furthermore, in another implementation, when there are multiple historical traffic flow trajectory information at the intersection, a local virtual lane that conforms to human driving habits can be dynamically generated based on the historical traffic flow trajectory, enabling the unmanned vehicle to adaptively follow the traffic flow.
[0169] like Figure 1 As shown, the method for generating local virtual lanes includes:
[0170] S700: Obtain the historical trajectory time series of multiple traffic flows, calculate the positional distance and heading angle distance between different historical trajectory time series, and obtain the custom distance.
[0171] Based on historical trajectory time series and For example, the distance between positions X and Y is calculated using the Euclidean distance formula, as follows:
[0172] ;
[0173] To calculate the angular distance, we first need to determine the absolute value of the difference between the two angular values, and then normalize this difference to the interval [0, π], as follows:
[0174] ;
[0175] A custom distance can be obtained by weighted summing the positional distance and the heading angle distance, as follows:
[0176] ;
[0177] in, , It is divided into the coordinates of trajectory points and the heading angle of trajectory points in the historical trajectory time series X. , It is divided into the historical trajectory time Y, the coordinates of the trajectory points, and the heading angle of the trajectory points. , As weight.
[0178] S800: Based on a custom distance, construct a cumulative cost matrix to obtain the DTW distance between different historical trajectory time series.
[0179] The cumulative cost matrix n×m is as follows:
[0180] ;
[0181] ;
[0182] ;
[0183] ;
[0184] In the formula, i=2…n, j=2…m.
[0185] After constructing the cumulative cost matrix, the DTW distance is... .
[0186] S900. Based on DTW distance, sequence aggregation is performed. In each sequence aggregation, two historical trajectory time series with a DTW distance less than the threshold are merged into a new trajectory cluster, and the DTW distance between the trajectory cluster and other historical trajectory time series or trajectory clusters is updated until a unique trajectory cluster is obtained, thus obtaining the historical aggregated trajectory cluster.
[0187] Historical trajectory time series with DTW distances less than a threshold are merged into new trajectory clusters, and the DTW distances are updated. Repeated sequences are merged, ultimately resulting in unique trajectory clusters. It should be noted that vehicle trajectory data often intersect, thus requiring partial matching. The partial DTW distance (Dpartial) is defined as the minimum DTW distance between all sub-trajectories in a longer trajectory and another trajectory.
[0188] In addition, the DTW distance between trajectory clusters or between a trajectory cluster and historical trajectory time series is the average of the DTW distances of all samples in the cluster, as follows:
[0189] ;
[0190] in, and These are the sample sizes for clusters A and B, respectively. It is the DTW distance between samples x and y. It is the DTW distance between clusters A and B.
[0191] In particular, in one embodiment, when merging historical trajectory time series, the aforementioned global virtual lane can be introduced as the target, and the two historical trajectory time series with the smallest DTW distance to the global virtual lane can be merged, which can also achieve the effect of this embodiment.
[0192] S1000. Based on the virtual lane function, calculate the DTW distance between the candidate virtual lanes and the historical aggregated trajectory clusters corresponding to different starting coordinates, and select the candidate virtual lane with the smallest DTW distance as the output to obtain the local virtual lane.
[0193] After obtaining the historical trajectory cluster based on historical trajectories, the virtual lane can be made to imitate the historical trajectory as much as possible. Therefore, the DTW distance between the candidate virtual lanes and the historical trajectory cluster corresponding to different starting coordinates can be calculated, and the candidate virtual lane with the smallest DTW distance can be selected as the local virtual lane.
[0194] In one implementation, the DTW distance between different candidate virtual lanes and the historical aggregated trajectory cluster can be calculated by traversing the range of starting coordinates of the virtual lanes. When a target starting coordinate is reached, candidate virtual lanes are obtained based on the virtual lane function, and the DTW distance between the candidate virtual lanes and the historical aggregated trajectory cluster is calculated. After the traversal is completed, the candidate virtual lane with the smallest DTW distance to the historical aggregated trajectory cluster is selected as the output to obtain the local virtual lane.
[0195] Based on the above steps, at the local level, based on real-time perceived traffic flow trajectory data ahead, a clustering algorithm is used to extract typical turning paths and dynamically generate virtual lanes that conform to human driving habits, enabling the autonomous vehicle to adaptively follow the traffic flow.
[0196] This application also provides a device for generating virtual lanes at intersections; please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of one embodiment of the virtual lane generation device for intersections in this application.
[0197] like Figure 6 As shown, the device includes an acquisition module 21, an initialization module 22, a fitting module 23, a curvature screening module 24, an overlap detection module 25, and an output module 26.
[0198] Among them, the acquisition module 21 is used to acquire intersection information, which includes the lane before turning and the lane after turning;
[0199] The initial module 22 is used to obtain the start and end point information of the virtual lane based on the intersection information. The start and end point information includes the start point coordinate range, start point vector, end point coordinates and end point vector of the virtual lane.
[0200] The fitting module 23 is used to fit a virtual lane function based on the start and end point information of the virtual lane, and the virtual lane function is associated with the start coordinates of the virtual lane.
[0201] The curvature filtering module 24 is used to calculate the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates based on the virtual lane function, and filter the starting coordinates with the maximum curvature less than the curvature threshold and collect them into the first queue.
[0202] The overlap detection module 25 is used to determine, based on the virtual lane function, whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the opposite turning lane, and to filter out the candidate virtual lanes that do not interfere with the opposite turning lane and collect them into the second queue.
[0203] Output module 26 is used to obtain the global virtual lane based on the second queue.
[0204] As per the above reference Figures 1 to 5 This specification describes a method for generating virtual lanes at intersections according to embodiments thereof. The details mentioned in the above description of the method embodiments also apply to the device for generating virtual lanes at intersections according to embodiments thereof. The above-described device for generating virtual lanes at intersections can be implemented in hardware, software, or a combination of hardware and software.
[0205] This application also provides an electronic device, please refer to... Figure 7 , Figure 7This is a schematic diagram of one embodiment of the electronic device of this application. For example... Figure 7 As shown, the electronic device 30 may include at least one processor 31, a memory 32 (e.g., non-volatile memory), a RAM 33, and a communication interface 34, and the at least one processor 31, memory 32, RAM 33, and communication interface 34 are connected together via a bus 35. The at least one processor 31 executes at least one computer-readable instruction stored or encoded in the memory 32.
[0206] It should be understood that the computer-executable instructions stored in memory 32, when executed, cause at least one processor 31 to perform the above-described combinations in the various embodiments of this specification. Figures 1-5 The description includes various operations and functions.
[0207] In the embodiments of this specification, electronic device 30 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.
[0208] According to one embodiment, a program product, such as a machine-readable medium, is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figures 1-5 The various operations and functions described. Specifically, a system or apparatus equipped with a readable storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute the instructions stored in the readable storage medium.
[0209] In this case, the program code read from the readable medium itself can perform the functions of any of the above embodiments, and therefore the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of this specification.
[0210] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.
[0211] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this specification should be defined by the appended claims.
[0212] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure. That is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or they may be jointly implemented by certain components in multiple independent devices.
[0213] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.
[0214] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0215] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles applicable herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.
Claims
1. A method for generating virtual lanes at intersections, characterized in that, include: Obtain intersection information, which includes the coordinates and directions of the lane before turning and the lane after turning; Based on the intersection information, the start and end point information of the virtual lane is obtained, including the start coordinate range, start vector, end coordinates and end vector of the virtual lane. Based on the start and end point information of the virtual lane, a virtual lane function is fitted, and the virtual lane function is associated with the start coordinates of the virtual lane; Based on the virtual lane function, the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates is calculated, and the starting coordinates with a maximum curvature less than the curvature threshold are filtered and collected into the first queue. Based on the virtual lane function, it is determined whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the oncoming turning lane, and candidate virtual lanes that do not interfere with the oncoming turning lane are filtered and collected into the second queue. Based on the second queue, the global virtual lanes are obtained; The step of obtaining the start and end point information of the virtual lane based on the intersection information includes: Based on the intersection information, a launch lane and a recovery lane are constructed; Obtain the starting coordinates of the launch lane and the intersection coordinates of the launch lane and the recovery lane to obtain the effective launch lane; A mapping relationship between the starting coordinates of the virtual lane and the emissivity is constructed to obtain the range of the starting coordinates of the virtual lane. The emissivity is used to describe the position of the starting point of the virtual lane on the effective transmission lane.
2. The generation method according to claim 1, characterized in that, The launch lane is the following straight lane in the same direction to the lane before the turn, and the recovery lane is the preceding straight lane in the same direction to the lane after the turn. The step of obtaining the start and end point information of the virtual lane based on the intersection information further includes: The starting coordinates of the lane after the turn are used as the ending coordinates of the virtual lane; The start-point vector and end-point vector of the virtual lane are obtained based on the vectors of the launch lane and the recovery lane, respectively.
3. The generation method according to claim 1, characterized in that, The step of fitting a virtual lane function based on the start and end point information of the virtual lane includes: The start and end points of the virtual lane are used as anchor points; Based on the starting coordinates, starting vector, and distance between the starting and ending points of the virtual lane, a first control point is constructed; Based on the endpoint coordinates, endpoint vector, and distance between the start and end points of the virtual lane, a second control point is constructed; Based on the anchor point, the first control point, and the second control point, a third-order Bézier curve is constructed to obtain the virtual lane function.
4. The generation method according to claim 1, characterized in that, The step of filtering the starting point coordinates where the maximum curvature is less than the curvature threshold includes: Traverse the range of starting coordinates of the virtual lanes. When a target starting coordinate is reached, obtain candidate virtual lanes based on the virtual lane function. Determine whether the maximum curvature of the candidate virtual lane is less than the curvature threshold; If so, collect the target starting point coordinates into the first queue, and traverse the next starting point coordinates until the traversal is complete; and / or, The step of selecting alternative virtual lanes that do not interfere with the oncoming turning lane includes: Traverse the first queue, and when a target starting point coordinate is reached, obtain the candidate virtual lane based on the virtual lane function; Determine whether the candidate virtual lane interferes with the oncoming turning lane; If not, the candidate virtual lanes are collected into the second queue, and the next starting point coordinates are traversed until the traversal is complete.
5. The generation method according to claim 1, characterized in that, The method for calculating the maximum curvature of the candidate virtual lanes includes: The candidate virtual lanes are discretized at equal intervals to obtain discrete points; Calculate the curvature of each discrete point in the candidate virtual lanes, sort them by size, and obtain the maximum curvature of the candidate virtual lanes.
6. The generation method according to claim 1, characterized in that, The steps for determining whether the candidate virtual lane interferes with the oncoming turning lane include: The candidate virtual lanes are discretized at equal intervals to obtain discrete points; Obtain the coordinates of the boundary points of the opposing turning lane, and construct several layers of quadtree nodes based on the range of the boundary point coordinates; Traverse the discrete points, construct a circular region with the target discrete point as the center and a preset distance as the radius, and determine whether there is a quadtree node that intersects with the circular region. If so, traverse the boundary points in the quadtree nodes to determine whether there are any boundary points located within the circular region; If so, the alternative virtual lane interferes with the opposing turning lane.
7. The generation method according to claim 6, characterized in that, Also includes; If no quadtree node intersects with the circular region, then traverse the next discrete point until the traversal is complete; and / or, If none of the boundary points in the quadtree node are located within the circular region, then traverse the next discrete point until the traversal is complete.
8. The generation method according to claim 5 or 6, characterized in that, The step of equally dispersing the candidate virtual lanes includes: The total arc length of the candidate virtual lanes is calculated using numerical integration. The total arc length is divided into equal parts, and the t value of discrete points is obtained by numerical solution. Based on the t value of the discrete point, the coordinates of the discrete point are obtained.
9. The generation method according to claim 1, characterized in that, Also includes: Obtain historical trajectory time series of multiple traffic flows, calculate the positional distance and heading angle distance between different historical trajectory time series, and obtain a custom distance; Based on the custom distance, a cumulative cost matrix is constructed to obtain the DTW distance between different historical trajectory time series; Sequence aggregation is performed based on DTW distance. In each sequence aggregation, two historical trajectory time series with a DTW distance less than a threshold are merged into a new trajectory cluster, and the DTW distance between the trajectory cluster and other historical trajectory time series or trajectory clusters is updated until a unique trajectory cluster is obtained, thus obtaining a historical aggregated trajectory cluster. Based on the virtual lane function, the DTW distance between the candidate virtual lanes corresponding to different starting coordinates and the historical aggregated trajectory cluster is calculated. The candidate virtual lane with the smallest DTW distance is selected as the output to obtain the local virtual lane.
10. The generation method according to claim 9, characterized in that, The formula for calculating the location distance is as follows: ; The formula for calculating the heading angle distance is as follows: ; The formula for calculating the custom distance is as follows: ; in, , It is divided into the coordinates of trajectory points and the heading angle of trajectory points in the historical trajectory time series X. , The trajectory is divided into the coordinates of the trajectory points and the heading angle of the trajectory points in the historical trajectory time series Y. , As weight; The cumulative cost matrix n×m is as follows: ; ; ; ; In the formula, i=2…n, j=2…m, and the DTW distance is equal to .
11. A device for generating virtual lanes at intersections, characterized in that, include: An acquisition module is used to acquire intersection information, which includes the lane before turning and the lane after turning. The initial module is used to obtain the start and end point information of the virtual lane based on the intersection information. The start and end point information includes the start coordinate range, start vector, end coordinates and end vector of the virtual lane. The fitting module is used to fit a virtual lane function based on the start and end point information of the virtual lane, and the virtual lane function is associated with the start coordinates of the virtual lane. The curvature filtering module is used to calculate the maximum curvature of the candidate virtual lanes corresponding to different starting coordinates based on the virtual lane function, and filter the starting coordinates with the maximum curvature less than the curvature threshold and collect them into the first queue. The overlap detection module is used to determine, based on the virtual lane function, whether the candidate virtual lanes corresponding to different starting coordinates in the first queue interfere with the oncoming turning lane, and to filter out the candidate virtual lanes that do not interfere with the oncoming turning lane and collect them into the second queue. The output module is used to obtain the global virtual lane based on the second queue; The step of obtaining the start and end point information of the virtual lane based on the intersection information includes: Based on the intersection information, a launch lane and a recovery lane are constructed; Obtain the starting coordinates of the launch lane and the intersection coordinates of the launch lane and the recovery lane to obtain the effective launch lane; A mapping relationship between the starting coordinates of the virtual lane and the emissivity is constructed to obtain the range of the starting coordinates of the virtual lane. The emissivity is used to describe the position of the starting point of the virtual lane on the effective transmission lane.
12. An electronic device, comprising: At least one processor; as well as A memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the method for generating virtual lanes at intersections as described in any one of claims 1 to 9.
13. A machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the method for generating virtual lanes at an intersection as described in any one of claims 1 to 9.