Method and system for detecting a trajectory turn direction

By collecting and processing GPS data, using map matching and spatial geometric vectors to calculate turning directions, and determining the core turning point, the problem of lane-level traffic travel pattern detection at intersections was solved, enabling accurate location of the causes of traffic congestion at intersections.

CN116136865BActive Publication Date: 2026-01-16YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310289300.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2026-01-16
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

Existing technologies cannot effectively determine the trajectory lane information at intersections, making it impossible to find the cause of traffic congestion at intersections.

Method used

By collecting trajectory data and road network data, using map matching algorithms and spatial geometric vector representation, the turning direction is calculated, the core turning point is determined, and the turning trajectory is calculated using a turning trajectory point clustering algorithm, thereby realizing the detection of traffic travel patterns at the lane level of intersections.

Benefits of technology

It enables lane-level traffic pattern detection at intersections, accurately determines the turning direction of vehicles at intersections, identifies the causes of traffic congestion, and improves the accuracy and efficiency of traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116136865B_ABST
    Figure CN116136865B_ABST
Patent Text Reader

Abstract

The application provides a method and system for detecting the turning direction of a trajectory, the method comprising: collecting trajectory data and road network data, classifying and screening the trajectory data to obtain a target data set, matching the trajectory data in the target data set with the road network data by using a map matching algorithm to obtain road network trajectory data, representing the road network trajectory data by using a spatial geometric vector, calculating the turning direction of the road network trajectory data by using a vector cross multiplication operation corresponding to the road network trajectory data, obtaining a turning core point by using a deflection angle, assigning the turning direction of the road network trajectory data to the turning core point, obtaining a turning core point turning detection model by using the deflection angle, and obtaining a complete turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm. The problem that lane information of a trajectory at an intersection cannot be determined by using GPS data is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of trajectory data mining, and particularly relates to a method and system for detecting trajectory turning direction. BACKGROUND

[0002] GPS (Global Positioning System) data has the advantages of easy collection and wide applicability. The Global Positioning System (GPS) is a high-precision radio navigation positioning system based on artificial satellites. It can provide accurate geographic position, vehicle speed and precise time information anywhere in the world and near space.

[0003] An intersection usually contains three types of turning lanes, i.e., left turn, straight and right turn, and is a hub of traffic roads with high traffic flow and areas where traffic congestion occurs. A more detailed study of an intersection can reveal the travel patterns and relationships of different turns and lanes in the intersection, and can find the causes of traffic congestion in the intersection, thereby providing more detailed road traffic information for the public, and having a very important significance for urban traffic management, smart city and smart traffic construction. Due to the high cost of lane-precision positioning data collection and expensive equipment, the actual application is largely limited.

[0004] In addition, urban traffic detection is mostly limited to the regional and road level, and does not detect and calculate lane-level traffic travel patterns of the intersection, so the causes of traffic congestion in the intersection cannot be found through the detection data. SUMMARY

[0005] The present application provides a method and system for detecting trajectory turning direction to solve the problem that the trajectory lane information of an intersection cannot be determined through GPS data.

[0006] In one aspect, the present application provides a method for detecting trajectory turning direction, comprising:

[0007] collecting trajectory data and road network data, wherein the trajectory data comprises a plurality of trajectory points;

[0008] classifying and screening the trajectory data to obtain a target data set, wherein the target data set comprises a plurality of trajectory data;

[0009] matching the trajectory data in the target data set with the road network data by using a map matching algorithm to obtain road network trajectory data, wherein the road network trajectory data is the trajectory data in which all trajectory points in the target data set are located on the road network data;

[0010] The road network trajectory data is represented by a spatial geometry vector, and a turning direction of the road network trajectory data is calculated by a vector cross multiplication operation corresponding to the road network trajectory data.

[0011] A turning core point is obtained by using the deflection angle, the turning core point being a trajectory point in the trajectory data that has the maximum deflection angle and is closest to a turning center;

[0012] The turning direction of the road network trajectory data is assigned to the turning core point;

[0013] A turning core point turning detection model is obtained by using the deflection angle;

[0014] A turning trajectory is calculated according to the turning core point by using a turning trajectory point clustering algorithm.

[0015] Optionally, the step of classifying and screening the trajectory data to obtain a target data set comprises:

[0016] The trajectory data is classified into normal class trajectory data and non-normal class trajectory data, the normal class trajectory data being trajectory data that does not need to be processed;

[0017] The normal class trajectory data is retained;

[0018] The non-normal class trajectory data is screened to obtain a non-normal class retained trajectory data set;

[0019] The target data set is generated, the target data set comprising the normal class trajectory data and the non-normal class retained trajectory data set.

[0020] Optionally, the non-normal class trajectory data comprises invalid trajectory data, field missing class trajectory data, duplicate class trajectory data, and abnormal class trajectory data; and the step of screening the non-normal class trajectory data to obtain a non-normal class retained trajectory data set comprises:

[0021] A position of a trajectory point of the invalid trajectory data is obtained; if the trajectory point is within a valid range, trajectory data corresponding to the invalid trajectory data is retained in the non-normal class retained trajectory data set; and if the trajectory point is outside the valid range, the trajectory data corresponding to the invalid trajectory data is deleted;

[0022] A missing type of the field missing class trajectory data is obtained; if the missing type is a passenger state missing, fields of a state before and after the passenger state are filled into the field missing class trajectory data, and the field missing class trajectory data after filling is retained in the non-normal class retained trajectory data set; and if the missing type is a longitude and latitude field missing, the field missing class trajectory data is deleted;

[0023] Obtaining the number of repeated trajectory data, if there are multiple trajectory data of the same individual at the same time, retaining the first trajectory data corresponding to the repeated trajectory data to the abnormal type retention trajectory data set, and deleting the repeated trajectory data of the first trajectory data;

[0024] Obtaining the abnormal type of the abnormal trajectory data, if the abnormal type is the format error of the latitude and longitude field, deleting the trajectory data corresponding to the abnormal trajectory data, if the abnormal type is the format error of the passenger state, correcting the fields of the front and rear states of the passenger state, and retaining the corrected abnormal trajectory data to the abnormal type retention trajectory data set.

[0025] Optionally, the step of matching the trajectory data with the road network data to obtain the road network trajectory data by using a map matching algorithm, comprising:

[0026] Setting the trajectory points in each trajectory data in the target data set on the actual road in the road network data;

[0027] Calculating the offset amount of the trajectory points from the actual road;

[0028] If the offset amount is greater than the offset amount threshold, correcting the trajectory points according to the actual road to obtain the road network trajectory data;

[0029] If the offset amount is less than or equal to the offset amount threshold, not correcting the road network trajectory data.

[0030] Optionally, the step of representing the road network trajectory data by using a spatial geometric vector and calculating the turning direction of the road network trajectory data by using the cross product operation of the vector corresponding to the road network trajectory data, comprising:

[0031] Determining whether the trajectory in the road network trajectory data turns according to at least three trajectory points;

[0032] When determining that the trajectory turns, determining at least two turning direction vectors by using a trajectory sequence, the trajectory sequence comprising a plurality of trajectory points, and the turning direction vector being used to determine the turning direction of the trajectory;

[0033] Cross-multiplying the at least two turning direction vectors to obtain a vector representing the turning direction of the trajectory;

[0034] Determining the direction of the vector representing the turning direction of the trajectory according to the right-hand screw rule;

[0035] If the direction is a first direction, the turning direction is a right turn, and if the direction is a second direction, the turning direction is a left turn, the first direction and the second direction being opposite.

[0036] Optionally, the step of obtaining the turning core point by using the deflection angle comprises:

[0037] obtaining a deflection angle, the deflection angle being an angle between the vector and a vector of a turning direction of the trajectory;

[0038] when the deflection angle is greater than an angle threshold, marking the trajectory data as an actual turning;

[0039] when the deflection angle is less than or equal to the angle threshold, marking the trajectory data as straight driving, lane changing and / or road bending.

[0040] Optionally, the step of obtaining the turning core point by using the deflection angle further comprises:

[0041] obtaining a piece of the trajectory data, the trajectory data comprising at least four trajectory points, the trajectory data being deflected at at least two trajectory points to form at least two deflection angles;

[0042] comparing the at least two deflection angles to obtain a maximum deflection angle;

[0043] marking a trajectory point corresponding to the maximum deflection angle as a turning core point.

[0044] Optionally, the step of obtaining the turning core point turning detection model by using the deflection angle comprises:

[0045] verifying whether a turning occurs and the turning core point by using a minimum angle threshold parameter, to obtain a turning core point turning detection model.

[0046] Optionally, the step of calculating a turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm comprises:

[0047] calculating a length of the trajectory data;

[0048] if the length is within a judgment range, traversing the trajectory points within the judgment range to obtain a candidate trajectory point set;

[0049] extracting trajectory points that are spatially and temporally continuous with the turning core point from the candidate trajectory point set, the trajectory points being to-be-clustered trajectory points;

[0050] clustering the to-be-clustered trajectory points to obtain a turning trajectory.

[0051] In a second aspect, the application provides a system for detecting a trajectory turning direction, comprising a data processing unit, a matching unit and a detection unit,

[0052] The data processing unit is configured to collect trajectory data and road network data, and classify and filter the trajectory data to obtain a target data set;

[0053] The matching unit is configured to match the trajectory data in the target data set with the road network data by using a map matching algorithm to obtain road network trajectory data.

[0054] The detection unit is configured to represent the road network trajectory data by using a spatial geometric vector, calculate the turning direction of the road network trajectory data by vector cross multiplication operation corresponding to the road network trajectory data, assign the turning direction of the road network trajectory data to the turning core point by using the deflection angle, obtain a turning core point turning detection model by using the deflection angle, and calculate a turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm.

[0055] The present application provides a method and system for detecting trajectory turning direction, the method comprising: collecting trajectory data and road network data, the trajectory data comprising a plurality of trajectory points, classifying and filtering the trajectory data to obtain a target data set, the target data set comprising a plurality of trajectory data, matching the trajectory data in the target data set with the road network data by using a map matching algorithm to obtain road network trajectory data, the road network trajectory data being the trajectory data in which all trajectory points in the target data set are located on the road network data, representing the road network trajectory data by using a spatial geometric vector, and calculating the turning direction of the road network trajectory data by vector cross multiplication operation corresponding to the road network trajectory data, obtaining a turning core point by using the deflection angle, the turning core point being a trajectory point in the trajectory data with the maximum deflection angle and closest to the turning center, assigning the turning direction of the road network trajectory data to the turning core point, obtaining a turning core point turning detection model by using the deflection angle, and calculating a turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm. This solves the problem that lane information at an intersection cannot be determined by GPS data. BRIEF DESCRIPTION OF DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, other drawings can also be obtained by those skilled in the art without creative effort.

[0057] Figure 1 A flowchart of a method for detecting trajectory turning direction;

[0058] Figure 2 A schematic diagram of matching trajectory data with road network data;

[0059] Figure 3 for turn direction detection;

[0060] Figure 4 for vector geometry space representation;

[0061] Figure 5 for determining the position of the turn core point;

[0062] Figure 6 for experimental results of different trajectories at different angle threshold parameter settings;

[0063] Figure 7 for spatiotemporal continuous trajectory points;

[0064] Figure 8 for the effect of distance threshold on the number of trajectories;

[0065] Figure 9 for the detection process of the turn core point;

[0066] Figure 10 for the clustering process of the turn core point. DETAILED DESCRIPTION

[0067] The embodiments will be described in detail below with reference to the drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are merely examples of systems and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0068] The trajectory data in the embodiments is GPS trajectory data, which can be collected by a GPS data collection system. Of course, it can also be other trajectory data, such as geographic information system (GIS) data, which can process and analyze information obtained by GPS and remote sensing (RS).

[0069] Referring to Figure 1 , some embodiments of the present disclosure provide a method for detecting the direction of a trajectory turn, referring to Figure 1 , comprising:

[0070] S101: Collecting trajectory data and road network data, the trajectory data including a plurality of trajectory points;

[0071] S102: Classifying and screening the trajectory data to obtain a target data set, the target data set including a plurality of trajectory data;

[0072] S103: match the trajectory data in the target data set with the road network data using a map matching algorithm to obtain road network trajectory data, the road network trajectory data being trajectory data in which all trajectory points in the target data set are located on the road network data;

[0073] S104: represent the road network trajectory data using a spatial geometric vector and calculate the turning direction of the road network trajectory data through a vector cross multiplication operation corresponding to the road network trajectory data;

[0074] S105: obtain a turning core point using the deflection angle, the turning core point being a trajectory point in the trajectory data that has the maximum deflection angle and is closest to the turning center;

[0075] S106: assign the turning direction of the road network trajectory data to the turning core point;

[0076] S107: obtain a turning core point turning detection model through the deflection angle;

[0077] S108: calculate a turning trajectory according to the turning core point using a turning trajectory point clustering algorithm.

[0078] The embodiment extracts and detects trajectory data with a turning direction and a complete turning process, and determines the lane in which the trajectory data is located in the intersection through the turning direction, so as to solve the problem that the intersection is not studied, detected, and calculated in the lane level traffic mode data, and the cause of the intersection traffic jam is not found.

[0079] To improve the accuracy and rationality of the trajectory data, in some embodiments, the trajectory data is classified and filtered, including: classifying the trajectory data into normal class trajectory data and non-normal class trajectory data, the normal class trajectory data being trajectory data that does not need to be processed, retaining the normal class trajectory data, filtering the non-normal class trajectory data to obtain a non-normal class retained trajectory data set, generating a target data set, the target data set including the normal class trajectory data and the non-normal class retained trajectory data set.

[0080] Some trajectory data is found to have no road network data matched when matched with the road network data, so the trajectory data cannot be calculated and processed, that is, this is defined as invalid trajectory data, the effective range of longitude and latitude in the embodiment is [103.87E, 104.26E] x [30.50N, 30.82N], therefore, in order to delete this part of invalid trajectory data, the non-normal class trajectory data needs to be processed, in some embodiments, the non-normal class trajectory data includes: invalid trajectory data, field missing class trajectory data, duplicate class trajectory data, and abnormal class trajectory data.

[0081] The step of screening the abnormal type trajectory data to obtain the abnormal type reserved trajectory data set comprises: obtaining the position of the trajectory point of invalid trajectory data; if the trajectory point is within the valid range, retaining the trajectory data corresponding to the invalid trajectory data to the abnormal type reserved trajectory data set; and if the trajectory point is outside the valid range, deleting the trajectory data corresponding to the invalid trajectory data.

[0082] The step of obtaining the missing type of the field missing type trajectory data comprises: if the missing type is missing of the passenger state, filling the fields of the previous and next states of the passenger state to the field missing type trajectory data, and retaining the filled field missing type trajectory data to the abnormal type reserved trajectory data set; and if the missing type is missing of the longitude and latitude fields, deleting the field missing type trajectory data.

[0083] The step of obtaining the number of the repeated type trajectory data comprises: if there are multiple trajectory data of the same individual at the same time, retaining the first trajectory data corresponding to the repeated type trajectory data to the abnormal type reserved trajectory data set, and deleting the trajectory data repeated with the first trajectory data in the repeated type trajectory data.

[0084] The step of obtaining the abnormal type of the abnormal type trajectory data comprises: if the abnormal type is format error of the longitude and latitude fields, deleting the trajectory data corresponding to the abnormal type trajectory data; and if the abnormal type is format error of the passenger state, correcting the fields of the previous and next states of the passenger state, and retaining the corrected abnormal type trajectory data to the abnormal type reserved trajectory data set.

[0085] After the invalid trajectory data in the abnormal type trajectory data is deleted, the trajectory data saved in the abnormal type reserved trajectory data set can all find the corresponding actual road in the road network data. If the trajectory data is not processed, many errors may occur in the matching with the road network, which leads to slow progress of the matching process.

[0086] Due to the accuracy of the GPS device, the trajectory point may deviate from the actual road, and therefore, the trajectory point needs to be corrected according to the road network data. In some embodiments, the step of matching the trajectory data with the road network data to obtain the road network trajectory data comprises: setting the trajectory point in each trajectory data in the target data set on the actual road in the road network data; calculating the offset amount of the trajectory point from the actual road; if the offset amount is greater than an offset amount threshold, correcting the trajectory point according to the actual road to obtain the road network trajectory data; and if the offset amount is less than or equal to the offset amount threshold, not correcting the road network trajectory data. Figure 2 , Figure 2 The diagram is a schematic diagram of the trajectory data matched with the road network data, i.e. the corrected result. The circle points in the diagram represent the initial trajectory points, and the square points represent the corrected trajectory points.

[0087] In some embodiments, the step of representing the road network trajectory data by using spatial geometry vectors and calculating the turning direction of the road network trajectory data by vector cross multiplication operation corresponding to the road network trajectory data comprises: determining whether the trajectory in the road network trajectory data turns according to at least three trajectory points, when it is determined that the trajectory turns, determining at least two turning direction vectors by a trajectory sequence, the trajectory sequence comprising a plurality of trajectory points, the turning direction vector being used to determine the turning direction of the trajectory; performing cross multiplication operation on the at least two turning direction vectors to obtain a vector representing the turning direction of the trajectory; determining the direction of the vector representing the turning direction of the trajectory according to the right-hand screw rule; if the direction is a first direction, the turning direction is a right turn, and if the direction is a second direction, the turning direction is a left turn, the first direction and the second direction being opposite.

[0088] For example, in the turning detection, three trajectory points are set as a unit to determine whether the trajectory deflects, the trajectory sequence P(p1, p2, p3) is set, the vector is determined by (p1, p2), the vector is determined by (p2, p3), and the turning direction of the trajectory is determined by judging the direction of . The calculation process of is as follows:

[0089]

[0090]

[0091]

[0092] wherein a x is the difference in longitude of the two continuous trajectory points, a y is the difference in latitude of the two continuous points, b x is the difference in longitude of the two continuous trajectory points, and b y is the difference in latitude of the two continuous points, since the ground is a two-dimensional plane, a z and b z are both equal to 0, i, j, k are the general expressions of vectors, corresponding to the directions of x, y and z respectively, and the above equation can be solved as:

[0093]

[0094] Therefore, the coordinates of are (0, 0, a x b y -a y b x ), and the turning direction of the trajectory can be determined by judging a x b y -a y b xgreater than 0 or less than 0 to determine the specific turning of the trajectory. See Figure 4 According to the right-hand rule, the turning direction of the trajectory can be determined. When the trajectory turns to the right, the direction of the trajectory is downward, so the value is less than 0, and vice versa.

[0095] Due to the accuracy of the GPS device and the existence of the actual road curvature, a small number of trajectories will be slightly deflected. However, such trajectories are not actually turning, but are caused by lane changing or road curvature. In order to reduce this problem, the deflection angle θ is used. When θ is greater than a certain angle, the turning occurs. See Figure 4 In some embodiments, the step of obtaining the turning core point using the deflection angle includes: obtaining the deflection angle, which is the angle between the vector and the vector in the turning direction of the trajectory; when the deflection angle is greater than an angle threshold, marking the trajectory data as an actual turning; and when the deflection angle is less than or equal to the angle threshold, marking the trajectory data as lane changing and / or road curvature.

[0096] In addition to being able to determine whether the trajectory has a turning behavior, since the turning core point is the trajectory point closest to the turning center, the size of θ needs to be considered when detecting the turning of the turning core point. In some embodiments, the step of obtaining the turning core point using the deflection angle further includes: obtaining a trajectory data, the trajectory data including at least four trajectory points, the trajectory data being deflected at at least two trajectory points to form at least two deflection angles, comparing the at least two deflection angles to obtain a maximum deflection angle, and marking the trajectory point corresponding to the maximum deflection angle as the turning core point. See Figure 5 , Figure 5 An example of a trajectory composed of four trajectory points is shown. The trajectory is deflected at points a and b. The deflection angle of the trajectory at point a is θ1, and the deflection angle of the trajectory at point b is θ2. θ2>θ1, and point b is closer to the center of the turning intersection, so point b is determined to be the position of the turning core point.

[0097] Since the turning core point needs to be considered in terms of deflection angle and whether the trajectory point is close to the center of the intersection, in some embodiments, the step of obtaining the turning core point turning detection model using the deflection angle includes: using a minimum angle threshold parameter α to determine whether a turning occurs, and verifying the turning core point to obtain the turning core point turning detection model.

[0098] For example, the minimum angle threshold parameter α is set to determine the position of the turning core point when the trajectory turns. In addition, the trajectory may also have behaviors such as U-turns or reverse driving. In order to exclude these disturbances, β is set to limit the size of θ, reducing the turning detection error caused by the large deflection angle of the trajectory. In summary, the detection model of the turning direction of the turning core point can be obtained as follows:

[0099]

[0100] In the present embodiment, the turning of the intersection is mainly divided into three categories, so three turning category precisions are required. The evaluation indexes of precision, recall and F1 score are used to set the turning core point discrimination angle threshold and verify the discrimination effect of the turning core point. The calculation methods of the three evaluation indexes are as follows:

[0101]

[0102]

[0103]

[0104] Taking the calculation of left turning as an example, TP is the sample that is discriminated as left turning and actually turns left; FP is the sample that is discriminated as left turning but actually turns other directions; and FN is the sample that actually turns left but is discriminated as other turning.

[0105] Thirdly, the average values of the three evaluation indexes are calculated as the final evaluation indexes, and the calculation formula is as follows:

[0106]

[0107]

[0108]

[0109] Among them, P left is the precision of left turning, P straight is the precision of straight going, P right is the precision of right turning, R left is the recall of left turning, R straight is the recall of straight going, R right is the recall of right turning, F1 left is the F1 score of left turning, F1 straight is the F1 score of straight going, and F1 right is the F1 score of right turning.

[0110] For example, two trajectories are used to perform parameter setting experiments under different angle thresholds, as shown in Figure 6 , Figure 6For the experimental results, it can be seen that when the angle threshold is 34 degrees, the detection effect is best, the precision, recall rate and F1 score of trajectory 1 are 84.2%, 97.9%, 89.8% respectively, and the precision, recall rate and F1 score of trajectory 2 are 94.4%, 88.7%, 90.2% respectively, when trajectory 1 is greater than 87 degrees, it reaches the lowest point, and when trajectory 2 is greater than 115 degrees, it reaches the lowest point, and in summary, trajectory 2 has a core point with a large turning angle, therefore, the maximum angle threshold parameter can be limited to below 115 degrees.

[0111] In this embodiment, for example: the minimum angle threshold parameter a is set to 34 degrees, and the maximum angle threshold parameter β is set to 115 degrees, and the specific detection process of the turning core point is described in Figure 9 The turning core point is detected by whether the angle between the vector a and the vector b is between 34 degrees and 115 degrees.

[0112] When the vehicle needs to turn, the driver will drive into the corresponding turning lane in advance, so it can be known that the turning is a continuous process, rather than the instantaneous state of a certain trajectory point, that is, all trajectory points in the trajectory are also in the state of turning, therefore, the trajectory points around the turning core point need to be clustered to form a complete turning trajectory, in some embodiments, a turning trajectory point clustering algorithm is used to calculate the turning trajectory according to the turning core point, and the steps include: calculating the length of the trajectory data, if the length is within the judgment range, traversing the trajectory points within the judgment range to obtain a set of candidate trajectory points; extracting trajectory points that are spatiotemporally continuous with the turning core point from the set of candidate trajectory points, the trajectory points are to-be-clustered trajectory points, clustering the to-be-clustered trajectory points to obtain a turning trajectory.

[0113] Density-based spatial clustering of applications with noise (DBSCAN) is a spatial clustering algorithm, and its core idea is to cluster the trajectory points in a certain neighborhood of a core object based on the core object, so as to discover high-density clusters. This embodiment proposes a turning trajectory point clustering algorithm based on the DBSCAN idea, which takes the turning core point as the core object, clusters the trajectory points that are spatiotemporally continuous with the turning core point and within a distance range of a threshold parameter D, and makes them into a complete turning trajectory.

[0114] In the GPS trajectory data, the trajectory points of the same intersection are formed by different vehicles at different times, therefore, all trajectory points in a complete turning trajectory should be generated by the same vehicle and be spatiotemporally continuous, as described in Figure 7, the dot is the turning core point, and the track points connected with it are the track points of the same vehicle continuously passing through a certain intersection in a period of time, that is, the time and space are continuous.

[0115] In order to determine whether the clustering of the track points is effective, the clustering results are analyzed by using the internal contour coefficient of the clustering evaluation, see Figure 3 , the triangle is the track point of the right turn, and the circle is the track point of the left turn. The continuous turning track is clustered into left turning track and right turning track. The turning track 1, the turning track 2 and the turning track 3 in Figure 2 are used as samples. The three track samples contain two turning categories, and the space-time continuous turning track, the longitude and latitude of the track points are normalized by the following formula:

[0116]

[0117] Wherein, wherein max is the maximum value of the sample data, and min is the minimum value of the sample data.

[0118] Based on the similarity measurement method of the Euclidean distance, the contour coefficients of the three track samples are calculated, see Table 1:

[0119]

[0120] Table 1

[0121] The contour coefficient has a value range of [-1, 1], and the greater the value, the better the clustering effect. For the contour coefficient, the three track samples have good clustering effect.

[0122] In order to determine the influence of the threshold parameter D on the number of tracks, four tracks T1, T2, T3 and T4 are used for testing, see Figure 8 Each track will enter a plateau after a certain distance, see the four points a, b, c and d in the figure, which means that the driving state of the track changes after these distances, and the threshold parameter D corresponding to the starting points of the three stable periods a, b and c is within 100 meters, while the threshold parameter D corresponding to the point d is about 100 meters. In addition, the number of track points of T1, T2 and T3 does not change much when the distance parameter D is within 100 meters. Therefore, in order to include more track points into the turning track and make the number of turning track points relatively balanced, the threshold parameter D of the algorithm is 100.

[0123] According to the threshold parameter D, the turning track points are clustered and the turning information is updated, see Figure 10 , Figure 10 In the formula, m and n are variables of operation index.

[0124] Based on the above trajectory turning direction detection method, some embodiments of the present application also provide a system for detecting trajectory turning direction. The system comprises a data processing unit, a matching unit and a detection unit.

[0125] The data processing unit is configured to collect trajectory data and road network data, and classify and filter the trajectory data to obtain a target data set.

[0126] The matching unit is configured to use a map matching algorithm to match the trajectory data in the target data set with the road network data to obtain road network trajectory data.

[0127] The detection unit is configured to use a spatial geometric vector to represent the road network trajectory data, and calculate the turning direction of the road network trajectory data through a vector cross multiplication operation corresponding to the road network trajectory data, obtain a turning core point through a deflection angle, assign the turning direction of the road network trajectory data to the turning core point, obtain a turning core point turning detection model through the deflection angle, and calculate a turning trajectory according to the turning core point using a turning trajectory point clustering algorithm.

[0128] To improve the accuracy and rationality of the trajectory data, in some embodiments, the data processing unit is further configured to classify the trajectory data into normal class trajectory data and non-normal class trajectory data, retain the normal class trajectory data, filter the non-normal class trajectory data to obtain a non-normal class retained trajectory data set, and generate the target data set.

[0129] Due to the accuracy of GPS devices, the trajectory points may deviate from the actual road, therefore, in some embodiments, the matching unit is further configured to set the trajectory points in each trajectory data in the target data set on the actual road in the road network data, and calculate the offset amount of the trajectory points from the actual road.

[0130] In some embodiments, the detection unit is further configured to determine whether the trajectory in the road network trajectory data has turned according to at least three trajectory points, obtain a deflection angle, use a minimum angle threshold parameter to determine whether the trajectory has turned, verify the turning core point, obtain a turning core point turning detection model, obtain a to-be-clustered trajectory point, cluster the to-be-clustered trajectory point, and obtain a turning trajectory.

[0131] The application provides a method and system for detecting a turning direction of a track, the method comprising: collecting track data and road network data, the track data comprising a plurality of track points; classifying and screening the track data to obtain a target data set, the target data set comprising a plurality of track data; matching the track data in the target data set with the road network data by using a map matching algorithm to obtain road network track data, the road network track data being track data in which all track points in the target data set are located on the road network data; representing the road network track data by using a spatial geometric vector; calculating a turning direction of the road network track data by using a vector cross multiplication operation corresponding to the road network track data; obtaining a turning core point by using a deflection angle, the turning core point being a track point in the track data that has the maximum deflection angle and is closest to a turning center; assigning the turning direction of the road network track data to the turning core point; obtaining a turning core point turning direction detection model by using the deflection angle; and calculating a turning track by using a turning track point clustering algorithm according to the turning core point. The method can solve the problem that lane information of a track at an intersection cannot be determined by using GPS data.

[0132] The similar parts among the embodiments provided by the application can be referred to each other, the specific embodiments provided above are only a few examples under the general concept of the application, and do not constitute a limitation on the protection scope of the application. Any other embodiments extended according to the application scheme without creative labor belong to the protection scope of the application for those skilled in the art.

Claims

1. A method of detecting a direction of a turn of a trajectory, characterized by, The method comprises the following steps: Collecting trajectory data and road network data, the trajectory data comprising a plurality of trajectory points; Classifying the trajectory data to obtain a target data set, the target data set comprising a plurality of the trajectory data; Matching the trajectory data in the target data set with road network data by using a map matching algorithm to obtain road network trajectory data, the road network trajectory data being the trajectory data in which all trajectory points in the target data set are located on the road network data; Using a spatial geometric vector to represent the road network trajectory data, and calculating the turning direction of the road network trajectory data through cross multiplication operation of the corresponding vector of the road network trajectory data; Obtaining a turning core point through a deflection angle, the turning core point being a trajectory point in the trajectory data with the maximum deflection angle and closest to the turning center; Assigning the turning direction of the road network trajectory data to the turning core point; Obtaining a turning core point turning detection model through the deflection angle; Using a turning trajectory point clustering algorithm to calculate a turning trajectory according to the turning core point.

2. The method of claim 1, wherein, The step of classifying the trajectory data to obtain a target data set comprises the following steps: Classifying the trajectory data into normal class trajectory data and non-normal class trajectory data, the normal class trajectory data being trajectory data that does not need to be processed; Retaining the normal class trajectory data; Screening the non-normal class trajectory data to obtain a non-normal class retained trajectory data set; Generating the target data set, the target data set comprising normal class trajectory data and the non-normal class retained trajectory data set.

3. The method of claim 2, wherein, The non-normal class trajectory data comprises invalid trajectory data, field missing class trajectory data, duplicate class trajectory data, and abnormal class trajectory data. The step of screening the non-normal class trajectory data to obtain a non-normal class retained trajectory data set comprises the following steps: Obtaining the position of a trajectory point of invalid trajectory data, if the trajectory point is within a valid range, retaining the trajectory data corresponding to the invalid trajectory data to the non-normal class retained trajectory data set, and if the trajectory point is outside the valid range, deleting the trajectory data corresponding to the invalid trajectory data; Obtaining the missing type of field missing class trajectory data, if the missing type is passenger state missing, filling the fields of the previous and subsequent states of the passenger state to the field missing class trajectory data, and retaining the filled field missing class trajectory data to the non-normal class retained trajectory data set, if the missing type is longitude and latitude field missing, deleting the field missing class trajectory data; Obtaining the number of duplicate class trajectory data, if there are multiple trajectory data of the same individual at the same time, retaining the first trajectory data corresponding to the duplicate class trajectory data to the non-normal class retained trajectory data set, and deleting the trajectory data duplicated with the first trajectory data in the duplicate class trajectory data; An abnormal type of the abnormal class trajectory data is obtained, if the abnormal type is a format error of latitude and longitude field, the trajectory data corresponding to the abnormal class trajectory data is deleted, if the abnormal type is a format error of passenger state, fields of front and rear states of the passenger state are corrected, and the abnormal class trajectory data after correction is retained to the non-normal class retained trajectory data set.

4. The method of claim 2, wherein, The step of matching the trajectory data with the road network data by using a map matching algorithm to obtain road network trajectory data comprises: setting the trajectory points in each of the trajectory data in the target data set on the actual road in the road network data; calculating the offset of the trajectory points from the actual road; if the offset is greater than an offset threshold, correcting the trajectory points according to the actual road to obtain road network trajectory data; if the offset is less than or equal to the offset threshold, not correcting the road network trajectory data.

5. The method of claim 1, wherein, The step of representing the road network trajectory data by using a spatial geometric vector and calculating the turning direction of the road network trajectory data by using a vector cross multiplication operation corresponding to the road network trajectory data comprises: judging whether the trajectory in the road network trajectory data turns according to at least three trajectory points; when judging that the trajectory turns, determining at least two turning direction vectors by using a trajectory sequence, the trajectory sequence comprising a plurality of trajectory points, and the turning direction vectors being used to judge the turning direction of the trajectory; performing a cross multiplication operation on the at least two turning direction vectors to obtain a vector representing the turning direction of the trajectory; judging the direction of the vector representing the turning direction of the trajectory according to the right-hand screw rule; if the direction is a first direction, the turning direction is a right turn, and if the direction is a second direction, the turning direction is a left turn, the first direction being opposite to the second direction.

6. The method of claim 1, wherein, The step of obtaining a turning core point by using a deflection angle comprises: obtaining a deflection angle, the deflection angle being an included angle between the vector and the vector representing the turning direction of the trajectory; when the deflection angle is greater than an angle threshold, marking the trajectory data as an actual turn; when the deflection angle is less than or equal to the angle threshold, marking the trajectory data as straight driving, lane changing and / or road bending.

7. The method of claim 1, wherein, The step of obtaining a turning core point by using a deflection angle further comprises: obtaining a piece of trajectory data, the trajectory data comprising at least four trajectory points, the trajectory data deflecting at at least two trajectory points to form at least two deflection angles; comparing the at least two deflection angles to obtain a maximum deflection angle; marking the trajectory point corresponding to the maximum deflection angle as a turning core point.

8. The method of claim 1, wherein, The step of obtaining a turning core point turning detection model by using the deflection angle comprises: verifying whether the turning core point occurs by using a minimum angle threshold parameter, and obtaining a turning core point turning detection model.

9. The method of claim 1, wherein, The step of calculating a turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm comprises: calculating the length of the trajectory data; if the length is within a judgment range, traversing the trajectory points within the judgment range to obtain a candidate trajectory point set; extracting, from the alternative trajectory point set, trajectory points that are spatiotemporally continuous with the turning core point, the trajectory points being to-be-clustered trajectory points; clustering the to-be-clustered trajectory points to obtain a turning trajectory.

10. A system for detecting a direction of a turn of a trajectory, characterized by comprise: a data processing unit, configured to collect trajectory data and road network data, and to classify and filter the trajectory data to obtain a target data set; a matching unit, configured to match the trajectory data in the target data set with the road network data by using a map matching algorithm to obtain road network trajectory data; a detection unit, configured to represent the road network trajectory data by using a spatial geometric vector, to calculate a turning direction of the road network trajectory data by vector cross multiplication operation corresponding to the road network trajectory data, to obtain a turning core point by using a deflection angle, to assign the turning direction of the road network trajectory data to the turning core point, to obtain a turning core point turning direction detection model by using the deflection angle, and to calculate a turning trajectory according to the turning core point by using a turning trajectory point clustering algorithm.