A method, device, electronic device and storage medium for detecting abnormal vehicle trajectories

By combining the spatial and temporal scale division of the target road network and the combination of multiple anomaly detection sub-models, especially VGAE, the problem of ignoring the spatial and temporal context information in the prior art is solved, and the accuracy of vehicle trajectory abnormality detection is improved.

CN120148251BActive Publication Date: 2025-07-25CCCC SECOND HIGHWAY CONSULTANTS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510622664.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-07-25
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

The existing vehicle trajectory abnormality detection methods ignore the space-time context information of the trajectory data to a certain extent, resulting in a lack of accuracy of the detection results.

Method used

By dividing the historical traffic volume data of the target road network at a time and space scale, trajectory feature data are generated, and multiple anomaly detection sub-models, especially VGAEs added to the adversarial network, vehicle trajectory anomaly detection is performed.

Benefits of technology

The space-time feature information of the vehicle trajectory is fully explored, and the accuracy of vehicle trajectory abnormality detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120148251B_ABST
    Figure CN120148251B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, electronic device and storage medium for detecting abnormal vehicle trajectories, belonging to the technical field of data processing. Among them, the method for detecting abnormal vehicle trajectories includes: based on the historical traffic volume data of the target road network, dividing the target road network in terms of time and space scales, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle; generating trajectory feature data based on the time and space scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle; using the trajectory feature data as the input of the anomaly detection model, and based on the anomaly score value output by the anomaly detection model, performing anomaly detection on the target vehicle. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of VGAE with an added adversarial network. In the process of detecting abnormal vehicle trajectories, the present invention fully considers the spatio-temporal feature information of vehicle trajectories, thereby improving the accuracy of abnormal vehicle trajectory detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly to a method, device, electronic device and storage medium for detecting abnormal vehicle trajectories. Background Art

[0002] With the acceleration of the urbanization process, the traffic flow on roads has been continuously increasing, bringing a series of challenges such as traffic congestion, frequent accidents, and illegal driving behaviors. Vehicle trajectories include the time and location information of traffic trips, reflecting various traffic patterns and travel characteristics. By deeply mining a large amount of vehicle trajectories, abnormal patterns different from most common characteristics can be identified, such as unusual driving paths, sudden speed changes, or frequent position deviations, which helps to timely discover potential safety hazards, reduce the occurrence of traffic accidents, and at the same time can provide key information for traffic management departments. Therefore, the detection of abnormal vehicle trajectories is of great significance for improving traffic efficiency and ensuring the travel of citizens.

[0003] Existing abnormal vehicle trajectory detections pay more attention to the overall or local abnormalities of a single trajectory, and to a certain extent, ignore the context information of trajectory data, which has limitations, resulting in a lack of accuracy in the results of abnormal vehicle trajectory detections. Summary of the Invention

[0004] In view of this, it is necessary to provide a method, device, electronic device and storage medium for detecting abnormal vehicle trajectories to solve the problem of the lack of accuracy in existing abnormal vehicle trajectory detection solutions.

[0005] To solve the above problems, the present invention provides a method for detecting abnormal vehicle trajectories, including:

[0006] Based on the historical traffic volume data of the target road network, perform spatio-temporal scale division on the target road network, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle;

[0007] Based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle, generate trajectory feature data;

[0008] Use the trajectory feature data as the input of the anomaly detection model, and based on the anomaly score value output by the anomaly detection model, perform anomaly detection on the target vehicle. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of VGAE with an added adversarial network.

[0009] In a possible implementation manner, the performing spatio-temporal scale division on the target road network based on the historical traffic volume data of the target road network includes:

[0010] Perform hierarchical clustering based on the similarity distance between adjacent road segments within the target road network until the number of road segments is less than or equal to the first preset number, to obtain the spatial scale division result of the target road network. The similarity distance between adjacent road segments is determined based on the traffic volumes of two adjacent road segments at multiple preset times;

[0011] Divide the historical traffic volume data of the target road network into multiple time periods based on a preset duration, and determine the traffic volume time mutation points within each time period based on the Pettitt algorithm;

[0012] Divide each time period into two new time periods based on the determined traffic volume time mutation points, and perform division on the new time periods based on the Pettitt algorithm until the number of time periods is greater than or equal to the second preset number, to obtain the time scale division result of the target road network.

[0013] In a possible implementation manner, generating trajectory feature data based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle includes:

[0014] Based on the spatio-temporal scale division result of the target road network and the speed, time, and deflection angle information in the preprocessed historical trajectory data of the target vehicle, determine the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales;

[0015] Based on the time scale division result of the target road network, determine the date label and peak period label of the target vehicle at different time scales;

[0016] Generate trajectory feature data based on the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales, and the date label and peak period label of the target vehicle at different time scales.

[0017] In a possible implementation manner, using the trajectory feature data as the input of an anomaly detection model, and performing anomaly detection on the target vehicle based on the anomaly score value output by the anomaly detection model includes:

[0018] Based on the spatial scale division result of the target road network, determine the adjacency matrix corresponding to the trajectory feature data. The adjacency matrix is used to represent the adjacent relationship between road segments in the spatial scale division result of the target road network;

[0019] Use the trajectory feature data and the adjacency matrix as the input of each anomaly detection sub-model, and obtain the anomaly score value output by each anomaly detection sub-model;

[0020] The anomaly score values output by each anomaly detection sub - model are weighted and averaged to obtain the anomaly score value output by the anomaly detection model. The weight of each anomaly detection sub - model is determined based on the Adaboost algorithm with the anomaly detection sub - model as the base detector;

[0021] When the anomaly score value output by the anomaly detection model is greater than the preset threshold, it is determined that there is an anomaly in the trajectory of the target vehicle;

[0022] When the anomaly score value output by the anomaly detection model is less than or equal to the preset threshold, it is determined that there is no anomaly in the trajectory of the target vehicle.

[0023] In a possible implementation, the anomaly score value output by each anomaly detection sub - model is determined based on the difference between the trajectory feature data reconstructed by each anomaly detection sub - model and the input trajectory feature data, the probability value that the input trajectory feature data is real data, and the probability value that the trajectory feature data reconstructed by each anomaly detection sub - model is real data.

[0024] In a possible implementation, the determination of the weight of each anomaly detection sub - model includes:

[0025] Taking the anomaly detection sub - model as the base detector, based on the trajectory feature data of multiple sample vehicles, the preset sample weights and the Adaboost algorithm, multiple iterations are performed, and the weight of the base detector obtained in each iteration is used as the weight of the corresponding anomaly sub - model.

[0026] In a possible implementation, the weighted averaging of the anomaly score values output by each anomaly detection sub - model to obtain the anomaly score value output by the anomaly detection model includes:

[0027] The anomaly score value output by the anomaly detection model is obtained based on the following formula:

[0028]

[0029] where, represents the anomaly score value output by the anomaly detection model, is the number of anomaly detection sub - models, represents the weight of the th anomaly detection sub - model, represents the anomaly score value output by the

[0030] The present invention also provides a vehicle trajectory anomaly detection device, including:

[0031] A partitioning module, configured to partition the target road network in terms of spatio-temporal scales based on the historical traffic volume data of the target road network, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle;

[0032] A generating module, configured to generate trajectory feature data based on the spatio-temporal scale partitioning result of the target road network and the preprocessed historical trajectory data of the target vehicle;

[0033] A detecting module, configured to use the trajectory feature data as the input of an anomaly detection model, and perform anomaly detection on the target vehicle based on the anomaly score value output by the anomaly detection model. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of a VGAE added with an adversarial network.

[0034] The present invention also provides an electronic device, including a memory and a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the vehicle trajectory anomaly detection method as described above is implemented.

[0035] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the vehicle trajectory anomaly detection method as described above is implemented.

[0036] The beneficial effects of the present invention are as follows: The vehicle trajectory anomaly detection method, device, electronic device and storage medium disclosed by the present invention first partition the target road network in terms of spatio-temporal scales through the historical traffic volume data of the target road network, and then generate trajectory feature data according to the spatio-temporal scale partitioning result and the historical trajectory data of the target vehicle, realizing the extraction of multi-scale spatio-temporal information of the vehicle and fully mining the spatio-temporal feature information of the vehicle trajectory. Then, multiple VGAEs added with adversarial networks perform vehicle trajectory anomaly detection based on the trajectory feature data to ensure the accuracy of anomaly detection. In the process of performing vehicle trajectory anomaly detection, the present invention fully considers the spatio-temporal feature information of the vehicle trajectory, thereby improving the accuracy of vehicle trajectory anomaly detection. Description of the Drawings

[0037] Figure 1 It is a schematic flowchart of an embodiment of the vehicle trajectory anomaly detection method provided by the present invention;

[0038] Figure 2 It is a schematic flowchart of an embodiment of the vehicle trajectory anomaly detection process provided by the present invention;

[0039] Figure 3 It is a schematic structural diagram of an embodiment of the trajectory anomaly detection sub-model provided by the present invention;

[0040] Figure 4 It is a schematic flowchart of an embodiment of the detection process of the trajectory anomaly detection model provided by the present invention;

[0041] Figure 5 Structural schematic diagram of an embodiment of the vehicle trajectory anomaly detection device provided by the present invention;

[0042] Figure 6 Structural schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed implementation manners

[0043] The preferred embodiments of the present invention will be specifically described below with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, rather than to limit the scope of the present invention.

[0044] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0045] In the description of the present invention, referring to "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the described embodiments may be combined with other embodiments.

[0046] With the acceleration of the urbanization process, the traffic flow on roads has been continuously increasing, bringing a series of challenges such as traffic congestion, frequent accidents, and illegal driving behaviors. Vehicle trajectories include the time and location information of traffic trips, reflecting various traffic patterns and travel characteristics. By deeply mining a large number of vehicle trajectories, abnormal patterns different from most common characteristics can be identified, such as unusual driving paths, sudden speed changes, or frequent position deviations, which helps to timely discover potential safety hazards, reduce the occurrence of traffic accidents, and at the same time can provide key information for traffic management departments. Therefore, vehicle trajectory anomaly detection is of great significance for improving traffic efficiency and ensuring the travel of citizens.

[0047] Common trajectory anomaly detection methods are mainly divided into statistical - based detection methods, machine - learning - based detection methods, and deep - learning - based detection methods. Among them, statistical - based detection methods mainly identify abnormal trajectories inconsistent with normal trajectory data through statistical analysis of vehicle trajectory data. Common ones include distance - and - density - based methods; machine - learning - based methods use algorithms such as clustering, Support Vector Machine (SVM), and Random Forest (RF) to model and train vehicle trajectory data to identify abnormal trajectory data. With the development of deep - learning technology, common convolutional neural networks, recurrent neural networks, and long short - term memory neural networks are also widely used in trajectory anomaly detection tasks. Generally speaking, existing trajectory anomalies pay more attention to the overall or local anomalies of a single trajectory, to a certain extent ignoring the spatio - temporal context information of trajectory data, which has limitations; in actual scenarios, for the same trajectory parameters at different road segments and different times, the implied abnormal features may also be different.

[0048] Making full use of the spatio - temporal information at different scales of trajectory data can help understand the characteristics of the road spatio - temporal scene and improve the accuracy of trajectory anomaly detection. Therefore, the present invention provides a vehicle trajectory anomaly detection algorithm that fuses multi - scale spatio - temporal information. By dividing the road network into time units and space units at different scales, on this basis, extracting the trajectory behavior characteristics of different - scale units, and then constructing a trajectory anomaly detection model that fuses multi - scale spatio - temporal information to achieve high - precision anomaly detection of vehicle trajectories.

[0049] The following will separately elaborate on specific embodiments in detail:

[0050] A specific embodiment of the present invention discloses a vehicle trajectory anomaly detection method, combined with Figure 1 seen as Figure 1 is a schematic flow chart of an embodiment of the vehicle trajectory anomaly detection method provided by the present invention, including steps S101 to S103, where:

[0051] In step S101, based on the historical traffic volume data of the target road network, the target road network is divided into spatio - temporal scales. The target road network is the road network corresponding to the historical trajectory data of the target vehicle;

[0052] In step S102, based on the spatio - temporal scale division result of the target road network and the pre - processed historical trajectory data of the target vehicle, trajectory feature data is generated;

[0053] In step S103, the trajectory feature data is used as the input of the anomaly detection model. Based on the anomaly score value output by the anomaly detection model, the target vehicle is subjected to anomaly detection. The anomaly detection model includes multiple anomaly detection sub-models, and each anomaly detection sub-model is composed of a VGAE with an added adversarial network.

[0054] In the present invention, the historical traffic volume data of the target road network can be obtained by the server on the detection platform side from the database of the traffic cloud platform through a public transmission network (such as the wired or wireless transmission network of an operator). The historical trajectory data of the target vehicle can be obtained by the server on the detection platform side from the in-vehicle device of the target vehicle through the wireless transmission network of the operator. The scale division of the target road network, the generation of trajectory feature data, and the anomaly detection process can be implemented by the algorithms built into the server on the detection platform side. The anomaly detection model can be pre-trained and set on the server on the detection platform side, or it can be directly set on the server on the detection platform side to complete the training.

[0055] During implementation, first, the historical trajectory data of the target vehicle can be obtained, and then the road network corresponding to the historical trajectory data of the target vehicle is determined as the target road network. Next, the historical traffic volume data of the target road network can be obtained, and based on the historical traffic volume data of the target road network, the spatio-temporal scale of the target road network is divided, so that the target road network is divided into multiple different time units and space units.

[0056] Then, the historical trajectory data of the target vehicle can be preprocessed. When preprocessing, the vehicle trajectory data can be first cleaned, and the trajectory data with missing Global Navigation Satellite System (GNSS) signals, out-of-range, and data missing are removed. Then, statistical and probability models are used to determine the correspondence between the trajectory points and the road network, and the trajectory points are matched to the actual road network.

[0057] Subsequently, according to the spatio-temporal scale division result of the target road network, the trajectory behavior feature parameters of different scale units in the preprocessed historical trajectory data of the target vehicle are extracted to generate trajectory feature data.

[0058] Finally, the trajectory feature data can be used as the input of the anomaly detection model. Based on the anomaly score value output by the anomaly detection model, the target vehicle is subjected to anomaly detection. The anomaly detection model can be composed of multiple anomaly detection sub-models, and each anomaly detection sub-model is composed of a Variational Graph Auto-Encoders (VGAE) with an added adversarial network.

[0059] Compared with the prior art, the vehicle trajectory anomaly detection method provided in this embodiment first performs spatio-temporal scale division on the target road network based on the historical traffic volume data of the target road network, and then generates trajectory feature data according to the spatio-temporal scale division result and the historical trajectory data of the target vehicle, realizing the extraction of multi-scale spatio-temporal information of the vehicle, fully mining the spatio-temporal feature information of the vehicle trajectory. Then, multiple VGAEs with adversarial networks are used to detect vehicle trajectory anomalies based on the trajectory feature data to ensure the accuracy of anomaly detection. In the process of detecting vehicle trajectory anomalies, the present invention fully considers the spatio-temporal feature information of the vehicle trajectory, thereby improving the accuracy of vehicle trajectory anomaly detection.

[0060] Exemplarily, the spatio-temporal scale division of the target road network based on the historical traffic volume data of the target road network includes:

[0061] Performing hierarchical clustering based on the similarity distance between adjacent road segments in the target road network until the number of road segments is less than or equal to the first preset number, to obtain the spatial scale division result of the target road network. The similarity distance between adjacent road segments is determined based on the traffic volumes of two adjacent road segments at multiple preset times;

[0062] Dividing the historical traffic volume data of the target road network into multiple time periods based on a preset duration, and determining the traffic volume time mutation points in each time period based on the Pettitt algorithm;

[0063] Dividing each time period into two new time periods based on the determined traffic volume time mutation points, and dividing the new time periods based on the Pettitt algorithm until the number of time periods is greater than or equal to the second preset number, to obtain the time scale division result of the target road network.

[0064] Specifically, when performing spatio-temporal scale division on the target road network according to the historical traffic volume data of the target road network, the time scale division and the spatial scale division can be respectively performed on the target road network according to the historical traffic volume data of the target road network.

[0065] First, the traffic volume of each road in the target road network at different time periods can be statistically calculated according to a preset duration (for example, every 30 minutes).

[0066] Then, the method of hierarchical clustering can be used to divide the road network into different spatial scales according to the traffic volume of each road segment in the road network. All road segments are regarded as single points, and the most similar road segments are merged bottom-up into clusters, and then larger clusters are gradually merged until the required scale is reached or the stop condition is satisfied. Among them, the similarity distance between adjacent road A and road B is calculated as follows:

[0067]

[0068] Among them, represents the similarity distance between adjacent roads A and B, and respectively represent the traffic flows of roads A and B at time tn.

[0069] When performing time scale division, the method of change point detection can be used to divide time into different scales according to the traffic volume of the road network in different time periods.

[0070] For example, taking 30 minutes as the basic time period, draw the curve of the traffic flow of the road network changing with time, and then use the Pettitt algorithm to detect the change points of the traffic volume changing with time to obtain its time mutation points. Then, according to the obtained mutation time points, divide the original traffic volume into two time series over time, and use the Pettitt algorithm to detect the change points of the generated two time series respectively to obtain the corresponding time mutation points, and continue to split the time series based on this to continuously obtain different time change points, so as to achieve the division of different time scales.

[0071] Exemplarily, generating trajectory feature data based on the spatio-temporal scale division result of the target road network and the historical trajectory data of the target vehicle after preprocessing includes:

[0072] Based on the spatio-temporal scale division result of the target road network and the speed, time, and deflection angle information in the historical trajectory data of the target vehicle after preprocessing, determine the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales;

[0073] Based on the time scale division result of the target road network, determine the date label and peak period label of the target vehicle at different time scales;

[0074] Generate trajectory feature data based on the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales, and the date label and peak period label of the target vehicle at different time scales.

[0075] Specifically, when generating trajectory feature data according to the spatio-temporal scale division result of the target road network and the historical trajectory data of the target vehicle after preprocessing, the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation and other operating parameters of the target vehicle at different spatial scales and time scales can be determined according to the spatio-temporal scale division result of the target road network and the speed, time, and deflection angle information in the historical trajectory data of the target vehicle after preprocessing.

[0076] Then, according to the time-scale division result of the target road network, determine the date label and peak period label of the target vehicle at different time scales.

[0077] Finally, based on the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales, as well as the date label and peak period label of the target vehicle at different time scales, generate trajectory feature data.

[0078] Exemplarily, taking the trajectory feature data as the input of the anomaly detection model and based on the anomaly score value output by the anomaly detection model, performing anomaly detection on the target vehicle includes:

[0079] Based on the spatial-scale division result of the target road network, determine the adjacency matrix corresponding to the trajectory feature data. The adjacency matrix is used to represent the adjacent relationship between road segments in the spatial-scale division result of the target road network;

[0080] Take the trajectory feature data and the adjacency matrix as the input of each anomaly detection sub-model, and obtain the anomaly score value output by each anomaly detection sub-model;

[0081] Perform weighted averaging on the anomaly score values output by each anomaly detection sub-model to obtain the anomaly score value output by the anomaly detection model. The weight of each anomaly detection sub-model is determined based on the Adaboost algorithm with the anomaly detection sub-model as the base detector;

[0082] When the anomaly score value output by the anomaly detection model is greater than the preset threshold, determine that there is an anomaly in the trajectory of the target vehicle;

[0083] When the anomaly score value output by the anomaly detection model is less than or equal to the preset threshold, determine that there is no anomaly in the trajectory of the target vehicle.

[0084] Specifically, when taking the trajectory feature data as the input of the anomaly detection model and performing anomaly detection on the target vehicle according to the anomaly score value output by the anomaly detection model, first, according to the spatial-scale division result of the target road network, determine the adjacency matrix corresponding to the trajectory feature data. The adjacency matrix can be used to represent the adjacent relationship between road segments in the spatial-scale division result of the target road network.

[0085] Then, the trajectory feature data and the adjacency matrix can be taken as the input of each anomaly detection sub-model to obtain the anomaly score value output by each anomaly detection sub-model, and then perform weighted averaging on the anomaly score values output by each anomaly detection sub-model to obtain the anomaly score value output by the anomaly detection model. When determining the weight of each anomaly detection sub-model, the anomaly detection sub-model can be used as the base detector, and the weight of each anomaly detection sub-model can be determined according to the Adaboost algorithm.

[0086] After determining the anomaly score value output by the anomaly detection model, the anomaly score value output by the anomaly detection model can be compared with a preset threshold, so as to realize the anomaly detection of the target vehicle. For example, when the anomaly score value output by the anomaly detection model is greater than the preset threshold, it can be determined that there is an anomaly in the trajectory of the target vehicle; when the anomaly score value output by the anomaly detection model is less than or equal to the preset threshold, it can be determined that there is no anomaly in the trajectory of the target vehicle.

[0087] Exemplarily, the anomaly score value output by each anomaly detection sub-model is determined based on the difference between the trajectory feature data reconstructed by each anomaly detection sub-model and the input trajectory feature data, the probability value that the input trajectory feature data is real data, and the probability value that the trajectory feature data reconstructed by each anomaly detection sub-model is real data.

[0088] Specifically, the anomaly score value output by each anomaly detection sub-model can be determined according to the difference between the trajectory feature data reconstructed by each anomaly detection sub-model and the input trajectory feature data, the probability value that the input trajectory feature data is real data, and the probability value that the trajectory feature data reconstructed by each anomaly detection sub-model is real data. For example, the anomaly score value output by each anomaly detection sub-model can be determined by the following formula:

[0089]

[0090] where represents the anomaly score value output by the anomaly detection sub-model, represents the difference between the trajectory feature data reconstructed by the anomaly detection sub-model and the input trajectory feature data, represents the probability value that the input trajectory feature data is real data, represents the probability value that the trajectory feature data reconstructed by the anomaly detection sub-model is real data, and are preset parameters with values between 0 and 1, and the values can be adjusted according to the actual situation.

[0091] Exemplarily, the determination of the weight of each anomaly detection sub-model includes:

[0092] Taking the anomaly detection sub-model as the base detector, based on the trajectory feature data of multiple sample vehicles, the preset sample weights and the Adaboost algorithm for multiple iterations, and taking the weight of the base detector obtained in each iteration as the weight of the corresponding anomaly sub-model.

[0093] Specifically, when determining the weight of each anomaly detection sub-model, the anomaly detection sub-model is first used as the basic detector, and then multiple iterations can be performed based on the trajectory feature data of multiple sample vehicles, the preset sample weights and the Adaboost algorithm. Finally, the weight of the basic detector obtained in each iteration is used as the weight of the corresponding anomaly sub-model.

[0094] Exemplarily, the weighted average of the anomaly score values output by each anomaly detection sub-model to obtain the anomaly score value output by the anomaly detection model includes:

[0095] The anomaly score value output by the anomaly detection model is obtained based on the following formula:

[0096]

[0097] in, Represents the anomaly score value output by the anomaly detection model, is the number of anomaly detection sub-models, Indicates The weights of the anomaly detection sub-models, Indicates The anomaly score value output by the anomaly detection sub-model.

[0098] Specifically, the anomaly score value output by the anomaly detection model can be calculated according to the above formula.

[0099] The technical solution of the present invention is better described below with reference to a specific embodiment:

[0100] Combination Figure 2 Come and see, Figure 2 The present invention provides a flow chart of an embodiment of a vehicle trajectory abnormality detection process, which includes the following steps:

[0101] 1. Vehicle trajectory data preprocessing.

[0102] Vehicle trajectory data mainly includes vehicle ID, time, longitude, latitude, speed, direction, GNSS status and other information. In order to analyze vehicle trajectory anomalies, it is necessary to project the vehicle trajectory points onto the nearest road for analysis. The specific steps include:

[0103] (1) Vehicle trajectory data cleaning: In complex traffic scenarios such as viaducts and tunnels, GNSS signals are often weak or even missing, resulting in large errors in vehicle trajectory accuracy. Therefore, it is necessary to remove data with missing GNSS signals based on the GNSS status. Then, the longitude and latitude of the trajectory data should be further checked to remove vehicle trajectory data that exceeds the study area. Finally, the integrity of the trajectory data should be checked to remove trajectory data with missing data.

[0104] (2) Map matching: Due to the adverse effects of weather conditions, road sections, systems, etc., there are likely to be deviations between the spatial positions of the collected trajectory data and the actual road network. To improve the accuracy of the data, based on the longitude and latitude information of the trajectory data and the regional road network information, models such as conditional random fields and hidden Markov models are further used to determine the correspondence between trajectory points and the road network through statistical and probability models, so as to match the trajectory points of the driving trajectory to the actual road network.

[0105] 2. Multi-scale time and space unit division of the road network.

[0106] Since road traffic has strong spatio-temporal differences, vehicle trajectory data also often has strong spatio-temporal dependencies, and trajectory data at different spatio-temporal scales exhibits different characteristics. Therefore, based on the road traffic volume, the road network is divided into spatial units of different scales, and continuous time is divided into time units of different scales to support the extraction of multi-scale spatio-temporal characteristics of subsequent trajectory data. Specifically as follows:

[0107] (1) Road section traffic volume statistics: According to the matching results of the trajectory data and the road network, with 30 minutes as the time period, the traffic volume of each road in different time periods is statistically calculated.

[0108] (2) Division of spatial units: The hierarchical clustering method is used to divide the road network into different scales according to the traffic volume of each road section in the road network. All road sections are regarded as single points, and the most similar road sections are merged bottom-up into clusters, and then larger clusters are gradually merged until the required scale is reached or the stop condition is met. Among them, the similarity distance of adjacent roads A and B is calculated as follows:

[0109]

[0110] In the above formula, and are the traffic flows of road A and road B at time tn respectively.

[0111] The specific steps of the division include:

[0112] a. Construct a road network adjacency matrix based on the road network. Assuming the initial number of road sections is N, the adjacency matrix can be expressed as: .

[0113] b. Based on the initial road section traffic volume and the road network adjacency matrix, calculate the similarity distance of each adjacent road section, and gradually merge the road sections with higher similarity in a bottom-up manner. After each layer of similar road sections is merged, recalculate and update the traffic volume of the road sections and the road network adjacency matrix.

[0114] c. Set the number of merged road sections i represents different spatial scale levels, where the number of road segments decreases from large to small, and the spatial scale from the first layer to the i-th layer increases from small to large; repeat the above step b, continuously merge adjacent road segments until the number of road segments reaches and then stop; during the iteration process, synchronously update the adjacency matrix at different hierarchical scales.

[0115] (3)Division of time units: Adopt the change point detection method to divide time into different scales according to the traffic volume of the road network in different time periods. The specific process is as follows:

[0116] a. Take 30 minutes as the basic time period, draw the curve of the road network traffic flow changing with time, and then use the Pettitt algorithm to detect the change points of the traffic volume data changing with time to obtain its time mutation points.

[0117] b. Based on the obtained mutation time points, the original traffic volume can be divided into two time series with respect to time, and then use the Pettitt algorithm to detect the change points of the two generated time series respectively to obtain the corresponding time mutation points, and continue to split the time series based on this.

[0118] c. Set the number of merged time periods , j represents different time scale levels, the number of time periods increases from small to large, and the time scale from the first layer to the j-th layer decreases from large to small; repeat the above step b, and different time change points can be continuously obtained, so as to realize the division of different time scales.

[0119] 3. Trajectory feature extraction based on multi-scale spatio-temporal units.

[0120] Judging vehicle trajectory anomalies comprehensively needs to consider the characteristics of the vehicle trajectory itself and external influencing factors such as holidays and working days that affect the vehicle formation speed, route, etc. For this reason, taking the above-mentioned extracted time units and spatial units as processing units, extract the trajectory behavior characteristic parameters in each corresponding different scale unit, specifically as follows:

[0121] (1)Vehicle trajectory feature extraction: According to the division results of large, medium, and small scale time units and spatial units, use the speed, time, and deflection angle information in the vehicle trajectory data to calculate the average vehicle speed , maximum speed , average acceleration , maximum acceleration , average direction deviation and maximum direction deviation at different time scales and spatial scales respectively.

[0122] (2)External feature extraction: According to the time units of large, medium, and small scales, using the time information in vehicle trajectory data, set different attribute information for different time units, including whether it is a holiday , whether it is a weekend , whether it is a weekday , whether it is the peak period of morning and evening rush hours .

[0123] (3)Generation of multi-scale spatio-temporal trajectory feature data: Based on the extracted vehicle trajectory features and external features, the vehicle trajectory features based on multi-scale spatio-temporal units can be expressed as:

[0124]

[0125]

[0126] Among them, and are different spatial scales and time scales respectively; is the trajectory feature corresponding to the spatial scale and the time scale .

[0127] 4. Construction of the trajectory anomaly detection network MST-AVGAE.

[0128] In the present invention, an adversarial network module is introduced on the basis of VGAE, and the extracted multi-scale spatio-temporal trajectory features are used as the input of the model to construct a vehicle trajectory data anomaly detection network model MST-AVGAE that integrates multi-scale spatio-temporal information. By fully mining the spatio-temporal feature information of vehicle trajectories, the anomaly score of vehicle trajectory data is comprehensively calculated to realize the anomaly judgment of vehicle trajectory data. The MST-AVGAE network consists of five parts: multi-scale spatio-temporal trajectory feature input, encoder, decoder, discriminator and adversarial learning, and anomaly score module.

[0129] Combined with Figure 3 to see, Figure 3 is the structural schematic diagram of an embodiment of the trajectory anomaly detection sub-model provided by the present invention. Combined with this structure, the specific detection process of MST-AVGAE is as follows:

[0130] (1)Multi-scale spatio-temporal trajectory feature input: Set the levels of the time scale and spatial scale of the trajectory data, and divide the corresponding time and space units of each scale. Select a certain spatial scale to divide the road network into N sections, and obtain the adjacency matrix by judging the adjacent relationship of the sections , extract the features of each trajectory data in different scale units , where D is the dimension of the feature; the adjacency matrix and the feature matrix As the input of the model.

[0131] (2) Encoder module: It consists of multiple layers of graph convolutional networks (GCNs), and its role is to map the node feature matrix and the adjacency matrix to the latent vector . The operation of the GCN layer can be expressed as:

[0132]

[0133] is the propagation rule of GCN, are the training parameters. Each layer of GCN is updated as follows:

[0134]

[0135] Among them: ; , is the adjacency matrix with self-loops added; is 's degree matrix; is the learnable weight matrix of the l-th layer; is the sigmoid function.

[0136] After multiple layers of encoding, the output of the final encoding layer is , and are the mean vector and the standard deviation vector respectively, obtained by performing a fully connected transformation on the output of the last layer of encoding, that is , , is the noise vector sampled from the standard normal distribution, represents element-wise multiplication.

[0137] (3) Decoder module: It reconstructs the original adjacency matrix and the feature matrix through the latent space representation , where , is the sigmoid function; , is the ReLU function, is the weight matrix from the latent space to the feature space.

[0138] (4) Discriminator and adversarial learning module: The discriminator consists of multiple layers of neural networks, and the output result is the probability that this data is real data, which can be expressed as , is the main part of the discriminator, consisting of multiple hidden layers, is the parameter set of the discriminator, is the sigmoid function. To improve the generalization ability of the VGAE model, the present invention designs an adversarial network composed of an encoder-decoder-discriminator, which mainly includes two parts:

[0139] a. Encoder-decoder training: Input the latent vector Z, reconstruct the trajectory feature data through the decoder, and then use the encoder to map the reconstructed trajectory feature data into a latent vector. The reconstruction error is ; Input the original trajectory feature data , use the encoder to map it into the latent vector Z, and then use the encoder to reconstruct the trajectory features. The reconstruction error . Then the overall reconstruction error of the encoder and the decoding network:

[0140]

[0141] b. Discriminator training: Use the original trajectory feature data as the positive sample, and the reconstructed trajectory feature data as the negative sample. Through the discriminator, increase the score of the positive sample and decrease the score of the negative sample. Its loss function is:

[0142]

[0143] During the adversarial training process, further use the reconstruction errors of the encoder and the decoder as the constraints of the adversarial network. The overall loss function of the model can be expressed as:

[0144]

[0145] (5) Anomaly score module: After the AVGAE model is trained, the reconstruction difference between the original trajectory feature data and the decoder-reconstructed trajectory feature data can be used as an index to evaluate trajectory anomalies. The calculation method of the reconstruction difference is as follows:

[0146]

[0147] At the same time, the probability values of the original trajectory feature data and the reconstructed trajectory feature data output by the discriminator can also be used to evaluate the trajectory anomaly situation. The calculation methods are respectively:

[0148]

[0149]

[0150] Therefore, the reconstruction difference and the probability output by the discriminator can be used for comprehensive evaluation of trajectory anomalies. Then the original trajectory feature data The anomaly score can be expressed as:

[0151]

[0152] Where and are dynamic adjustment parameters in the range of 0 - 1. The higher the value, the higher the likelihood of the original trajectory feature data being anomalous.

[0153] 5. Trajectory anomaly detection based on MST - AVGAE and ensemble learning.

[0154] The present invention uses the Adaboost algorithm to ensemble the MST - AVGAE network, constructing an MST - AVGAE - Adaboost coupled model to improve the accuracy and practicality of trajectory anomaly analysis. The MST - AVGAE - Adaboost model uses the MST - AVGAE network as the basic detector for vehicle trajectory anomalies. By repeatedly training the MST - AVGAE network and applying the Adaboost algorithm, a strong trajectory anomaly detector composed of multiple MST - AVGAE networks is obtained.

[0155] Combined with Figure 4 seen, Figure 4 is a schematic flowchart of an embodiment of the detection process of the trajectory anomaly detection model provided by the present invention. The specific steps of this process are as follows:

[0156] (1) Initialize the training sample weights: The weights of the training samples are expressed as , where m is the number of samples and k is the number of iterations; when k = 1, .

[0157] (2) Resample the training samples: When k = 1, the training samples do not need to be resampled, and the initial training samples are used; when k > 1, using the training sample weights, the samples are probabilistically resampled m times with replacement to obtain a new training sample set .

[0158] (3) Calculate the error rate of the MST - AVGAE model: Use the training sample set obtained in the previous step to train the MST - AVGAE network, and use the trained model to reconstruct the training set to obtain to obtain the maximum error of the training samples, the squared error of each training sample, the regression error rate of the MST - AVGAE model, and further obtain the weight of this model.

[0159] (4) Training sample weight update: , where is the normalization factor, and the expression is .

[0160] (5) Repeat the above steps (2)-(4) until the set maximum number of iterations or error threshold is reached. If Adaboost is iterated K times at this time, K MST-AVGAE models are obtained, and the weighted average of the K trajectory anomaly score results is performed to obtain the final trajectory anomaly score. The expression is:

[0161]

[0162] Among them, is the trajectory feature data The anomaly score at the k-th MST-AVGAE model, is the final anomaly score of this trajectory.

[0163] (6) By setting the trajectory anomaly threshold , when , it can be considered that the trajectory data is abnormal.

[0164] Compared with the existing technical solutions, the MST-AVGAE-Adaboost model constructed by the present invention has less dependence on training samples, can make full use of the multi-scale spatio-temporal information of vehicle trajectory data, greatly improves the accuracy of model anomaly detection, and has stronger practicability.

[0165] The embodiment of the present invention also provides a vehicle trajectory anomaly detection device. Combining Figure 5 to see, Figure 5 is a schematic structural diagram of an embodiment of the vehicle trajectory anomaly detection device provided by the present invention. The vehicle trajectory anomaly detection device 500 includes:

[0166] A division module 501, configured to perform spatio-temporal scale division on the target road network based on the historical traffic volume data of the target road network, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle;

[0167] A generation module 502, configured to generate trajectory feature data based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle;

[0168] A detection module 503, configured to use the trajectory feature data as the input of the anomaly detection model, and perform anomaly detection on the target vehicle based on the anomaly score value output by the anomaly detection model. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of VGAE with an added adversarial network.

[0169] The specific implementation manners of the various modules of the vehicle trajectory anomaly detection device can be referred to the description of the above vehicle trajectory anomaly detection method, and have similar beneficial effects, which will not be elaborated here.

[0170] An embodiment of the present invention further provides an electronic device. In combination with Figure 6 view, Figure 6 FIG. 6 is a schematic structural diagram of an embodiment of the electronic device provided by the present invention. The electronic device 600 includes a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the processor 601 executes the program, the vehicle trajectory anomaly detection method described above is implemented.

[0171] As a preferred embodiment, the above electronic device 600 further includes a display 603 for displaying the vehicle trajectory anomaly detection method executed by the processor 601 as described above.

[0172] Exemplarily, the computer program can be divided into one or more modules / units. One or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 600. For example, the computer program can be divided into the partitioning module 501, the generating module 502, and the detecting module 503 in the above embodiment. The specific functions of each module are as described above and will not be elaborated here one by one.

[0173] The electronic device 600 can be a desktop computer, a notebook, a palm computer, a smart phone, or other devices with an adjustable camera module.

[0174] Among them, the processor 601 may be an integrated circuit chip with signal processing capabilities. The above processor 601 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0175] Among them, the memory 602 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. Among them, the memory 602 is used to store a program. After receiving an execution instruction, the processor 601 executes the program. The method defined by the process disclosed in any embodiment of the foregoing embodiments of the present invention can be applied to the processor 601 or implemented by the processor 601.

[0176] Among them, the display 603 can be an LCD display screen or an LED display screen. For example, the display screen on a mobile phone.

[0177] It can be understood that Figure 6 The structure shown is only a schematic structural diagram of the electronic device 600, and the electronic device 600 may further include more or fewer components than Figure 6 those shown. Figure 6 Each component shown in can be implemented by hardware, software, or a combination thereof.

[0178] According to the electronic device provided in the foregoing embodiments of the present invention, it can be implemented with reference to the content specifically described in the vehicle trajectory anomaly detection method implemented according to the present invention, and has beneficial effects similar to those of the vehicle trajectory anomaly detection method described above, which will not be elaborated here.

[0179] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the vehicle trajectory anomaly detection method described above is implemented.

[0180] Generally speaking, the computer instructions for implementing the method of the present invention can be carried by any combination of one or more computer-readable storage media. A non-transitory computer-readable storage medium can include any computer-readable medium except for the signal propagating temporarily itself.

[0181] A computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection with one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0182] Computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. In particular, the Python language suitable for neural network computing and platform frameworks based on TensorFlow, PyTorch, etc. can be used. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0183] Those skilled in the art can understand that all or part of the processes of implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disc, a read-only memory, or a random access memory, etc.

[0184] The present invention discloses a method, apparatus, electronic device and storage medium for detecting abnormal vehicle trajectories. First, the target road network is divided in terms of spatio-temporal scales based on the historical traffic volume data of the target road network. Then, trajectory feature data is generated according to the spatio-temporal scale division result and the historical trajectory data of the target vehicle, realizing the extraction of multi-scale spatio-temporal information of the vehicle and fully mining the spatio-temporal feature information of the vehicle trajectory. Next, multiple VGAEs with adversarial networks are used to detect abnormal vehicle trajectories based on the trajectory feature data to ensure the accuracy of abnormal detection. In the process of detecting abnormal vehicle trajectories, the present invention fully considers the spatio-temporal feature information of the vehicle trajectory, thereby improving the accuracy of detecting abnormal vehicle trajectories.

[0185] As mentioned above, the above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for detecting abnormal vehicle trajectories, characterized in that, Including: Based on the historical traffic volume data of the target road network, perform spatio-temporal scale division on the target road network, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle; Based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle, generate trajectory feature data; Use the trajectory feature data as the input of the anomaly detection model, and based on the anomaly score value output by the anomaly detection model, perform anomaly detection on the target vehicle. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of VGAE with an added adversarial network.

2. The vehicle trajectory anomaly detection method according to claim 1, characterized in that, The performing spatio-temporal scale division on the target road network based on the historical traffic volume data of the target road network includes: Perform hierarchical clustering based on the similarity distance between adjacent road segments in the target road network until the number of road segments is less than or equal to the first preset number, to obtain the spatial scale division result of the target road network. The similarity distance between adjacent road segments is determined based on the traffic volume of two adjacent road segments at multiple preset times; Divide the historical traffic volume data of the target road network into multiple time periods based on a preset duration, and determine the traffic volume time mutation points in each time period based on the Pettitt algorithm; Divide each time period into two new time periods based on the determined traffic volume time mutation points, and perform division on the new time periods based on the Pettitt algorithm until the number of time periods is greater than or equal to the second preset number, to obtain the time scale division result of the target road network.

3. The vehicle trajectory anomaly detection method according to claim 1, wherein The generating trajectory feature data based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle includes: Based on the spatio-temporal scale division result of the target road network and the speed, time, and deflection angle information in the preprocessed historical trajectory data of the target vehicle, determine the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales; Based on the time scale division result of the target road network, determine the date label and peak period label of the target vehicle at different time scales; Based on the average speed, maximum speed, average acceleration, maximum acceleration, average direction deviation, and maximum direction deviation of the target vehicle at different spatial scales and time scales, and the date label and peak period label of the target vehicle at different time scales, generate trajectory feature data.

4. The vehicle trajectory anomaly detection method according to claim 2, wherein, The using the trajectory feature data as the input of the anomaly detection model and performing anomaly detection on the target vehicle based on the anomaly score value output by the anomaly detection model includes: Based on the spatial scale division result of the target road network, determine the adjacency matrix corresponding to the trajectory feature data, where the adjacency matrix is used to represent the adjacent relationship between road segments in the spatial scale division result of the target road network; Use the trajectory feature data and the adjacency matrix as the input of each anomaly detection sub-model to obtain the anomaly score value output by each anomaly detection sub-model; The anomaly score values output by each anomaly detection sub-model are weighted and averaged to obtain the anomaly score value output by the anomaly detection model. The weight of each anomaly detection sub-model is determined based on the Adaboost algorithm with the anomaly detection sub-model as the base detector; When the anomaly score value output by the anomaly detection model is greater than the preset threshold, it is determined that there is an anomaly in the trajectory of the target vehicle; When the anomaly score value output by the anomaly detection model is less than or equal to the preset threshold, it is determined that there is no anomaly in the trajectory of the target vehicle.

5. The vehicle trajectory anomaly detection method according to claim 4, wherein, The anomaly score value output by each anomaly detection sub-model is determined based on the difference between the trajectory feature data reconstructed by each anomaly detection sub-model and the input trajectory feature data, the probability value of the input trajectory feature data being real data, and the probability value of the trajectory feature data reconstructed by each anomaly detection sub-model being real data.

6. The vehicle trajectory anomaly detection method according to claim 4, wherein The determination of the weight of each anomaly detection sub-model includes: Using the anomaly detection sub-model as the base detector, based on the trajectory feature data of multiple sample vehicles, the preset sample weights, and the Adaboost algorithm, perform multiple iterations, and use the weight of the base detector obtained in each iteration as the weight of the corresponding anomaly sub-model.

7. The vehicle trajectory abnormal detection method according to claim 4, wherein, The weighted averaging of the anomaly score values output by each anomaly detection sub-model to obtain the anomaly score value output by the anomaly detection model includes: Obtain the anomaly score value output by the anomaly detection model based on the following formula: Among them, represents the anomaly score value output by the anomaly detection model, is the number of anomaly detection sub-models, represents the weight of the th anomaly detection sub-model, represents the anomaly score value output by the th anomaly detection sub-model.

8. A vehicle trajectory anomaly detection device, characterized in that, Including: A division module for performing spatio-temporal scale division on the target road network based on the historical traffic volume data of the target road network, where the target road network is the road network corresponding to the historical trajectory data of the target vehicle; A generation module for generating trajectory feature data based on the spatio-temporal scale division result of the target road network and the preprocessed historical trajectory data of the target vehicle; A detection module for using the trajectory feature data as the input of the anomaly detection model, and performing anomaly detection on the target vehicle based on the anomaly score value output by the anomaly detection model. The anomaly detection model includes multiple anomaly detection sub-models, and the anomaly detection sub-model is composed of VGAE with an added adversarial network.

9. An electronic device, characterized in that, Including a memory and a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the vehicle trajectory anomaly detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Stored thereon is a computer program, and when the computer program is executed by the processor, it implements the vehicle trajectory anomaly detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A RNN based Spatio Temporal Data Mining model for urban road Planning

    AU2020104112A4

  • DVGAE-GAN-based traffic road network data restoration method

    CN113033619A