Dangerous chemical vehicle abnormal behavior detection method based on multi-view spatio-temporal data mining
Through a multi-view spatiotemporal data mining model, abnormal behavior detection of hazardous chemical vehicles in the toll station area of the expressway is solved, and the problem of inaccurate detection in the prior art is achieved, and the abnormal behavior of vehicles is accurately identified and risk prevention is achieved.
Patent Information
- Application Number
- CN202411882181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The prior art in the art is inaccurate in detecting abnormal behaviors of hazardous chemical vehicles in the toll station area of highways in complex environments, making it difficult to achieve accurate and real-time identification.
The detection method based on multi-view spatiotemporal data mining is adopted, and multi-view data is collected through the physical perception layer, and multi-view fractional domain data of the vehicle trajectory is constructed using fractional Fourier transform, and abnormal events are identified through multi-view spatiotemporal data mining model.
It improves the accurate identification of abnormal behaviors of hazardous chemical vehicles, enhances the understanding of dynamic changes in vehicle trajectory, and can promptly detect and prevent risks, thereby improving the safety management level of the transportation industry.
Smart Images

Figure CN119807267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic safety monitoring, and in particular to a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining. Background Art
[0002] With the rapid development of my country's economy, the demand for hazardous chemicals in various industries has continued to increase, resulting in increasingly frequent hazardous chemical transportation operations between regions. As a key facility for vehicle access control, highway toll stations are prone to abnormal events such as slow vehicles, congestion, queues, illegal parking, and traffic accidents. Compared with the transportation of other goods, the transportation of hazardous chemicals has diverse risks and is difficult to identify. Once an accident occurs, the harm is extremely serious. Therefore, the implementation of all-weather, all-time, fully automatic real-time monitoring and abnormal traffic event warnings will not only help improve the safety operation and maintenance management level of toll stations and ensure smooth traffic, but also effectively reduce the potential harm caused by accidents.
[0003] In the field of traffic monitoring, existing technologies mainly rely on video surveillance and traditional sensors as detection means, such as bayonet cameras, ground induction coils, and infrared sensors. However, these methods have significant limitations in complex environments. For example, the monitoring effect of cameras is significantly reduced under coverage, lighting changes, and severe weather conditions (such as thunderstorms, heavy rain, or fog). At the same time, current detection technologies mainly rely on image recognition technology to identify abnormal behaviors of hazardous chemical vehicles in toll booth areas. This method usually compares the real-time image with abnormal samples for similarity, and when a specific threshold is reached, it is determined as an abnormal event in combination with rules. In addition, the trajectory changes of vehicles during driving are usually non-stationary, and may be accompanied by dynamic behaviors such as sudden acceleration, sudden stop, or collision. Most existing methods are based on a single data source for monitoring, which is easily affected by occlusion and environmental interference, and lack a comprehensive understanding of the dynamic changes of vehicle trajectories. It also does not consider combining fractional domain analysis methods to analyze the complex characteristics of trajectory behavior. This limitation makes it difficult to achieve accurate and real-time abnormal behavior recognition in complex traffic scenarios, which ultimately affects the accuracy and comprehensiveness of the judgment results. Summary of the invention
[0004] The present invention aims to solve the problem that existing detection devices cannot accurately monitor abnormal events of vehicles at toll stations. A method for detecting abnormal behavior of hazardous chemical vehicles based on multi-perspective spatiotemporal data mining is proposed to detect abnormal behavior of hazardous chemical vehicles in the area of highway toll stations.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is:
[0006] A method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining, comprising the following steps:
[0007] S101, collecting multi-view data information of vehicles entering the toll station area through physical perception layer equipment;
[0008] S102, the network transmission layer transmits the multi-view data information collected by the physical perception layer to the computing service layer;
[0009] S103, the computing service layer receives and processes the multi-view data information to obtain multi-view time series data of the vehicle;
[0010] S104, constructing multi-view time series data of the vehicle in the fractional domain based on fractional Fourier transform;
[0011] S105, identifying abnormal vehicle events through a multi-view spatiotemporal data mining model based on the multi-view time series data of the vehicle in the score domain;
[0012] S106: After detecting an abnormal vehicle event, the business application layer executes an alarm push operation.
[0013] Furthermore, step S101 specifically includes the following operations:
[0014] S201, collecting position information and speed information of the vehicle through an omnidirectional wide-area millimeter-wave radar;
[0015] S202, collecting vehicle images through a high-speed camera, and identifying the vehicle license plate, body color and model based on the vehicle images;
[0016] S203. Identify whether there is any hazardous gas leakage in the vehicle by using a medium wave gas leak detector.
[0017] Furthermore, step S103 specifically includes the following operations:
[0018] S301, processing the vehicle location information to extract the longitude E and latitude N of the vehicle's current location;
[0019] S302: Calculate the distance D between the vehicle and the toll station station , the calculation formula is as follows:
[0020] D station =arcsin(sin 2 (2E-E0)+cos(E)·cos(E0)·sin 2 (2N-N0))*d
[0021] In the above formula, E0 and N0 are the longitude and latitude of the toll station, respectively, and d is the unit distance;
[0022] S303: Calculate the distance D between the current vehicle and the vehicle in front according to the current position of the vehicle and the position of the vehicle in front or behind.before , and the distance D between the current vehicle and the following vehicle after ;
[0023] S304, calculating the vehicle acceleration a=(V1-V0) / t, where V1 is the vehicle speed at the current moment, V0 is the vehicle speed at the previous moment, and t is the unit time;
[0024] S305. Based on the current speed of the vehicle, the current distance of the vehicle from the toll station, the current acceleration of the vehicle, and the distance between the vehicle and the preceding and following vehicles, n moments are considered to form a time series data set X of the vehicle, which is expressed as:
[0025] X={x1,x2,…,x n}
[0026]
[0027] Where i is the current time.
[0028] Furthermore, step S104 specifically includes the following operations:
[0029] S401. Given a time series x i , using the fractional Fourier transform of order p Transform it into the fractional domain, the corresponding expression is:
[0030]
[0031] In the above formula, represents the p-order fractional Fourier transform, the order is p~U[0,1], u0 represents the initial domain, that is, the time domain, u p is a p-order fractional field, α=pπ / 2, α is the angle. When α=0, the time series is represented in the time domain. When α=π / 2, the time series is represented in the frequency domain. δ represents the Dirac delta function. K p (u0,u p ) represents the kernel function of fractional Fourier transform;
[0032] S402, processing the time series data set according to the fractional-order Fourier transform, and calculating the multi-view data of the time series, the calculation formula is as follows:
[0033]
[0034] In the above formula, V represents the number of viewing angles, |p| = V, v represents the viewing angle number, and X (v) represents a time series dataset under perspective v, Represents the time series under the perspective v;
[0035] S403, obtain the amplitude information of the fractional-order data by taking the absolute value operation Abs. For each viewing angle data, the formula is defined as follows:
[0036]
[0037] Furthermore, in step S105, the time series data of different perspectives are processed respectively by a multi-perspective spatiotemporal data mining model, specifically including:
[0038] S501: For the input vehicle time series, use m vehicles with a shape of d model ×M filters perform convolution operations on the time series to obtain the multi-head embedding representation matrix E, d model represents the embedding layer dimension, M represents the filter convolution kernel size;
[0039] S502, encode the embedding representation matrix E, and the corresponding expression is as follows:
[0040] p i (2k) = sinω k i
[0041] p i (2k+1)=cosω k i
[0042]
[0043] In the above formula, k∈[0,d model / 2], sin is the sine function, cos is the cosine function, p i Represents the positional encoding value of sequence x at index i;
[0044] S503. For a time series of length L, create a trainable parameter w of size 2L-1. For two position indexes i and j, the corresponding relative position scalar is w i-j+L , based on which the time series is encoded with relative positions;
[0045] S504, generate QKV matrix through linear layer, including query matrix Key Matrix Value Matrix
[0046] S505. Integrate the relative position encoding into the self-attention mechanism to obtain the attention vector of the time series. The corresponding expression is:
[0047]
[0048] In the above formula, w i-jis a learnable position encoding scalar, representing the relative position weight between position i and position j, W Q is the parameter of the query matrix Q, W K is the parameter of the key matrix K, S represents tensor filling, slicing, and reshaping operations;
[0049] S506. Considering the multi-head attention mechanism, the attention vectors in multiple attention heads are concatenated to generate the final attention matrix H:
[0050] H=MultiHead(Q,K,V)=Concat(head1,…,head h )W
[0051] Among them, head h is the attention vector learned by the attention head h, and W is the learnable parameter matrix;
[0052] S507, use a two-layer perceptron network with Gaussian error linear unit GELU as the activation function to encode the attention vector and obtain the representation vector The formula is:
[0053]
[0054] in, and is the learnable weight matrix and bias term, d z =4d model ;
[0055] S508, perform a skip connection operation, and combine the input and output of the model through matrix addition. The formula is expressed as
[0056] S509: Extracting representation vectors through maximum pooling and global average pooling techniques Feature information in ;
[0057] S510, through a fully connected layer including a softmax function, the representation vector Mapped into the category probability distribution space, the formula is expressed as:
[0058]
[0059] S511. The final category probability distribution is obtained by weighted averaging the category probability distributions of v perspectives. The formula is:
[0060]
[0061] S512, use the maximum index function argmax to obtain the prediction result of the model Y=argmax(y (fusion) ).
[0062] Furthermore, the method also includes optimizing the multi-view spatiotemporal data mining model, which specifically includes the following operations:
[0063] S601. Use the cross entropy loss function to calculate the loss of the multi-view spatiotemporal data mining model. The formula is:
[0064]
[0065] Where |I| represents the number of abnormal vehicle events;
[0066] S602, using a mini-batch optimization method to divide the training data into multiple small batches for training the multi-view spatiotemporal data mining model;
[0067] S603, using the Radam optimizer to optimize parameters, and stopping training when the test accuracy of the multi-view spatiotemporal data mining model reaches a preset range and no longer improves.
[0068] Furthermore, before identifying abnormal vehicle events through the multi-view spatiotemporal data mining model, the multi-view spatiotemporal data mining model is trained, specifically including:
[0069] S701, training the multi-view spatiotemporal data mining model using simulated data, and performing a mask operation on the simulated data;
[0070] S702: When it is verified that the loss change does not exceed a preset change threshold during multiple consecutive training cycles, it is determined that the multi-view spatiotemporal data mining model has converged, and the multi-view spatiotemporal data mining model is saved.
[0071] Furthermore, step S106 specifically includes the following operations:
[0072] S801, recording the detected abnormal vehicle events into a database;
[0073] S802, sending the vehicle abnormal event information to the front-end interface, and the front-end interface prompts the user in a visual and audio manner;
[0074] S803: Read the configured contact information of relevant personnel from the recipient database, and send the vehicle abnormal event information to the corresponding relevant personnel according to the contact information.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] The present invention provides a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-perspective spatiotemporal data mining. The method integrates and constructs multi-perspective spatiotemporal data, including vehicle information, millimeter-wave radar sensor data, image data, geographic location information and its derivative data, and uses fractional Fourier transform to construct multi-perspective fractional domain data of vehicle trajectory time series, and uses an improved position encoding mechanism to capture position information in time series data. At the same time, the self-attention mechanism is combined to calculate the correlation between historical sequence and query sequence data, automatically extract abnormal event features, and timely discover and prevent risks, thereby improving the safety management level of the transportation industry and improving transportation efficiency and safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0078] Figure 1 It is a schematic diagram of the overall process of a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-perspective spatiotemporal data mining provided by an embodiment of the present invention.
[0079] Figure 2 It is a schematic diagram of the overall architecture of the abnormal behavior detection system for hazardous chemicals vehicles provided in an embodiment of the present invention.
[0080] Figure 3 It is a schematic diagram of the detection process of the abnormal behavior detection system for hazardous chemicals vehicles provided in an embodiment of the present invention.
[0081] Figure 4 It is the change of time series at different orders.
[0082] Figure 5 It is a schematic diagram of the improved self-attention mechanism provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0083] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The enumerated embodiments are only used to explain the present invention and are not used to limit the scope of the present invention.
[0084] Reference Figure 1 This embodiment provides a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining, which can be applied to an abnormal behavior detection system for hazardous chemical vehicles. Figure 2 The system includes a physical perception layer, a network transmission layer, a computing service layer and a business application layer.
[0085] The method comprises the following steps:
[0086] S101. Collect multi-view data information of vehicles entering the toll station area through physical perception layer equipment.
[0087] S102: The network transmission layer transmits the multi-view data information collected by the physical perception layer to the computing service layer.
[0088] S103: The computing service layer receives and processes the multi-view data information to obtain multi-view time series data of the vehicle.
[0089] S104. Construct multi-view time series data of the vehicle in the fractional domain based on fractional Fourier transform.
[0090] S105 . Based on the multi-view time series data of the vehicle in the score domain, identify abnormal vehicle events through a multi-view spatiotemporal data mining model.
[0091] S106: After detecting an abnormal vehicle event, the business application layer executes an alarm push operation.
[0092] The method provided in this embodiment collects multi-perspective data information of the vehicle through the physical perception layer, and transmits the multi-perspective data information to the computing service layer through the network transmission layer. The computing service layer processes the multi-perspective data information to obtain multi-perspective time series data of the vehicle, and constructs multi-perspective time series data of the vehicle in the fractional domain based on fractional Fourier transform. The multi-perspective time series data is processed through a multi-perspective spatiotemporal data mining model, and abnormal event features are automatically extracted to identify abnormal vehicle events. After detecting abnormal vehicle events, the business application layer executes an alarm push operation to timely discover and prevent risks, thereby improving the safety management level of the transportation industry and improving transportation efficiency and safety.
[0093] As a possible implementation, step S101 specifically includes the following operations:
[0094] S201. Collect the position and speed information of the vehicle through the omnidirectional wide-area millimeter-wave radar.
[0095] In this implementation, the omnidirectional wide-area millimeter-wave radar transmits millimeter-wave signals in all directions and detects reflected signals from surrounding objects. Whenever a vehicle enters the toll booth area, the beam emitted by the radar encounters the vehicle and is reflected back to the receiving antenna. The device calculates the time difference between signal transmission and return to obtain the distance between the vehicle and the radar. At the same time, using the frequency change of the reflected signal (Doppler effect), the radar can accurately measure the vehicle's speed.
[0096] S202: Capture vehicle images through a high-speed camera, and recognize the vehicle license plate, body color, and model based on the vehicle images.
[0097] In this embodiment, when a vehicle enters the monitoring area of the high-speed camera, the camera will automatically capture images of the vehicle, which are used to identify information such as the vehicle's license plate, body color, and model.
[0098] S203. Identify whether there is any hazardous gas leakage in the vehicle by using a medium wave gas leak detector.
[0099] In this embodiment, the medium-wave gas leak detector emits medium-wave infrared rays and receives infrared signals reflected from the vehicle surface and surroundings, and generates a temperature distribution image of the vehicle through infrared imaging. When a leak occurs, the temperature of the leaked gas usually differs from the temperature of the surrounding environment, thereby showing an abnormal temperature distribution in the corresponding infrared image.
[0100] In this embodiment, multi-view data information is transmitted through the network transport layer. As a possible implementation, the network transport layer includes routers and switches. The router is responsible for correctly guiding and forwarding data between different networks, and the switch efficiently manages and transmits data streams within the local area network. The network transport layer sends multi-view spatiotemporal data such as vehicle location information, speed information, vehicle images, and infrared images to the computing service layer quickly and stably, providing real-time support for subsequent data analysis and anomaly detection.
[0101] As another possible implementation, step S103 specifically includes the following operations:
[0102] S301. Process the vehicle location information to extract the longitude E and latitude N of the vehicle's current location.
[0103] S302: Calculate the distance D between the vehicle and the toll station station , the calculation formula is as follows:
[0104] D station =arcsin(sin 2 (2E-E00+cos(E)·cos(E0)·sin 2 (2N-N0))*d
[0105] In the above formula, E0 and N0 are the longitude and latitude of the toll station respectively, and d is the unit distance.
[0106] S303: Calculate the distance D between the current vehicle and the vehicle in front according to the current position of the vehicle and the position of the vehicle in front or behind. before , and the distance D between the current vehicle and the following vehicle after , thereby constructing the vehicle trajectory sequence.
[0107] S304, calculate the vehicle acceleration a=(V1-V0) / t, where V1 is the current speed of the vehicle, V0 is the speed of the vehicle at the previous moment, and t is the unit time. This step parses the vehicle speed information to obtain the current vehicle speed V and form a vehicle speed sequence.
[0108] S305: Based on the current vehicle speed V i , the vehicle’s current distance from the toll station The vehicle's current acceleration a i , the distance between the vehicle and the vehicle in front and behind Consider n moments, constituting the time series data set X of vehicles, which is expressed as:
[0109] X={x1,x2,…,x n}
[0110]
[0111] Where i is the current time.
[0112] As another possible implementation, step S104 specifically includes the following operations:
[0113] S401. Given a time series x i , using the fractional Fourier transform of order p Transform it into the fractional domain, the corresponding expression is:
[0114]
[0115] In the above formula, represents the p-order fractional Fourier transform, the order is p~U[0,1], u0 represents the initial domain, that is, the time domain, u p is a p-order fractional field, α=pπ / 2, Fractional Fourier Transform FRFT is a more generalized version of Fourier transform, providing an intermediate domain between time domain and frequency domain. Figuratively speaking, it is the fractional Fourier transform of the time series at an angle of α. In particular, when α=0, the time series is represented in the time domain; when α=π / 2, the time series is represented in the frequency domain. δ represents the Dirac delta function, K p (u0,u p ) represents the kernel function of fractional Fourier transform.
[0116] S402, processing the time series data set according to the fractional-order Fourier transform, and calculating the multi-view data of the time series, the calculation formula is as follows:
[0117]
[0118] In the above formula, V represents the number of viewing angles, |p| = V, v represents the viewing angle number, and X (v) represents a time series dataset under perspective v, Represents the time series under the perspective v.
[0119] S403. Since the data after the fractional Fourier transform is a complex number, this embodiment only uses the amplitude information. Therefore, the amplitude information of the fractional data is obtained by taking the absolute value operation Abs. For each viewing angle data, the formula is defined as follows:
[0120]
[0121] In this implementation, the order p is selected at equal intervals and takes values of [0, 0.2, 0.4, 0.6, 0.8, 1], so V = 6. An example of multi-view data generated by fractional Fourier transform is as follows: Figure 5 shown.
[0122] As another possible implementation, for vehicle images, the vehicle image is first analyzed by an image recognition algorithm to obtain the color and type information of the vehicle, and then the license plate part in the vehicle image is segmented and recognized to obtain the vehicle license plate number. At the same time, the temperature information of the vehicle is extracted from the infrared image of the vehicle, and the infrared image is judged by the gas leakage detection model. When the statistical information reaches a certain preset threshold, a gas leakage event is triggered. When the gas leakage event is triggered, the vehicle-related information is sent to the business application layer, and the vehicle status information of the highway toll station area is displayed on the data dashboard, including vehicle flow statistics, vehicle information statistics, vehicle status display, etc.
[0123] As another possible implementation, in step S105, the time series of different perspectives are analyzed by a multi-perspective spatiotemporal data mining model. The data are processed separately, including:
[0124] S501: For the input vehicle time series, use m vehicles with a shape of d model ×M filters perform convolution operations on the time series to obtain the multi-head embedding representation matrix E, d model represents the embedding layer dimension, and M represents the filter convolution kernel size.
[0125] For example, the input vehicle time series X (v) ={x1,x2,…,x n}, Where N is the number of samples, the number of channels C = 5, and L is the length of the sequence. model The value of is 64, M=64, and the number of longs h is set to 8.
[0126] S502, in order to effectively capture the sequential information of the time series, and considering that as the dimension of the embedding layer increases, the traditional embedding method often causes the position embedding value to be sampled from a low-frequency sine function, which easily leads to anisotropy, that is, the embedding vector is distributed differently in different directions of the embedding space. To this end, this embodiment encodes the embedding representation matrix E through an improved absolute position embedding method, and the corresponding expression is as follows:
[0127] p i (2k) = sinω k i
[0128] p i (2k+1)=cosω k i
[0129]
[0130] In the above formula, k∈[0,d modle / 2], sin is the sine function, cos is the cosine function, p i Represents the positional encoding value of sequence x at index i. Different from the traditional positional encoding method, the above method takes into account the size of the input embedding dimension and the sequence length, thereby effectively alleviating the anisotropy phenomenon and ensuring the uniform distribution of the embedding vector in the embedding space.
[0131] S503. In order to enable the model to dynamically adapt to the complex relationship between different time points, this implementation introduces a relative position encoding mechanism independent of the input embedding to encode the sequence, and then applies it to the self-attention mechanism. The specific implementation is: for a time series of length L, create a trainable parameter w of size 2L-1, for two position indexes i and j, the corresponding relative position scalar is w i-j+L .
[0132] S504, generate QKV matrix through linear layer, including query matrix Key Matrix Value Matrix The QKV matrix is used to capture different patterns in the time series to facilitate subsequent attention mechanism calculations.
[0133] S505. Integrate the relative position encoding into the self-attention mechanism to obtain the attention vector of the time series. The corresponding expression is:
[0134]
[0135] In the above formula, w i-j is a learnable position encoding scalar, representing the relative position weight between position i and position j, W Qis the parameter of the query matrix Q, W K is the parameter of the key matrix K, and S represents the tensor filling, slicing, and reshaping operations.
[0136] S506. Considering the multi-head attention mechanism, the attention vectors in multiple attention heads are concatenated to generate the final attention matrix H:
[0137] H=MultiHead(Q,K,V)=Concat(head1,…,head h )W
[0138] Among them, head h is the attention vector learned by the attention head h, and W is the learnable parameter matrix.
[0139] S507. Since the attention mechanism only contains linear operations and does not model complex nonlinear relationships, a two-layer perceptron network with a Gaussian error linear unit GELU as the activation function is used to encode the attention vector to obtain the representation vector The formula is:
[0140]
[0141] in, and is the learnable weight matrix and bias term, d z =4d model .
[0142] S508, perform a skip connection operation, and combine the input and output of the model through matrix addition. The formula is expressed as
[0143] S509: Extracting representation vectors through maximum pooling and global average pooling techniques The maximum pooling technique aims to select the largest value in a set of data to represent the main features of this set of data, while the global average pooling technique takes the average value of a set of data to represent the overall features of this set of data.
[0144] For example, given a set of data X = {x1, x2, ..., x n}, the maximum pooling MaxPool and the global average pooling GlobalAvg are expressed as follows:
[0145] MaxPool(X)=max(x1,x2,…,x n )
[0146]
[0147] S510, through a fully connected layer including a softmax function, the representation vector Mapped into the category probability distribution space, the formula is expressed as:
[0148]
[0149] S511. Considering the data of v perspectives, the category probability distribution of the corresponding perspective can be obtained. Figure 1 The principle of consistency assumption is that the real label or category information of the data is the same under different perspectives, that is, although the features obtained when observing the same object from different perspectives may be different, they should be able to point to the same category or label. Based on this, the final category probability distribution is obtained by weighted averaging the category probability distribution of v perspectives, and the formula is expressed as:
[0150]
[0151] S512, use the maximum index function argmax to obtain the prediction result of the model Y=argmax(y (fusion) ).
[0152] As another possible implementation, the method further includes optimizing the multi-view spatiotemporal data mining model, specifically including the following operations:
[0153] S601. Use the cross entropy loss function to calculate the loss of the multi-view spatiotemporal data mining model. The formula is:
[0154]
[0155] Where |I| represents the number of abnormal vehicle events. In this implementation, abnormal vehicle events include illegal parking, collision between hazardous chemical vehicles, collision between hazardous chemical vehicles and ordinary vehicles, collision between ordinary vehicles, and normal vehicle driving, so |I|=5.
[0156] S602: In order to allow the model to gradually learn the rules in the data, the multi-view spatiotemporal data mining model is trained by using a mini-batch optimization method to divide the training data into multiple small batches.
[0157] For example, batch_size can be set to 128 to improve the prediction accuracy of new data.
[0158] S603, use the Radam optimizer to optimize parameters, and introduce an early stopping mechanism, that is, when the test accuracy of the model reaches the preset range and no longer improves, stop the model training, so as to prevent the model from "remembering" the details of the training data and let it learn the general rules in the data. In this way, when the model processes new data, it will not perform poorly due to "learning too rigidly".
[0159] In a possible implementation of this embodiment, the model uses simulated data for training, verification and testing. The five abnormal events of the vehicle can be represented by 0, 1, 2, 3, and 4 respectively.
[0160] Considering the influence of signal transmission distortion, weather factors, etc., which may lead to incomplete data. To this end, the model performs a masking operation on the simulated data. Specifically, some data is randomly removed from the vehicle sequence data to simulate the situation of missing data in the real environment. If the change in the verification loss does not exceed the preset change threshold in multiple consecutive training cycles, the multi-view spatiotemporal data mining model is judged to have converged and the multi-view spatiotemporal data mining model is saved. By inputting real-time vehicle data into the model, the vehicle events predicted by the model are output. At the same time, the vehicle speed is compared with the set minimum speed threshold and maximum speed threshold to determine whether the vehicle is speeding or driving at a low speed.
[0161] To sum up, the model in this embodiment can predict 10 abnormal situations, including whether ordinary vehicles are speeding, whether ordinary vehicles are driving at a low speed, whether ordinary vehicles are illegally parked, whether ordinary vehicles collide with ordinary vehicles, whether hazardous chemical vehicles collide with ordinary vehicles, whether hazardous chemical vehicles are speeding, whether hazardous chemical vehicles are driving at a low speed, whether hazardous chemical vehicles are illegally parked, whether hazardous chemical vehicles collide with hazardous chemical vehicles, and whether hazardous chemical vehicles have gas leaks.
[0162] In another possible implementation of this embodiment, step S106 specifically includes the following operations:
[0163] S801. Record the detected abnormal vehicle events into a database.
[0164] S802: Send the vehicle abnormal event information to the front-end interface, which prompts the user with high-priority visual and audio methods, such as popping up a warning window, displaying event details, and sounding an alarm, to ensure that the management personnel receive the reminder in time for quick processing.
[0165] For example, on the alarm interface, managers can view detailed information about the event, such as event type, time, location, vehicle type, etc., and have confirmation or processing buttons to clear or update the reminder status after the exception is processed. The system will continue to send reminders before the event is processed to ensure that managers can respond in a timely manner.
[0166] S803: Read the configured contact information of the relevant personnel from the recipient database, such as email address and mobile phone number, to ensure compliance with the pre-defined acceptance authority. Send the vehicle abnormal event information to the corresponding relevant personnel according to the contact information to realize remote alarm notification.
[0167] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining, characterized in that: The method comprises: S101, collecting multi-view data information of vehicles entering the toll station area through physical perception layer equipment; S102, the network transmission layer transmits the multi-view data information collected by the physical perception layer to the computing service layer; S103, the computing service layer receives and processes the multi-view data information to obtain multi-view time series data of the vehicle; S104, constructing multi-view time series data of the vehicle in the fractional domain based on fractional Fourier transform; S105, identifying abnormal vehicle events through a multi-view spatiotemporal data mining model based on the multi-view time series data of the vehicle in the score domain; S106: After detecting an abnormal vehicle event, the business application layer executes an alarm push operation.
2. According to claim 1, a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining is characterized in that: Step S101 specifically includes the following operations: S201, collecting position information and speed information of the vehicle through an omnidirectional wide-area millimeter-wave radar; S202, collecting vehicle images through a high-speed camera, and identifying the vehicle license plate, body color and model based on the vehicle images; S203. Identify whether there is any hazardous gas leakage in the vehicle by using a medium wave gas leak detector.
3. According to claim 2, a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining is characterized in that: Step S103 specifically includes the following operations: S301, processing the vehicle location information to extract the longitude E and latitude N of the vehicle's current location; S302: Calculate the distance D between the vehicle and the toll station station , the calculation formula is as follows: D station =arcsin(sin 2 (2E-E0)+cos(E)·cos(E0)·sin 2 (2N-N0))*d In the above formula, E0 and N0 are the longitude and latitude of the toll station, respectively, and d is the unit distance; S303: Calculate the distance D between the current vehicle and the vehicle in front according to the current position of the vehicle and the position of the vehicle in front or behind. before , and the distance D between the current vehicle and the following vehicle after ; S304, calculating the vehicle acceleration a=(V1-V0) / t, where V1 is the vehicle speed at the current moment, V0 is the vehicle speed at the previous moment, and t is the unit time; S305. Based on the current speed of the vehicle, the current distance of the vehicle from the toll station, the current acceleration of the vehicle, and the distance between the vehicle and the preceding and following vehicles, n moments are considered to form a time series data set X of the vehicle, which is expressed as: X={x1,x2,…,x n } Where i is the current time.
4. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 3 is characterized in that: Step S104 specifically includes the following operations: S401. Given a time series x i , using the fractional Fourier transform of order p Transform it into the fractional domain, the corresponding expression is: In the above formula, represents the p-order fractional Fourier transform, the order is p~U[0,1], u0 represents the initial domain, that is, the time domain, u p is a p-order fractional field, α=pπ / 2, α is the angle. When α=0, the time series is represented in the time domain. When α=π / 2, the time series is represented in the frequency domain. δ represents the Dirac delta function. K p (u0,u p ) represents the kernel function of fractional Fourier transform; S402, processing the time series data set according to the fractional-order Fourier transform, and calculating the multi-view data of the time series, the calculation formula is as follows: In the above formula, V represents the number of viewing angles, |p| = V, v represents the viewing angle number, and X (v) represents a time series dataset under perspective v, Represents the time series under the perspective v; S403, obtain the amplitude information of the fractional-order data by taking the absolute value operation Abs. For each viewing angle data, the formula is defined as follows:
5. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 4 is characterized in that: In step S105, the time series data from different perspectives are processed respectively by a multi-perspective spatiotemporal data mining model, specifically including: S501: For the input vehicle time series, use m vehicles with a shape of d model ×M filters perform convolution operations on the time series to obtain the multi-head embedding representation matrix E, d model represents the embedding layer dimension, M represents the filter convolution kernel size; S502, encode the embedding representation matrix E, and the corresponding expression is as follows: p i (2k)=sinω k i p i (2k+1)=something ω who In the above formula, k∈[0,d model / 2], sin is the sine function, cos is the cosine function, p i Represents the positional encoding value of sequence x at index i; S503. For a time series of length L, create a trainable parameter w of size 2L-1. For two position indexes i and j, the corresponding relative position scalar is w i-j+L , based on which the time series is encoded with relative positions; S504, generate QKV matrix through linear layer, including query matrix Key Matrix Value Matrix S505. Integrate the relative position encoding into the self-attention mechanism to obtain the attention vector of the time series. The corresponding expression is: In the above formula, w i-j is a learnable position encoding scalar, representing the relative position weight between position i and position j, W Q is the parameter of the query matrix Q, W K is the parameter of the key matrix K, S represents tensor filling, slicing, and reshaping operations; S506. Considering the multi-head attention mechanism, the attention vectors in multiple attention heads are concatenated to generate the final attention matrix H: H=MultiHead(Q,K,V)=Concat(head1,…,head h )W Among them, head h is the attention vector learned by the attention head h, and W is the learnable parameter matrix; S507, use a two-layer perceptron network with Gaussian error linear unit GELU as the activation function to encode the attention vector and obtain the representation vector The formula is: in, and is the learnable weight matrix and bias term, d z =4d model ; S508, perform a skip connection operation, and combine the input and output of the model through matrix addition. The formula is expressed as S509, extracting representation vectors through maximum pooling and global average pooling techniques Feature information in ; S510, through a fully connected layer including a softmax function, the representation vector Mapped into the category probability distribution space, the formula is expressed as: S511. The final category probability distribution is obtained by weighted averaging the category probability distributions of v perspectives. The formula is: S512, use the maximum index function argmax to obtain the prediction result of the model Y=argmax(y (fusion) ).
6. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 5 is characterized in that: The method further includes optimizing the multi-view spatiotemporal data mining model, specifically including the following operations: S601. Use the cross entropy loss function to calculate the loss of the multi-view spatiotemporal data mining model. The formula is: Where |I| represents the number of abnormal vehicle events; S602, using a mini-batch optimization method to divide the training data into multiple small batches for training the multi-view spatiotemporal data mining model; S603, using the Radam optimizer to optimize parameters, and stopping training when the test accuracy of the multi-view spatiotemporal data mining model reaches a preset range and no longer improves.
7. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 1 is characterized in that: Before identifying abnormal vehicle events through the multi-view spatiotemporal data mining model, the multi-view spatiotemporal data mining model is trained, including: S701, training the multi-view spatiotemporal data mining model using simulated data, and performing a mask operation on the simulated data; S702: When it is verified that the loss change does not exceed a preset change threshold during multiple consecutive training cycles, it is determined that the multi-view spatiotemporal data mining model has converged, and the multi-view spatiotemporal data mining model is saved.
8. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 1 is characterized in that: Step S106 specifically includes the following operations: S801, recording the detected abnormal vehicle events into a database; S802, sending the vehicle abnormal event information to the front-end interface, and the front-end interface prompts the user in a visual and audio manner; S803: Read the configured contact information of relevant personnel from the recipient database, and send the vehicle abnormal event information to the corresponding relevant personnel according to the contact information.
Citation Information
Patent Citations
Anomaly detection method for continuous space-time refueling data
CN110232082A
Network flow anomaly detection method based on intuitionistic fuzzy time series graph mining
CN111460026A
Abnormal behavior target detection system based on multi-view deep learning algorithm
CN115761614A
Multi-view comparison self-supervision attribute network abnormal point detection method
CN116128024A
DEPMU-based traffic anomaly detection method in Internet of Things environment
CN116545730A
Cited By
Method and system for automatically identifying and intercepting hazardous chemicals at entrance of highway toll station
CN122313696A