The invention discloses an
early warning system and method for judging whether a vehicle track deviates from a predetermined
route, and relates to the technical field of intelligent traffic, the method comprises the following steps: collecting and preprocessing vehicle track data in real time, generating an H3 space
label based on historical track starting and ending longitudes and latitudes, and constructing a static track pattern
library and a Ball-tree space index; a dual-
branch anomaly detection model is constructed, a supervised
branch captures a track
time sequence context through Bi-LSTM to generate a point-level anomaly probability, and an unsupervised
branch learns a space-time diagram normal mechanism by using an ST-GAE diagram auto-
encoder to reconstruct an error to reflect an anomaly degree; in the online stage, an H3
label matching reference trajectory is generated for the real-
time trajectory, and the spatial deviation degree is calculated by means of Ball-tree retrieval; inputting the real-
time trajectory data into the model to obtain a supervised anomaly probability and an unsupervised anomaly
score, and fusing the supervised anomaly probability and the unsupervised anomaly
score into a comprehensive anomaly
score according to a preset weight after
standardization; and calculating a comprehensive abnormal sub-average value in the sliding window, and triggering graded early warning in combination with continuity
verification to realize accurate judgment and early warning of vehicle trajectory deviation.