Lane matching method, device, equipment and storage medium
By constructing a K-dimensional tree dataset and performing nearest neighbor searches, the projection distance from the vehicle to the lane is calculated, and the misjudgment problem of traditional lane matching methods when curvature changes large or lane width is uneven, achieving higher lane binding accuracy and accuracy of intelligent driving decisions.
Patent Information
- Application Number
- CN202411680468.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Traditional lane matching methods are prone to misjudgment when the lane line curvature changes greatly or the lane width is uneven, and it is impossible to accurately identify the lane where the vehicle is located, resulting in insufficient accuracy of lane binding.
By constructing a K-dimensional tree data set, the lane trajectory point coordinates, lane number and vehicle coordinates are effectively organized, the K-dimensional tree is used to search for nearest neighbors, the projection distance between the vehicle and the nearest neighbor candidate points is calculated, and the lane number is determined based on the projection distance and preset binding conditions are determined to bind the vehicle to the lane.
It improves the accuracy of lane binding and can accurately identify the lane where the vehicle is located in the case of large changes in lane line curvature or uneven lane width, improving the quality of the intelligent driving data set and the accuracy of decision-making.
Smart Images

Figure CN119169571B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a lane matching method, device, equipment and storage medium. Background Art
[0002] In the process of intelligent driving, it is necessary to frequently calculate the lane information of the vehicle as the data set of intelligent driving. The accuracy of lane information calculation directly affects the quality of the data set. Accurate lane information can ensure that the lane labels made in the data set, the identification of vehicle lane changes, and the design of interactive labels between vehicles are more accurate. However, the traditional lane matching method has many shortcomings. For example, when the curvature of the lane line changes greatly or the lane width is uneven, it is easy to make misjudgments and fail to accurately identify the lane where the vehicle is located.
[0003] Therefore, how to improve the accuracy of lane binding is a problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of this application is to provide a lane matching method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the accuracy of lane binding.
[0005] To achieve the above object, the present application provides a lane matching method, which includes:
[0006] Get the lane trajectory point coordinates, lane number and vehicle coordinates;
[0007] Constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates;
[0008] Performing a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculating a projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point according to the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates;
[0009] A lane number that meets a preset binding condition is determined based on the projection distance, and the vehicle is bound to the lane corresponding to the lane number.
[0010] In one embodiment, the step of constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates includes:
[0011] Aggregating the lane trajectory point coordinates to obtain a lane trajectory point coordinate data set, wherein the lane trajectory point coordinate data set includes a plurality of groups of lane trajectory point coordinates of different lane numbers, and the lane trajectory point coordinates in the same lane number group are arranged in sequence;
[0012] sorting the lane numbers based on the arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a lane number data set;
[0013] Calculating, according to the lane trajectory point and the vehicle coordinates, a Euclidean distance from the vehicle coordinates to the lane trajectory point, and sorting the Euclidean distances based on an arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a Euclidean distance data set;
[0014] A K-dimensional tree data set is obtained according to the lane trajectory point coordinate data set, the lane number data set and the Euclidean distance data set.
[0015] In one embodiment, the step of performing a nearest neighbor search on the K-dimensional tree data set to obtain a neighbor candidate point, and calculating a projection distance from the vehicle to the lane corresponding to the neighbor candidate point according to the lane trajectory point coordinates corresponding to the neighbor candidate point and the vehicle coordinates includes:
[0016] According to a preset point count threshold, a nearest neighbor search is performed on the Euclidean distance data set to obtain the same number of candidate neighbor points as the point count threshold;
[0017] According to the lane trajectory point coordinate data set, obtaining the current lane trajectory point coordinates corresponding to the neighboring candidate points, and the previous lane trajectory point coordinates and / or the next lane trajectory point coordinates of the current lane trajectory point coordinates;
[0018] Calculate the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates; and / or
[0019] The projection distance is calculated according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates.
[0020] In one embodiment, the step of calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates comprises:
[0021] According to the lane number data set, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the previous lane trajectory point;
[0022] Determining whether the lane number corresponding to the coordinates of the current lane trajectory point is the same as the lane number corresponding to the coordinates of the previous lane trajectory point;
[0023] If the lane number corresponding to the current lane trajectory point coordinates is the same as the lane number corresponding to the previous lane trajectory point coordinates, the projection distance is calculated according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates.
[0024] In one embodiment, the step of calculating the projection distance according to the current lane trajectory point coordinates, the next lane trajectory point coordinates and the vehicle coordinates comprises:
[0025] According to the lane number data set, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the next lane trajectory point;
[0026] Determining whether the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the next lane trajectory point are the same;
[0027] If the lane number corresponding to the current lane trajectory point coordinates and the lane number corresponding to the next lane trajectory point coordinates are the same, the projection distance is calculated according to the current lane trajectory point coordinates, the next lane trajectory point coordinates and the vehicle coordinates.
[0028] In one embodiment, the step of calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates comprises:
[0029] Calculating a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the previous lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the previous lane trajectory point and the coordinates of the vehicle;
[0030] Calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the previous lane trajectory point;
[0031] Calculate the projection distance according to the cosine value of the angle, the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point;
[0032] The step of calculating the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates comprises:
[0033] Calculate a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the subsequent lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates;
[0034] Calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the subsequent lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the subsequent lane trajectory point;
[0035] The projection distance is calculated according to the cosine value of the angle, the coordinates of the trajectory point of the current lane and the coordinates of the trajectory point of the next lane.
[0036] In one embodiment, the step of determining a lane number that meets a preset binding condition based on the projection distance and binding the vehicle to the lane corresponding to the lane number includes:
[0037] Comparing the projection distances to obtain a minimum projection distance;
[0038] Compare the minimum projection distance with a preset distance threshold to obtain a comparison result;
[0039] If the comparison result is that the minimum projection distance is less than the preset distance threshold, then obtaining the lane number corresponding to the minimum projection distance;
[0040] A target lane is determined according to a lane number corresponding to the minimum projection distance, and the vehicle is bound to the target lane.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a lane matching device, the lane matching device comprising:
[0042] An acquisition module, used to obtain the coordinates of lane trajectory points, lane numbers and vehicle coordinates;
[0043] A data set construction module, used to construct a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates;
[0044] A projection distance calculation module is used to perform a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculate the projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point according to the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates;
[0045] The lane binding module is used to determine a lane number that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane corresponding to the lane number.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a lane matching device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane matching method described above.
[0047] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing the lane matching method is stored on the computer-readable storage medium. The program for implementing the lane matching method is executed by a processor to implement the steps of the lane matching method as described above.
[0048] The present application provides a lane matching method, which effectively organizes the data of lane trajectory point coordinates, lane numbers and vehicle coordinates by constructing a K-dimensional tree (Kd tree) data set, and can quickly find several points closest to the vehicle coordinates, namely, neighbor candidate points, by performing a nearest neighbor search on the K-dimensional tree. The projection distance is calculated based on the coordinates of the neighbor candidate points and the vehicle coordinates, and based on the projection distance and preset binding conditions, the target lane can be dynamically selected according to real-time data and bound to the vehicle. Accurate lane calculation helps to improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the lane matching method of the present application;
[0052] Figure 2 This is a data arrangement diagram of a lane trajectory point coordinate data set and a lane number data set of the lane matching method of this application;
[0053] Figure 3 A schematic diagram of the neighboring candidate points, the coordinates of the trajectory points of the previous lane and the coordinates of the trajectory points of the next lane in the lane matching method of this application;
[0054] Figure 4 This is a schematic diagram of the module structure of the lane matching device according to an embodiment of the present application;
[0055] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the lane matching method in the embodiment of the present application.
[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0059] The main solution of the present application is: obtaining lane trajectory point coordinates, lane number and vehicle coordinates; constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates; performing nearest neighbor search on the K-dimensional tree data set to obtain neighbor candidate points, and calculating the projection distance from the vehicle to the lane corresponding to the neighbor candidate point according to the lane trajectory point coordinates corresponding to the neighbor candidate point and the vehicle coordinates; determining the lane number that meets the preset binding conditions based on the projection distance, and binding the vehicle to the lane corresponding to the lane number.
[0060] In the process of intelligent driving, it is necessary to frequently calculate the lane information of the vehicle as the data set of intelligent driving. The accuracy of lane information calculation directly affects the quality of the data set. Accurate lane information can ensure that the lane labels made in the data set, the identification of vehicle lane changes, and the design of interactive labels between vehicles are more accurate. However, the traditional lane matching method has many shortcomings. For example, when the curvature of the lane line changes greatly or the lane width is uneven, it is easy to make misjudgments and fail to accurately identify the lane where the vehicle is located. Therefore, how to improve the accuracy of lane binding is a problem that needs to be solved urgently.
[0061] This application constructs a K-dimensional tree (Kd tree) data set to effectively organize the data of lane trajectory point coordinates, lane numbers, and vehicle coordinates. By performing a nearest neighbor search on the K-dimensional tree, it is possible to quickly find several points closest to the vehicle coordinates, namely, the nearest candidate points. The projection distance is calculated based on the coordinates of the nearest candidate points and the vehicle coordinates, and based on the projection distance and the preset binding conditions, the target lane can be dynamically selected and bound to the vehicle according to real-time data. Accurate lane calculation helps improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions.
[0062] It should be noted that the execution subject of this embodiment may be a lane matching system, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a lane matching device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the lane matching system as an example to illustrate this embodiment and the following embodiments.
[0063] Based on this, this application proposes a lane matching method of the first embodiment, please refer to Figure 1 , the lane matching method includes steps S10 to S40:
[0064] Step S10, obtaining lane trajectory point coordinates, lane number and vehicle coordinates;
[0065] It should be noted that the map of the vehicle at a certain moment consists of multiple lanes (assuming that it consists of M lanes), and each lane has a unique identifier (such as a number, a string, etc.) to distinguish different lanes. For example, the lane number of each lane can be recorded as lane1, lane2, ..., laneM.
[0066] Each lane is defined by two or more track points. The coordinates of the lane track points can be obtained through map data, GPS positioning or other sensors. The track points are distributed along the lane lines and describe the actual shape of the lane.
[0067] Vehicle coordinates represent the precise position of the vehicle on the current road, which can be determined by the vehicle's positioning system (such as GPS, inertial navigation system, etc.) and the vehicle's internal sensors (such as wheel speed sensors, steering wheel angle sensors, etc.). The sensors can provide real-time information such as the vehicle's position, speed, and direction, thereby obtaining the vehicle's precise position in the map or lane coordinate system.
[0068] Step S20, constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates;
[0069] It should be noted that each lane contains a series of lane trajectory point coordinates arranged in order, which are managed separately and organized by lane number. The concatenation process merges the lane trajectory point coordinates of all lanes into a unified data set to obtain a lane trajectory point coordinate data set. At the same time, a corresponding lane number is assigned to each lane trajectory point, and the lane numbers corresponding to the lane trajectory point coordinates are sorted to obtain a lane number data set. In addition, the Euclidean distance from the vehicle coordinates to each lane trajectory point is calculated, and these distances are also arranged in the order corresponding to the lane trajectory point coordinates to obtain a Euclidean distance data set. Finally, a K-dimensional tree (KD Tree) is constructed based on the lane trajectory point coordinate data set, and the lane number data set and the Euclidean distance data set are used as auxiliary information for subsequent query operations in the K-dimensional tree to achieve efficient spatial search and matching. The K-dimensional tree (Kd tree) is a data structure used to organize points in a k-dimensional space, supporting efficient range queries and nearest neighbor searches.
[0070] Step S30, performing a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculating a projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point according to the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates;
[0071] It should be noted that several candidate points of the nearest neighbor are selected from the Euclidean distance data set by performing the nearest neighbor search on the K-dimensional tree data set. For each candidate point, find its corresponding current lane trajectory point coordinates and the front and rear point coordinates. By comparing the lane numbers of the current point and the front and rear point coordinates, it is determined whether the vehicle is traveling in the same lane. If it is in the same lane, based on the front and rear point coordinates and the vehicle coordinates, the relative position of the vehicle relative to the lane corresponding to the nearest candidate point can be determined by analyzing the vector relationship of the coordinate point. According to the different positions of the vehicle relative to the lane, the projection point of the vehicle on the lane is different. According to the different projection point positions, the corresponding method is used to calculate the distance between the vehicle coordinates and the projection point, that is, the projection distance from the vehicle to the lane.
[0072] Step S40: determining a lane number that meets a preset binding condition based on the projection distance, and binding the vehicle to the lane corresponding to the lane number.
[0073] It should be noted that in order to ensure that the vehicle can be accurately identified and bound to the target lane, the width of the lane and the actual position of the vehicle must be considered. Since the lane has a certain width, direct binding may be inaccurate when the vehicle is far away from the lane. Therefore, it is necessary to set a projection distance threshold as a preset binding condition. Only when the minimum projection distance is less than this threshold, the lane with the lane number to which the corresponding lane trajectory point belongs is used as the lane to which the vehicle is bound. In addition, in order to prevent the vehicle from driving in the wrong or significantly deviated direction for a long time, the preset binding condition can also set a lane direction deviation threshold to monitor the vehicle's driving direction and remove data driving in the wrong or significantly deviated direction. When the projection distance meets the projection distance threshold requirement and the lane direction is within the lane direction deviation threshold range, the vehicle is determined to be in the lane and is bound to the lane.
[0074] This embodiment provides a lane matching method, which effectively organizes the data of lane trajectory point coordinates, lane numbers and vehicle coordinates by constructing a K-dimensional tree (Kd tree) data set. By performing a nearest neighbor search on the K-dimensional tree, several points closest to the vehicle coordinates, namely, the nearest candidate points, can be quickly found. The projection distance is calculated based on the coordinates of the nearest candidate points and the vehicle coordinates, and based on the projection distance and the preset binding conditions, the target lane can be dynamically selected according to the real-time data and bound to the vehicle. Accurate lane calculation helps to improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions.
[0075] In a feasible implementation, step S20 may include steps S201 to S204:
[0076] Step S201, aggregating the lane trajectory point coordinates to obtain a lane trajectory point coordinate data set, wherein the lane trajectory point coordinate data set includes a plurality of groups of lane trajectory point coordinates of different lane numbers, and the lane trajectory point coordinates in the same lane number group are arranged in sequence;
[0077] Step S202, sorting the lane numbers based on the arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a lane number data set;
[0078] Step S203, calculating the Euclidean distance from the vehicle coordinates to the lane trajectory point according to the lane trajectory point and the vehicle coordinates, and sorting the Euclidean distance based on the arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a Euclidean distance data set;
[0079] Step S204: obtaining a K-dimensional tree data set according to the lane trajectory point coordinate data set, the lane number data set and the Euclidean distance data set.
[0080] It should be noted that, refer to Figure 2 Each lane contains a set of lane trajectory point coordinates, and the lane trajectory point coordinates of each lane are managed separately. For example, for a lane lane1, it includes several lane trajectory points, which can be recorded as: point11, point12, point13, ... point1N; for a lane laneM, it includes several lane trajectory points, which can be recorded as: pointM1, pointM2, pointM3, ... pointMN.
[0081] Reference Figure 2 ,The process of splicing is to merge the lane trajectory point coordinates of all lanes into a single dataset, which contains all lane trajectory point coordinates of all lanes, and the lanes are grouped or sorted by lane numbers. ,The spliced lane trajectory point coordinate dataset is a list of multidimensional arrays or lists, where each internal list or array represents the coordinates of a point (e.g., [x, y]).
[0082] According to the lane number, the lane number data corresponding to the lane trajectory points in the lane trajectory point coordinate data set can be obtained. Figure 2 , according to the order of the lane trajectory point coordinates in the lane trajectory point coordinate dataset, the lane numbers are sorted to ensure a one-to-one correspondence between the lane numbers and the trajectory point coordinates. The lane number dataset obtained after sorting is a list or array, in which each element represents the lane number corresponding to a lane trajectory point coordinate.
[0083] Calculate the Euclidean distance from the vehicle coordinates to the coordinates of each lane trajectory point. The Euclidean distance is the straight-line distance between two points in Euclidean space. Sort the calculated Euclidean distances according to the order of the lane trajectory point coordinates in the lane trajectory point coordinate dataset to maintain the consistency of the data order so that the lane trajectory point coordinates, lane numbers, and Euclidean distances can correspond one to one. The sorted Euclidean distance dataset is a list or array in which each element represents the Euclidean distance from the vehicle coordinates to the corresponding lane trajectory point coordinates.
[0084] According to the lane trajectory point coordinate data set, lane number data set and Euclidean distance data set, a K-dimensional tree data set is obtained. A K-dimensional tree can be constructed based on the lane trajectory point coordinate data set, and the lane number and Euclidean distance data sets can be used as auxiliary information in the subsequent K-dimensional tree query process.
[0085] In this embodiment, the data processing process is simplified by splicing the lane trajectory point coordinates of all lanes into a unified data set. By generating lane number data that corresponds one-to-one to the lane trajectory point coordinates and sorting them based on the same arrangement order, the consistency between the lane number and the trajectory point coordinates is ensured, so that when querying a specific trajectory point, the corresponding lane number can be quickly found, thereby improving the query efficiency. By calculating the Euclidean distance from the vehicle coordinates to each lane trajectory point and sorting the Euclidean distance based on the arrangement order of the trajectory point coordinates, the trajectory point closest to the vehicle coordinates can be found more quickly in the subsequent nearest neighbor query. A K-dimensional tree can be constructed based on the lane trajectory point coordinate data set, and the lane number and Euclidean distance data sets can be used as auxiliary information in the subsequent K-dimensional tree query process. By constructing a K-dimensional tree, the efficiency of finding the nearest neighbor point in a multidimensional space can be significantly improved, thereby improving the processing efficiency of lane-bound data, which helps to ensure that the vehicle can make driving decisions in a timely and accurate manner.
[0086] In a feasible implementation, step S30 may include steps S301 to S304:
[0087] Step S301, performing a nearest neighbor search on the Euclidean distance data set according to a preset point number threshold, and obtaining candidate neighbor points whose number is the same as the point number threshold;
[0088] Step S302, obtaining the coordinates of the current lane trajectory point corresponding to the neighboring candidate point, and the coordinates of the previous lane trajectory point and / or the next lane trajectory point of the current lane trajectory point according to the lane trajectory point coordinate data set;
[0089] Step S303, calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates; and / or
[0090] Step S304, calculating the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the next lane trajectory point and the vehicle coordinates.
[0091] It should be noted that the preset point count threshold is used to specify how many nearest points need to be selected from the Euclidean distance dataset as candidate points. This value may be set based on factors such as the requirements of the lane binding algorithm, lane width, vehicle size, or computing performance. According to the Euclidean distance dataset, the nearest N points (N equals the preset point count threshold) are found through the nearest neighbor search to obtain the nearest neighbor candidate points.
[0092] For each candidate point in the neighborhood, find the corresponding point in the lane trajectory point coordinate dataset, that is, the current lane trajectory point coordinate. Figure 3 ,For each current lane trajectory point, it is necessary to find the coordinates of its previous point and / or the coordinates of the next point in the lane trajectory point dataset.
[0093] Optionally, step S303 may include steps S3031 to S3033:
[0094] Step S3031, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the previous lane trajectory point according to the lane number data set;
[0095] Step S3032, determining whether the lane number corresponding to the coordinates of the current lane trajectory point is the same as the lane number corresponding to the coordinates of the previous lane trajectory point;
[0096] Step S3033: If the lane number corresponding to the current lane trajectory point coordinates is the same as the lane number corresponding to the previous lane trajectory point coordinates, the projection distance is calculated according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates.
[0097] It should be noted that the lane number corresponding to the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point can be found through the lane number data set. The lane number corresponding to the coordinates of the current lane trajectory point is compared with the lane number corresponding to the coordinates of the previous lane trajectory point. If the lane number corresponding to the coordinates of the current lane trajectory point is the same as the lane number corresponding to the coordinates of the previous lane trajectory point, it can be inferred that the current lane trajectory point and the previous lane trajectory point are in the same lane, and the vehicle may be driving straight in the lane, or making a slight steering adjustment, but has not yet crossed to other lanes.
[0098] If the lane number corresponding to the coordinates of the current lane trajectory point is different from the lane number corresponding to the coordinates of the previous lane trajectory point, indicating that the vehicle has changed lanes, the projection distance calculation and lane binding operation are not performed.
[0099] When it is confirmed that the vehicles are traveling in the same lane, in order to calculate the projection distance, it is first necessary to determine the projection point of the vehicle on the lane. The projection point is the closest point of the vehicle on the lane along the direction perpendicular to the lane. The projection point is different according to the different positions of the vehicle relative to the lane. If the vehicle is located inside the lane segment formed by the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point, the projection point of the vehicle relative to the lane is a point on the lane segment closest to the vehicle. At this time, the projection distance is the vertical distance from the vehicle to the lane segment. The projection distance can be obtained by calculating the relationship between the vehicle and the direction vector of the lane segment. If the vehicle is located outside the lane segment formed by the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point, the projection point of the vehicle relative to the lane corresponds to one of the trajectory points in the lane segment, and the projection distance is the distance from the vehicle to one of the trajectory points in the lane segment.
[0100] Optionally, step S304 may include steps S3041 to S3043:
[0101] Step S3041, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the next lane trajectory point according to the lane number data set;
[0102] Step S3042, determining whether the lane number corresponding to the coordinates of the current lane trajectory point is the same as the lane number corresponding to the coordinates of the next lane trajectory point;
[0103] Step S3043: If the lane number corresponding to the current lane trajectory point coordinates is the same as the lane number corresponding to the next lane trajectory point coordinates, the projection distance is calculated according to the current lane trajectory point coordinates, the next lane trajectory point coordinates and the vehicle coordinates.
[0104] It should be noted that the lane number comparison and judgment process of the current lane trajectory point coordinates and the lane number comparison and judgment process of the next lane trajectory point coordinates is the same as the lane number comparison and judgment process of the current lane trajectory point coordinates and the previous lane trajectory point coordinates. The previous lane trajectory point coordinates are replaced by the next lane trajectory point coordinates, which will not be repeated here.
[0105] In this embodiment, the nearest neighbor search is performed by using a preset point number threshold, which can limit the number of candidate points that need to be processed, reduce the complexity and time of subsequent calculations, find the lane trajectory point most relevant to the vehicle position more quickly, and improve the response speed of the system. By obtaining the coordinates of the current lane trajectory point corresponding to the nearest candidate point and its front and rear coordinates, the projection distance can be calculated, and the relative position relationship between the vehicle and the lane can be evaluated, thereby improving the accuracy of the relative position calculation between the vehicle and the lane, providing accurate data support for lane binding, and helping to improve the accuracy of lane binding.
[0106] In a feasible implementation manner, the step of calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates includes:
[0107] Step S30331, calculating a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the previous lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the previous lane trajectory point and the vehicle coordinates;
[0108] Step S30332, calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the previous lane trajectory point;
[0109] Step S30333, calculating the projection distance according to the cosine value of the angle, the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point;
[0110] It should be noted that the vector from the vehicle to the current lane trajectory point and the vector from the vehicle to the previous lane trajectory point, as well as the vector between the current lane trajectory point and the previous lane trajectory point are calculated respectively, which can be recorded as the first vector from the current lane trajectory point to the vehicle coordinates, the lane trajectory vector from the current lane trajectory point to the previous lane trajectory point and the second vector from the previous lane trajectory point to the vehicle coordinates.
[0111] After obtaining the vectors, calculate the cosine value of the angle between the first vector and the lane trajectory vector, and the cosine value of the angle between the second vector and the lane trajectory vector. The cosine value of the angle can reflect the relationship between the directions of the two vectors. Assume that the current lane trajectory point is point1 (x1, y1), the previous lane trajectory point is point2 (x2, y2), and the vehicle coordinates are agent (p1, p2). When the cosine value of the angle between the first vector and the lane trajectory vector is less than zero, the projection distance is calculated as follows:
[0112]
[0113] When the cosine value of the angle between the first vector and the lane trajectory vector is greater than or equal to zero, the projection distance is calculated as follows:
[0114]
[0115] in, is the cosine of the angle between the first vector and the lane trajectory vector.
[0116] When the cosine value of the angle between the second vector and the lane trajectory vector is less than zero, the projection distance is calculated as follows:
[0117]
[0118] When the cosine value of the angle between the second vector and the lane trajectory vector is greater than or equal to zero, the projection distance is calculated as follows:
[0119]
[0120] in, is the cosine of the angle between the first vector and the lane trajectory vector.
[0121] Optionally, the step of calculating the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates includes:
[0122] Step S30431, calculating a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the subsequent lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates;
[0123] Step S30432, calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the subsequent lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the subsequent lane trajectory point;
[0124] Step S30433, calculating the projection distance according to the cosine value of the angle, the coordinates of the trajectory point of the current lane and the coordinates of the trajectory point of the next lane.
[0125] It should be noted that the process of calculating the projection distance between the coordinates of the current lane trajectory point and the coordinates of the next lane trajectory point is the same as the process of calculating the projection distance between the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point. The coordinates of the previous lane trajectory point are replaced by the coordinates of the next lane trajectory point, which will not be repeated here.
[0126] In this implementation, the projection distance from the vehicle to the lane can be accurately calculated by combining the cosine value of the angle with the coordinates of the previous lane trajectory point, the coordinates of the next lane trajectory point and the vehicle coordinates. As a quantitative indicator, the projection distance can intuitively reflect the relative position relationship between the vehicle and the lane, thereby improving the accuracy of the relative position calculation between the vehicle and the lane, providing accurate data support for lane binding, and helping to improve the accuracy of lane binding.
[0127] In a feasible implementation, step S40 may include steps S401 to S404:
[0128] Step S401, comparing the projection distances to obtain a minimum projection distance;
[0129] Step S402, comparing the minimum projection distance with a preset distance threshold to obtain a comparison result;
[0130] Step S403: if the comparison result is that the minimum projection distance value is less than the preset distance threshold, then obtaining the lane number corresponding to the minimum projection distance value;
[0131] Step S404: determining a target lane according to the lane number corresponding to the minimum projection distance, and binding the vehicle to the target lane.
[0132] It should be noted that by calculating the projection distance between the vehicle and multiple neighboring candidate points, as well as the corresponding previous lane trajectory point coordinates or next lane trajectory point coordinates to form a lane segment, multiple projection distance values are obtained. In order to determine the closest distance from the vehicle to the entire lane, it is necessary to compare these projection distance values, find the minimum value of all projection distances, and update the minimum projection distance value in real time during vehicle driving. The minimum projection distance value is used as the projection distance from the vehicle to the lane, which will be used as the data basis for subsequent lane binding decisions.
[0133] Since lanes have a certain width, some vehicles cannot be truly bound to the lanes. Even if they are bound to the lanes, it is meaningless if the vehicle is far away from the lanes. Therefore, it is necessary to set a distance threshold. The distance threshold is pre-set according to the actual application requirements. Only when the minimum projection distance is less than the distance threshold, the lane trajectory point corresponding to the minimum projection distance is determined, and the lane with the lane number to which the lane trajectory point belongs is used as the lane bound to the vehicle. Therefore, the lane trajectory point corresponding to the minimum projection distance is obtained, and the bound lane is determined according to the lane number corresponding to the lane trajectory point, and the vehicle is bound to the lane. Otherwise, it is determined that the vehicle has no lane to which it can be bound, and the vehicle binding can be defined as a free lane.
[0134] In this embodiment, by comparing multiple projected distances and selecting the minimum value, the closest point of the vehicle to the entire lane is determined, which helps to improve the accuracy of lane binding. By comparing the minimum projected distance with the preset distance threshold, it is possible to accurately determine whether the proximity between the vehicle and the lane has reached the standard that the vehicle can be considered to be driving in the lane, effectively reducing the possibility of vehicle misbinding and improving the accuracy of lane binding.
[0135] The present application also provides a lane matching device, please refer to Figure 4 , the lane matching device comprises:
[0136] An acquisition module 10, for acquiring lane trajectory point coordinates, lane number and vehicle coordinates;
[0137] A data set construction module 20, configured to construct a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates;
[0138] A projection distance calculation module 30 is used to perform a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculate a projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point based on the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates;
[0139] The lane binding module 40 is used to determine a lane number that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane corresponding to the lane number.
[0140] The lane matching device provided in the embodiment of the present application adopts the lane matching method in the above embodiment, which can solve the technical problem of lane matching. Compared with the prior art, the beneficial effects of the lane matching device provided in the embodiment of the present application are the same as the beneficial effects of the lane matching method provided in the above embodiment, and other technical features in the lane matching device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0141] The present application provides a lane matching device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane matching method in the above-mentioned embodiment 1.
[0142] Reference below Figure 5, which shows a schematic diagram of the structure of a lane matching device suitable for implementing the embodiment of the present application. The lane matching device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The lane matching device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0143] like Figure 5 As shown, the lane matching device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the lane matching device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the lane matching device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a lane matching device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0144] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0145] The lane matching device provided by the present application adopts the lane matching method in the above embodiment to solve the technical problem of lane matching. Compared with the prior art, the beneficial effects of the lane matching device provided by the present application are the same as the beneficial effects of the lane matching method provided by the above embodiment, and other technical features in the lane matching device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0146] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0147] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0148] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the lane matching method in the above-mentioned embodiment.
[0149] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0150] The computer-readable storage medium may be included in the lane matching device; or may exist independently without being assembled into the lane matching device.
[0151] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the lane matching device, the lane matching device: obtains lane trajectory point coordinates, lane number and vehicle coordinates; constructs a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates; performs a nearest neighbor search on the K-dimensional tree data set to obtain a neighbor candidate point, and calculates the projection distance from the vehicle to the lane corresponding to the neighbor candidate point according to the lane trajectory point coordinates corresponding to the neighbor candidate point and the vehicle coordinates; determines the lane number that meets the preset binding condition based on the projection distance, and binds the vehicle to the lane corresponding to the lane number.
[0152] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0155] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the lane matching method described above, and can solve the technical problem of lane matching. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the lane matching method provided in the above embodiment, and will not be elaborated here.
[0156] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A lane matching method, characterized in that: The lane matching method comprises: Get the lane trajectory point coordinates, lane number and vehicle coordinates; Constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates; The K-dimensional tree data set at least includes a lane trajectory point coordinate data set and a lane number data set, the lane trajectory point coordinate data set includes multiple groups of lane trajectory point coordinates of different lane numbers, and the lane trajectory point coordinates in the same lane number group are arranged in sequence; Performing a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculating a projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point according to the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates; The step of calculating the projection distance from the vehicle to the lane corresponding to the neighboring candidate point according to the lane trajectory point coordinates corresponding to the neighboring candidate point and the vehicle coordinates comprises: According to the lane trajectory point coordinate data set, obtaining the coordinates of the current lane trajectory point corresponding to the neighboring candidate point, and the coordinates of the previous lane trajectory point coordinates and / or the next lane trajectory point coordinates of the current lane trajectory point coordinates; Calculate the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates; and / or Calculate the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the next lane trajectory point and the vehicle coordinates; A lane number that meets a preset binding condition is determined based on the projection distance, and the vehicle is bound to the lane corresponding to the lane number.
2. The method according to claim 1, characterized in that The step of constructing a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates comprises: Aggregating the lane trajectory point coordinates to obtain a lane trajectory point coordinate data set; sorting the lane numbers based on the arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a lane number data set; calculating, according to the lane trajectory point and the vehicle coordinates, a Euclidean distance from the vehicle coordinates to the lane trajectory point, and sorting the Euclidean distances based on an arrangement order of the lane trajectory point coordinates in the lane trajectory point coordinate data set to obtain a Euclidean distance data set; A K-dimensional tree data set is obtained according to the lane trajectory point coordinate data set, the lane number data set and the Euclidean distance data set.
3. The method according to claim 2, characterized in that The step of performing nearest neighbor search on the K-dimensional tree data set to obtain nearest neighbor candidate points comprises: According to a preset point number threshold, a nearest neighbor search is performed on the Euclidean distance data set to obtain the same number of candidate neighbor points as the point number threshold.
4. The method according to claim 1, characterized in that The step of calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates comprises: According to the lane number data set, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the previous lane trajectory point; Determining whether the lane number corresponding to the coordinates of the current lane trajectory point is the same as the lane number corresponding to the coordinates of the previous lane trajectory point; If the lane number corresponding to the current lane trajectory point coordinates is the same as the lane number corresponding to the previous lane trajectory point coordinates, the projection distance is calculated according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates.
5. The method according to claim 1, characterized in that The step of calculating the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the next lane trajectory point and the vehicle coordinates comprises: According to the lane number data set, obtaining the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the next lane trajectory point; Determining whether the lane number corresponding to the coordinates of the current lane trajectory point and the lane number corresponding to the coordinates of the next lane trajectory point are the same; If the lane number corresponding to the current lane trajectory point coordinates and the lane number corresponding to the next lane trajectory point coordinates are the same, the projection distance is calculated according to the current lane trajectory point coordinates, the next lane trajectory point coordinates and the vehicle coordinates.
6. The method according to claim 1, characterized in that The step of calculating the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates comprises: Calculating a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the previous lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the previous lane trajectory point and the coordinates of the vehicle; Calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the previous lane trajectory point; Calculate the projection distance according to the cosine value of the angle, the coordinates of the current lane trajectory point and the coordinates of the previous lane trajectory point; Wherein, the step of calculating the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates comprises: Calculate a vector between the vehicle and the coordinates of the current lane trajectory point, and a vector between the vehicle and the coordinates of the subsequent lane trajectory point according to the coordinates of the current lane trajectory point, the coordinates of the subsequent lane trajectory point and the vehicle coordinates; Calculating the cosine value of the angle between the vehicle and the coordinates of the current lane trajectory point and the coordinates of the subsequent lane trajectory point according to the vector between the vehicle and the coordinates of the current lane trajectory point and the vector between the vehicle and the coordinates of the subsequent lane trajectory point; The projection distance is calculated according to the cosine value of the angle, the coordinates of the trajectory point of the current lane and the coordinates of the trajectory point of the next lane.
7. The method according to claim 1, characterized in that The step of determining a lane number that meets a preset binding condition based on the projection distance, and binding the vehicle to the lane corresponding to the lane number, comprises: Comparing the projection distances to obtain a minimum projection distance; Compare the minimum projection distance with a preset distance threshold to obtain a comparison result; If the comparison result is that the minimum projection distance is less than the preset distance threshold, then obtaining the lane number corresponding to the minimum projection distance; A target lane is determined according to a lane number corresponding to the minimum projection distance, and the vehicle is bound to the target lane.
8. A lane matching device, characterized in that: The lane matching device comprises: An acquisition module, used to obtain the coordinates of lane trajectory points, lane numbers and vehicle coordinates; A data set construction module, used to construct a K-dimensional tree data set according to the lane trajectory point coordinates, the lane number and the vehicle coordinates; The K-dimensional tree data set at least includes a lane trajectory point coordinate data set and a lane number data set, the lane trajectory point coordinate data set includes multiple groups of lane trajectory point coordinates of different lane numbers, and the lane trajectory point coordinates in the same lane number group are arranged in sequence; A projection distance calculation module is used to perform a nearest neighbor search on the K-dimensional tree data set to obtain a nearest neighbor candidate point, and calculate the projection distance from the vehicle to the lane corresponding to the nearest neighbor candidate point according to the lane trajectory point coordinates corresponding to the nearest neighbor candidate point and the vehicle coordinates; Wherein, the projection distance calculation module is also used for: According to the lane trajectory point coordinate data set, obtaining the coordinates of the current lane trajectory point corresponding to the neighboring candidate point, and the coordinates of the previous lane trajectory point coordinates and / or the next lane trajectory point coordinates of the current lane trajectory point coordinates; Calculate the projection distance according to the current lane trajectory point coordinates, the previous lane trajectory point coordinates and the vehicle coordinates; and / or Calculate the projection distance according to the coordinates of the current lane trajectory point, the coordinates of the next lane trajectory point and the vehicle coordinates; The lane binding module is used to determine a lane number that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane corresponding to the lane number.
9. A lane matching device, characterized in that: The lane matching device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane matching method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the lane matching method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Lane positioning method and device, and electronic equipment
CN110060493A
Lane level fusion positioning method and system
CN114705199A