Vehicle trajectory anomaly detection method and device based on trajectory clustering and electronic equipment
By analyzing smart beacon data using clustering methods in the intelligent transportation system, generating reference trajectories and trajectories to be inspected, the problem of vehicle trajectory detection is solved, and high-precision trajectory abnormality detection is achieved to ensure traffic safety.
Patent Information
- Application Number
- CN202411073229.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-06
AI Technical Summary
In intelligent traffic systems, vehicle trajectory characteristics cannot be directly recorded and analyzed like traditional video surveillance systems, making it difficult for traffic supervisors to accurately judge the normality of vehicle trajectory and road conditions, affecting road safety.
By obtaining the target vehicle feature vector and historical vehicle feature vector collected by the smart beacon data, the clustering method is used to generate the reference trajectory and the trajectory to be checked, and the similarity between the two is calculated to determine whether there is a trajectory abnormality in the vehicle.
It realizes rapid detection and analysis of vehicle trajectory, improves traffic safety, can accurately determine whether the vehicle has trajectory abnormalities, and locates abnormal positions, improving detection accuracy and targetedness.
Smart Images

Figure CN119128562A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of vehicle driving trajectory anomaly detection, and in particular relates to a vehicle trajectory anomaly detection method, device and electronic equipment based on trajectory clustering. Background Art
[0002] In recent years, relying on the rapid development of the Internet of Things, the intelligent transportation system has combined advanced control, sensing, communication and other functions with computer technology to act on the traffic management system, greatly improving the intelligence, safety and reliability of the transportation system. The continuous development of the technology and equipment of the intelligent transportation system will also provide strong support for the detection of abnormal traffic behavior, an important link in the intelligent transportation system.
[0003] However, in the emerging smart devices such as smart beacons, the trajectory characteristics of vehicles cannot be "seen" and recorded frame by frame like traditional video surveillance systems, but can only be recorded through sensor measurements separated by a certain distance. Therefore, when using these sensor measurements, it is often impossible to accurately analyze the normality of vehicle trajectories and real-time road conditions based solely on the experience of traffic supervisors.
[0004] Therefore, how to extract and analyze the various vehicle motion information returned by the beacon to quickly determine whether the vehicle has an abnormal trajectory is of great significance for ensuring safe road driving. This is why abnormal vehicle trajectory has become a key technology in the intelligent transportation system. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a vehicle trajectory anomaly detection method, device, electronic device and storage medium based on trajectory clustering. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a vehicle trajectory anomaly detection method based on trajectory clustering, the method comprising:
[0007] Obtain target feature vectors generated by each smart beacon set on the road side after collecting data from a target vehicle passing by, and obtain historical feature vectors corresponding to multiple historical vehicles of each smart beacon; wherein each feature vector contains elements including: the horizontal coordinate of the trajectory, the vertical coordinate of the trajectory, the speed, the time and the magnetic field strength when the vehicle passes the smart beacon;
[0008] For each smart beacon, cluster the same type of elements in all historical feature vectors of the smart beacon to obtain the cluster center of each type of element of the smart beacon;
[0009] 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 the element of this type; and each type of element of the target vehicle is connected according to the order of the smart beacons to obtain the to-be-tested trajectory corresponding to the element of this type;
[0010] By calculating the similarity between the reference trajectory and the trajectory to be checked corresponding to each type of element, it is determined whether the target vehicle has a trajectory abnormality.
[0011] In one embodiment of the present invention, for each smart beacon, when clustering the same type of elements in all historical feature vectors of the smart beacon, the clustering method used includes: k-means clustering algorithm.
[0012] In one embodiment of the present invention, with respect to magnetic field strength, the number of cluster centers of this type of element is set according to the number of vehicle types.
[0013] In one embodiment of the present invention, by calculating the similarity between the reference trajectory and the trajectory to be checked corresponding to each type of element, determining whether the target vehicle has a trajectory abnormality includes:
[0014] For each type of element, by calculating the similarity between the reference trajectory corresponding to the element and the trajectory to be detected, it is determined whether the target vehicle has a trajectory abnormality for the element;
[0015] If the target vehicle has an abnormal trajectory for at least one type of element, it is determined that the target vehicle has an abnormal trajectory.
[0016] In one embodiment of the present invention, for each type of element, by calculating the similarity between the reference trajectory corresponding to the type of element and the trajectory to be detected, determining whether the target vehicle has a trajectory abnormality for the type of element includes:
[0017] For this type of element, calculate the similarity value of a group of trajectory points located in the same position order in the reference trajectory and the trajectory to be tested;
[0018] If the similarity value is greater than a preset threshold, it is determined that for this type of element, there is a trajectory anomaly for the target vehicle at a position corresponding to the group of trajectory points.
[0019] In one embodiment of the present invention, calculating the similarity values of a group of trajectory points located in the same position order in the reference trajectory and the trajectory to be checked includes:
[0020] Based on the Euclidean distance between two trajectory points, the similarity values of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be tested are calculated.
[0021] In one embodiment of the present invention, based on the Euclidean distance between two trajectory points, the similarity values of a group of trajectory points in the reference trajectory and the trajectory to be checked that are located in the same position order are calculated, and the formula used is:
[0022]
[0023] Among them, T i represents the trajectory point in the reference trajectory, T j represents the track point in the track to be checked, S(T i ,T j ) indicates T i and T j The similarity value of 2 (T i ,T j ) indicates T i and T j The Euclidean distance of , σ represents the scaling factor determined according to the historical feature vector.
[0024] In a second aspect, an embodiment of the present invention provides a vehicle trajectory anomaly detection device based on trajectory clustering, the device comprising:
[0025] The data acquisition module is used to acquire the target feature vector generated by each smart beacon set on the road side after collecting data from the target vehicle passing by, and to acquire the historical feature vectors corresponding to multiple historical vehicles of each smart beacon; wherein each feature vector contains the elements including: the horizontal coordinate of the track when the vehicle passes the smart beacon, the vertical coordinate of the track, the speed, the time and the magnetic field strength;
[0026] A clustering module is used to cluster the same type of elements in all historical feature vectors of each smart beacon to obtain the cluster center of each type of elements of the smart beacon;
[0027] The trajectory determination module is used to connect the cluster centers of each type of elements according to the order of the smart beacons to obtain the reference trajectory corresponding to the elements of this type; and connect each type of elements of the target vehicle according to the order of the smart beacons to obtain the to-be-checked trajectory corresponding to the elements of this type;
[0028] The trajectory anomaly detection module is used to determine whether the target vehicle has a trajectory anomaly by calculating the similarity between 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 invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0030] The memory is used to store computer programs;
[0031] The processor is used to implement the steps of the vehicle trajectory anomaly detection method based on trajectory clustering provided by an embodiment of the present invention when executing the program stored in the memory.
[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle trajectory anomaly detection method based on trajectory clustering provided in an embodiment of the present invention are implemented.
[0033] Beneficial effects of the present invention:
[0034] Aiming at the problem of detecting abnormal vehicle driving trajectories in the transportation field, the present invention is based on the development of intelligent transportation systems and proposes a detection scheme for detecting abnormal vehicle trajectories using intelligent beacons, filling the gap in the field of intelligent beacon detection of vehicle driving trajectories in intelligent transportation systems. Aiming at the problem that abnormal trajectory features are difficult to detect, the present invention clusters historical vehicle data, determines the normal typical trajectories of elements of different categories as reference trajectories, and calculates the similarity between the reference trajectories corresponding to each type of element and the trajectory to be detected, so as to determine whether the target vehicle has an abnormal trajectory.
[0035] Furthermore, through the positioning of the smart beacon, when it is determined that the vehicle has an abnormal trajectory, that is, there may be abnormal driving behavior, the present invention can detect the abnormal trajectory of the vehicle and locate the position where the abnormality begins to occur.
[0036] Compared with vehicle abnormal trajectory detection algorithms in other fields, the fault detection algorithm designed by the present invention has higher fault detection accuracy and stronger pertinence, which is beneficial to ensuring traffic safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of a process flow of a vehicle trajectory anomaly detection method based on trajectory clustering provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a process of clustering and generating reference trajectory points in an embodiment of the present invention;
[0039] Figure 3 Schematic diagram of the process of adjusting and determining the proportional factor in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of a vehicle trajectory detection process in an embodiment of the present invention;
[0041] Figure 5 A schematic diagram of the structure of a vehicle trajectory anomaly detection device based on trajectory clustering provided by an embodiment of the present invention;
[0042] Figure 6 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0044] After analysis and research, the inventor determined that it is necessary to extract and analyze the various vehicle motion information returned by the beacon to obtain the corresponding vehicle trajectory that is easy to intuitively understand. At the same time, it is necessary to establish a normal vehicle motion trajectory standard according to the real-time road traffic information, so that the real-time trajectory of the vehicle can be accurately judged and whether the vehicle has abnormal behavior can be quickly determined. Based on the above concept, the embodiment of the present invention provides a vehicle trajectory anomaly detection method, device, electronic device and storage medium based on trajectory clustering.
[0045] It should be noted that the execution subject of the vehicle trajectory anomaly detection method based on trajectory clustering provided in the embodiment of the present invention may be a vehicle trajectory anomaly detection device based on trajectory clustering, and the device may be run in an electronic device. The electronic device may be a server or a terminal device, but is not limited thereto.
[0046] In a first aspect, an embodiment of the present invention provides a vehicle trajectory anomaly detection method based on trajectory clustering, such as Figure 1 As shown, the method may include the following steps:
[0047] S1, obtaining a target feature vector generated by each smart beacon set on the road side after collecting data of a target vehicle passing by, and obtaining a historical feature vector corresponding to multiple historical vehicles of each smart beacon;
[0048] In the embodiment of the present invention, multiple smart beacons can be set at a certain interval on one side of the road. Smart beacons are intelligent devices with sensing, computing and communication functions. They use the geomagnetic disturbances generated when a vehicle passes by to judge and calculate vehicle-related information such as the vehicle's passing time, speed and magnetic field strength.
[0049] The location of each smart beacon is set in advance, so the location is known. The starting point of the smart beacon deployment can be used as the origin of the two-dimensional coordinate axis. The smart beacon detects the geomagnetic disturbance signal of the vehicle passing through its range and determines the two-dimensional coordinates of each track point when the vehicle passes the smart beacon. The vehicle's track is composed of each track point in sequence.
[0050] For each trajectory point, its information is represented by a feature vector. Each feature vector contains the following elements: the horizontal coordinate of the trajectory, the vertical coordinate of the trajectory, the speed, the time and the magnetic field strength when the vehicle passes the smart beacon; the feature vector can be represented as T = (X, Y, V, T, M), where X, Y, V, T, M are the horizontal coordinate of the trajectory, the vertical coordinate of the trajectory, the speed, the time and the 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 when it passes the smart beacon is estimated by Kalman filtering; please refer to the relevant technical understanding for this part and will not be explained here.
[0052] Furthermore, the strength of the magnetic field when a vehicle passes by a smart beacon can be judged to determine the type of vehicle, such as a large car or a small car. Large and small cars can be pre-divided according to vehicle length and height. At the same time, smart beacons are integrated with target tracking algorithms and matching algorithms for vehicles, such as the Hungarian algorithm, so that different smart beacons can locate the trajectory point data of the same vehicle.
[0053] Therefore, in S1, on the one hand, the target feature vector generated by each smart beacon for the target vehicle passing by 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 vectors generated by each smart beacon for all historical vehicles passing by can be obtained, and these historical feature vectors are combined as a historical data set.
[0054] S2, for each smart beacon, clustering the same type of elements in all historical feature vectors of the smart beacon to obtain the cluster center of each type of element of the smart beacon;
[0055] Clustering is to divide data points with the same label into several categories or clusters so that data points in the same category have high similarity.
[0056] It can be understood that for historical data sets, since each smart beacon has a large number of vehicles passing by, the data obtained for each type of element corresponds to multiple vehicles. By clustering the data of the same type of elements of the surrounding vehicles, the cluster center of this type of element at the smart beacon can be obtained. The cluster center represents the normal trajectory point of this type of element simulated by many vehicles and can be used as a reference trajectory point.
[0057] In an optional implementation, for each smart beacon, when clustering the same type of elements in all historical feature vectors of the smart beacon, the clustering method used includes: k-means clustering algorithm. Of course, the clustering method used is not limited to this. The process of clustering to generate reference trajectory points can be seen in Figure 2 understand.
[0058] The five elements of trajectory abscissa, trajectory ordinate, speed, time and magnetic field strength may each have a cluster center.
[0059] In an optional implementation, for magnetic field strength, 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 large vehicles and small vehicles, so there can be two cluster centers of magnetic field strength, one for large vehicles and one for small vehicles. As for the target vehicle, since the magnitude of the magnetic field strength when it passes through the smart beacon can be judged to determine its vehicle type, then, when performing subsequent trajectory similarity calculations, the target vehicle's to-be-tested trajectory can be similarly calculated with the type-adapted reference trajectory, so that it can be more accurately determined whether the target vehicle has trajectory abnormalities.
[0060] S2, connecting the cluster centers of each type of elements according to the order of smart beacons to obtain the reference trajectory corresponding to the type of elements; and connecting each type of elements of the target vehicle according to the order of smart beacons to obtain the to-be-tested trajectory corresponding to the type of elements;
[0061] The reference trajectory corresponding to each type of element is regarded as a normal trajectory. It can be understood that if there are 2 cluster centers of magnetic field intensity and 1 cluster center of other elements, 6 reference trajectories and 5 to-be-tested trajectories can be obtained.
[0062] S3, determining whether the target vehicle has a trajectory abnormality by calculating the similarity between the reference trajectory and the trajectory to be checked corresponding to each type of element.
[0063] In an optional implementation manner, S3 may include:
[0064] S31, for each type of element, by calculating the similarity between the reference trajectory corresponding to the type of element and the trajectory to be checked, determining whether the target vehicle has a trajectory abnormality for the type of element;
[0065] S32: If the target vehicle has an abnormal trajectory for at least one type of element, it is determined that the target vehicle has an abnormal trajectory.
[0066] The embodiment of the present invention performs trajectory anomaly judgment on each type of element separately. When the judgment 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 method can reduce the probability of missing abnormal situations.
[0067] In an optional implementation manner, S31 may include:
[0068] S311, for the element of this type, calculating the similarity values of a group of trajectory points located in the same position order in the reference trajectory and the trajectory to be checked;
[0069] In an optional implementation manner, for S311, calculating similarity values of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be checked includes:
[0070] Based on the Euclidean distance between two trajectory points, the similarity values of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be tested are calculated.
[0071] For this type of element, the similarity value of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be checked can be the Euclidean distance between the two, or a value obtained by combining other data processing methods based on the Euclidean distance.
[0072] For example, in an optional implementation, based on the Euclidean distance between two trajectory points, the similarity values of a group of trajectory points in the reference trajectory and the trajectory to be tested that are located in the same position order are calculated, and the formula used may be:
[0073]
[0074] Among them, the above formula represents the Gaussian similarity function; T i represents the trajectory point in the reference trajectory, T j represents the track point in the track to be checked, S(T i ,T j ) indicates T i and T j The similarity value of 2 (T i ,T j ) indicates T i and T j , σ represents the 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 for this type of element, there is a trajectory anomaly at the position corresponding to the group of trajectory points of the target vehicle.
[0076] By measuring whether the similarity between the trajectory to be tested and the reference trajectory at each smart beacon has a large deviation, it is possible to determine whether the target vehicle has abnormal driving conditions.
[0077] The preset threshold can be determined based on a large amount of data of vehicles with normal trajectories and vehicles with abnormal trajectories. 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 the position corresponding to the group of trajectory points can be determined as the position where the trajectory anomaly occurs, which can be determined by the trajectory abscissa and trajectory ordinate in the target feature vector.
[0078] The following briefly describes the process of determining the scaling factor.
[0079] The embodiment of the present invention uses the normal trajectory data in the historical data set to perform simulation analysis on the method of the present invention after obtaining the historical data set, and uses a part of the abnormal trajectory data in the historical data set to perform verification testing 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 using the method of the present invention to generate a normal typical trajectory, and then the abnormal vehicle trajectory data set is brought into the real-time algorithm detection and verification. The proportional factor is adjusted until the data in the abnormal vehicle trajectory data set can be judged as abnormal and meets the preset detection accuracy. At this time, the proportional factor of the historical data set is determined. The adjustment and determination process of the proportional factor can be referred to Figure 3 understand.
[0081] Of course, for different historical data sets, the corresponding scaling factors need to be determined.
[0082] The present invention predetermines the corresponding proportional factor for the historical data set used, and can determine a relatively accurate proportional factor to determine the similarity calculation formula. Therefore, during the abnormality detection process, it can detect in real time whether there is an abnormality between the trajectory of the vehicle passing through the corresponding position of the smart beacon and the classic normal vehicle trajectory, thereby realizing abnormal detection of the vehicle during driving.
[0083] The vehicle trajectory anomaly detection method based on trajectory clustering provided in the embodiment of the present invention can be executed by any device with data processing capabilities, such as a computer. In an optional implementation, the vehicle trajectory anomaly detection method based on trajectory clustering can be executed by any smart beacon. As an element in the smart transportation system, the smart beacon collects and analyzes the trajectory data of vehicle movement in real time to detect possible abnormal trajectories and abnormally moving vehicles.
[0084] Furthermore, when it is determined that the target vehicle has an abnormal trajectory, an early warning process can be performed, such as giving an early warning to traffic system managers and feeding back the abnormal vehicle position, thereby preventing possible traffic accidents, improving the safety of highway traffic, and protecting the life of the driver. The specific vehicle trajectory detection process can be as follows Figure 4 shown.
[0085] In order to detect the abnormal vehicle driving trajectory in the transportation field, the present invention is based on the development of intelligent transportation systems and proposes a detection scheme for detecting abnormal vehicle trajectories using intelligent beacons, filling the gap in the field of intelligent beacon detection of vehicle driving trajectories in intelligent transportation systems. In order to solve the problem that abnormal trajectory features are difficult to detect, the present invention clusters historical vehicle data to determine the normal typical trajectories of elements of different categories as reference trajectories. By calculating the similarity between the reference trajectories and the trajectories to be detected corresponding to each type of element, it can be determined whether the target vehicle has an abnormal trajectory. And through the positioning of the intelligent beacon, when it is determined that the vehicle has an abnormal trajectory, that is, there may be abnormal driving behavior, the abnormal trajectory of the vehicle can be detected and the position where the abnormality begins to occur can be located. Compared with the abnormal vehicle trajectory detection algorithms in other fields, the fault detection designed by the present invention has higher accuracy and is more targeted, which is conducive to ensuring traffic safety.
[0086] In a second aspect, corresponding to the above method embodiment, the embodiment of the present invention further provides a vehicle trajectory anomaly detection device based on trajectory clustering, such as Figure 5 As shown, the device comprises:
[0087] The data acquisition module is used to acquire the target feature vector generated by each smart beacon set on the road side after collecting data from the target vehicle passing by, and to acquire the historical feature vectors corresponding to multiple historical vehicles of each smart beacon; wherein each feature vector contains the elements including: the horizontal coordinate of the track when the vehicle passes the smart beacon, the vertical coordinate of the track, the speed, the time and the magnetic field strength;
[0088] A clustering module is used to cluster the same type of elements in all historical feature vectors of each smart beacon to obtain the cluster center of each type of elements of the smart beacon;
[0089] The trajectory determination module is used to connect the cluster centers of each type of elements according to the order of the smart beacons to obtain the reference trajectory corresponding to the elements of this type; and connect each type of elements of the target vehicle according to the order of the smart beacons to obtain the to-be-checked trajectory corresponding to the elements of this type;
[0090] The trajectory anomaly detection module is used to determine whether the target vehicle has a trajectory anomaly by calculating the similarity between the reference trajectory and the trajectory to be detected corresponding to each type of element.
[0091] For the specific processing process of each module of the device, please refer to the relevant content of the first aspect and will not be repeated here.
[0092] In a third aspect, an embodiment of the present invention further provides an electronic device, such as Figure 6As shown, it 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 used to store computer programs;
[0094] The processor is used to implement the steps of any vehicle trajectory anomaly detection method based on trajectory clustering provided in the first aspect of the embodiment of the present invention when executing the program stored in the memory.
[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 ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0096] The communication interface is used for communication between the above electronic device and other devices.
[0097] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0098] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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.
[0099] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0100] In a fourth aspect, corresponding to the vehicle trajectory anomaly detection method based on trajectory clustering provided in the first aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any vehicle trajectory anomaly detection method based on trajectory clustering provided in the first aspect of the embodiment of the present invention.
[0101] As for the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A vehicle trajectory anomaly detection method based on trajectory clustering, characterized in that: include: Obtain target feature vectors generated by each smart beacon set on the road side after collecting data from a target vehicle passing by, and obtain historical feature vectors corresponding to multiple historical vehicles of each smart beacon; wherein each feature vector contains elements including: the horizontal coordinate of the trajectory, the vertical coordinate of the trajectory, the speed, the time and the magnetic field strength when the vehicle passes the smart beacon; For each smart beacon, cluster the same type of elements in all historical feature vectors of the smart beacon to obtain the cluster center of each type of element of the smart beacon; 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 the element of this type; and each type of element of the target vehicle is connected according to the order of the smart beacons to obtain the to-be-tested trajectory corresponding to the element of this type; By calculating the similarity between the reference trajectory and the trajectory to be checked corresponding to each type of element, it is determined whether the target vehicle has a trajectory abnormality.
2. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 1 is characterized in that: For each smart beacon, when clustering the same type of elements in all historical feature vectors of the smart beacon, the clustering methods used include: k-means clustering algorithm.
3. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 1 is characterized in that: For the magnetic field strength, the number of cluster centers of this type of element is set according to the number of vehicle types.
4. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 1 is characterized in that: By calculating the similarity between the reference trajectory and the trajectory to be checked corresponding to each type of element, it is determined whether the target vehicle has a trajectory abnormality, including: For each type of element, by calculating the similarity between the reference trajectory corresponding to the element and the trajectory to be detected, it is determined whether the target vehicle has a trajectory abnormality for the element; If the target vehicle has an abnormal trajectory for at least one type of element, it is determined that the target vehicle has an abnormal trajectory.
5. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 4 is characterized in that: For each type of element, by calculating the similarity between the reference trajectory corresponding to the type of element and the trajectory to be detected, it is determined whether the target vehicle has a trajectory abnormality for the type of element, including: For this type of element, calculate the similarity value of a group of trajectory points located in the same position order in the reference trajectory and the trajectory to be tested; If the similarity value is greater than a preset threshold, it is determined that for this type of element, there is a trajectory anomaly for the target vehicle at a position corresponding to the group of trajectory points.
6. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 5 is characterized in that: Calculate the similarity values of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be tested, including: Based on the Euclidean distance between two trajectory points, the similarity values of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be tested are calculated.
7. The vehicle trajectory anomaly detection method based on trajectory clustering according to claim 6 is characterized in that: Based on the Euclidean distance between two trajectory points, the similarity value of a group of trajectory points in the same position order in the reference trajectory and the trajectory to be tested is calculated. The formula used is: Among them, T i represents the trajectory point in the reference trajectory, T j represents the track point in the track to be checked, S(T i ,T j ) indicates T i and T j The similarity value of 2 (T i ,T j ) indicates T i and T j The Euclidean distance of , σ represents the scaling factor determined according to the historical feature vector.
8. A vehicle trajectory anomaly detection device based on trajectory clustering, characterized in that: include: The data acquisition module is used to acquire the target feature vector generated by each smart beacon set on the road side after collecting data from the target vehicle passing by, and to acquire the historical feature vectors corresponding to multiple historical vehicles of each smart beacon; wherein each feature vector contains the elements including: the horizontal coordinate of the track when the vehicle passes the smart beacon, the vertical coordinate of the track, the speed, the time and the magnetic field strength; A clustering module is used to cluster the same type of elements in all historical feature vectors of each smart beacon to obtain the cluster center of each type of elements of the smart beacon; The trajectory determination module is used to connect the cluster centers of each type of elements according to the order of the smart beacons to obtain the reference trajectory corresponding to the elements of this type; and connect each type of elements of the target vehicle according to the order of the smart beacons to obtain the to-be-checked trajectory corresponding to the elements of this type; The trajectory anomaly detection module is used to determine whether the target vehicle has a trajectory anomaly by calculating the similarity between the reference trajectory and the trajectory to be detected corresponding to each type of element.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-7 when executing the program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Learning and anomaly detection method based on multi-feature motion modes of vehicle traces
CN103605362A
Trajectory outlier detection method based on wide-area distributed traffic system
CN104778355A
Lane detection
CN106922176A
Anomaly detection
CN115718874A
Abnormality analysis method and device based on artificial intelligence, equipment and storage medium
CN116796140A
Cited By
Abnormal path behavior detection method and device
CN116127374A
Abnormal path behavior detection method and device
CN116127374B
