Trajectory clustering-based vehicle trajectory anomaly detection method, device and electronic equipment

By using a trajectory clustering method, the similarity of vehicle trajectories is calculated using feature vectors generated by smart beacons and clustering algorithms. This solves the problem of anomaly detection in vehicle trajectories in intelligent transportation systems, achieves high-precision anomaly detection and localization, and improves traffic safety.

CN119128562BActive Publication Date: 2026-02-06XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411073229.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2026-02-06
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

In intelligent transportation systems, the vehicle trajectory characteristics recorded by smart beacons cannot be directly observed like traditional video surveillance systems. This makes it difficult for traffic regulators to accurately analyze the normality of vehicle trajectories and real-time road conditions. How to quickly determine whether a vehicle has an abnormal trajectory has become a key issue.

Method used

By acquiring the target and historical feature vectors generated by smart beacons, the k-means clustering algorithm is used to determine the trajectory cluster centers, the similarity between the reference trajectory and the trajectory to be inspected is calculated, and the Euclidean distance and similarity formula are used to determine trajectory anomalies.

Benefits of technology

It enables precise anomaly detection of vehicle trajectories, improving detection accuracy and targeting, and can promptly locate abnormal positions to prevent traffic accidents and ensure road safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128562B_ABST
    Figure CN119128562B_ABST
Patent Text Reader

Abstract

The application discloses a kind of vehicle trajectory anomaly detection method, device and electronic equipment based on trajectory clustering, method includes: obtaining the target feature vector generated after each intelligent beacon carries out data collection to target vehicle, and obtains the historical feature vector corresponding to multiple historical vehicles;Each feature vector contains element including trajectory horizontal coordinate, speed, time and magnetic field intensity when vehicle passes through intelligent beacon;To each intelligent beacon, the same element clustering in all historical feature vectors thereof is obtained, and the clustering center thereof for each element is obtained;The clustering center of each element is connected according to the order of intelligent beacon to obtain reference trajectory;Each element of target vehicle is connected according to the order of intelligent beacon to obtain the trajectory to be detected;Whether target vehicle exists trajectory anomaly is determined by similarity calculation to the reference trajectory and the trajectory to be detected of each element.The application can judge whether vehicle exists trajectory anomaly to the beacon returned vehicle motion information.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of vehicle trajectory anomaly detection, and particularly relates to a vehicle trajectory anomaly detection method and device based on trajectory clustering and an electronic device. BACKGROUND

[0002] In recent years, intelligent transportation systems rely on the rapid development of the Internet of Things, combine advanced control, sensing, communication and other functions with computer technology, and act on the traffic management system, greatly improving the intelligence, safety and reliability of the transportation system. The continuous development of intelligent transportation system technology and equipment will also provide strong support for the detection of traffic abnormal behavior, an important part of intelligent transportation systems.

[0003] However, in emerging intelligent devices such as intelligent beacons, the trajectory characteristics of vehicles cannot be "seen" and recorded frame by frame like traditional video monitoring systems, but can only be recorded through individual sensor measurements with a certain distance. Therefore, when using these sensor measurements, relying solely on the experience of traffic supervisors to make judgments often cannot accurately analyze the trajectory normality of vehicles and real-time road conditions.

[0004] Therefore, how to extract and analyze the various vehicle motion information returned by the beacon to quickly determine whether the vehicle has a trajectory anomaly is of great significance to ensure safe driving on the road, and this is also the reason why vehicle abnormal trajectory has become a key technology in intelligent transportation systems. SUMMARY

[0005] To solve the above problems in the prior art, the present application provides a vehicle trajectory anomaly detection method and device based on trajectory clustering, an electronic device and a storage medium. The technical problem to be solved by the present application is solved by the following technical solutions:

[0006] In a first aspect, the present application provides a vehicle trajectory anomaly detection method based on trajectory clustering, which comprises:

[0007] Obtaining a target feature vector generated by each intelligent beacon arranged on the side of the road after data collection on a target vehicle passing through, and obtaining a historical feature vector corresponding to a plurality of historical vehicles for each intelligent beacon; wherein the elements contained in each feature vector include: trajectory horizontal coordinates, trajectory vertical coordinates, speed, time and magnetic field strength of the vehicle passing through the intelligent beacon;

[0008] For each intelligent beacon, the same type of elements in all historical feature vectors of the intelligent beacon are clustered to obtain the cluster center of each type of element for the intelligent beacon;

[0009] connect the cluster centers of each type of element according to the order of the wisdom beacons to obtain a reference trajectory corresponding to the type of element; and connect each type of element of the target vehicle according to the order of the wisdom beacons to obtain a to-be-inspected trajectory corresponding to the type of element;

[0010] By performing similarity calculation on the reference trajectory and the to-be-inspected trajectory corresponding to each type of element, it is determined whether the target vehicle has trajectory anomaly.

[0011] In an embodiment of the present application, for each wisdom beacon, when clustering the same type of element in all historical feature vectors of the wisdom beacon, the clustering method used includes a k-means clustering algorithm.

[0012] In an embodiment of the present application, for the magnetic field strength, the number of cluster centers of the type of element is set according to the number of vehicle types.

[0013] In an embodiment of the present application, by performing similarity calculation on the reference trajectory and the to-be-inspected trajectory corresponding to each type of element, it is determined whether the target vehicle has trajectory anomaly, including:

[0014] For each type of element, by calculating the similarity of the reference trajectory and the to-be-inspected trajectory corresponding to the type of element, it is determined whether the target vehicle has trajectory anomaly for the type of element;

[0015] If the target vehicle has trajectory anomaly for at least one type of element, it is determined that the target vehicle has trajectory anomaly.

[0016] In an embodiment of the present application, for each type of element, by calculating the similarity of the reference trajectory and the to-be-inspected trajectory corresponding to the type of element, it is determined whether the target vehicle has trajectory anomaly for the type of element, including:

[0017] For the type of element, the similarity value of a group of trajectory points located in the same position order in the reference trajectory and the to-be-inspected trajectory is calculated;

[0018] If the similarity value is greater than a preset threshold, it is determined that the target vehicle has trajectory anomaly at the position corresponding to the group of trajectory points for the type of element.

[0019] In an embodiment of the present application, the similarity value of a group of trajectory points located in the same position order in the reference trajectory and the to-be-inspected trajectory is calculated, including:

[0020] The similarity value of a group of trajectory points located in the same position order in the reference trajectory and the to-be-inspected trajectory is calculated based on the Euclidean distance of two trajectory points.

[0021] In one embodiment of the present application, the similarity value of a group of trajectory points in the same position sequence in the reference trajectory and the trajectory to be detected is calculated based on the Euclidean distance of the two trajectory points, and the formula used is:

[0022]

[0023] wherein T i represents a trajectory point in the reference trajectory, T j represents a trajectory point in the trajectory to be detected, S(T i , T j ) represents the similarity value of T i and T j , d 2 (T i , T j ) represents the Euclidean distance of T i and T j , and σ represents a scale factor determined according to the historical feature vector.

[0024] In a second aspect, an embodiment of the present application provides a vehicle trajectory anomaly detection device based on trajectory clustering, and the device comprises:

[0025] a data acquisition module configured to acquire target feature vectors generated by each intelligent beacon arranged on a road side after data collection on a target vehicle passing by, and acquire historical feature vectors of a plurality of historical vehicles corresponding to each intelligent beacon, wherein each feature vector contains elements including trajectory horizontal coordinates, trajectory vertical coordinates, speed, time and magnetic field strength of the vehicle when passing by the intelligent beacon;

[0026] a clustering module configured to cluster the same type of elements in all historical feature vectors of each intelligent beacon to obtain a clustering center of each type of element for the intelligent beacon;

[0027] a trajectory determination module configured to connect the clustering center of each type of element according to the order of the intelligent beacon to obtain a reference trajectory corresponding to the type of element, and connect each type of element of the target vehicle according to the order of the intelligent beacon to obtain a trajectory to be detected corresponding to the type of element;

[0028] a trajectory anomaly detection module configured to determine whether the target vehicle has a trajectory anomaly by performing similarity calculation on the reference trajectory and the trajectory to be detected corresponding to each type of element.

[0029] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;

[0030] the memory is configured to store a computer program.

[0031] The processor is configured to execute the program stored in the memory, and implement the steps of the vehicle trajectory anomaly detection method based on trajectory clustering provided by the embodiment of the application.

[0032] In a fourth aspect, the embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores a computer program.

[0033] The application has the following beneficial effects:

[0034] For the detection of vehicle trajectory anomaly in the field of transportation, the application is based on the development of intelligent transportation system, and proposes a detection scheme for detecting vehicle abnormal trajectory by using intelligent beacon, which fills the blank of intelligent beacon in the field of vehicle trajectory detection in intelligent transportation system.

[0035] In addition, by positioning of the intelligent beacon, when it is determined that the vehicle has trajectory anomaly, i.e., there may be abnormal driving behavior, the application can detect the abnormal trajectory of the vehicle and position the position where the abnormality occurs.

[0036] Compared with vehicle abnormal trajectory detection algorithms in other fields, the fault detection accuracy of the application is higher and more targeted, which is conducive to ensuring traffic safety. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A flowchart of a vehicle trajectory anomaly detection method based on trajectory clustering provided by the embodiment of the application;

[0038] Figure 2 A flowchart of generating reference trajectory points by clustering in the embodiment of the application;

[0039] Figure 3 A schematic diagram of the adjustment and determination process of the proportion factor in the embodiment of the application;

[0040] Figure 4 A flowchart of a vehicle trajectory detection process in the embodiment of the application;

[0041] Figure 5 A structure diagram of a vehicle trajectory anomaly detection device based on trajectory clustering provided by the embodiment of the application;

[0042] Figure 6 Fig. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] The present application will be further described in detail below with specific embodiments, but the embodiments of the present application are not limited thereto.

[0044] The inventors determined through analysis and research that currently, various vehicle motion information returned by beacons needs to be extracted and analyzed to obtain corresponding vehicle trajectories that are easy to intuitively understand, and a normal vehicle motion trajectory standard needs to be established according to real-time road traffic information, so as to accurately judge the real-time trajectory of a vehicle and quickly determine whether the vehicle has abnormal behavior. Based on the above concept, an embodiment of the present application provides a vehicle trajectory anomaly detection method and device based on trajectory clustering, an electronic device, and a storage medium.

[0045] It should be noted that the execution subject of the vehicle trajectory anomaly detection method based on trajectory clustering provided by an embodiment of the present application can be a vehicle trajectory anomaly detection device based on trajectory clustering, which can run in an electronic device. The electronic device can be a server or a terminal device, but is not limited thereto.

[0046] In a first aspect, an embodiment of the present application provides a vehicle trajectory anomaly detection method based on trajectory clustering, as shown in Figure 1 The method can include the following steps:

[0047] S1, obtaining a target feature vector generated by each intelligent beacon arranged on a side of a road after data collection on a target vehicle passing through, and obtaining a historical feature vector corresponding to a plurality of historical vehicles of each intelligent beacon;

[0048] In an embodiment of the present application, a plurality of intelligent beacons can be arranged at a certain interval on one side of a road. The intelligent beacon is an intelligent device with functions of sensing, computing, and communication, which uses the geomagnetic disturbance generated when a vehicle passes through to judge and calculate vehicle-related information such as passing time, speed, and magnetic field strength.

[0049] Each intelligent beacon is placed at a position set in advance, so the position is known. The starting point of the deployed intelligent beacon can be used as the origin of the two-dimensional coordinate axis. The intelligent beacon detects the geomagnetic disturbance signal of the vehicle passing through in its range to determine the two-dimensional coordinates of each trajectory point when the vehicle passes through the intelligent beacon. The trajectory of the vehicle is sequentially formed by each trajectory point.

[0050] For each trajectory point, its information is represented by a feature vector. Each feature vector contains elements including: trajectory horizontal coordinate, trajectory vertical coordinate, speed, time and magnetic field strength when the vehicle passes the smart beacon; the feature vector can be represented as T=(X, Y, V, T, M), wherein X, Y, V, T and M are trajectory horizontal coordinate, trajectory vertical coordinate, speed, time and magnetic field strength respectively.

[0051] Among them, the time when the vehicle passes the smart beacon is mainly judged by the double window threshold algorithm; the speed of the vehicle passing the smart beacon is estimated by Kalman filtering; please refer to the relevant technical understanding for this part, which is not described here.

[0052] Further, the size of the magnetic field strength when the vehicle passes the smart beacon can be judged to determine the vehicle type, such as large or small vehicles, etc. Large and small vehicles can be pre-divided according to the length and height of the vehicle; at the same time, the smart beacon integrates the target tracking algorithm and matching algorithm for vehicles, such as the Hungarian algorithm, so that different smart beacons can locate the same vehicle trajectory point data.

[0053] Therefore, in S1, on the one hand, the target feature vector generated by each smart beacon for the target vehicle passing through can be obtained, and the target vehicle is the vehicle that needs to be detected for trajectory anomaly. On the other hand, the historical feature vector generated by each smart beacon for all historical vehicles passing through can be obtained, and these historical feature vectors are combined as a historical data set.

[0054] S2, for each smart beacon, the same class elements in all historical feature vectors of the smart beacon are clustered to obtain the cluster center of each class element of the smart beacon;

[0055] The so-called clustering is to divide data points with the same label into several categories or clusters, so that the data points in the same category have high similarity.

[0056] It can be understood that for the historical data set, each smart beacon has a large number of vehicles passing through, and the data corresponding to each class element obtained by the smart beacon is for multiple vehicles. By clustering the same class element data of the surrounding vehicles, the cluster center of the same class element at the smart beacon can be obtained, which represents the normal trajectory point simulated by the same class element through many vehicles, and can be used as a reference trajectory point.

[0057] In an optional implementation, for each smart beacon, when the same class elements in all historical feature vectors of the smart beacon are clustered, the clustering method includes: k-means clustering algorithm. Of course, the clustering method used is not limited to this. The process of generating reference trajectory points by clustering can be referred to Figure 2 understanding.

[0058] For the five types of elements of trajectory abscissa, trajectory ordinate, speed, time and magnetic field intensity, each type of element can have a cluster center.

[0059] In an optional embodiment, for the magnetic field intensity, the number of cluster centers of this type of element is set according to the number of vehicle types. For example, the vehicle types can be preset as two types of large vehicle and small vehicle, and then the magnetic field intensity can have two cluster centers, respectively for the large vehicle and the small vehicle. For the target vehicle, since the size of the magnetic field intensity when the target vehicle passes through the smart beacon can be determined to determine the vehicle type of the target vehicle, when the trajectory similarity calculation is performed subsequently, the to-be-inspected trajectory of the target vehicle can be calculated with the reference trajectory of the type-adapted trajectory, so that whether the target vehicle has a trajectory anomaly can be determined more accurately.

[0060] S2, connecting the cluster center of each type of element according to the order of the smart beacon to obtain the reference trajectory corresponding to the type of element; and connecting each type of element of the target vehicle according to the order of the smart beacon to obtain the to-be-inspected trajectory corresponding to the type of element;

[0061] The reference trajectory corresponding to each type of element is regarded as a normal trajectory. It can be understood that if the cluster center of the magnetic field intensity is two and the cluster center of the remaining elements is one, six reference trajectories and five to-be-inspected trajectories can be obtained.

[0062] S3, determining whether the target vehicle has a trajectory anomaly by calculating the similarity of the reference trajectory and the to-be-inspected trajectory corresponding to each type of element.

[0063] In an optional embodiment, S3 can include:

[0064] S31, for each type of element, determining whether the target vehicle has a trajectory anomaly for the type of element by calculating the similarity of the reference trajectory and the to-be-inspected trajectory corresponding to the type of element;

[0065] S32, if the target vehicle has a trajectory anomaly for at least one type of element, determining that the target vehicle has a trajectory anomaly.

[0066] The embodiment of the present application separately determines the trajectory anomaly for each type of element, and when the determination result of at least one type of element shows that the target vehicle has a trajectory anomaly, it is determined that the target vehicle has a trajectory anomaly. This way can reduce the probability of missing the abnormal situation.

[0067] In an optional embodiment, S31 can include:

[0068] S311, for the type of element, calculating the similarity value of a group of trajectory points in the same position order in the reference trajectory and the to-be-inspected trajectory.

[0069] In an optional implementation, for S311, the similarity value of a set of trajectory points in the same position sequence in the reference trajectory and the to-be-detected trajectory is calculated, including:

[0070] The similarity value of a set of trajectory points in the same position sequence in the reference trajectory and the to-be-detected trajectory is calculated based on the Euclidean distance of two trajectory points.

[0071] For this type of element, the similarity value of a set of trajectory points in the same position sequence in the reference trajectory and the to-be-detected trajectory can be the Euclidean distance between them, or a value obtained by integrating the remaining data processing methods based on the Euclidean distance.

[0072] For example, in an optional implementation, the similarity value of a set of trajectory points in the same position sequence in the reference trajectory and the to-be-detected trajectory is calculated based on the Euclidean distance of two trajectory points, and the formula used can be:

[0073]

[0074] wherein the above formula represents a Gaussian similarity function; T i represents a trajectory point in the reference trajectory, T j represents a trajectory point in the to-be-detected trajectory, S(T i ,T j ) represents the similarity value of T i and T j , d 2 (T i ,T j ) represents the Euclidean distance of T i and T j , and σ represents a scale factor determined according to the historical feature vector. The determination process of the scale factor is described below.

[0075] S312, if the similarity value is greater than a preset threshold, it is determined that the target vehicle has a trajectory anomaly at the position corresponding to the set of trajectory points for this type of element.

[0076] By measuring whether the similarity of the to-be-detected trajectory and the reference trajectory at each intelligent beacon has a large deviation, it is determined whether the target vehicle has an abnormal driving condition.

[0077] The preset threshold can be determined according to a large amount of data of normal trajectory vehicles and abnormal trajectory vehicles. If the similarity value is greater than the preset threshold, it can be determined that the target vehicle has a trajectory anomaly for this type of element, and it can be determined that the position corresponding to the set of trajectory points is the position where the trajectory anomaly occurs, which can be determined by the trajectory horizontal coordinate and the trajectory vertical coordinate in the target feature vector.

[0078] The following will briefly describe the determination process of the proportion factor.

[0079] After obtaining the historical data set, the normal trajectory data in the historical data set is used to simulate and analyze the method of the application, and a part of the abnormal trajectory data in the historical data set is used for verification test and adjustment to ensure the accuracy and robustness of the algorithm.

[0080] Specifically, after obtaining the historical data set, the normal vehicle trajectory data set and the abnormal vehicle trajectory data set are divided according to the data characteristics of the vehicle trajectory. The normal vehicle trajectory data set is clustered to generate a normal typical trajectory, and then the abnormal vehicle trajectory data set is brought in for real-time algorithm detection and verification. By adjusting the proportion factor until the data in the abnormal vehicle trajectory data set can be judged as abnormal and meet the preset detection accuracy, the proportion factor of the historical data set is determined. The adjustment and determination process of the proportion factor can be referred to Figure 3 understand.

[0081] Of course, for different historical data sets, the corresponding proportion factor needs to be determined.

[0082] The application determines the corresponding proportion factor of the historical data set in advance, which can determine a relatively accurate proportion factor to determine the similarity calculation formula, so that the abnormal situation between the trajectory of the vehicle at the corresponding position of the intelligent beacon and the classic normal vehicle trajectory can be detected in real time during the abnormal detection process, thereby realizing the abnormal detection of the vehicle during driving.

[0083] The vehicle trajectory anomaly detection method based on trajectory clustering provided by the embodiment of the application can be executed by any device with data processing capability, such as a computer. In an optional implementation, the vehicle trajectory anomaly detection method based on trajectory clustering can be executed by any intelligent beacon. As an element in the intelligent transportation system, the intelligent beacon collects trajectory data of vehicle movement in real time and performs real-time analysis to detect possible abnormal trajectories and abnormal driving vehicles.

[0084] Further, when it is determined that the target vehicle has a trajectory anomaly, a warning process can be performed, such as warning the traffic system manager and feeding back the position of the vehicle with the anomaly, so as to prevent possible traffic accidents, improve the safety of highway traffic, and protect the life safety of the driver. The specific vehicle trajectory detection process can be as shown in Figure 4 .

[0085] For the problem of vehicle trajectory anomaly detection in the field of transportation, the present application is based on the development of intelligent transportation system, and proposes a detection scheme for detecting vehicle abnormal trajectory by using intelligent beacon, which fills the blank of intelligent beacon in the field of vehicle trajectory detection in intelligent transportation system. In view of the problem that the characteristics of abnormal trajectory are difficult to detect, the present application determines the normal typical trajectory of different categories of elements as the reference trajectory by clustering the historical vehicle data, and determines whether the target vehicle has trajectory anomaly by calculating the similarity between the reference trajectory and the to-be-detected trajectory corresponding to each category of elements. And through the positioning of the intelligent beacon, when it is determined that the vehicle has trajectory anomaly, that is, there may be abnormal driving behavior, the abnormal trajectory of the vehicle can be detected, and the position where the anomaly starts can be located. Compared with other vehicle abnormal trajectory detection algorithms, the fault detection accuracy of the present application is higher, the pertinence is stronger, and the traffic safety can be ensured.

[0086] In a second aspect, corresponding to the method embodiments, the present application also provides a vehicle trajectory anomaly detection device based on trajectory clustering, as shown in Figure 5 The device comprises:

[0087] A data acquisition module is configured to acquire the target feature vector generated by each intelligent beacon arranged on the side of the road after collecting data of the target vehicle passing by, and acquire the historical feature vector of each intelligent beacon corresponding to a plurality of historical vehicles. Each feature vector contains elements including trajectory horizontal coordinates, trajectory vertical coordinates, speed, time and magnetic field strength when the vehicle passes through the intelligent beacon.

[0088] A clustering module is configured to cluster the same category elements in all historical feature vectors of each intelligent beacon, and obtain the clustering center of each category element for the intelligent beacon.

[0089] A trajectory determination module is configured to connect the clustering center of each category element according to the order of the intelligent beacon, and obtain the reference trajectory corresponding to the category element. The trajectory determination module is also configured to connect each category element of the target vehicle according to the order of the intelligent beacon, and obtain the to-be-detected trajectory corresponding to the category element.

[0090] A trajectory anomaly detection module is configured to calculate the similarity between the reference trajectory and the to-be-detected trajectory corresponding to each category element, and determine whether the target vehicle has trajectory anomaly.

[0091] For the specific processing process of each module of the device, please refer to the related content of the first aspect, which will not be repeated here.

[0092] In a third aspect, the present application also provides an electronic device, as shown in Figure 6As shown, the electronic device includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 communicate with each other through the communication bus 604,

[0093] The memory is configured to store a computer program.

[0094] The processor is configured to execute the program stored in the memory to implement the steps of any trajectory clustering-based vehicle trajectory anomaly detection method provided in the first aspect of the embodiments of the present application.

[0095] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0096] The communication interface is configured to communicate between the above electronic device and other devices.

[0097] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0098] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0099] The method provided by the embodiment of the present application can be applied to an electronic device. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. Herein, no limitation is made, and any electronic device that can implement the present application falls within the protection scope of the present application.

[0100] In a fourth aspect, corresponding to the vehicle trajectory anomaly detection method based on trajectory clustering provided in the first aspect, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of any vehicle trajectory anomaly detection method based on trajectory clustering provided in the first aspect of the embodiment of the present application are implemented.

[0101] For the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0102] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in the present application.

[0103] The above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application falls within the protection scope of the present application.

Claims

1. A trajectory clustering based vehicle trajectory anomaly detection method, characterized in that, include: The system obtains target feature vectors generated by each smart beacon set up on the roadside after collecting data on passing target vehicles, and obtains historical feature vectors of multiple historical vehicles corresponding to each smart beacon. Each feature vector contains elements including: the abscissa of the vehicle's trajectory when passing the smart beacon, the ordinate of the trajectory, the speed, the time, and the magnetic field strength. For each smart beacon, cluster the elements of the same class in all historical feature vectors of that smart beacon to obtain the cluster center for each class of elements; The cluster centers of each type of element are connected according to the order of the smart beacons to obtain the reference trajectory corresponding to that type of element; and the elements of the target vehicle are connected according to the order of the smart beacons to obtain the trajectory to be detected corresponding to that type of element. By calculating the similarity between the reference trajectory and the trajectory to be inspected corresponding to various elements, it can be determined whether the target vehicle has an abnormal trajectory. 2.The trajectory cluster based vehicle trajectory anomaly detection method according to claim 1, characterized in that, When clustering elements of the same class among all historical feature vectors of each smart beacon, the clustering method used includes the k-means clustering algorithm. 3.The trajectory cluster based vehicle trajectory anomaly detection method according to claim 1, wherein, The number of cluster centers for this type of element is set according to the number of vehicle types, depending on the magnetic field strength. 4.The trajectory cluster based vehicle trajectory anomaly detection method according to claim 1, wherein, By calculating the similarity between the reference trajectory and the trajectory to be inspected corresponding to various elements, it is determined whether the target vehicle has trajectory anomalies, including: For each type of element, the similarity between the reference trajectory and the trajectory to be inspected corresponding to that type of element is calculated to determine whether the target vehicle has an abnormal trajectory for that type of element. If the target vehicle exhibits trajectory anomalies for at least one type of element, then the target vehicle is determined to have trajectory anomalies. 5.The trajectory cluster based vehicle trajectory anomaly detection method according to claim 4, characterized in that, For each type of element, the similarity between the reference trajectory and the trajectory to be inspected corresponding to that type of element is calculated to determine whether the target vehicle has an abnormal trajectory for that type of element, including: For this type of element, calculate the similarity value of a set of trajectory points in the same position order in the reference trajectory and the trajectory to be inspected; If the similarity value is greater than a preset threshold, it is determined that for this type of element, the target vehicle has a trajectory anomaly at the location corresponding to the trajectory points in that group. 6.The trajectory cluster based vehicle trajectory anomaly detection method according to claim 5, characterized in that, Calculate the similarity score of a set of trajectory points in the reference trajectory and the trajectory to be inspected that are in the same positional order, including: Based on the Euclidean distance between two trajectory points, the similarity value of a set of trajectory points in the same position order in the reference trajectory and the trajectory to be inspected is calculated.

7. The trajectory cluster based vehicle trajectory anomaly detection method of claim 6, wherein, Based on the Euclidean distance between two trajectory points, the similarity score of a set of trajectory points in the same position order in the reference trajectory and the trajectory to be detected is calculated using the following formula: wherein T i represents a trajectory point in the reference trajectory, T j represents a trajectory point in the trajectory to be detected, S(T i , T j ) represents a similarity value of T i and T j , d 2 (T i , T j ) represents the Euclidean distance of T i and T j , and σ represents a scale factor determined according to a historical feature vector.

8. A trajectory cluster-based vehicle trajectory anomaly detection apparatus, characterized by, include: The data acquisition module is used to acquire the target feature vectors generated by the smart beacons set up on the roadside after collecting data from passing target vehicles, and to acquire the historical feature vectors of each smart beacon corresponding to multiple historical vehicles; wherein, each feature vector contains the following elements: the abscissa of the vehicle's trajectory when passing the smart beacon, the ordinate of the trajectory, the speed, the time, and the magnetic field strength. The clustering module is used to cluster elements of the same class in all historical feature vectors of each smart beacon to obtain the cluster center for each class of elements of the smart beacon; The trajectory determination module is configured to connect the cluster centers of each type of element according to the order of the smart beacons to obtain a reference trajectory corresponding to the type of element; and connect each type of element of the target vehicle according to the order of the smart beacons to obtain a to-be-inspected trajectory corresponding to the type of element. The trajectory anomaly detection module is configured to determine whether the target vehicle has a trajectory anomaly by performing similarity calculation on the reference trajectory and the to-be-inspected trajectory corresponding to each type of element.

9. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory can communicate with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored in the memory to implement the method steps of any one of claims 1-7.

10. A computer readable storage medium, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Anomaly detection

    CN115718874A

  • Abnormality analysis method and device based on artificial intelligence, equipment and storage medium

    CN116796140A