Trajectory filtering method, device, electronic device, storage medium and vehicle
By calculating the similarity of trajectory point sets within a high-precision road network buffer zone and removing vehicle travel trajectories with low similarity, the problem of vehicle traffic data being incorrectly included in road heat maps is solved, thus improving the accuracy of the analysis results.
Patent Information
- Application Number
- CN202211057102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-08-31
AI Technical Summary
In existing technologies, traffic data when vehicles pass through intersections is incorrectly included in road traffic intensity, leading to inaccurate analysis results.
By acquiring vehicle driving trajectories, the set of trajectory points within the high-precision road network buffer is determined, and the similarity between the set of trajectory points and the trajectory points within the high-precision road network buffer is calculated, removing trajectories with low similarity.
This improves the accuracy of the analysis results, effectively filters out invalid vehicle trajectories, and ensures the accuracy of data analysis.
Smart Images

Figure CN115547036B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a trajectory filtering method, device, electronic device, storage medium and vehicle. Background Art
[0002] The development of the Internet of Vehicles in recent years has triggered a wave of research on urban interconnection. Many mass-produced cars can be connected to the Internet and upload information such as vehicle movement trajectories in real time. By analyzing and discovering this information, the traffic conditions of the city can be extracted, travel services can be provided to users, and traffic congestion can be avoided.
[0003] In the existing technology, the traffic heat of a high-precision road network can be analyzed through the movement trajectories of a large number of vehicles. However, due to the complexity of the road network conditions, when calculating the traffic heat of a certain road, the traffic data of vehicles passing through the intersection and entering other roads will still be included in the traffic heat of the road, making the analysis results of the relevant data inaccurate. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a trajectory filtering method, device, electronic device, storage medium and vehicle, which filter out invalid vehicle driving trajectories for analysis of relevant data and improve the accuracy of analysis results.
[0005] In a first aspect, an embodiment of the present disclosure provides a trajectory filtering method, including:
[0006] Acquire multiple vehicle driving trajectories, each vehicle driving trajectory includes multiple trajectory points;
[0007] For each vehicle driving trajectory of the multiple vehicle driving trajectories, determining a first set and a second set corresponding to the vehicle driving trajectory, wherein the first set includes multiple trajectory points of the vehicle driving trajectory, and the second set includes trajectory points in the vehicle driving trajectory that are located in a high-precision road network buffer corresponding to a road to be analyzed;
[0008] Calculating the similarity between the first set and the second set;
[0009] At least one vehicle driving trajectory of the plurality of vehicle driving trajectories whose similarity is less than a first preset value is removed.
[0010] In some embodiments, before acquiring the first set and the second set, the method further includes:
[0011] Determine the high-precision road network buffer zone based on the high-precision road network centerline corresponding to the road to be analyzed and the preset distance;
[0012] Acquire a plurality of original trajectories, each original trajectory including at least one trajectory point;
[0013] At least one original trajectory in which each trajectory point of the plurality of original trajectories is not located in the high-precision road network buffer is removed.
[0014] In some embodiments, after removing at least one original trajectory in which each trajectory point of the plurality of original trajectories is not located in the high-precision road network buffer, the method further comprises:
[0015] For each remaining original trajectory, obtaining the length of the original trajectory and the number of trajectory points in the original trajectory;
[0016] At least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is less than a preset number is removed.
[0017] In some embodiments, after removing at least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is less than a preset number, the method further includes:
[0018] Determine a plurality of projection points of a plurality of trajectory points in each remaining original trajectory in the high-precision road network buffer, wherein the plurality of trajectory points correspond to the plurality of projection points one by one;
[0019] For each remaining original trajectory, calculating the distance between each trajectory point in the original trajectory and its corresponding projection point;
[0020] Determine the coefficient of variation of the original trajectory based on the distance between each trajectory point in the original trajectory and its corresponding projection point;
[0021] If the coefficient of variation in the original trajectory is less than or equal to a second preset value, it is determined that the original trajectory is a vehicle driving trajectory.
[0022] In some embodiments, calculating the similarity between the first set and the second set includes:
[0023] The ratio of the number of trajectory points in the second set to the number of trajectory points in the first set is used as the similarity between the first set and the second set.
[0024] In some embodiments, the method further comprises:
[0025] For each vehicle driving trajectory of the remaining plurality of vehicle driving trajectories, determining a trajectory direction vector corresponding to each trajectory point in a second set corresponding to the vehicle driving trajectory;
[0026] Determining the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network according to the cosine value of the angle between the trajectory direction vector and the center line of the high-precision road network;
[0027] At least one vehicle driving trajectory of the multiple vehicle driving trajectories whose cosine similarity is less than a cosine similarity threshold is removed.
[0028] In a second aspect, an embodiment of the present disclosure provides a trajectory filtering device, including:
[0029] An acquisition module, used for acquiring a plurality of vehicle driving trajectories, each vehicle driving trajectory including a plurality of trajectory points;
[0030] A first determination module is used to determine, for each vehicle driving trajectory of the multiple vehicle driving trajectories, a first set and a second set corresponding to the vehicle driving trajectory, wherein the first set includes multiple trajectory points of the vehicle driving trajectory, and the second set includes trajectory points in the vehicle driving trajectory that are located in a high-precision road network buffer corresponding to a road to be analyzed;
[0031] A first calculation module, used for calculating the similarity between the first set and the second set;
[0032] The removal module is used to remove at least one vehicle driving trajectory whose similarity is less than a first preset value from the multiple vehicle driving trajectories.
[0033] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0034] Memory;
[0035] Processor; and
[0036] Computer programs;
[0037] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.
[0038] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.
[0039] In a fifth aspect, an embodiment of the present disclosure further provides a vehicle, which includes the trajectory filtering device as described above.
[0040] The trajectory filtering method, device, electronic device, storage medium and vehicle provided by the embodiments of the present disclosure are pre-matched through a high-precision road network buffer, and then the similarity between the trajectory point set of the vehicle driving trajectory and the trajectory point set in the high-precision road network buffer corresponding to the road to be analyzed is calculated. It is possible to effectively distinguish the vehicle driving trajectories that pass through the high-precision road network or intersect with the high-precision road network with a shorter driving distance in the high-precision road network. If the similarity is low, the driving trajectory has a shorter driving distance on the high-precision road network, or may only intersect at an intersection. Such trajectories are filtered out, and invalid vehicle driving trajectories are filtered out for subsequent analysis of related data, thereby improving the accuracy of the analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0042] In order to more clearly illustrate the embodiments of the present invention 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.
[0043] Figure 1 A flow chart of a trajectory filtering method provided in an embodiment of the present disclosure;
[0044] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0045] Figure 3 A flow chart of a trajectory filtering method provided by another embodiment of the present disclosure;
[0046] Figure 4 A flow chart of a trajectory filtering method provided by another embodiment of the present disclosure;
[0047] Figure 5 A schematic diagram of the structure of a trajectory filtering device provided in an embodiment of the present disclosure;
[0048] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0049] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0051] The present disclosure provides a trajectory filtering method, which is described below in conjunction with a specific embodiment.
[0052] Figure 1 The following is a flow chart of the trajectory filtering method provided by the embodiment of the present disclosure. The method can be applied to Figure 2 In the application scenario shown in Figure 2 As shown, the application scenario includes a terminal device 21 and a server 22, and the terminal device 21 is communicatively connected with the server 22. Among them, the terminal device 21 can be a vehicle-mounted terminal with a real-time positioning function, such as a vehicle computer, an intelligent driving device, etc., which is used to collect the driving trajectory of the vehicle where the terminal is located. The terminal device 21 can also be other devices with real-time positioning functions, such as smart phones, PDAs, tablet computers, laptops, all-in-one computers, etc., which are used to collect the driving trajectory of the mobile carrier where the device is located. The server 22 can also be any device with a data processing function. It can be understood that the trajectory filtering method provided in the embodiment of the present disclosure can also be applied in other scenarios.
[0053] Combine the following Figure 2 The application scenario shown is Figure 1 The trajectory filtering method shown in FIG. 1 is introduced, and the specific steps of the method are as follows:
[0054] S101. Acquire multiple vehicle driving trajectories, each vehicle driving trajectory including multiple trajectory points.
[0055] The server 22 receives multiple original trajectories uploaded by the terminal device 21, and selects multiple trajectories that meet the conditions as vehicle driving trajectories. Each vehicle trajectory includes multiple trajectory points. Trajectory points, that is, location points collected by the positioning system during the movement of the terminal device, are used to indicate the location of the terminal device 21 or its mobile carrier at a certain moment. A curve composed of multiple orderly arranged trajectory points is a trajectory. Among them, the positioning system can be a global positioning system (GPS) or any other positioning system, which is not limited in the embodiments of the present disclosure.
[0056] S102: for each vehicle driving trajectory among the multiple vehicle driving trajectories, determine a first set and a second set corresponding to the vehicle driving trajectory.
[0057] The first set includes multiple trajectory points of the vehicle's driving trajectory, and the second set includes trajectory points in the vehicle's driving trajectory that are located in a high-precision road network buffer corresponding to the road to be analyzed;
[0058] The centerline of the high-precision road network can be the centerline of the road or lane to be analyzed, which is pre-specified. The position of the centerline of the high-precision road network can be obtained according to the high-precision map. Buffer is an influence range or service range of a geographic spatial target, specifically a polygon of a certain width automatically established around a point, line, or surface entity. The high-precision road network buffer is a polygon of a certain width automatically established around a route in the high-precision road network, or a polygon of a certain width automatically established around a lane on a route in the high-precision road network. Specifically, it can be a rectangle with a preset distance established based on the centerline of the high-precision road network corresponding to the road to be analyzed. A preset distance is set in advance, and the preset distance is the most suitable buffer width for the high-precision road network. The area within the preset distance around the centerline of the high-precision road network is the high-precision road network buffer. For example, for a straight road with a length of 10 kilometers, a high-precision road network buffer is established with a preset distance of 5 meters, and finally a rectangular high-precision road network buffer with a length of 10 kilometers and a width of 5 meters is obtained, with the centerline of the road as the centerline of the high-precision road network. The vehicle driving trajectory may not completely overlap with the high-precision road network, so not all of the multiple trajectory points in the vehicle driving trajectory are located in the high-precision road network buffer. The server 22 determines, based on the position of each trajectory point, a first set consisting of multiple trajectory points in the vehicle driving trajectory and a second set consisting of several trajectory points in the vehicle driving trajectory that are located in the high-precision road network buffer corresponding to the road to be analyzed.
[0059] S103: Calculate the similarity between the first set and the second set.
[0060] Optionally, the similarity between the two sets is determined by calculating the Jaccard distance between the first set and the second set. The Jaccard distance is used to measure the difference between the two sets and is defined as 1 minus the Jaccard similarity coefficient; the Jaccard similarity index is used to measure the similarity between the two sets and is defined as the number of elements in the intersection of the two sets divided by the number of elements in the union. The larger the Jaccard similarity index between the first set and the second set, the smaller the Jaccard distance, indicating that the similarity between the first set and the second set is higher; the smaller the Jaccard similarity index between the first trajectory point combination and the second set, the larger the Jaccard distance, indicating that the similarity between the first set and the second set is lower.
[0061] In some embodiments, the ratio of the number of trajectory points in the second set to the number of trajectory points in the first set may be used as the similarity between the first set and the second set.
[0062] S104: Remove at least one vehicle driving trajectory whose similarity is less than a first preset value from the multiple vehicle driving trajectories.
[0063] For a certain vehicle driving trajectory, the higher the similarity between the first set and the second set, the higher the overlap between the vehicle driving trajectory and the high-precision road network buffer corresponding to the road to be analyzed; if the similarity between the first set and the second set is lower, it means that the overlap between the vehicle driving trajectory and the high-precision road network buffer corresponding to the road to be analyzed is lower, for example, the vehicle enters other roads after driving a certain distance in the high-precision road network corresponding to the high-precision road network buffer. The vehicle driving trajectory with a low overlap with the high-precision road network buffer is also not suitable as the basis for subsequent data analysis, so at least one vehicle driving trajectory with a similarity less than the second preset value among the multiple vehicle driving trajectories is removed. The disclosed embodiment obtains a plurality of vehicle driving trajectories, each of which includes a plurality of trajectory points; for each vehicle driving trajectory in the plurality of vehicle driving trajectories, determines a first set and a second set corresponding to the vehicle driving trajectory; calculates the similarity between the first set and the second set; removes at least one vehicle driving trajectory in the plurality of vehicle driving trajectories whose similarity is less than a first preset value, and by calculating the similarity between the trajectory point set of the vehicle driving trajectory and the trajectory point set of the trajectory in the buffer zone of the high-precision road network, it is possible to effectively distinguish vehicle driving trajectories that pass through the high-precision road network or intersect with the high-precision road network with a shorter driving distance in the high-precision road network, thereby filtering out invalid vehicle driving trajectories for subsequent analysis of related data, thereby improving the accuracy of the analysis results.
[0064] On the basis of the above embodiments, the trajectory filtering method provided by the embodiments of the present disclosure also includes: for each vehicle driving trajectory of the remaining multiple vehicle driving trajectories, determining the trajectory direction vector corresponding to each trajectory point in the second set corresponding to the vehicle driving trajectory; determining the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network according to the cosine value of the angle between the trajectory direction vector and the center line of the high-precision road network; and removing at least one vehicle driving trajectory whose cosine similarity is less than a cosine similarity threshold value from the multiple vehicle driving trajectories.
[0065] Cosine similarity, also known as cosine similarity, evaluates the similarity between two vectors by calculating the cosine value of the angle between the two vectors. The cosine similarity between the two vectors can be calculated by measuring the cosine value of the angle between the two vectors. Specifically, when the angle between the two vectors is 0, that is, when the directions of the two vectors are exactly the same, the cosine value is 1, and the cosine similarity of the two vectors is considered to be the largest; when the directions of the two vectors are completely opposite, the cosine value is -1, and the cosine similarity of the two vectors is the smallest. According to the vehicle driving state corresponding to each trajectory point in the vehicle driving trajectory, the trajectory direction vector of each trajectory point can be determined, and the cosine similarity of the trajectory direction vector and the center line of the high-precision road network is further calculated. The average value of the cosine similarity corresponding to each trajectory point is taken as the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network. The higher the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network, the greater the possibility that the direction of the vehicle driving trajectory is similar to the direction of the high-precision road network. It is understandable that, under normal circumstances, the direction of the vehicle's driving trajectory will not change frequently. Therefore, each trajectory point in the vehicle's driving trajectory can be sampled, and the average value of the cosine similarity between the trajectory vectors of some of the trajectory points and the center line of the high-precision road network can be calculated as the cosine similarity between the vehicle's driving trajectory and the center line of the high-precision road network.
[0066] The disclosed embodiment calculates the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network, and removes the vehicle driving trajectory with a low overlap with the high-precision road network based on the directional similarity between the two. This can more accurately filter out the vehicle driving trajectory that intersects the high-precision road network, further improving the accuracy of trajectory filtering and data analysis. Figure 3 This is a flow chart of a trajectory filtering method provided by another embodiment of the present disclosure. Figure 3 As shown, before obtaining multiple vehicle driving trajectories, the method includes the following steps:
[0067] S301. Establish a high-precision road network buffer zone with a preset width based on the high-precision road network centerline corresponding to the road to be analyzed.
[0068] A preset distance is set in advance, which is the most suitable buffer width for the high-precision road network. The area within the preset distance around the center line of the high-precision road network corresponding to the road to be analyzed is the high-precision road network buffer.
[0069] S302: Acquire multiple original trajectories, each of which includes at least one trajectory point.
[0070] The server 22 obtains a plurality of original trajectories from the terminal device 21 , each of which includes one or more trajectory points.
[0071] S303: Remove at least one original trajectory from the plurality of original trajectories, each trajectory point of which is not located in the high-precision road network buffer.
[0072] For each original trajectory, any trajectory point included therein may be located in the high-precision road network buffer or outside the high-precision road network buffer. If there is an original trajectory in which all trajectory points are located outside the high-precision road network buffer, it means that the original trajectory has no intersection with the high-precision road network buffer, that is, the original trajectory has no intersection with the high-precision road network corresponding to the high-precision road network buffer. Remove such original trajectories that have no intersection with the high-precision road network buffer from multiple original trajectories.
[0073] S304: For each remaining original trajectory, obtain the length of the original trajectory and the number of trajectory points in the original trajectory.
[0074] S305: Remove at least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is less than a preset number.
[0075] For multiple original trajectories whose trajectory points are located in the high-precision road network buffer, that is, multiple original trajectories that intersect with the high-precision road network buffer, the length of each original trajectory and the number of trajectory points it contains are further obtained. If the length of the original trajectory is too short or the number of trajectory points is small, the original trajectory is short and may be noise data, which is not generally referenced. Therefore, the original trajectory with a length less than the preset length threshold or a number of trajectory points less than the preset number is removed.
[0076] S306, determining a plurality of projection points of a plurality of trajectory points in each remaining original trajectory in the high-precision road network buffer, wherein the plurality of trajectory points correspond to the plurality of projection points in a one-to-one manner.
[0077] S307 . For each remaining original trajectory, calculate the distance between each trajectory point in the original trajectory and its corresponding projection point.
[0078] The original trajectory may not completely overlap with the high-precision road network, so not all of the multiple trajectory points in the original trajectory are located in the high-precision road network buffer. Therefore, it is necessary to determine the multiple projection points of the multiple trajectory points in each of the remaining original trajectories in the high-precision road network buffer. For example, for each trajectory point, project it onto the center line of the high-precision road network buffer to obtain a projection point that corresponds to the trajectory point one by one.
[0079] S308: Determine a coefficient of variation of the original trajectory based on the distance between each trajectory point in the original trajectory and its corresponding projection point.
[0080] The coefficient of variation is a normalized measure of the degree of dispersion of the probability distribution, which is defined as the ratio of the standard deviation to the mean. For each original trajectory, the server 22 obtains the distances between multiple trajectory points and their corresponding projection points, and further calculates the coefficient of variation of the original trajectory, that is, the ratio of the standard deviation of the distances between multiple trajectory points and their corresponding projection points to the mean. The coefficient of variation can characterize the degree of dispersion of the original trajectory relative to the high-precision road network buffer.
[0081] S309: If the coefficient of variation in the original trajectory is less than or equal to a second preset value, determine that the original trajectory is a vehicle driving trajectory.
[0082] When the coefficient of variation of the original trajectory is greater than the second preset value, it means that the original trajectory has a small overlap or similarity with the high-precision road network buffer corresponding to the road to be analyzed. It can be determined that the original trajectory is not obtained by driving in the high-precision road network, and the original trajectory needs to be removed from multiple original trajectories. For example, in three-dimensional space, there is still a road similar to the high-precision road network below a certain section of the high-precision road network, but the driving trajectory of the vehicle on different roads will not be exactly the same. Therefore, the coefficient of variation of the original trajectory generated by the vehicle driving on other roads is larger than the coefficient of variation of the original trajectory generated by the vehicle driving on the high-precision road network. The original trajectory generated by this part of the vehicle driving on other roads, that is, at least one original trajectory with a coefficient of variation greater than the second preset value, is the original trajectory that needs to be removed. If the coefficient of variation of the original trajectory is less than or equal to the second preset value, the original trajectory is more consistent with the high-precision road network, and it can be determined that the original trajectory is the vehicle driving trajectory.
[0083] The disclosed embodiment determines whether the original trajectory is a vehicle driving trajectory that meets the requirements by combining the length of the original trajectory, the number of trajectory points and the coefficient of variation, and filters out the original trajectories that do not meet the requirements, and uses the remaining original trajectories as the vehicle driving trajectories. On the one hand, the noise data in the original trajectory is eliminated, and the accuracy of the relevant data analysis results is further improved; on the other hand, the number of vehicle driving trajectories is reduced through preliminary screening, which greatly reduces the calculation amount of the trajectory filtering method and improves the efficiency of the trajectory filtering method.
[0084] Figure 4 A flow chart of a trajectory filtering method provided by another embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the method includes the following steps:
[0085] S401. Acquire multiple vehicle driving trajectories, each vehicle driving trajectory including multiple trajectory points.
[0086] S402: for each vehicle driving trajectory among the multiple vehicle driving trajectories, determine a first set and a second set corresponding to the vehicle driving trajectory.
[0087] The first set includes multiple trajectory points of the vehicle's driving trajectory, and the second set includes trajectory points in the vehicle's driving trajectory that are located in a high-precision road network buffer corresponding to the road to be analyzed;
[0088] S403: Calculate the similarity between the first set and the second set.
[0089] S404: Remove at least one vehicle driving trajectory whose similarity is less than a first preset value from the multiple vehicle driving trajectories.
[0090] Specifically, the implementation process and principle of S401 to S404 are consistent with those of S101 to S104, and will not be described in detail here.
[0091] S405. For each of the remaining multiple vehicle driving trajectories, calculate the spatial centroid of the vehicle driving trajectory, and determine a target lane group closest to the spatial centroid in the high-precision road network.
[0092] After the above steps, the remaining multiple vehicle driving trajectories have a high degree of similarity and overlap with the high-precision road network, but there may still be vehicle driving trajectories that do not meet the data analysis requirements. For example, some roads in the high-precision road network may have auxiliary roads. When a vehicle drives on the auxiliary road, the vehicle driving trajectory generated is highly overlapped with the high-precision road network buffer, but the vehicle driving trajectory on the auxiliary road is generally not included in the data that needs to be analyzed. Therefore, for the remaining multiple vehicle driving trajectories, the spatial centroid of each trajectory is calculated, and the target lane group closest to its spatial centroid in the high-precision road network is determined.
[0093] S406. Based on at least one lane line in the target lane group, determine a third set of shape points corresponding to the at least one lane line.
[0094] The target lane group may include one or more lanes, each of which has its own corresponding lane line. The server 22 determines a third set of shape points corresponding to at least one lane line in the target lane group based on this.
[0095] S407: Calculate the distance between the first set and the third set.
[0096] Hausdorff distance is a distance defined between any two sets in a metric space. The server 22 obtains a first set consisting of multiple trajectory points of the vehicle's driving trajectory and a third set consisting of shape points corresponding to at least one lane line in the target lane group, and calculates the Hausdorff distance between the first set and the third set. The distance between the vehicle's driving trajectory and the target lane group can be determined by the Hausdorff distance.
[0097] S408: Determine at least one vehicle driving trajectory among the multiple vehicle driving trajectories whose distance is less than a third preset value as a target driving trajectory.
[0098] If the distance between the vehicle driving trajectory and the target lane group is greater than or equal to the third preset value, it can be determined that the vehicle driving trajectory is far away from the target lane group; if the distance between the vehicle driving trajectory and the target lane group is less than the third preset value, it can be determined that the vehicle driving trajectory is the target driving trajectory on the high-precision road network and can be used as vehicle driving trajectory data for data analysis.
[0099] The disclosed embodiment, on the basis of removing at least one vehicle driving trajectory whose similarity is less than a first preset value from the multiple vehicle driving trajectories, further removes the vehicle driving trajectories whose distance between the first set and the third set corresponding to the target lane group is too large from the remaining vehicle driving trajectories, that is, removes the vehicle driving trajectories that are too far away from the high-precision road network, further screens out more accurate vehicle driving trajectories for data analysis of the high-precision road network, improves the efficiency of the trajectory screening method, and can quickly and accurately filter out the passing vehicle trajectory data of the high-precision road network from massive trajectories.
[0100] Figure 5 The schematic diagram of the structure of the track filtering device provided in the embodiment of the present disclosure. The track filtering device may be a server as described in the above embodiment, or the track filtering device may be a component or assembly in the server. The track filtering device provided in the embodiment of the present disclosure may execute the processing flow provided in the track filtering method embodiment, such as Figure 5As shown, the trajectory filtering device 50 includes: an acquisition module 51, a first determination module 52, a calculation module 53, and a removal module 54; wherein the acquisition module 51 is used to acquire multiple vehicle driving trajectories, each vehicle driving trajectory includes multiple trajectory points; the first determination module 52 is used to determine, for each vehicle driving trajectory in the multiple vehicle driving trajectories, a first set and a second set corresponding to the vehicle driving trajectory, the first set includes multiple trajectory points of the vehicle driving trajectory, and the second set includes trajectory points in the vehicle driving trajectory that are located in a high-precision road network buffer corresponding to the road to be analyzed; the first calculation module 53 is used to calculate the similarity between the first set and the second set; the removal module 54 is used to remove at least one vehicle driving trajectory in the multiple vehicle driving trajectories whose similarity is less than a first preset value.
[0101] Optionally, the acquisition module 51 is also used to determine a high-precision road network buffer zone based on the high-precision road network center line corresponding to the road to be analyzed and a preset distance; obtain multiple original trajectories, each original trajectory including at least one trajectory point; and remove at least one original trajectory in which each trajectory point of the multiple original trajectories is not located in the high-precision road network buffer zone.
[0102] Optionally, the acquisition module 51 is further used to acquire the length of the original trajectory and the number of trajectory points in the original trajectory for each remaining original trajectory; and remove at least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is continuously less than a preset number.
[0103] Optionally, the acquisition module 51 is also used to determine multiple projection points of multiple trajectory points in each remaining original trajectory in the high-precision road network buffer, and the multiple trajectory points correspond to the multiple projection points one by one; for each remaining original trajectory, calculate the distance between each trajectory point in the original trajectory and its corresponding projection point; based on the distance between each trajectory point in the original trajectory and its corresponding projection point, determine the coefficient of variation of the original trajectory; if the coefficient of variation in the original trajectory is less than or equal to a second preset value, determine that the original trajectory is a vehicle driving trajectory.
[0104] Optionally, the calculation module 53 is further used to use the ratio of the number of trajectory points in the second set to the number of trajectory points in the first set as the similarity between the first set and the second set. Optionally, the trajectory filtering device 50 also includes a second determination module 55, which is used to determine, for each vehicle driving trajectory in the remaining multiple vehicle driving trajectories, the trajectory direction vector corresponding to each trajectory point in the second set corresponding to the vehicle driving trajectory; determine the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network according to the cosine value of the angle between the trajectory direction vector and the center line of the high-precision road network; the removal module 54 is also used to remove at least one vehicle driving trajectory whose cosine similarity is less than a cosine similarity threshold value from the multiple vehicle driving trajectories.
[0105] Figure 5 The trajectory filtering device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be described in detail here.
[0106] Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device may be a server as described in the above embodiment. The electronic device provided in an embodiment of the present disclosure may execute the processing flow provided in the trajectory filtering method embodiment, such as Figure 6 As shown, the electronic device 60 includes: a memory 61, a processor 62, a computer program and a communication interface 63; wherein the computer program is stored in the memory 61 and is configured so that the processor 62 executes the trajectory filtering method as described above.
[0107] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the trajectory filtering method described in the above embodiment.
[0108] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the trajectory filtering method as described above is implemented.
[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, 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 cases involving 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., through the Internet using an Internet service provider).
[0110] 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 disclosure. 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 implementations as replacements, 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.
[0111] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0112] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A trajectory filtering method, characterized in that: The method comprises: Acquire multiple vehicle driving trajectories, each vehicle driving trajectory includes multiple trajectory points; For each vehicle driving trajectory of the multiple vehicle driving trajectories, determining a first set and a second set corresponding to the vehicle driving trajectory, wherein the first set includes multiple trajectory points of the vehicle driving trajectory, and the second set includes trajectory points in the vehicle driving trajectory that are located in a high-precision road network buffer corresponding to a road to be analyzed; Taking the ratio of the number of trajectory points in the second set to the number of trajectory points in the first set as the similarity between the first set and the second set; At least one vehicle driving trajectory of the plurality of vehicle driving trajectories whose similarity is less than a first preset value is removed.
2. The method according to claim 1, characterized in that Before acquiring the first set and the second set, the method further includes: A high-precision road network buffer with a preset width is established based on the high-precision road network centerline corresponding to the road to be analyzed; Acquire a plurality of original trajectories, each original trajectory including at least one trajectory point; At least one original trajectory in which each trajectory point of the plurality of original trajectories is not located in the high-precision road network buffer is removed.
3. The method according to claim 2, characterized in that After removing at least one original trajectory in which each trajectory point of the plurality of original trajectories is not located in the high-precision road network buffer, the method further includes: For each remaining original trajectory, obtaining the length of the original trajectory and the number of trajectory points in the original trajectory; At least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is less than a preset number is removed.
4. The method according to claim 3, characterized in that After removing at least one original trajectory whose length is less than a preset length threshold or whose number of trajectory points is less than a preset number, the method further includes: Determine a plurality of projection points of a plurality of trajectory points in each remaining original trajectory in the high-precision road network buffer, wherein the plurality of trajectory points correspond to the plurality of projection points one by one; For each remaining original trajectory, calculating the distance between each trajectory point in the original trajectory and its corresponding projection point; Determine the coefficient of variation of the original trajectory based on the distance between each trajectory point in the original trajectory and its corresponding projection point; If the coefficient of variation in the original trajectory is less than or equal to a second preset value, it is determined that the original trajectory is a vehicle driving trajectory.
5. The method according to claim 1, characterized in that After removing at least one vehicle driving trajectory whose similarity is less than a first preset value from the plurality of vehicle driving trajectories, the method further includes: For each vehicle driving trajectory of the remaining plurality of vehicle driving trajectories, determining a trajectory direction vector corresponding to each trajectory point in a second set corresponding to the vehicle driving trajectory; Determining the cosine similarity between the vehicle driving trajectory and the center line of the high-precision road network according to the cosine value of the angle between the trajectory direction vector and the center line of the high-precision road network; At least one vehicle driving trajectory of the multiple vehicle driving trajectories whose cosine similarity is less than a cosine similarity threshold is removed.
6. A trajectory filtering device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of vehicle driving trajectories, each vehicle driving trajectory including a plurality of trajectory points; A first determination module is used to determine, for each vehicle driving trajectory of the multiple vehicle driving trajectories, a first set and a second set corresponding to the vehicle driving trajectory, wherein the first set includes multiple trajectory points of the vehicle driving trajectory, and the second set includes trajectory points in the vehicle driving trajectory that are located in a high-precision road network buffer corresponding to a road to be analyzed; a first calculation module, configured to use a ratio of the number of trajectory points in the second set to the number of trajectory points in the first set as a similarity between the first set and the second set; The removal module is used to remove at least one vehicle driving trajectory whose similarity is less than a first preset value from the multiple vehicle driving trajectories.
7. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
9. A vehicle, characterized in that: include: The trajectory filtering device as claimed in claim 6.
