A GPS static drift detection method and system based on trajectory morphology analysis
By using a trajectory morphology analysis-based method, the applicability and computational complexity of GPS static drift detection are addressed, enabling high-precision and low-cost static drift detection in environments without external signals. This method is suitable for scenarios where vehicles remain stationary for extended periods, improving detection accuracy and trajectory integrity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MAPGOO TECH
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-05
Smart Images

Figure CN122151129A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of satellite navigation data processing, specifically relating to a GPS static drift detection method and system based on trajectory morphology analysis. Background Technology
[0002] Global Positioning System (GPS), as a core satellite navigation technology, has been widely used in many fields, especially in industries that rely heavily on location information, such as vehicle monitoring, logistics management, shared mobility, and asset tracking. By receiving satellite signals, GPS terminals can calculate their real-time longitude, latitude, and altitude information in the global coordinate system.
[0003] However, in practical applications, the GPS system itself has inherent technical limitations; one significant problem is the "static drift" phenomenon. This phenomenon manifests as follows: when a device equipped with a GPS terminal is completely stationary, its output positioning coordinates are not a constant value, but fluctuate irregularly within a small range. This fluctuation generates false displacement and speed readings, causing the system to misjudge that the device is moving at an extremely low speed, resulting in incorrect mileage accumulation, false movement alarms, and inaccurate geofence judgments. This problem not only seriously affects the accuracy and reliability of positioning data, but also brings huge technical challenges to application scenarios that rely on high-precision static judgment (such as parking timekeeping, idling speed statistics, etc.).
[0004] The causes of static drift are complex and are usually attributed to the combined effects of multiple factors, including but not limited to: delays in satellite signals as they penetrate the ionosphere and troposphere, multipath propagation effects of signals in urban high-rise buildings or complex terrain environments, minute errors in satellite clocks, and noise interference within the GPS receiver. Therefore, effectively identifying and filtering out noise data generated by static drift to accurately determine the true static state of the device has become a key technical issue for improving the quality of GPS positioning application services.
[0005] To address the aforementioned GPS static drift problem, various solutions have been proposed in the prior art. However, these solutions still have various limitations in practical applications, as detailed below: 1) Judgment method based on vehicle ACC signal or speed status: This technical solution assists in determining whether the vehicle is stationary by reading the vehicle's ignition signal (ACC) or directly obtaining the vehicle's speed. When the system detects that the vehicle's ACC is off or the speed is zero, it determines that the vehicle is stationary and takes measures such as locking coordinates and resetting the odometer to block drift data; Its disadvantages are as follows: First, this method is highly dependent on the acquisition of external signals. Not all GPS terminals can reliably and stably access the vehicle's ACC signal or bus speed signal, limiting its versatility. Second, in many real-world scenarios, the vehicle may be idling (i.e., ACC is on but the vehicle is stationary, such as waiting at a traffic light or during a temporary stop). In such cases, the method will be unable to accurately determine the vehicle's true stationary state, leading to drift data being incorrectly recorded in the driving trajectory, resulting in continuous deviations in mileage and position.
[0006] 2) Drift suppression method based on speed thresholds: This is a relatively simple processing method. Its core logic is to set one or more speed thresholds. When the instantaneous speed calculated by GPS exceeds an unrealistic upper limit (such as 200 km / h) or falls below an extremely low value, the system identifies the data point as a drift or anomaly and removes it. Its drawbacks are that the method is too simplistic and cannot form a complete static drift detection scheme. It is mainly used to eliminate obvious abnormal speed points, but it is helpless against continuous positioning points that are common in static drift phenomena and manifest as extremely low speeds (such as 0.1-1 km / h); when the vehicle is actually stationary, the method cannot make an effective judgment, and the static drift problem still exists.
[0007] 3) Optimization Algorithm Based on Kalman Filter: Kalman filtering is a more advanced recursive algorithm that uses the state equations of a linear system to optimally estimate the system state. In the field of positioning, it can predict and correct the position, velocity, and other states by establishing a motion model (state transition model) of the target and combining it with GPS measurements, thereby smoothing the trajectory and filtering out noise.
[0008] Its disadvantages are as follows: First, the standard Kalman filter algorithm is based on the ideal assumptions of a linear system and Gaussian white noise; however, the drift noise distribution of GPS signals usually does not conform to the ideal Gaussian distribution, and the motion model of vehicles (especially in complex urban road conditions) has highly nonlinear characteristics, which limits the application effect of the standard Kalman filter; Second, the algorithm is very sensitive to the accuracy of the motion model, and inaccurate model parameters will cause the filtering results to diverge, which will reduce the positioning accuracy; Finally, Kalman filtering and its extended forms (such as EKF and UKF) have a large computational load, and the complexity of implementation and debugging on embedded terminals is high, which also increases the technical requirements for developers.
[0009] In summary, existing technologies for solving the GPS static drift problem either have limitations in applicable scenarios, rely on external equipment, have insufficient algorithm reliability, or are too costly to achieve an ideal balance between cost, power consumption, accuracy, and universality. Therefore, there is a need for a GPS static drift detection algorithm that does not rely on external signals, has low computational cost, and high accuracy. Summary of the Invention
[0010] To address the shortcomings of existing technologies, the present invention aims to provide a GPS static drift detection method and system based on trajectory morphology analysis, thereby solving the problems in the prior art.
[0011] The objective of this invention can be achieved through the following technical solutions: A GPS static drift detection method based on trajectory morphology analysis includes: Obtain the original GPS trajectory point sequence and perform a planar projection transformation on the coordinates to obtain planar coordinate trajectory data; Based on planar coordinate trajectory data, a fixed-length sliding window is used to extract local trajectory morphology features. The confidence of the window in normal driving and static drift states is evaluated respectively. The normalized state probability is output, and a preliminary judgment is made according to the preset decision threshold to obtain the window-level state label. Based on window-level state labels, a context-driven iterative temporal smoothing and adjudication mechanism is used to eliminate state jitter and determine the final window state label. The final window status labels are mapped back to the original GPS trajectory points and aggregated into initial trajectory segments to obtain driving segments or drift segments with preliminary status labels. Perform heuristic review and correction on the initial trajectory segment, and output the final state annotation result.
[0012] Furthermore, the original GPS track points include: timestamps, latitude and longitude, and speed or positioning accuracy information; The planar projection transformation includes converting latitude and longitude coordinates into Cartesian plane coordinates through local projection.
[0013] Furthermore, the local trajectory morphological features include: Autocorrelation of displacement vectors: Calculate the mean of the normalized dot product of adjacent displacement vectors; Average rate of change of heading angle: the mean of the absolute values of consecutive heading angle differences within a statistical window; Displacement efficiency: defined as the ratio of the straight-line distance from the start to the end of the window to the total path length within the window. Low-speed point percentage: The proportion of points with speeds below a preset threshold within the statistical window.
[0014] Furthermore, the process of outputting normalized state probabilities includes: For each local trajectory morphology feature, a confidence score for normal driving and static drift is generated. The confidence scores of the four local trajectory morphology features are weighted and summed according to preset weights to obtain the total driving confidence score and total drift confidence score at the window level, and then normalized to obtain the final state probability.
[0015] Furthermore, the preliminary judgment includes the following: if the higher probability value between the normal driving and static drift states is lower than a preset decision threshold, then the window is temporarily marked as an uncertain state.
[0016] Furthermore, the process of eliminating state jitter and determining the final window state label includes: If an uncertain window is sequentially surrounded by two windows with the same and determined state, then the uncertain window is directly determined to have the same state as its adjacent windows. The high-confidence window propagates its state determination to the left and right adjacent uncertain windows with an exponentially decaying coefficient, and the process is repeated in multiple rounds until the states of all windows are determined.
[0017] Furthermore, the aggregation process of the initial trajectory segment includes: For an original trajectory point covered by multiple windows, the intermediate state label of the point is determined by weighted voting or majority rule based on the states of all windows covering the point. If a point is still classified as uncertain after aggregation, it will be ultimately determined as a normal driving point during the segment generation stage; subsequently, points with the same final state will be aggregated into a trajectory segment to form the initial trajectory segment.
[0018] Furthermore, in the heuristic review and correction process, two complementary misjudgment correction methods are used to handle misjudgments, including: 1) Correction of drift status misjudgment: Review all trajectory segments initially marked as static drift and calculate their stability speed index; if the stability speed index exceeds the threshold, correct the trajectory segment to normal driving. 2) Correction of Misjudgment of Driving Status: Review all trajectory segments marked as normal driving, and only correct them to static drift if the following three chains of evidence are met simultaneously: Contextual evidence: The trajectory segment is temporally surrounded by two static drift segments, and the maximum distance between the centroids of the three segments is less than the threshold. Morphological evidence: The displacement efficiency of this trajectory segment is below the threshold, exhibiting in-place shaking or spinning; Kinematic evidence: More than 80% of the points within this trajectory segment have velocities below the low-velocity threshold.
[0019] A GPS static drift detection system based on trajectory morphology analysis, performing the above-mentioned detection method, includes: Data processing module: acquires the original GPS trajectory point sequence and performs planar projection transformation on the coordinates to obtain planar coordinate trajectory data; Sliding window analysis module: Based on planar coordinate trajectory data, a fixed-length sliding window is used to extract local trajectory morphology features, and the confidence of the window in normal driving and static drift states is evaluated respectively. Normalized state probabilities are output, and preliminary judgments are made according to preset decision thresholds to obtain window-level state labels. Temporal smoothing and adjudication module: Based on window-level state labels, it eliminates state jitter and determines the final window state label through a context-driven iterative temporal smoothing and adjudication mechanism; Tag backtracking and mapping module: Maps the final window status tags back to the original GPS trajectory points and aggregates them into initial trajectory segments to obtain driving segments or drift segments with preliminary status tags; Heuristic error correction module: performs heuristic review and correction on the initial trajectory segment, and outputs the final state annotation result.
[0020] A computer storage medium storing a readable program that, when executed, instructs a computing device to perform a GPS static drift detection method based on trajectory morphology analysis as described above.
[0021] The beneficial effects of this invention are: 1. This invention does not rely on external auxiliary signals, but only uses the geometric and kinematic characteristics of the GPS trajectory points themselves for discrimination. It is suitable for pure GNSS scenarios without network, map, or IMU, and has low deployment cost and wide applicability.
[0022] 2. This invention significantly reduces the probability of misjudging complex driving behaviors (such as traffic congestion, roundabout driving, and highway cruising) as static drift by adopting the design concept of "presumption of innocence" (preferring to judge as driving when there is insufficient evidence), dual-branch confidence modeling, and SVS false positive correction mechanism of module A, thus ensuring the integrity of the trajectory.
[0023] 3. Module B of the present invention can reliably identify short-term missed drift segments sandwiched between drift segments through a triple evidence chain of "context + morphology + motion", which is especially suitable for typical scenarios where GPS slowly drifts after the vehicle has been parked for a long time with the engine off.
[0024] 4. The present invention adopts a sliding window analysis and time-series decision mechanism with controllable computational overhead, without the need for complex model training or large-scale data dependence, and can run in real time on resource-constrained devices such as vehicle terminals and mobile phones.
[0025] 5. The final output of this invention is a trajectory segment with clear semantic labels ("normal driving" / "static drift"), which is convenient for downstream tasks to use directly, and the confidence and decision basis of each stage have good interpretability.
[0026] 6. Compared with traditional simple discrimination methods based on speed thresholds or positioning accuracy, the present invention significantly improves the discrimination accuracy in complex scenarios where static drift is likely to occur, such as urban canyons, under overpasses, and underground parking garage exits, while maintaining a high recall rate for the actual driving trajectory. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a flowchart of the GPS static drift detection method of the present invention; Figure 2 This is a schematic diagram comparing the trajectory states of the present invention; Figure 3 This is a schematic diagram comparing the trajectory states of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] Example 1: As Figure 1 As shown, a GPS static drift detection method based on trajectory morphology analysis includes the following steps: S1, Obtain the original GPS trajectory point sequence and perform a planar projection transformation on the coordinates to obtain planar coordinate trajectory data; The raw GPS track points include: timestamp, latitude and longitude, speed, and optional positioning accuracy information.
[0031] This step does not perform outlier removal, time alignment, or velocity filtering; it simply converts the latitude and longitude coordinates to Cartesian plane coordinates (x, y) through local projection (e.g., using an ENU coordinate system with the trajectory origin as the origin). This transformation ensures that subsequent geometric quantities such as displacement, heading angle, and path length can be accurately calculated based on Euclidean distance, avoiding nonlinear errors introduced by spherical coordinates. The transformed trajectory point sequence provides input for subsequent sliding window analysis.
[0032] S2, based on the planar coordinate trajectory data obtained in S1, uses a fixed-length sliding window to extract local trajectory morphology features, evaluates the confidence of the window for normal driving and static drift states respectively, outputs normalized state probabilities, and makes preliminary judgments based on preset decision thresholds to obtain window-level state labels. The process of obtaining window-level status labels includes: S21, within each window, calculate the following four morphological features (local trajectory morphological features): (1) Autocorrelation of displacement vectors: Calculate the mean of the normalized dot product of adjacent displacement vectors to reflect the consistency of motion direction; a value close to 1 indicates stable direction (supports driving), and a value close to 0 indicates random direction (supports drift). (2) Average heading angle change rate: the average absolute value of the difference in heading angles within the statistical window; a low change rate indicates a smooth trajectory (supports driving), while a high change rate indicates frequent changes in direction (supports drifting). (3) Displacement efficiency: defined as the ratio of the straight-line distance from the start point to the end point of the window to the total path length within the window; a value close to 1 indicates approximately straight-line motion (supports driving), and a value close to 0 indicates a tortuous path or shaking in place (supports drifting). (4) Low speed point proportion: The proportion of points with speeds below the preset threshold within the statistical window; a high proportion reflects weak motion or stillness (supports drift).
[0033] S22: For each local trajectory morphology feature, generate its confidence score for "normal driving" and "static drift" respectively; then, the confidence scores of the four features are weighted and summed according to preset weights to obtain the window-level "total driving confidence score" and "total drift confidence score", and then normalized to obtain the final probability output: driving_prob = total driving confidence / (total driving confidence + total drift confidence) drifting_prob = total drift confidence / (total driving confidence + total drift confidence) Where driving_prob and drifting_prob represent the normalized probability outputs of the trajectory being in the "normal driving" and "static drifting" states within the current sliding window, respectively; a larger driving_prob indicates that the window is more in line with the trajectory morphology of continuous driving, and a larger drifting_prob indicates that the window is more in line with the trajectory morphology of static drifting such as shaking in place and slow hovering, and driving_prob + drifting_prob = 1.
[0034] The process of generating a confidence score for each local trajectory morphology feature, categorizing it as "normal driving" and "static drift," is as follows: For the k-th local trajectory morphology feature (k=1,2,3,4), calculate its feature value within the window. And set the driving-side threshold for this feature. With drift side threshold .
[0035] If the feature is defined as "the larger the value, the more it supports driving" (such as displacement vector autocorrelation, displacement efficiency), then: ;
[0036] ;
[0037] If the feature is defined as "the larger the value, the more it supports drift" (e.g., average heading angle change rate, low-speed point percentage), then: ;
[0038] ;
[0039] in, This means clipping x to the interval [0,1]. and represents the confidence score of the k-th feature for "normal driving" and "static drift", respectively.
[0040] The formula for calculating the total driving confidence level is:
[0041] Where C_drive represents the total driving confidence at the window level; w_k represents the preset weight of the k-th morphological feature ( And it can be normalized. ); The k-th morphological feature represents the confidence score of "normal driving" (within the range of [0,1]); k=1,2,3,4 correspond to displacement vector autocorrelation, average heading angle change rate, displacement efficiency, and low-speed point proportion, respectively.
[0042] The formula for calculating the total drift confidence level is:
[0043] in, Indicates the total drift confidence at the window level; The meaning is the same as above; This represents the confidence score of the k-th morphological feature for "static drift" (with a value range of [0,1]).
[0044] S23 employs a "presumption of innocence" design philosophy. After completing probability calculations, a preliminary decision is made: if the higher probability value between the two states is lower than a preset decision threshold, the window is temporarily marked as "uncertain," pending a decision in the subsequent time-series smoothing phase. This mechanism avoids making hasty judgments when evidence is insufficient.
[0045] S3, based on the window-level state label obtained in S2, eliminates state jitter and determines the final window state label through a context-driven iterative temporal smoothing and adjudication mechanism. The window-level status labels obtained by S2 include "Normal Driving", "Static Drift", and "Uncertain".
[0046] This step employs a trajectory semantics-based adjudication logic to eliminate state jitter and determine the final window state label, specifically comprising two sub-processes: S31, Sandwich Filling: If an "uncertain" window is sequentially surrounded by two windows with the same and determined state (such as both being "static drift"), then the "uncertain" window is directly determined to be in the same state as its adjacent window. S32, Confidence Propagation: The high-confidence window propagates its state determination to the adjacent "uncertain" windows with an exponential decay coefficient, and iterates for multiple rounds until the states of all windows are determined.
[0047] This mechanism makes full use of the continuity of the trajectory in time, smoothing out noise interference while preserving the real motion state transitions (such as a vehicle starting from a standstill or entering a signal blind spot).
[0048] The uncertain window and the high-confidence window are defined as follows: For each window, two types of state probabilities P are obtained. drive (Normalized confidence level of the normal trajectory), P drift (Normalized drift confidence), let: Max prob (the maximum of the two) = max(P) drive , P drift ); margin (absolute value of the difference) = |P drive - P drift |; but: Uncertain window: Max prob < T min; High confidence window: Max prob ≥ T high And margin ≥ Δ; In this embodiment, the value is: T min = 0.6, T high= 0.8, Δ = 0.25.
[0049] S4, map the final window status labels determined in S3 back to the original GPS trajectory points, and aggregate them into initial trajectory segments to obtain driving segments or drift segments with preliminary status labels; Because sliding windows overlap (e.g., with a step size of 1), each original trajectory point is typically covered by multiple windows. The system determines the intermediate state label ("normal driving", "static drift" or "uncertain") of the point based on the states of all windows covering it, using weighted voting (with the weight being the window confidence level) or a simple majority principle.
[0050] If a point is still classified as "uncertain" after aggregation, the system will, based on the "presumption of innocence" principle, ultimately determine it as "normal driving" during the segment generation stage. Subsequently, points with the same final state are aggregated into trajectory segments, forming an initial segment-level structure, which serves as input to the heuristic error correction module.
[0051] S5 performs heuristic review and correction on the initial trajectory segment obtained in S4, and outputs the final state annotation result.
[0052] This step handles systematic misjudgments through two complementary heuristic error correction modules (HESC): Module A: Correction of Misjudgment of Drift State ("False Positive Correction"); All trajectory segments initially labeled as "static drift" are reviewed, and their Stable Velocity Score (SVS) is calculated. SVS is a comprehensive index whose score is directly proportional to the average speed within the segment, while being negatively penalized for speed instability (i.e., the ratio of speed standard deviation to average speed). A high SVS value represents high-speed and stable motion characteristics. If the SVS exceeds a threshold, it indicates that the segment exhibits typical driving characteristics, contradicting the physical definition of "static drift," and the system corrects it to "normal driving." This rule effectively prevents scenarios such as constant speed driving on highways and cruising on viaducts from being misjudged as drift. The formula for calculating the Stable Velocity Score (SVS) is: SVS = (v avg / v th ) - w stab × (v std / v avg ) Among them, v avg This represents the average speed (in units such as km / h) within the trajectory segment; v std : Represents the standard deviation of the velocity within this trajectory segment (km / h); v th This represents the high-speed reference threshold / calibrated speed (unit: km / h), used to normalize the speed term; w stabThis represents the stability penalty weight (dimensionless), used to adjust the intensity of the penalty imposed on SVS by "velocity fluctuations"; v std / v avg This represents the relative velocity fluctuation coefficient (dimensionless); the larger the coefficient, the more unstable the velocity. In practice, additional protection measures should be implemented: when v... avg When the value is very small (close to 0), it can be directly determined as "non-high-speed stable driving", or max(v) can be used. avg , v min Avoid division by zero (v) min (for extremely small positive numbers) Module B: Correction of driving status misjudgment (correction of missed reports); Examine all trajectory segments marked as "normal driving" and only correct them to "static drift" if the following three chains of evidence are met simultaneously: 1) Contextual evidence: This segment is temporally surrounded by two "static drift" segments, and the maximum distance between the centroids of the three segments is less than the threshold. 2) Morphological evidence: The displacement efficiency of this segment is below the threshold, exhibiting slight shaking or spinning in place; 3) Kinematic evidence: More than 80% of the points in this segment have velocities below the low-velocity threshold.
[0053] The triple evidence design ensures that corrective decisions are highly reliable, avoiding misjudging brief stops or low-speed turns as drifting.
[0054] After the above double review, the final trajectory segment sequence is output with the labels "normal driving" or "static drift".
[0055] Based on a similar inventive concept, embodiments of the present invention also provide a computer storage medium storing a readable program that, when run by a processor, can execute the aforementioned GPS static drift detection method based on trajectory morphology analysis.
[0056] Based on a similar inventive concept, this invention provides an electronic device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the GPS static drift detection method based on trajectory morphology analysis described above.
[0057] Based on a similar inventive concept, embodiments of the present invention also provide a computer program product, including computer instructions, which instruct a computing device to perform the operations corresponding to the above-described GPS static drift detection method based on trajectory morphology analysis.
[0058] Example 2: This example proposes a GPS static drift detection system based on trajectory morphology analysis, specifically including: Data processing module: acquires the original GPS trajectory point sequence and performs planar projection transformation on the coordinates to obtain planar coordinate trajectory data; Sliding window analysis module: Based on planar coordinate trajectory data, a fixed-length sliding window is used to extract local trajectory morphology features, and the confidence of the window in normal driving and static drift states is evaluated respectively. Normalized state probabilities are output, and preliminary judgments are made according to preset decision thresholds to obtain window-level state labels. Temporal smoothing and adjudication module: Based on window-level state labels, it eliminates state jitter and determines the final window state label through a context-driven iterative temporal smoothing and adjudication mechanism; Tag backtracking and mapping module: Maps the final window status tags back to the original GPS trajectory points and aggregates them into initial trajectory segments to obtain driving segments or drift segments with preliminary status tags; Heuristic error correction module: performs heuristic review and correction on the initial trajectory segment, and outputs the final state annotation result.
[0059] Example 3: In this example, the GPS static drift detection method proposed in Example 1 is verified through a specific case. 1. Test Dataset and Experiment Setup The test dataset comes from historical driving trajectory data of Maigu Technology's vehicle networking platform (anonymized, retaining only fields required for algorithm verification: timestamp, latitude and longitude, speed, etc.). The median time interval between trajectory points is approximately 1 second (there are a few instances of 0 seconds or larger intervals due to duplicate reporting or missing points), and the data time range is from May 6, 2025 to July 18, 2025. It contains 13 labeled trajectories, totaling 63,311 trajectory points. The trajectories can be divided into three categories based on manual annotation results: 6 mixed trajectories, 3 purely normal driving trajectories, and 4 purely static drifting trajectories. The annotation method involves manual segment-level annotation of the trajectories, with labels including "normal driving" and "static drifting"; during evaluation, the segment-level annotations are mapped to point-level labels for statistical purposes.
[0060] The comparative experiment included two methods: (a) the traditional speed threshold method (the speed threshold was set to 5 km / h, which is on the order of low speed discrimination threshold commonly used in engineering practice); (b) the method of this invention (window length 60 seconds, step size 10 seconds, low speed threshold 5.0 km / h, minimum confidence threshold for uncertain state 0.5, high confidence propagation threshold 0.8, attenuation coefficient 0.8).
[0061] 2. Trajectory State Comparison and Analysis Figure 2 This is a schematic diagram comparing trajectory states (time series). For example... Figure 2As shown, the traditional velocity thresholding method (upper sub-figure) only makes point-by-point judgments based on whether the velocity of adjacent points is lower than the threshold, lacking constraints on the semantic context of the trajectory and jitter suppression. Therefore, under positioning noise or intermittent velocity fluctuations, the output is prone to frequent "static drift / driving" alternating sawtooth state switching. The method of this invention (lower sub-figure) first extracts trajectory morphological features within a sliding window and calculates double confidence, then eliminates jitter in the window labels through temporal smoothing adjudication driven by uncertain states and context (including sandwich filling and confidence propagation), ultimately forming a clear, continuous, and stable trajectory state segment. This invention, through the control logic of "confidence modeling + uncertain state mitigation + temporal propagation adjudication," significantly suppresses noise-driven high-frequency switching, making the output labels continuous and interpretable in the time dimension.
[0062] Figure 3 This is a schematic diagram comparing trajectory states (spatial, not a map). For example... Figure 3 As shown, the traditional speed threshold method (left sub-image) is sensitive to noise due to point-by-point discrimination, resulting in numerous short, alternating color segments on the spatial trajectory, leading to a fragmented, blurred-boundary static / dynamic segmentation effect in space. In contrast, the method of this invention (right sub-image), due to the combined effect of morphological evidence and temporal adjudication, exhibits a continuous clustering and clearly defined distribution of static segments on the spatial trajectory, more closely resembling the physical semantics of "random drift of trajectory points around a local area under static conditions." Both images use red to represent "static drift" and green to represent "normal driving."
[0063] 3. Basis for parameter selection The key parameter selection of the method of this invention follows three categories of criteria: "physical meaning constraint + sampling characteristic matching + empirical verification": (1) The window length is 60 seconds, which is the time scale that can form sufficient local morphological evidence (displacement autocorrelation, heading change, etc.) and reduce the influence of single-point noise under sampling of about 1Hz; (2) The feature to confidence mapping threshold is based on the principle of "being able to distinguish typical driving (consistent direction, high efficiency, low proportion of low speed) and typical static drift (random direction, low efficiency, high proportion of low speed)"; (3) The minimum confidence threshold is 0.5, which is used to implement "presumption of innocence" and avoid hasty judgment when there is insufficient evidence; (4) The high confidence propagation and attenuation coefficient is 0.8, which only allows the high confidence window to propagate to the neighborhood, and the influence is weaker the farther the time distance, so as to maintain the controllability of the state switching boundary.
[0064] 4. Quantitative Evaluation Results On mixed tracks (6 tracks), the F1 score of this invention reached 0.9560 (Precision=0.9328, Recall=0.9803, Accuracy=0.9398), which is significantly better than the traditional speed threshold method (F1=0.5678, Precision=0.8453, Recall=0.4275, Accuracy=0.5662), indicating that this invention can more reliably distinguish between static drift sections and normal driving sections.
[0065] On a pure static drift trajectory (4 lines, 4231 points in total), the recall rate of the present invention reached 0.9856 (61 missed points), while the traditional method only reached 0.5566 (1876 missed points), proving that the present invention can more completely cover the static drift segment and significantly reduce the missed detection.
[0066] On a purely normal driving trajectory (3 tracks, totaling 22,625 points), the false positive rate of this invention is 0.0102 (230 misjudged points), slightly higher than the traditional method's 0.00168 (38 misjudged points), but still remains at a low level (approximately 1%), reflecting the design principle of "not judging static drift when there is insufficient evidence".
[0067] In the 45-minute sample segment selected in Example 3 (manually labeled "full static drift"), the traditional velocity threshold method generated 722 state transitions, with static drift accounting for only 38.12%, exhibiting obvious jagged and fragmented output; while the method of the present invention had 0 state transitions, with static drift accounting for 100%, and the output was a continuous single static drift segment with clear boundaries (see...). Figure 2 and Figure 3 ).
[0068] By extracting trajectory morphological features and employing a context-driven temporal smoothing adjudication mechanism, this invention effectively addresses the high false negative rate and state jitter issues inherent in traditional speed threshold methods for GPS static drift detection. Experimental results demonstrate that this invention significantly improves the recall rate (from 0.5566 to 0.9856) and overall F1 score (from 0.5678 to 0.9560) for static drift detection, while maintaining a low false positive rate in normal driving scenarios. More importantly, the static drift segments output by this invention are more continuous and stable in both temporal and spatial dimensions, better conforming to the physical semantics of static drift, thus providing more reliable trajectory quality assurance for applications such as fleet management.
[0069] The methods of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.
[0070] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A GPS static drift detection method based on trajectory morphology analysis, characterized in that, include: Obtain the original GPS trajectory point sequence and perform a planar projection transformation on the coordinates to obtain planar coordinate trajectory data; Based on planar coordinate trajectory data, a fixed-length sliding window is used to extract local trajectory morphology features. The confidence of the window in normal driving and static drift states is evaluated respectively. The normalized state probability is output, and a preliminary judgment is made according to the preset decision threshold to obtain the window-level state label. Based on window-level state labels, a context-driven iterative temporal smoothing and adjudication mechanism is used to eliminate state jitter and determine the final window state label. The final window status labels are mapped back to the original GPS trajectory points and aggregated into initial trajectory segments to obtain driving segments or drift segments with preliminary status labels. Perform heuristic review and correction on the initial trajectory segment, and output the final state annotation result.
2. The GPS static drift detection method based on trajectory morphology analysis according to claim 1, characterized in that, The original GPS track points include: timestamp, latitude and longitude, and speed or positioning accuracy information; The planar projection transformation includes converting latitude and longitude coordinates into Cartesian plane coordinates through local projection.
3. The GPS static drift detection method based on trajectory morphology analysis according to claim 1, characterized in that, The local trajectory morphological features include: Autocorrelation of displacement vectors: Calculate the mean of the normalized dot product of adjacent displacement vectors; Average rate of change of heading angle: the mean of the absolute values of consecutive heading angle differences within a statistical window; Displacement efficiency: defined as the ratio of the straight-line distance from the start to the end of the window to the total path length within the window. Low-speed point percentage: The proportion of points with speeds below a preset threshold within the statistical window.
4. The GPS static drift detection method based on trajectory morphology analysis according to claim 3, characterized in that, The process of outputting normalized state probabilities includes: For each local trajectory morphology feature, a confidence score for normal driving and static drift is generated. The confidence scores of the four local trajectory morphology features are weighted and summed according to preset weights to obtain the total driving confidence score and total drift confidence score at the window level, and then normalized to obtain the final state probability.
5. The GPS static drift detection method based on trajectory morphology analysis according to claim 4, characterized in that, The preliminary judgment includes the following: if the higher probability value between the normal driving and static drift states is lower than a preset decision threshold, the window is temporarily marked as an uncertain state.
6. The GPS static drift detection method based on trajectory morphology analysis according to claim 5, characterized in that, The process of eliminating state jitter and determining the final window state label includes: If an uncertain window is sequentially surrounded by two windows with the same and determined state, then the uncertain window is directly determined to have the same state as its adjacent windows. The high-confidence window propagates its state determination to the left and right adjacent uncertain windows with an exponentially decaying coefficient, and the process is repeated in multiple rounds until the states of all windows are determined.
7. The GPS static drift detection method based on trajectory morphology analysis according to claim 1, characterized in that, The aggregation process of the initial trajectory segment includes: For an original trajectory point covered by multiple windows, the intermediate state label of the point is determined by weighted voting or majority rule based on the states of all windows covering the point. If a point is still classified as uncertain after aggregation, it will be ultimately determined as a normal driving point during the segment generation stage; subsequently, points with the same final state will be aggregated into a trajectory segment to form the initial trajectory segment.
8. The GPS static drift detection method based on trajectory morphology analysis according to claim 1, characterized in that, In the heuristic review and correction process, two complementary methods for correcting misjudgments are employed, including: 1) Correction of drift status misjudgment: Review all trajectory segments initially marked as static drift and calculate their stability speed index; if the stability speed index exceeds the threshold, correct the trajectory segment to normal driving. 2) Correction of Misjudgment of Driving Status: Review all trajectory segments marked as normal driving, and only correct them to static drift if the following three chains of evidence are met simultaneously: Contextual evidence: The trajectory segment is temporally surrounded by two static drift segments, and the maximum distance between the centroids of the three segments is less than the threshold. Morphological evidence: The displacement efficiency of this trajectory segment is below the threshold, exhibiting in-place shaking or spinning; Kinematic evidence: More than 80% of the points within this trajectory segment have velocities below the low-velocity threshold.
9. A GPS static drift detection system based on trajectory morphology analysis, comprising the detection method according to any one of claims 1-8, characterized in that, include: Data processing module: acquires the original GPS trajectory point sequence and performs planar projection transformation on the coordinates to obtain planar coordinate trajectory data; Sliding window analysis module: Based on planar coordinate trajectory data, a fixed-length sliding window is used to extract local trajectory morphology features, and the confidence of the window in normal driving and static drift states is evaluated respectively. Normalized state probabilities are output, and preliminary judgments are made according to preset decision thresholds to obtain window-level state labels. Temporal smoothing and adjudication module: Based on window-level state labels, it eliminates state jitter and determines the final window state label through a context-driven iterative temporal smoothing and adjudication mechanism; Tag backtracking and mapping module: Maps the final window status tags back to the original GPS trajectory points and aggregates them into initial trajectory segments to obtain driving segments or drift segments with preliminary status tags; Heuristic error correction module: performs heuristic review and correction on the initial trajectory segment, and outputs the final state annotation result.
10. A computer storage medium storing a readable program, characterized in that, When the program is running, it can instruct the computing device to execute a GPS static drift detection method based on trajectory morphology analysis as described in any one of claims 1-8.