A method and system for improving data quality of non-motor vehicle riding trajectory

Through GeoHash-based mesh division and nearest neighbor trajectory point detection, abnormal and missing data in non-motor vehicle riding trajectory are identified and eliminated, the problem of improving the quality of non-motor vehicle riding trajectory is solved, a high-quality data foundation is achieved, and accurate data support is provided for the construction and navigation of cycling maps.

CN115310522BActive Publication Date: 2025-08-12EAST CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210842913.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2025-08-12
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

There are data abnormalities and missing problems in non-motor vehicle riding trajectories. The existing pre-processing methods based on car trajectory data cannot effectively improve the quality of non-motor vehicle riding trajectory, affecting the construction and navigation accuracy of cycling maps.

Method used

The low-mass trajectory area is segmented by a grid division method based on GeoHash, and abnormal points are detected in combination with the direction and velocity of the adjacent trajectory points. The hovering trajectory segment is identified using breadth-first search. The kernel density estimate eliminates the illegal driving trajectory, and the drift trajectory is calibrated using LCSS and Fréchet distances, and the missing trajectory is restored through incremental clustering.

Benefits of technology

Effectively identifying and eliminating abnormal and missing data in non-motor vehicle riding trajectories provides a high-quality data foundation and provides accurate data support for the construction and navigation of cycling maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115310522B_ABST
    Figure CN115310522B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for improving the data quality of non-motor vehicle riding trajectories. The method first collects and acquires vehicle trajectory data and non-motor vehicle trajectory data, divides the low-quality trajectory area into grids of fixed size, and establishes a grid index for the trajectory points; identifies and eliminates turning abnormal points and speed abnormal points, wandering trajectory segments, and wrong-way / illegal driving trajectory segments, calibrates the drifting trajectory segments, and restores the missing trajectories; and finally outputs the non-motor vehicle riding trajectory with improved data quality. The present invention also discloses a system for implementing the above-mentioned method for improving the data quality of non-motor vehicle riding trajectories and the application of the method and / or system in improving the data quality of non-motor vehicle riding trajectories. The present invention can solve the problems of trajectory anomalies and missing positioning signals in non-motor vehicle riding trajectory data, and provides a good data foundation for inferring riding maps using non-motor vehicle riding data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of trajectory mining technology, and specifically relates to a method and system for improving the data quality of non-motor vehicle riding trajectories. Background Art

[0002] With the massive increase in the number of non-motorized vehicles (NMVs), NMV-related services are booming and entering a period of rapid growth. To reach their destinations quickly and conveniently, people often use NMVs as a means of transportation. Due to the lack of professional and accurate NMV cycling navigation maps, riders often enter areas restricted for NMVs. Furthermore, relying on outdated two-wheeled vehicle navigation software to reach their destinations can lead to incidents of straying into deep mountains or forests. Building and updating NMV cycling maps can ensure efficient route planning and enhance the NMV cycling experience. The rapid growth of NMV-related services has accumulated a massive amount of NMV cycling trajectory data. This, along with the corresponding trip, vehicle, and baseline road network data, provides a foundation for inferring cycling maps. However, due to factors such as positioning device errors and NMV riding habits, cycling trajectory datasets contain a large amount of anomalies and missing positioning information, posing significant challenges to inferring NMV cycling maps. Therefore, a data quality improvement method for NMV cycling map construction is urgently needed.

[0003] It has been observed that, in addition to the direction and speed noise commonly found in trajectory data, non-motorized vehicle riding trajectories also contain data anomalies such as wandering segments in popular riding areas, illegal turning (reverse driving) segments, signal drift segments, and signal missing segments. Wandering segments are common in non-road areas, accompanied by frequent changes in direction and low speeds; illegal riding trajectories are characterized by turning and reverse driving in non-turning areas. These introduce a certain degree of interference to the accurate extraction of road topology and require timely detection and elimination. Signal drift and missing segments often occur in areas with weak signals, necessitating the use of historical trajectory data to effectively identify drifting behavior and recover missing trajectories based on sparse data. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to address the problems of data anomalies and missing data in non-motor vehicle riding trajectories, and the inability of existing preprocessing methods based on automobile trajectory data to directly improve the quality of non-motor vehicle riding trajectories. A method and system for improving the data quality of non-motor vehicle riding trajectories are proposed. This method can handle the trajectory anomalies and positioning signal missing problems in non-motor vehicle riding trajectory data, and provide an effective data basis for non-motor vehicle riding map inference.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0006] A method for improving the data quality of non-motor vehicle riding trajectories includes the following steps:

[0007] S1: Collect vehicle and non-motor vehicle trajectory data. To accelerate subsequent neighborhood-based anomaly detection and data recovery, use a GeoHash-based cell partitioning method to segment low-quality trajectory areas into fixed-size grids and establish a GeoHash grid index for the trajectory points.

[0008] S2: A trajectory noise detection method based on the main direction and speed of neighboring trajectory points is used to identify and eliminate abnormal turning points and speed points.

[0009] S3: Based on the characteristics of variable direction and low speed, the wandering trajectory segments with larger spatiotemporal neighbors are identified and eliminated based on the GeoHash grid and breadth-first search (BFS).

[0010] S4: Use kernel density estimation and GeoHash grid to analyze neighboring trajectories, detect illegal driving trajectory segments and eliminate them.

[0011] S5: The drifting trajectory segment is detected by using the normal sampling interval of the trajectory data and the consistency of the drifting trajectory segment with the movement behavior of the neighboring trajectory. The most similar neighboring trajectory segment is extracted using LCSS and Fréchet distance calculation to replace the drifting trajectory segment for calibration.

[0012] S6: Extract trajectory segments with longer time (or distance) intervals based on the average sampling interval between neighboring trajectory points. Use the incremental clustering method to cluster the trajectory segments to identify the area where the missing trajectory is located. Based on the historical trajectory data of this area, similar sub-trajectories are obtained. Then, a fitting method based on the minimum distance sum is used to restore the missing trajectory.

[0013] S7: Output the non-motor vehicle riding trajectory after data quality improvement.

[0014] To optimize the above technical solutions, specific measures taken also include:

[0015] In the above step S1 , the information of the sampling interval of the trajectory points and the distance between adjacent trajectory points is derived from the original trajectory itself.

[0016] The step S1 specifically includes:

[0017] To accelerate the efficiency of nearest neighbor search for anomaly data detection, a GeoHash-based grid cell partitioning method is first used to segment the data anomaly area (low-quality trajectory area) into a fixed-size grid. The grid size is related to the scope of the subsequent query and should be as close to the query range as possible. Subsequent queries are based on trajectory points within the neighborhood of the trajectory point. Considering that the properties of lanes are relatively similar, the query range should be slightly larger than the lane to ensure that trajectory points within the same lane fall within the query range; the query range is 100-120% of the lane width. The direction and speed of the trajectory points in the riding trajectory data, the direction and speed changes between adjacent trajectory points, and the sampling time difference between adjacent trajectory points are then calculated. Based on this, the trajectory points' travel status (the travel status is an inherent attribute obtained when the trajectory is obtained, such as "idle", "riding", "near the ride start point", "reached the ride end point", etc.) is combined to form derived attributes of the trajectory points. Finally, a grid index is created for the trajectory data, with the corresponding GeoHash value as the keyword. GeoHash here converts the latitude and longitude into strings and then uses the string as a one-dimensional index to connect the corresponding trajectory information. The keyword of the grid index is GeoHash. Each GeoHash corresponds to a geographical range and a grid area.

[0018] Among them, the data abnormal area or low-quality trajectory area refers to an area with low-quality trajectory conditions such as wandering trajectory segments in popular riding areas, illegal turning (reverse driving) trajectory segments, signal drift trajectory segments, and signal missing trajectory segments; the derived attributes (i.e., information) of the trajectory point include the direction of the trajectory point, direction change, speed, speed change, sampling time difference between adjacent trajectory points, travel status, etc.

[0019] GeoHash is a geocoding algorithm that can locate GPS coordinates in different sizes of geographic grid cells with different code lengths in O(1) time complexity. At the same time, for the common prefix of the code corresponding to different GPS coordinates, the longer the length, the closer the location. Considering that the national standard for lane width is 3.5 meters to 3.75 meters, the corresponding geohash code length is set to 9 (that is, the corresponding grid cell length and width are both 4.8 meters). The length of geohash is a positive integer value. The code length, i.e., the geohash value, is increased by 1. For every increase in the code length, the corresponding grid area is reduced to 1 / 32 of the original. The longer the length, the smaller the corresponding grid area. Specifically, the longitude and latitude are first converted to binary code according to the dichotomy method, and then integrated by placing longitude in even digits and latitude in odd digits. The integrated binary is then converted into decimal in groups of 5, and finally converted into a string according to the Base32 table. The Base32 table can use 32 characters to encode any byte data.

[0020] The above step S2 specifically includes:

[0021] Step 2.1, track segmentation: Count the sampling time intervals between adjacent track points, and use the average sampling time interval Time between each track point in the entire non-motor vehicle track data dis The trajectory is segmented as a threshold for segmenting the trajectory.

[0022] Step 2.2, speed abnormal point elimination: Considering that the upper limit speed of non-motor vehicles used for riding is th according to national standards speed is 6.95 m / s (i.e. 25 km / h), and the trajectory point whose speed exceeds the speed threshold th is deleted. speed The velocity of a trajectory point is calculated as the sum of the distances between the trajectory point before segmentation and its adjacent trajectory points before and after it / the sum of the sampling time differences between the trajectory point before segmentation and its adjacent trajectory points before and after it.

[0023] Step 2.3, Elimination of Turning Outliers: Based on the direction difference characteristics of a few turning outliers and most of their neighboring trajectory points, first use the GeoHash grid to find the neighbors of the trajectory point to be detected; then divide the neighboring points into 8 different directions according to their directions (the angle difference from true north is Considering that the road has one-way / two-way roads, if the direction of the trajectory point to be detected does not belong to the two directions with the largest number of trajectory points, it will be regarded as a turning abnormal point and deleted. The definition of the neighboring points is as follows:

[0024] Given a trajectory point p i , the preset distance threshold th dis , and the trajectory point set P, GeoDis(p i , p j ) indicates p i and p j The actual ground distance between i The nearest neighbor point is defined as: Near(p i )={p j ∈P|GeoDis(p i , p j )≤th dis The distance threshold is set in accordance with the lane width and is generally slightly wider than the lane width, generally equivalent to 100% to 120% of the lane width.

[0025] The direction of the neighboring point represents the normal direction of most of the trajectory points around the trajectory point to be detected. If the direction of the trajectory point to be detected is significantly different from the normal direction of the neighboring point, it is considered that its direction is abnormal. Considering that the lane width is 3.5 meters to 3.7 meters, in actual use, th dis =4 meters.

[0026] The above step S3 specifically includes:

[0027] The wandering trajectory segments of non-motorized vehicle riding trajectories are located in non-road areas involved in the riding journey, such as residential areas and commercial districts. These areas are where a large number of trajectory points with the status of "reaching near the end of the ride" are located. At the same time, the wandering trajectory segments are often accompanied by behaviors such as frequent changes in direction and lower speeds compared to normal riding trajectories.

[0028] Based on these characteristics, we first search for the neighboring points of the trajectory point to be detected based on breadth-first search (BFS). Considering the sparseness of trajectories in non-road areas compared to road areas, we set a larger neighbor distance threshold (set to twice the lane width, generally 8 meters) to extract more neighboring trajectory points.

[0029] Based on the obtained neighboring points, the proportion of trajectory points with the status of "reaching the end of the ride" is counted. When the proportion exceeds the proportion of trajectory points with the status of "riding", the area is considered a popular non-road area related to non-motorized vehicle riding. If multiple consecutive trajectory points in a trajectory are located in the above-mentioned popular non-road area, it is considered a candidate wandering trajectory segment;

[0030] The directions of the trajectory points in the candidate wandering trajectory segments are counted and divided into eight direction classes. Considering the characteristics that road riding trajectories may occasionally turn and the riding direction remains unchanged before and after turning, if the directions of the trajectory points in a wandering trajectory segment belong to more than two direction classes, and the trajectory points of different classes have a positional intersection relationship based on the sampling time sequence, and the average speed of the trajectory points in the candidate wandering trajectory segment is lower than the average speed of road riding, then it is judged as a wandering trajectory segment and deleted.

[0031] The above step S4 specifically includes:

[0032] The illegal driving trajectory segments in S4 include wrong-way turning trajectory segments and illegal turning trajectory segments; the trajectory elimination in the non-motor vehicle restricted road area: considering that the sparsity of the trajectory point density under the grid will affect the smoothness of the vehicle area calculation, the kernel density estimation method is used to smoothly calculate the cycling trajectory and (car) vehicle trajectory density in each grid cell. The grid cells in the trajectory area belonging to the restricted area are determined based on the characteristic that the trajectory density in the vehicle area should be significantly higher than the cycling trajectory density.

[0033] The kernel density estimation method is a non-parametric estimation method that smoothes the current grid density by weighted summation of grid densities within a certain range. The weight is calculated by the distance between the neighboring grid and the current grid through the Gaussian kernel function. The function form is as follows:

[0034]

[0035] Among them, x is the historical trajectory flow of the current grid, x′ is the historical trajectory flow of the neighboring grid, and σ is the window width of the kernel function, which corresponds to the lane width (in meters).

[0036] Based on the restricted area grid cells identified in the above steps, the non-motor vehicle riding trajectory is traversed. When the proportion of restricted area grid cells covered by the line segments formed by connecting adjacent trajectory points exceeds the threshold th prop (Set a smaller threshold th prop To ensure that the cycling trajectory and the vehicle trajectory in the restricted area are significantly different, the value is taken as 0.1), and the line segment is judged as an abnormal trajectory segment; when the length between the continuous trajectory points in the abnormal trajectory segment exceeds the distance threshold dis len (The distance threshold is set by multiplying the selected time average sampling interval and the riding speed limit), it is determined to be an abnormal driving trajectory segment and eliminated. The time average sampling interval is determined by the non-motor vehicle trajectory data. In this invention, the average sampling interval of the experimental data is 12 s The speed limit for non-motor vehicles is 25 km / h, which is 6.94 m / s. Multiplying by 6.94 m / s gives 83.33 m, which can be rounded to 84 m. The distance threshold is set as len =84 meters.

[0037] Elimination of wrong-way / illegal turning trajectory segments: Considering that wrong-way and illegal turning trajectory segments have significant differences in direction and direction changes from most of their neighboring trajectory points, we first extract the neighboring points of the trajectory point to be detected by range extraction (the extraction range is slightly larger than the lane width, within 100-120% of the lane width, generally 4 meters), and divide the neighboring points into 8 directions according to direction and direction changes (angle difference from true north is 100-120%). 8 directions) category;

[0038] When the directions of the neighboring points are roughly the same (the direction of the majority of the neighboring points is the main direction), the road where the trajectory point is located is determined to be a one-way road; if the direction of the current trajectory point is opposite to the main direction, the trajectory point is determined to have a wrong-way behavior. If the proportion of trajectory points without wrong-way behavior in the continuous trajectory point sequence is lower than the set threshold (a small proportion threshold is set to ensure the credibility of wrong-way behavior, generally 0.1), the trajectory point sequence is considered to be a wrong-way trajectory segment and is eliminated;

[0039] When the direction of a trajectory point does not belong to the main direction of its neighboring points, and its direction change is different from the direction change of its neighboring trajectory points, it is considered that the point has illegal turning behavior; when the proportion of the direction of a sequence of continuous trajectory points belonging to the main direction is lower than the threshold (a small threshold is set to ensure the credibility of illegal turning, generally 0.1) and there are trajectory points with illegal turning behavior, it is considered that the trajectory point sequence has illegal turning behavior and should be eliminated.

[0040] The above step S5 specifically includes:

[0041] Step 5.1, give the definition: given a trajectory point pair (p s , p e ) and a trajectory Tr={p1,p2,...,p n}, when the following conditions are met at the same time, it is considered that the sub-trajectory of Tr is a pair of trajectory points (p s , p e ) of similar trajectory segments:

[0042] (1)p i is the distance point p in the trajectory Tr s The nearest point, p i+m is the distance point p in the trajectory Tr e the nearest point;

[0043] (2)p s With p i The distance between dis(p s , p i )<β and p e With p i+m The distance between dis(p e , p i+m )<β(β>0), β is the distance threshold used to search for the nearest neighbor of a given trajectory point. Its initial value is set according to the product of the average sampling interval and the riding speed limit, which can be 84 meters, and β=min(dis(p s , p e ) / 2,β);

[0044] (3) The time interval between query trajectory points should be similar to the duration of similar trajectory segments, that is, let △t = p e .time-p s .time, max(0, (1-α1)*△t)<p i+m .time-p i , time<(1+α1)*△t, where α1 is an adjustment parameter with a value range of [0, 1], which can be changed according to different GPS trajectory data sets. In general, the average value is 0.5, and time is the sampling timestamp.

[0045] Step 5.2, drift trajectory segment identification: Given a trajectory Tr = {p1, p2, ..., p n}, when there is a drift trajectory segment When , it appears as a sub-trajectory of trajectory Tr All trajectory points in Tr are far away from other neighboring trajectory points in Tr, but The sampling interval between the inner track points remains unchanged. Based on this, the sub-tracks of track Tr will be determined according to the following conditions Is it a drift trajectory segment?

[0046] (1)p i With p i-1 The distance between dis(p i , p i-1 )>(1+α2)*avg dis And p i+m+1 With p i+m The distance between dis(p i+m , p i+m+1 )>(1+α2)*avg dis , where avg dis It represents the average sampling distance between two consecutive trajectory points. α2 is an adjustment parameter whose value range is [0, 1]. It can be changed according to the different GPS trajectory data sets. In general, the average value is 0.5.

[0047] (2)(1-α2)*avg dis <dis(p z+k , p z+k+1 )<(1+α2)*avg dis (0≤k≤m-1);

[0048] (3)(1-α3)*avg si <(p i+k-1 .time-p z+k .time)<(1+α3)*avg si (0≤k≤m+1), where avg si It represents the average sampling interval of the data set. α3 is an adjustment parameter with a value range of [0, 1]. It can be changed according to different GPS trajectory data sets. Generally, the average value is 0.5. Time refers to the sampling timestamp of the trajectory point.

[0049] Step 5.3, drift trajectory segment calibration: Considering that the drift trajectory segment is only one segment of the entire trajectory of the moving object, the similarity measurement method based on the longest common subsequence (LCSS: Longest Common Subsequence) is used to find the k trajectories with the highest similarity to the trajectory with the drift trajectory segment. In order to evaluate the similarity between other trajectories and the drift trajectory, the ratio of the number of points in the longest common subsequence of the two trajectories to the number of all trajectory points of the trajectory is used as the measurement value. Then, according to the definition of step 5.1, the drift trajectory segment is used as the calibration value. The preceding trajectory point p i-1 and subsequent trajectory point p i+m+1As the query point pair, a set of trajectory segments similar to the drift trajectory is extracted from the k trajectories with the highest similarity.

[0050] Since the drift trajectory segment may be generated by the inertial navigation system of the mobile device based on the direction and acceleration of the continuously collected trajectory points, its shape is similar to the real trajectory. Each trajectory point p i+k (0≤k≤m) Convert the geographic location to get Thus, the new trajectory segment after conversion is obtained The position conversion formula is as follows, where x represents the longitude of the point and y represents the latitude of the point:

[0051]

[0052] Using Fréchet distance metric The distance between each similar trajectory segment and the new trajectory segment with the minimum distance to the similar trajectory segment Considered as a representative trajectory segment, the representative trajectory segment is used to replace the corresponding drift trajectory segment to achieve calibration. and The Fréchet distance F(Tr m , Tr n ) is calculated as follows: First, find the corresponding point pair sequence between the two trajectories Where a1=1, b1=1, a s =i,b s =j, Contains the trajectory segment Tr m All the trajectory points in the original trajectory point sequence (repeated), Similarly, the maximum distance between corresponding point pairs in the point pair sequence ||L||, Fréchet distance F(Tr m , Tr n ) is the smallest ||L|| value among all point pairs:

[0053]

[0054] F(Tr m , Tr n )=min{||L|||L is Tr p , Tr q A sequence of pairs between

[0055] The above step S6 specifically includes:

[0056] Step 6.1, define: given trajectory Tr = {p1, p2, ..., p n}, the longer sampling interval trajectory segment Li =(p i , p i+1 ) is a line segment formed by connecting two consecutive trajectory points that meet the following conditions:

[0057] (1)p i With p i+1 The distance between dis(p i , p i+1 )>(1+α2)*avg dis , where avg dis It represents the average sampling distance interval between two consecutive trajectory points. α2 is the adjustment parameter of the distance constraint, and its value range is [0, 1]. It can be changed according to the different GPS trajectory data sets. In general, the average value is 0.5.

[0058] (2)(p i+1 .time-p i .time)>(1+α4)*avg si , where avg si It represents the average sampling time interval, α4 is an adjustment parameter, and its value range is [0, +∞], which can be changed according to the different GPS trajectory data sets. In general, the average value is 2. Here, time is the sampling timestamp.

[0059] Step 6.2: Identification of weak signal areas:

[0060] Due to the weak positioning signal in some areas, there are cases where the time and / or distance between consecutive trajectory points is much longer than the average sampling time interval / average sampling distance interval, which is called a long sampling interval segment (trajectory segment). According to the definition of step 6.1, the long sampling interval segment is detected and then incrementally clustered to locate the area with weak signal. During the clustering process, this method maintains a set of long sampling interval segment clusters. Here, the segment cluster represents a set of segments (trajectory segments). At the beginning, the set is empty. When a long sampling interval segment (trajectory segment) L is detected, i By calculating L i The distance between the representative trajectory of the existing longer sampling interval line segment cluster, the search distance L i The nearest long sampling interval line segment cluster (satisfying L i The distance from the line segment cluster with the longer sampling interval is less than the specified threshold β), L i Insert the cluster and recalculate the representative trajectory of the cluster; if not found, L i As a separate cluster, the value of β is calculated according to the formula min(lc.length / 2, β), where lc.length represents the length of lc representing the trajectory. kThe starting point lc of the representative trajectory s and the end point lc e Calculated by the following formula, C k .num indicates the number of segments in the cluster:

[0061]

[0062] L i .st indicates the starting endpoint of the longer sampling interval segment, L i .ed represents the ending endpoint of the longer sampling interval segment.

[0063] The distance between line segments adopts the segment-based Hausdorff distance method, which combines parallel distance, perpendicular distance, and angular distance to evaluate the distance between line segments. Compared with other segment-based similarity measurement methods, Hausdorff distance can obtain a more accurate similarity value based on a smaller calculation time. In this invention, it can effectively measure the similarity between line segments.

[0064] When the number of line segment clusters with longer sampling intervals exceeds the maximum number m that can be stored in the memory, the two closest clusters are merged. k .num is greater than the preset threshold thres num When the cluster is located in the area where the weak signal is located, the threshold thres num Set to the average number of segments in all clusters with longer sampling intervals in the region. Setting the average number can reflect the normal number of trajectories in a cluster under normal circumstances.

[0065] Step 6.3: Restoring missing tracks in weak signal areas:

[0066] For missing traces in weak signal areas, the two endpoints of the longer sampling interval line segment (L i .st、L i .ed) is the query point. According to the definition in step 5.1, a set of similar trajectory segments is extracted from the historical trajectory. The Fréchet distance between the trajectory segments in the set of similar trajectory segments is calculated respectively, and the trajectory segment with the smallest sum of distances between similar trajectory segments is found. It is used as the reference trajectory segment. and The Fréchet distance F(Tr m , Tr n ) is calculated as follows: First, find the corresponding point pair sequence between the two trajectories Where a1=1, b1=1, a s =i,b s =j, Contains the trajectory segment Trm All the trajectory points in the original trajectory point sequence (repeated), Similarly, the maximum distance between corresponding point pairs in the point pair sequence ||L||, Fréchet distance F(Tr m , Tr n ) is the smallest ||L|| value among all point pairs:

[0067]

[0068] F(Tr m , Tr n )=min{||L|||L is Tr p , Tr q A sequence of pairs between

[0069] Considering the instability of the reference trajectory segment obtained based on distance calculation, the trajectory points near the reference trajectory segment are used to calibrate it. The specific method is as follows: first, L i .st is considered to represent the trajectory point rp s ; Then take the trajectory point p of the reference trajectory segment i+k (0≤k≤m) is the center of the circle and the road width d is the radius. Find all the trajectory points in the area and select the ones that are related to the trajectory point p among these trajectory points. i+k The direction angle is less than the threshold thres angle The trajectory point set S p , S p The average position point of the trajectory point is taken as its representative trajectory point rp i+k , where the threshold thres angle A smaller value is set to ensure direction approximation. In the present invention, 10° is generally used. Different smaller value parameters can be selected according to different trajectories.

[0070] In order to ensure the smoothness of the extracted representative trajectory, if the distance between the current representative trajectory point and the previous representative trajectory point is less than the smoothness threshold thres smooth , then the traversal skips the current representative trajectory point. Until L i The distance between .ed and the current trajectory point is less than the smoothness threshold thres smooth , L i .ed as the last representative trajectory point rp e , complete the extraction of the representative trajectory segment. The threshold thres smoothSet to the average sampling distance between adjacent trajectory points in the GPS dataset. Using the average sampling interval can reflect the normal sampling interval of trajectories under normal circumstances. This parameter can be adjusted according to the sampling interval of different trajectories. Finally, the representative trajectory segment is used to replace the corresponding longer sampling interval segment to complete the recovery of the sampled missing trajectory in the weak signal area.

[0071] The present invention also proposes a non-motor vehicle riding trajectory data quality improvement system, which includes: a trajectory data acquisition module, a low-quality trajectory area segmentation module, an abnormal trajectory point elimination module, a wandering trajectory segment elimination module, a wrong-way and / or illegal trajectory segment elimination module, a drifting trajectory segment calibration module, a missing trajectory segment recovery module, and an improved trajectory data output module;

[0072] The trajectory data acquisition module is used to collect and acquire vehicle trajectory data and non-motor vehicle trajectory data;

[0073] The low-quality trajectory region segmentation module is used to segment the low-quality trajectory region into fixed-size grids based on the GeoHash unit partitioning method, and to establish a GeoHash grid index for the trajectory points;

[0074] The abnormal trajectory point elimination module is used to identify and eliminate abnormal turning points and abnormal speed points based on the trajectory noise detection method of the main direction and speed of the neighboring trajectory points;

[0075] The wandering trajectory segment elimination module is used to identify and eliminate wandering trajectory segments that are closer to their neighbors in a larger range of time and space based on the GeoHash grid and breadth-first search (BFS);

[0076] The module for eliminating wrong-way and / or illegal trajectory segments is used to analyze neighboring trajectories using kernel density estimation and GeoHash grids to detect and eliminate illegal driving trajectory segments;

[0077] The trajectory segment elimination calibration module is used to detect drifting trajectory segments by using the normal sampling interval of trajectory data and the consistency of the drifting trajectory segment and the movement behavior of the neighboring trajectory, and to extract the most similar neighboring trajectory segment by using LCSS and Fréchet distance calculation to replace the drifting trajectory segment for calibration;

[0078] The missing trajectory segment recovery module uses an incremental clustering method to cluster trajectory segments to identify the area where the missing trajectory is located, obtains similar sub-trajectories based on the historical trajectory data of the area, and then uses a fitting method based on the minimum distance sum to restore the missing trajectory;

[0079] The improved trajectory data output module is used to output the non-motor vehicle riding trajectory after data quality is improved.

[0080] The present invention also proposes the above-mentioned method for improving the data quality of non-motor vehicle riding trajectories, and the application of the above-mentioned system for improving the data quality of non-motor vehicle riding trajectories in improving the data quality of non-motor vehicle riding trajectories.

[0081] The present invention has the following beneficial effects:

[0082] 1. This study analyzes data quality issues in non-motorized vehicle riding trajectories that affect subsequent map construction, including abnormal trajectory points (directional noise, speed noise) and abnormal trajectory segments (wandering trajectory segments, illegal turning (including wrong-way driving)), as well as trajectory segment drift and trajectory loss.

[0083] 2. To address the data quality issues existing in non-motorized vehicle riding trajectories, this paper proposes a six-step framework for improving data quality, which achieves the calibration of abnormal data and missing data, thereby providing a good data foundation for the subsequent use of non-motorized vehicle riding data to infer the construction of cycling maps.

[0084] 3. This paper uses real trajectory data and the subsequent use of non-motor vehicle data as a standard to experimentally evaluate the quality improvement method. The experimental results verify the effectiveness of this method. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 This is a framework diagram for improving data quality based on non-motor vehicle riding trajectories.

[0086] Figure 2 This is a rendering of the original data in an embodiment of the present invention.

[0087] Figure 3 This is a diagram showing the effect of improving data quality in an embodiment of the present invention.

[0088] Figure 4 This is a diagram showing the intersection discovery effect after the original CITT preprocessing method in an embodiment of the present invention.

[0089] Figure 5 This is a diagram showing the intersection discovery effect based on the data quality improvement method of the present invention in an embodiment of the present invention.

[0090] Figure 6 This is a diagram showing the intersection discovery effect after the original TKDD preprocessing method in an embodiment of the present invention.

[0091] Figure 7 This is a diagram showing the intersection discovery effect after the data quality of the present invention is improved in the same area in an embodiment of the present invention.

[0092] Figure 8 This is the road generation effect diagram after the original SLC preprocessing in the embodiment of the present invention.

[0093] Figure 9 This is a road generation effect diagram after the data quality is improved in an embodiment of the present invention.

[0094] Figure 10 This is the road generation effect diagram after the original Cao09 preprocessing in the embodiment of the present invention.

[0095] Figure 11 This is a road generation effect diagram after the data quality is improved in an embodiment of the present invention. DETAILED DESCRIPTION

[0096] The present invention is further described in detail with reference to the following specific examples and accompanying drawings. The processes, conditions, experimental methods, etc. for implementing the present invention, except for those specifically mentioned below, are common knowledge and common common sense in the art and are not particularly limited by the present invention.

[0097] This paper proposes a framework for improving the quality of non-motor vehicle riding trajectory data. Figure 1 As shown in the figure, in response to the aforementioned data anomaly and missing issues in non-motor vehicle riding trajectories, the present invention first collects and obtains vehicle and non-motor vehicle trajectory data, uses a GeoHash-based unit partitioning method to divide low-quality areas into fixed-size grids, and establishes a GeoHash grid index for trajectory points to accelerate subsequent anomaly detection and data recovery based on the nearest neighbor range; then, a trajectory noise detection method based on the main direction and speed of the nearest neighbor trajectory points is used to identify and eliminate turning anomalies and speed anomalies; and based on the direction change and low speed characteristics, a grid-based breadth-first search (BFS) method is used to identify and eliminate wandering trajectory segments that are different from the larger range of spatiotemporal neighbors; then, kernel density estimation and grid-based nearest neighbor trajectory analysis are used to detect and eliminate illegal driving trajectory segments. The drifting trajectory segments are then detected using the average sampling interval of the trajectory data and the inconsistency between the drifting trajectory segments and the movement behaviors of the neighboring trajectories. The most similar neighboring trajectory segments are extracted using LCSS and Fréchet distance calculation to replace the drifting trajectory segments for calibration. Finally, trajectory segments with longer time (or distance) intervals are extracted based on the average sampling interval between neighboring trajectory points. These segments are clustered using an incremental clustering method to identify the area where the missing trajectories are located. Similar sub-trajectories are obtained based on the historical trajectory data of this area, and a fitting method based on the minimum sum of distances is used to restore the missing trajectories. Finally, the non-motor vehicle riding trajectory with improved data quality is output.

[0098] like Figure 1 As shown, the present invention adopts a six-step data quality improvement method, including the following steps:

[0099] S1: Collect and obtain vehicle and non-motor vehicle trajectory data. To accelerate subsequent neighborhood-based anomaly detection and data recovery, use a GeoHash-based unit partitioning method to divide the area where the abnormal riding trajectory is located into fixed-size grids, and establish a GeoHash grid index for the trajectory points.

[0100] In the embodiment, step S1 specifically includes:

[0101] To accelerate the nearest neighbor search efficiency for anomaly data detection, a GeoHash-based grid cell partitioning method is first used to divide the data anomaly area into fixed-size grids. Subsequently, statistics are collected on the direction of the trajectory points in the non-motor vehicle riding trajectory data, the direction and speed changes between adjacent trajectory points, and the sampling time difference between adjacent points. On this basis, the derived attributes of the trajectory points are formed by combining the travel status information (such as "idle", "riding", "near the riding start point", "reached near the riding end point", etc.). Finally, a GeoHash grid index is established for the trajectory data.

[0102] GeoHash is a geocoding algorithm that can locate GPS coordinates in different sizes of geographic grid cells using different code lengths in O(1) time complexity. Furthermore, the longer the common prefix of the codes corresponding to different GPS coordinates, the closer the locations are. Considering that the national standard for lane width is 3.5 to 3.75 meters, the corresponding GeoHash code length is set to 9 (i.e., the corresponding grid cell length and width are both 4.8 meters).

[0103] S2: A trajectory noise detection method based on the main direction and speed of neighboring trajectory points is used to identify and eliminate abnormal turning points and speed points.

[0104] In the embodiment, step S2 specifically includes:

[0105] Step 2.1) Track segmentation: Count the sampling time intervals between adjacent track points, and use the average sampling time interval Time between each track point in the entire non-motor vehicle track data dis As the threshold for segmenting the trajectory (here, set Time dis = 12 seconds for experiments) to segment the trajectory.

[0106] Step 2.2) Elimination of abnormal speed points: Considering that non-motor vehicles such as electric bicycles have an upper speed limit of th according to national standards speed The velocity of the trajectory point calculated based on S1 is deleted if it exceeds the speed threshold th speed trajectory points.

[0107] Step 2.3) Elimination of turning outliers: Based on the directional differences between a few turning outliers and most of their neighboring trajectory points, the GeoHash grid is first used to find the neighbors of the trajectory point to be detected; then the neighboring points are divided into 8 different directions (angles different from true north). Considering that the road has one-way / two-way roads, if the direction of the trajectory point to be detected does not belong to the two directions with the largest number of trajectory points, it will be regarded as a turning abnormal point and deleted. The definition of the neighboring points is as follows:

[0108] Given a trajectory point p i , preset distance threshold th dis , and the trajectory point set P, GeoDis(p i , p j ) indicates p i and p j The actual ground distance between i The nearest neighbor point is defined as: Near(p i )={p j ∈P|GeoDis(p i , p j )≤th dis}.

[0109] The direction of the neighboring point is essentially the normal direction of most of the trajectory points around the trajectory point to be detected. If the direction of the trajectory point to be detected is significantly different from the normal direction of the neighboring point, it is considered that its direction is abnormal. Considering that the lane width is 3.5 meters to 3.7 meters, the th is set dis =4 meters.

[0110] S3: Based on the characteristics of variable direction and low speed, the breadth-first search (BFS) method is used based on the GeoHash grid to identify and eliminate wandering trajectory segments that are different from their spatiotemporal neighbors in a larger range.

[0111] In the embodiment, step S3 specifically includes:

[0112] The wandering trajectory segment of a non-motorized vehicle's riding trajectory is located in non-road areas involved in the non-motorized vehicle's journey, such as residential areas and commercial districts. Such areas are where a large number of trajectory points with the status of "reaching near the end of the ride" are located. At the same time, the wandering trajectory segment is often accompanied by characteristics such as changing directions and lower speeds compared to normal riding trajectories.

[0113] According to the above characteristics, the breadth-first search (BFS) method is first used to search for the neighboring points of the track point to be detected. Considering that the non-road area has sparser trajectories than the road area, the neighboring point distance threshold is set (here th dis = 8 meters for experiments) to extract more neighboring trajectory points;

[0114] Based on the obtained neighboring points, the proportion of trajectory points with the status of "reaching the end of the ride" is counted. When the proportion exceeds the proportion of trajectory points with the status of "riding", the area is considered a popular non-road area related to non-motorized vehicle riding. If multiple consecutive trajectory points of a trajectory are located in a popular non-road area, it is considered a candidate wandering trajectory segment;

[0115] The directions of the trajectory points within the candidate wandering trajectory segments are counted and divided into eight directional categories. Considering the fact that road riding trajectories may occasionally turn and the riding direction remains unchanged before and after turning, if the directions of the trajectory points within a wandering trajectory segment exceed two directional categories, and the trajectory points of different categories have a positional intersection relationship based on the sampling time sequence, and the average speed of the trajectory points within the candidate wandering trajectory segment is lower than the average road riding speed (here, V = 4.0 m / s for the experiment), then the segment is judged as a wandering trajectory segment and is deleted.

[0116] S4: Use kernel density estimation and nearest neighbor trajectory analysis based on GeoHash grid to detect and eliminate illegal driving trajectory segments.

[0117] In the embodiment, step S4 specifically includes:

[0118] Trajectory elimination in restricted non-motorized vehicle areas: Given that the sparsity of trajectory point density within the grid will affect the smoothness of the vehicle area calculation, the kernel density estimation method is used to smoothly calculate the density of cycling trajectories and vehicle (car) vehicle trajectories within each grid cell. Grid cells belonging to restricted areas are determined based on the characteristic that the trajectory density within the vehicle area should be significantly higher than the cycling trajectory density.

[0119] Based on the restricted area grid cells identified in the above steps, the riding trajectory is traversed. When the proportion of restricted area grid cells covered by the line segments formed by connecting adjacent trajectory points exceeds the threshold th prop (Set the ratio threshold th prop is 0.1 to ensure a significant difference between the cycling trajectory and the vehicle trajectory in the restricted area), the line segment is judged as an abnormal trajectory segment; when the length between the continuous trajectory points in the abnormal trajectory segment exceeds the distance threshold dis len (The distance threshold value dis is set by multiplying the selected time average sampling interval and the riding speed limit len =84 meters), it is determined to be an abnormal driving trajectory segment and eliminated.

[0120] Eliminating wrong-way / illegal turning trajectory segments: Considering that wrong-way and illegal turning trajectory segments have significant differences in direction and direction changes from most of their neighboring trajectory points, we first extract the neighboring points of the trajectory point to be detected by range, and then divide the neighboring points into eight direction classes based on direction and direction changes;

[0121] When the directions of the neighboring points are roughly the same (the direction of most neighboring points is the main direction, and the direction ratio threshold th that does not belong to the main direction is set prop =0.1), the road where the track point is located is determined to be a one-way road; if the direction of the current track point is opposite to the main direction (that is, the direction is 180 degrees away from the main direction), the track point is determined to have a reverse behavior. If the proportion of track points without reverse behavior in the continuous track point sequence is lower than the set threshold (here the threshold th prop If the value is 0.1 (for experiments), the trajectory point sequence is considered to be a retrograde trajectory segment and is eliminated;

[0122] When the direction of the trajectory point does not belong to the main direction of the neighboring points, and its direction change is different from the direction change of its neighboring trajectory points (the proportion threshold th that does not belong to the main direction change is taken prop 0.1 for experiments), it is considered that there is an illegal turning behavior at this point; when the proportion of the direction of the sequence of continuous trajectory points belonging to the main direction is lower than the threshold (threshold th prop When the value of 0 is 0.1 and there are trajectory points with illegal turning behaviors, it is considered that the trajectory point sequence has illegal turning behaviors and should be eliminated.

[0123] S5: The drifting trajectory segments are detected by using the average sampling interval of the trajectory data and the inconsistency between the drifting trajectory segments and the movement behaviors of the neighboring trajectories. The most similar neighboring trajectory segments are extracted by LCSS and Fréchet distance calculation to replace the drifting trajectory segments for calibration.

[0124] In the embodiment, step S5 specifically includes:

[0125] Step 5.1) Define: Given a trajectory point pair (p s , p e ) and a trajectory Tr={p1,p2,...,p n}, when the following conditions are met, it is considered that the sub-trajectory of Tr is a pair of trajectory points (p s , p e ) of similar trajectory segments:

[0126] (1)p i is the distance point p in the trajectory Tr s The nearest point, p i+m is the distance point p in the trajectory Tr e the nearest point;

[0127] (2)p s With p i The distance between dis(p s , p i )<β and dis(p e , p i+m)<β(β>0), β is the distance threshold used to search for the nearest neighbors of a given trajectory point, β=min(dis(p s , p e ) / 2,β);

[0128] (3) Let Δt = p e .time-p s .time, max(0, (1-α1)*△t)<p z+m .time-p i , time<(1+α1)*△t, where α1 is the adjustment parameter, which is set to 0.5 here.

[0129] Step 5.2) Drift trajectory segment identification: Given a trajectory Tr = {p1, p2, ..., p n}, when there is a drift trajectory segment When All trajectory points in Tr are far away from other neighboring trajectory points in Tr, but The sampling interval between the inner track points remains unchanged. Based on this, the sub-tracks of track Tr will be determined according to the following conditions Is it a drift trajectory segment?

[0130] (1)dis(p i , p i-1 )>(1+α2)*avg dis And dis(p i+m , p i+m+1 )>(1+α2)*avg dis , where avg dis represents the average sampling distance between two consecutive trajectory points, α2 is the adjustment parameter, which is set to 0.5 here;

[0131] (2)(1-α2)*avg dis <dis(p i+k , p i+k+1 )<(1+α2)*avg dis (0≤k≤m-1);

[0132] (3)(1-α3)*avg si )<(p i+k-1 .time-p i+k .time)<(1+α3)*avg si (0≤k≤m+1), where avg si represents the average sampling interval of the data set, and α3 is an adjustment parameter, which is set to 0.5 in the present invention.

[0133] Step 5.3) Drift trajectory segment calibration: Considering that the drift trajectory segment is only one segment of the entire trajectory of the moving object, a similarity measurement method based on the longest common subsequence (LCSS) is used to find the k trajectories with the highest similarity to the trajectory with the drift trajectory segment (here, k=20 is set). In order to evaluate the similarity between other trajectories and the drift trajectory, the ratio of the number of points in the longest common subsequence of the two trajectories to the number of all trajectory points of the trajectory is used as the measurement value. Then, according to the definition of step 5.1), the drift trajectory segment is used as the The preceding trajectory point p i-1 and subsequent trajectory point p i+m+1 As the query point pair, a set of trajectory segments similar to the drift trajectory is extracted from the k trajectories with the highest similarity.

[0134] Since the drift trajectory segment may be generated by the inertial navigation system of the mobile device based on the direction and acceleration of the continuously collected trajectory points, its shape is similar to the real trajectory. Each trajectory point p z+k (0≤k≤m) Convert the geographic location to get Then obtain the new trajectory segment after conversion The position conversion formula is as follows:

[0135]

[0136] Using Fréchet distance metric The distance between each similar trajectory segment is the smallest trajectory segment. The representative trajectory segments are regarded as the representative trajectory segments, and the corresponding drift trajectory segments are replaced by the representative trajectory segments to achieve calibration.

[0137] S6: Extract trajectory segments with longer time (or distance) intervals based on the average sampling interval between neighboring trajectory points. Cluster them using an incremental clustering method to identify the area where the missing trajectory is located. Obtain similar sub-trajectories based on the historical trajectory data of this area, and then use a fitting method based on the minimum sum of distances to restore the missing trajectory.

[0138] In the embodiment, step S6 specifically includes:

[0139] Step 6.1) Define: Given a trajectory Tr = {p1, p2, ..., p n}, the longer sampling interval trajectory segment L i =(pi, p i+1 ) is a line segment formed by connecting two consecutive trajectory points that meet the following conditions:

[0140] (1)dis(p i , pi+1 )>(1+α2)*avg dis , where avg dis represents the average sampling distance interval between two consecutive trajectory points, and α2 is the adjustment parameter of the distance constraint. Here, it is set to 0.5 ;

[0141] (2)(p i+1 .time-p i .time)>(1+α4)*avg si , where avg si represents the average sampling time interval, and α4 is the adjustment parameter, which is set to 2 here.

[0142] Step 6.2) Identification of weak signal areas:

[0143] Due to the weak positioning signal in some areas, there are cases where the time / distance between consecutive trajectory points is much longer than the average sampling time interval / average sampling distance interval, which is called a long sampling interval segment. According to the definition of step 6.1), the long sampling interval segment is detected and then incrementally clustered to locate the area with weak signal. This method first maintains a set of long sampling interval segment clusters. When a long sampling interval segment L is detected, i By calculating L i The distance between the representative trajectory of the existing longer sampling interval line segment cluster, the search distance L i The nearest long sampling interval line segment cluster (satisfying L i The distance between them is less than the specified threshold β), L i Insert the cluster and recalculate the representative trajectory of the cluster; if not found, L i As a separate cluster, the value of β is calculated according to the formula min(lc.length / 2, β). The longer sampling interval line segment cluster C k The starting point lc of the representative trajectory s and the end point lc e Calculated by the following formula, C k .num indicates the number of segments in the cluster:

[0144]

[0145] The distance between line segments adopts the line segment-based Hausdorff distance method, which combines parallel distance, perpendicular distance and angular distance to evaluate the distance between line segments.

[0146] When the number of line segment clusters with longer sampling intervals exceeds the maximum number m that can be stored in the memory, the two closest clusters are merged. k .num is greater than the preset threshold thres num(thres num When it is set to 10 here, the area where the cluster is located is regarded as a weak signal area.

[0147] Step 6.3) Recovery of missing tracks in weak signal areas:

[0148] For missing traces in weak signal areas, the two endpoints of the longer sampling interval line segment (L i .st、L i .ed) is the query point. According to the definition in step 5.1), a set of similar trajectory segments is extracted from the historical trajectory. The Fréchet distance between the trajectory segments in the set of similar trajectory segments is calculated respectively, and the trajectory segment with the smallest sum of distances between similar trajectory segments is found. This is used as the reference trajectory segment.

[0149] Considering the instability of the reference trajectory segment obtained based on the distance, the trajectory points near the reference trajectory segment are used to calibrate it. The specific method is as follows: first, L i .st is considered to represent the trajectory point rp s ; Then take the trajectory point p of the reference trajectory segment in turn i+k (0≤k≤m) is the center of the circle and the road width d is the radius. Find all the trajectory points in the area and select the ones that are related to the trajectory point p among these trajectory points. i+k The direction angle is less than the threshold thres angle The trajectory point set S p (thres angle Set to 10 degrees), S p The average position point of the trajectory point is taken as its representative trajectory point rp i+k .

[0150] In order to ensure the smoothness of the extracted representative trajectory, if the distance between the current representative trajectory point and the previous representative trajectory point is less than the smoothness threshold thres smooth (Here it is set to 30 meters), the traversal skips the current representative trajectory point. i The distance between .ed and the current trajectory point is less than the smoothness threshold thres smooth , L i .ed as the last representative trajectory point rp e Finally, the representative trajectory segments are used to replace the corresponding longer sampling interval segments to complete the recovery of the sampling missing trajectory in the weak signal area.

[0151] Finally, the non-motor vehicle riding trajectory with improved data quality is obtained and output.

[0152] In order to verify the effectiveness of the present invention, real trajectory data are selected to improve data quality, such as Figure 2 The original data effect diagram is shown as follows: Figure 3 The figure shows the effect of improving the data quality. The trajectory quality has been significantly improved. Based on the public cycling road network, the pre-processing methods of existing map inference applications are compared and evaluated. The selected methods include CITT and Huang19 for intersection discovery methods. Figure 4 The figure shows the intersection discovery effect after the original CITT preprocessing method. Figure 5 The figure shows the intersection discovery effect after the data quality improvement method of the present invention is used. The wandering tracks in the popular area are significantly eliminated. Figure 6 The following is the result of intersection discovery after the original TKDD preprocessing method: Figure 7 The figure shows the intersection discovery effect after the data quality of the present invention is improved in the same area, and a large number of noise tracks are eliminated; the selected road generation methods include SLC and Cao09, such as Figure 8 The figure shows the road generation effect after the original SLC preprocessing, as shown in Figure 9 The figure shows the road generation effect after the data quality is improved in the present invention. The generated road network has fewer missing cases and the wandering trajectory segments in the popular areas do not affect the road network generation. Figure 10 The following is the original road generation effect diagram after Cao09 preprocessing, as shown in Figure 11 The figure shows the road generation effect after the data quality of the present invention is improved. The redundancy of the generated road network is significantly reduced. The evaluation indicators Precision, Recall and F-score of intersection discovery are selected for quantitative evaluation. The real position is obtained from OSM road network data. truth Indicates the actual number of intersections, L detect Indicates the number of detected intersections, L corr Indicates the number of correctly identified intersections. A higher F-score value indicates better performance. Precision, recall, and F-score are defined as follows:

[0153]

[0154]

[0155]

[0156] The comparative evaluation results are shown in Table 1. After the data quality is improved using the present invention, the Precision, Recall, and F-score of the intersection discovery method are all improved to a certain extent. The evaluation indicators selected for road generation are CMP (correct match percentage), AL (match length), and AN (number of matches). The comparative evaluation results are shown in Table 2. After the data quality is improved using the present invention, the CMP, AL, and AN of the road generation are also improved to a certain extent compared with the original method.

[0157] Table 1 Comparison of preprocessing effects based on intersection discovery application

[0158]

[0159] Table 2 Comparison of preprocessing effects based on road generation application

[0160]

[0161] In summary, the present invention comprehensively adopts GeoHash geographic spatial indexing technology, trajectory anomaly detection method, range search technology, kernel density estimation, trajectory similarity measurement method and incremental clustering technology to form a data quality improvement method for non-motor vehicle riding trajectory, so as to deal with the trajectory anomalies and positioning signal missing problems in non-motor vehicle riding trajectory data, and provide an effective data basis for non-motor vehicle riding map inference.

[0162] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the present invention, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the appended claims.

Claims

1. A method for improving the data quality of non-motor vehicle riding trajectories, characterized in that: The following steps are involved: S1: Collect vehicle and non-motor vehicle trajectory data, use the GeoHash-based cell partitioning method to divide the low-quality trajectory area into fixed-size grids, and establish a GeoHash grid index for the trajectory points; S2: A trajectory noise detection method based on the main direction and speed of neighboring trajectory points is used to identify and eliminate abnormal turning points and speed points. S3: Based on the characteristics of variable direction and low speed, the wandering trajectory segments whose direction and speed are different from those of their spatiotemporal neighbors are identified and eliminated based on the GeoHash grid and breadth-first search method; S4: Use kernel density estimation and GeoHash grid to analyze neighboring trajectories and detect and eliminate illegal driving trajectory segments; S5: Detect drifting trajectory segments based on the average sampling interval of trajectory data and the consistency of the drifting trajectory segments with their neighboring trajectory movements. LCSS and Fréchet distance calculations are used to extract the most similar neighboring trajectory segments to replace the drifting trajectory segments for calibration. S6: Extract trajectory segments with longer time or distance intervals based on the average sampling interval between neighboring trajectory points. Use the incremental clustering method to cluster the trajectory segments to identify the area where the missing trajectory is located. Based on the historical trajectory data of this area, similar sub-trajectories are obtained. Then, a fitting method based on the minimum distance sum is used to restore the missing trajectory. S7: Output the non-motor vehicle riding trajectory after data quality improvement.

2. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S1 specifically includes: A GeoHash-based grid cell partitioning method is used to segment data anomaly areas into fixed-size grids. Subsequently, the direction and speed of the trajectory points in the riding trajectory data, the direction and speed changes between adjacent trajectory points, and the sampling time difference between adjacent trajectory points are calculated. This is combined with the travel status of the trajectory points to form derived attributes of the trajectory points. Finally, a GeoHash grid index is established for the trajectory data. The data anomaly areas include wandering trajectory segments in popular riding areas, illegal turning or wrong-way driving trajectory segments, signal drift trajectory segments, and signal loss trajectory segments.

3. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S2 specifically includes: Step 2.1, track segmentation: Count the sampling time intervals between adjacent track points, and use the average sampling time interval Time between each track point in the entire non-motor vehicle track data dis Segment the trajectory as a threshold for segmenting the trajectory; Step 2.2, speed abnormal point elimination: delete the trajectory point whose speed exceeds the speed threshold th speed The speed threshold is the upper limit speed of non-motor vehicles used for riding according to national standards th speed The velocity of the track point is calculated as the sum of the distances between the track point before segmentation and its adjacent track points before and after it / the sum of the sampling time differences between the track point before segmentation and its adjacent track points before and after it; Step 2.3: Eliminate turning outliers: Based on the directional differences between a few turning outliers and most of their neighboring trajectory points, we first use the GeoHash grid to find the neighbors of the trajectory point to be detected. We then classify the neighboring points into eight different direction categories based on their directions. Considering that roads may have one-way or two-way lanes, if the direction of the trajectory point to be detected does not belong to the two most common directions among its neighboring points, it is considered a turning outlier and is deleted.

4. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 3 is characterized in that: The neighbor points are defined as follows: Given a trajectory point p i , the preset distance threshold th dis , and the trajectory point set P, GeoDis(p i ,p j ) indicates p i and p j The actual ground distance between i The nearest neighbor point is defined as: Near(p i )={p j ∈P|GeoDis(p i ,p j )≤th dis The distance threshold is set in relation to the lane width, and is between 100% and 120% of the lane width. The direction of the neighboring point represents the main direction of most of the trajectory points around the trajectory point to be detected. If the direction of the trajectory point to be detected is significantly different from that of the neighboring point, its direction is considered abnormal.

5. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S3 specifically includes: First, based on the breadth-first search method, the neighboring points of the trajectory point to be detected are searched. Considering the sparseness of trajectories in non-road areas compared to road areas, a neighbor distance threshold of twice the lane width is set to extract more neighboring trajectory points. Based on the obtained neighboring points, the proportion of trajectory points with the status of "reaching the end of the ride" is counted. When the proportion exceeds the proportion of trajectory points with the status of "riding", the area is considered a popular non-road area related to non-motorized vehicle riding. If multiple consecutive trajectory points in a trajectory are located in the popular non-road area, it is considered a candidate wandering trajectory segment; the wandering trajectory segment has a changeable direction and a lower speed than the normal riding trajectory. The directions of the trajectory points in the candidate wandering trajectory segments are counted and divided into eight direction classes. Considering the characteristics of road cycling trajectories with occasional turning behaviors and the unchanged riding direction before and after turning, if the directions of the trajectory points in a wandering trajectory segment exceed two direction classes, the positions of the trajectory points of different classes intersect according to the sampling time sequence, and the average speed of the trajectory points in the candidate wandering trajectory segment is lower than the average speed of road cycling, then the segment is judged as a wandering trajectory segment and deleted.

6. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S4 specifically includes: Trajectory elimination in restricted non-motorized vehicle areas: Given that the sparse density of trajectory points in the grid affects the smoothness of vehicle area calculations, a kernel density estimation method is used to smoothly calculate the density of cycling and vehicle trajectories within each grid cell. Based on the characteristic that the density of trajectories within a vehicle area should be higher than the density of cycling trajectories, grid cells are determined to be restricted areas. Based on the restricted area grid cells identified in the above steps, the riding trajectory is traversed. When the proportion of restricted area grid cells covered by the line segments formed by connecting adjacent trajectory points exceeds the threshold th prop , the line segment is judged as an abnormal trajectory segment; when the length between continuous trajectory points in the abnormal trajectory segment exceeds the distance threshold dis len When the distance threshold is , it is determined to be an abnormal driving trajectory segment and eliminated; len Obtained by multiplying the average sampling time interval by the riding speed limit; Eliminating wrong-way / illegal turning trajectory segments: Considering that wrong-way and illegal turning trajectory segments differ from most of their neighboring trajectories in terms of direction and direction changes, we first search for the neighboring points of the trajectory point to be detected through a range search and classify the neighboring points into eight direction classes based on their direction and direction changes. When the main direction of the point to be detected is the same as that of its neighboring points, the road where the point is located is determined to be a one-way road; if the direction of the point to be detected is opposite to the main direction, the point is determined to be in a wrong direction; if the proportion of trajectory points without wrong direction in a continuous trajectory point sequence is lower than the set threshold, the trajectory point sequence is considered to be a wrong direction segment and is eliminated; When the direction of a trajectory point does not belong to the main direction of its neighboring points, and its direction change is different from the direction change of its neighboring trajectory points, it is considered that the point has illegal turning behavior; when the proportion of the direction of a sequence of continuous trajectory points belonging to the main direction is lower than the threshold and there are trajectory points with illegal turning behavior, the trajectory point sequence is considered to have illegal turning behavior and should be eliminated.

7. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S5 specifically includes: Step 5.1, give the definition: given a trajectory point pair (p s ,p e ) and a trajectory Tr={p1,p2,…,p n }, the sub-trajectory of Tr is is a pair of trajectory points (p s ,p e ), 1 <i,i+m<n: (1)p i is the distance point p in the trajectory Tr s The nearest point, p i+m is the distance point p in the trajectory Tr e the nearest point; (2)p s With p i The distance between dis(p s ,p i )<β and p e With p i+m The distance between dis(p e ,p i+m )<β,β>0,β is the distance threshold used to search for the nearest neighbors of a given trajectory point,β=min(dis(p s ,p e ) / 2,β); the initial value of β is set according to the product of the average sampling interval and the riding speed limit, and β=min(dis(p s ,p e ) / 2,β); (3) Let Δt = p e .time-p s .time, max(0,(1-α1)*△t) <p i+m .time-p i , time<(1+α1)*△t, where α1 is the adjustment parameter, and its value range is [0, 1]; time is the sampling timestamp; Step 5.2, Drift trajectory segment identification: Given a trajectory Tr = {p1, p2, …, p n}, when there exists a drift trajectory segment such that 1 < i, i + m < n, which is characterized by all the trajectory points within are far away from other neighboring trajectory points in Tr, but the sampling interval between the trajectory points within remains unchanged; Determine whether the sub-trajectory of the trajectory Tr is a drift trajectory segment according to the following conditions: (1)p i With p i-1 The distance between dis(p i ,p i-1 )>(1+α2)*avg dis And p i+m+1 With p i+m The distance between dis(p i+m ,p i+m+1 )>(1+α2)*avg dis , where avg dis represents the average sampling distance between two consecutive trajectory points, α2 is a tuning parameter whose value range is [0, 1]; time is the sampling timestamp; (2)(1-α2)*avg dis <dis(p i+k ,p i+k+1 )<(1+α2)*avg dis ,0≤k≤m-1; (3)(1-α3)*avg si )<(p i+k-1 .time-p i+k .time)<(1+α3)*avg si , 0≤k≤m+1; where avg si represents the average sampling interval of the data set, α3 is a tuning parameter whose value range is [0, 1]; time is the sampling timestamp; Step 5.3, drift trajectory segment calibration: Considering that the drift trajectory segment is only one segment of the entire trajectory of the moving object, the similarity measurement method based on the longest common subsequence is used to find the k trajectories with the highest similarity to the trajectory with the drift trajectory segment; to evaluate the similarity between other trajectories and the drift trajectory, the ratio of the number of points in the longest common subsequence of the two trajectories to the number of all trajectory points of the trajectory is used as the evaluation value; then, according to the definition in step 5.1, the drift trajectory segment is used as the calibration value. The preceding trajectory point p i-1 and subsequent trajectory point p i+m+1 As the query point pair, a set of trajectory segments similar to the drift trajectory is extracted from the k trajectories with the highest similarity; The shape of the drift trajectory segment is similar to the real trajectory; therefore, the drift trajectory segment is first Each trajectory point p i+k Convert geographic location to Thus, the new trajectory segment after conversion is obtained 0≤k≤m; the position conversion formula is as follows, where x represents the longitude of the point and y represents the latitude of the point: Using Fréchet distance metric The distance between each similar trajectory segment is the smallest trajectory segment. The representative trajectory segments are regarded as the representative trajectory segments, and the corresponding drift trajectory segments are replaced by the representative trajectory segments to achieve calibration.

8. The method for improving the data quality of non-motor vehicle riding trajectory according to claim 1, characterized in that: The step S6 specifically includes: Step 6.1, define: given trajectory Tr = {p1, p2, ..., p n }, the longer sampling interval trajectory segment L i =(p i ,p i+1 ) is a line segment formed by connecting two consecutive trajectory points that meet the following conditions: (1)dis(p i ,p i+1 )>(1+α2)*avg dis , where avg dis represents the average sampling distance interval between two consecutive trajectory points, α2 is the adjustment parameter of the distance constraint, and its value range is [0, 1]; (2)(p i+1 .time-p i .time)>(1+α4)*avg si , where avg si represents the average sampling time interval, α4 is the adjustment parameter, and its value range is [0, +∞]; Step 6.2: Identification of weak signal areas: The line segments whose time and / or distance between consecutive trajectory points is much larger than the average sampling time interval / average sampling distance interval are called long sampling interval line segments; according to the definition of step 6.1, long sampling interval line segments are detected and then incrementally clustered to locate the area with weak signal; first maintain a set of long sampling interval line segment clusters, and when a long sampling interval line segment L is detected i By calculating L i The distance between the representative trajectory of the existing longer sampling interval line segment cluster, the search distance L i The nearest cluster of segments with longer sampling intervals, satisfying L i The distance from the line segment cluster with a longer sampling interval is less than the specified threshold β, and L i Insert the cluster and recalculate the representative trajectory of the cluster; if not found, L i As a separate cluster, the value of β is calculated according to the formula min(lc.length / 2,β); the longer sampling interval line segment cluster C k The starting point lc of the representative trajectory s and the end point lc e Calculated by the following formula, C k .num indicates the number of segments in the cluster: L i .st indicates the starting endpoint of the longer sampling interval segment, L i .ed represents the terminal endpoint of the longer sampling interval segment; The distance between line segments adopts the line segment-based Hausdorff distance method, which combines parallel distance, perpendicular distance, and angular distance to evaluate the distance between line segments; When the number of line segment clusters with longer sampling intervals exceeds the maximum number m that can be stored in the memory, the two closest clusters are merged. k .num is greater than the preset threshold thres num When the cluster is located in the area where the weak signal area is located, the threshold thres num Set to the average number of segments in all clusters of segments with longer sampling intervals in the region; Step 6.3: Restoring missing tracks in weak signal areas: For missing traces in weak signal areas, the two endpoints of the longer sampling interval line segment (L i .st、L i .ed) is the query point. According to the definition in step 5.1, a set of similar trajectory segments is extracted from the historical trajectory. The Fréchet distance between the trajectory segments in the similar trajectory segment set is calculated respectively, and the trajectory segment with the smallest sum of distances between similar trajectory segments is found. Take it as the reference trajectory segment; Considering that the reference trajectory segment obtained based on distance calculation is unstable, the trajectory points near the reference trajectory segment are used to calibrate it. The specific method is as follows: first, L i .st is considered to represent the trajectory point rp s ; Then take the trajectory point p of the reference trajectory segment in turn i+k As the center of the circle, 0≤k≤m, with the road width d as the radius, find all the trajectory points in the area, and filter out the trajectory points that are related to the trajectory point p among these trajectory points. i+k The direction angle is less than the threshold thres angle The trajectory point set S p , S p The average position point of the trajectory point is taken as its representative trajectory point rp i+k ; In order to ensure the smoothness of the extracted representative trajectory, if the distance between the current representative trajectory point and the previous representative trajectory point is less than the smoothness threshold thres smooth , then the traversal skips the current representative trajectory point; until L i The distance between .ed and the current trajectory point is less than the smoothness threshold thres smooth , L i .ed as the last representative trajectory point rp e , complete the extraction of representative trajectory segments; finally, use the representative trajectory segments to replace the corresponding longer sampling interval segments to complete the recovery of sampling missing trajectories in the weak signal area.

9. A system for improving the quality of non-motor vehicle riding trajectory data, which implements the method for improving the quality of non-motor vehicle riding trajectory data according to any one of claims 1 to 8, the system comprising: Trajectory data acquisition module, low-quality trajectory area segmentation module, abnormal trajectory point elimination module, wandering trajectory segment elimination module, wrong-way and / or illegal trajectory segment elimination module, drifting trajectory segment calibration module, missing trajectory segment recovery module, and improved trajectory data output module; The trajectory data acquisition module is used to collect and acquire vehicle trajectory data and non-motor vehicle trajectory data; The low-quality trajectory region segmentation module is used to segment the low-quality trajectory region into fixed-size grids based on the GeoHash unit partitioning method, and to establish a GeoHash grid index for the trajectory points; The abnormal trajectory point elimination module is used to identify and eliminate abnormal turning points and abnormal speed points based on the trajectory noise detection method of the main direction and speed of the neighboring trajectory points; The wandering trajectory segment elimination module is used to identify and eliminate wandering trajectory segments that are closer to their neighbors in a larger range of time and space based on the GeoHash grid and breadth-first search (BFS); The module for eliminating wrong-way and / or illegal trajectory segments is used to analyze neighboring trajectories using kernel density estimation and GeoHash grids to detect and eliminate illegal driving trajectory segments; The drift trajectory segment calibration module is used to detect the drift trajectory segment by using the normal sampling interval of the trajectory data and the consistency of the drift trajectory segment with the movement behavior of the neighboring trajectory, and to extract the most similar neighboring trajectory segment by using LCSS and Fréchet distance calculation to replace the drift trajectory segment for calibration; The missing trajectory segment recovery module uses an incremental clustering method to cluster trajectory segments to identify the area where the missing trajectory is located, obtains similar sub-trajectories based on the historical trajectory data of the area, and then uses a fitting method based on the minimum distance sum to restore the missing trajectory; The improved trajectory data output module is used to output the non-motor vehicle riding trajectory after data quality is improved.

Citation Information

Patent Citations

  • An image region of interest extraction method based on two-step clustering of eye movement data

    CN109255342A

  • Urban canyon rapid detection method and device based on floating car trajectory data

    CN112462401A