Method for detecting abnormal behavior of hazardous chemical vehicle based on multi-view spatio-temporal data mining
By employing a multi-perspective spatiotemporal data mining method, combined with fractional Fourier transform and a multi-perspective spatiotemporal data mining model, the problem of inaccurate monitoring of abnormal behavior of hazardous chemical vehicles at highway toll stations was solved. This enabled accurate identification and real-time early warning of abnormal behavior of hazardous chemical vehicles, thereby improving the safety and efficiency of transportation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANXI UNIV
- Filing Date
- 2024-12-19
- Publication Date
- 2026-07-28
AI Technical Summary
Existing detection devices are inaccurate in monitoring abnormal behavior of hazardous chemical vehicles at highway toll stations, especially in complex environments where they struggle to achieve accurate and real-time identification, and they lack a comprehensive understanding of the dynamic changes in vehicle trajectories.
A multi-view spatiotemporal data mining method is adopted, which collects multi-view data through omnidirectional wide-area millimeter-wave radar, high-speed checkpoint camera and mid-wave gas leak detector, and combines fractional Fourier transform and multi-view spatiotemporal data mining model to identify abnormal vehicle behavior.
It has improved the accuracy and real-time nature of identifying abnormal behavior of hazardous chemical vehicles, thereby enhancing the safety management level and transportation efficiency of the transportation industry.
Smart Images

Figure CN119807267B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic safety monitoring technology, and in particular to a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining. Background Technology
[0002] With the rapid development of my country's economy, the demand for hazardous chemicals from various industries is constantly increasing, leading to increasingly frequent hazardous chemical transportation between regions. As key facilities for vehicle entry and exit control, highway toll stations are prone to abnormal events such as slow traffic, congestion, queuing, illegal parking, and traffic accidents. Compared to the transportation of other goods, the transportation of hazardous chemicals involves diverse risks, is difficult to identify, and the consequences of accidents are extremely serious. Therefore, implementing 24 / 7, fully automated real-time monitoring and abnormal traffic event early warning systems not only helps improve the safety operation and management level of toll stations and ensure smooth traffic flow, but also effectively reduces the potential hazards caused by accidents.
[0003] In the field of traffic monitoring, existing technologies primarily rely on video surveillance and traditional sensors as detection methods, such as checkpoint cameras, inductive loop detectors, and infrared sensors. However, these methods have significant limitations in complex environments. For example, the monitoring effectiveness of cameras decreases significantly under conditions of reduced coverage, varying lighting, and severe weather (such as thunderstorms, heavy rain, or dense fog). Simultaneously, current detection technologies mainly rely on image recognition to identify abnormal behavior of hazardous chemical vehicles within tollbooth areas. This method typically compares real-time images with abnormal samples for similarity, and when a certain threshold is reached, it is combined with rules to determine an abnormal event. Furthermore, vehicle trajectory changes during driving are usually non-stationary, potentially accompanied by dynamic behaviors such as sudden acceleration, abrupt stops, or collisions. Existing methods are mostly based on a single data source, making them susceptible to occlusion and environmental interference, and lack a comprehensive understanding of the dynamic changes in vehicle trajectories. They also do not consider incorporating fractional domain analysis methods to analyze the complex characteristics of trajectory behavior. These limitations make it difficult to achieve accurate and real-time abnormal behavior identification in complex traffic scenarios, ultimately affecting the accuracy and comprehensiveness of the judgment results. Summary of the Invention
[0004] This invention aims to solve the problem of inaccurate monitoring of abnormal events of vehicles at toll stations by existing detection devices. It proposes a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining, so as to detect abnormal behavior of hazardous chemical vehicles in the area of highway toll stations.
[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:
[0006] A method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining includes the following steps:
[0007] S101. Collect multi-view data information of vehicles entering the toll station area through physical sensing layer equipment;
[0008] S102. The network transport layer transmits the multi-view data information collected by the physical sensing layer to the computing service layer.
[0009] S103. The computing service layer receives and processes multi-view data information to obtain multi-view time series data of the vehicle.
[0010] S104. Constructing multi-view time series data of vehicles in the fractional domain based on fractional Fourier transform;
[0011] S105. Based on multi-view time series data of vehicles in the fractional domain, identify abnormal vehicle events through a multi-view spatiotemporal data mining model.
[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. Acquire vehicle position and speed information using omnidirectional wide-area millimeter-wave radar;
[0015] S202. Vehicle images are captured by high-speed checkpoint cameras, and vehicle license plates, body colors and vehicle models are identified based on the vehicle images;
[0016] S203. Use a medium-wave gas leak detector to identify whether a vehicle is experiencing a hazardous gas leak.
[0017] Furthermore, step S103 specifically includes the following operations:
[0018] S301. Process the vehicle location information and extract the longitude E and latitude N of the vehicle's current location;
[0019] S302, Calculate the current distance D of the vehicle from 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. Based on the current position of the vehicle and the position of the vehicle in front or behind, calculate the distance D between the current vehicle and the vehicle in front.before And the distance D between the current vehicle and the vehicle behind it. after ;
[0023] S304. Calculate the vehicle acceleration a = (V1 - V0) / t, where V1 is the vehicle's current velocity, V0 is the vehicle's velocity at the previous moment, and t is the unit time.
[0024] S305. Based on the vehicle's current speed, current distance from the toll station, current acceleration, and distances to the vehicle in front and behind, considering n time points, a time series dataset X for the vehicle is constructed, the expression of which is:
[0025] X = {x1, x2, ..., x} n}
[0026]
[0027] Where i represents the current time.
[0028] Furthermore, step S104 specifically includes the following operations:
[0029] S401. Given a time series x i Using a fractional Fourier transform of order p Transforming it to the fractional domain, the corresponding expression is:
[0030]
[0031] In the above formula, This represents a p-th order fractional Fourier transform, with order p ~ U[0,1], where u0 represents the initial domain, i.e., the time domain. p For a fractional field of order p, α = pπ / 2, where α 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, and K... p (u0,u p ) represents the kernel function of the fractional Fourier transform;
[0032] S402. Process the time series dataset using the fractional Fourier transform to calculate 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 viewpoints, |p|=V, v represents the viewpoint number, and X (v) This represents a time-series dataset from viewpoint v. This represents a time series from a perspective v.
[0035] S403. The amplitude information of fractional-order data is obtained by taking the absolute value (Abs). For each viewpoint data, the formula is defined as follows:
[0036]
[0037] Furthermore, in step S105, the time series data from different perspectives are processed separately using a multi-view spatiotemporal data mining model, specifically including:
[0038] S501. For the input vehicle time series, use m units of shape d. model A ×M filter is used to perform a convolution operation on the time series to obtain the multi-head embedding representation matrix E,d of the time series. model M represents the embedding layer dimension, and 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 This represents the encoded value of the position 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 indices i and j, the corresponding relative position scalar is w. i-j+L Based on this, the time series is encoded with relative positions;
[0045] S504. Generate a QKV matrix, including a query matrix, through a linear layer. Key matrix Value matrix
[0046] S505. The relative position encoding is fused into the self-attention mechanism to obtain the attention vector of the time series, and the corresponding expression is:
[0047]
[0048] In the above formula, w i-jW is a learnable positional encoding scalar representing the relative positional weights between positions i and j. Q To query the parameters of matrix Q, W K S represents the parameters of the key matrix K, and S represents the tensor filling, slicing, and reshaping operations.
[0049] S506. Considering a multi-head attention mechanism, the attention vectors from 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 Let h be the attention vector learned by the attention head, and W be the learnable parameter matrix.
[0052] S507. Encode the attention vector using a two-layer perceptron network with a Gaussian error linear unit (GELU) as the activation function to obtain the representation vector. The formula is expressed as:
[0053]
[0054] in, and For the learnable weight matrix and bias terms, d z =4d model ;
[0055] S508. Perform a skip-step connection operation, combining the model's input and output through matrix addition, expressed as follows:
[0056] S509. Extracting representation vectors using max pooling and global average pooling techniques. Feature information in;
[0057] S510. Through a fully connected layer containing a softmax function, the representation vector is... Mapped to the class probability distribution space, the formula is expressed as:
[0058]
[0059] S511. By taking a weighted average of the category probability distributions of v viewpoints, the final category probability distribution is obtained, expressed by the formula:
[0060]
[0061] S512. Use the maximum index function argmax to obtain the model's prediction result Y = argmax(y (fusion) ).
[0062] Furthermore, the method also includes optimizing the multi-view spatiotemporal data mining model, specifically including the following operations:
[0063] S601. Calculate the loss of the multi-view spatiotemporal data mining model using the cross-entropy loss function, expressed by the formula:
[0064]
[0065] Where |I| represents the number of abnormal vehicle events;
[0066] S602. The mini-batch optimization method is used to divide the training data into multiple small batches for training the multi-view spatiotemporal data mining model.
[0067] S603. Use the Radam optimizer to optimize parameters, and stop training when the test accuracy of the multi-view spatiotemporal data mining model reaches the preset range and no longer improves.
[0068] Furthermore, before identifying abnormal vehicle events using the multi-view spatiotemporal data mining model, the multi-view spatiotemporal data mining model is trained, specifically including:
[0069] S701. The multi-view spatiotemporal data mining model is trained using simulated data, and the simulated data is masked.
[0070] S702. When the loss change does not exceed the preset change threshold in 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. Record detected abnormal vehicle events into the database;
[0073] S802: Send vehicle abnormal event information to the front-end interface, and the front-end interface prompts the user with visual and audio means.
[0074] S803. Read the contact information of the configured 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 beneficial effects of the present invention are:
[0076] This invention provides a method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining. The method integrates and constructs multi-view spatiotemporal data, including vehicle information, millimeter-wave radar sensor data, image data, geographic location information, and their derived data. It utilizes fractional Fourier transform to construct multi-view fractional-domain data of vehicle trajectory time series and employs an improved location encoding mechanism to capture location information from the time series data. Simultaneously, it combines a self-attention mechanism to calculate the correlation between historical and query sequence data, automatically extracting abnormal event features to promptly detect and prevent risks, thereby improving the safety management level of the transportation industry and enhancing transportation efficiency and safety. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only preferred embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 This is a schematic diagram of the overall process of the method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining provided in the embodiments of the present invention.
[0079] Figure 2 This is a schematic diagram of the overall architecture of the hazardous chemical vehicle abnormal behavior detection system provided in this embodiment of the invention.
[0080] Figure 3 This is a schematic diagram of the detection process of the abnormal behavior detection system for hazardous chemical vehicles provided in an embodiment of the present invention.
[0081] Figure 4 It describes how the time series changes at different orders.
[0082] Figure 5 This is a schematic diagram of the improved self-attention mechanism provided in an embodiment of the present invention. Detailed Implementation
[0083] The principles and features of the present invention are described below with reference to the accompanying drawings. The listed embodiments are only used to explain the present invention and are not intended 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. This method can be applied to a hazardous chemical vehicle abnormal behavior detection system. (Refer to...) Figure 2 The system comprises a physical sensing layer, a network transmission layer, a computing service layer, and a business application layer.
[0085] The method includes the following steps:
[0086] S101. Collect multi-view data information of vehicles entering the toll station area through physical sensing layer equipment.
[0087] S102, The network transport layer transmits the multi-view data information collected by the physical sensing layer to the computing service layer.
[0088] S103. The computing service layer receives and processes multi-view data information to obtain multi-view time series data of the vehicle.
[0089] S104. Construct multi-view time series data of vehicles in the fractional domain based on fractional Fourier transform.
[0090] S105. Based on multi-view time series data of vehicles in the fractional 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-view data information of vehicles through the physical sensing layer and transmits it to the computing service layer through the network transmission layer. The computing service layer processes the multi-view data information to obtain multi-view time series data of vehicles, and constructs multi-view time series data of vehicles in the fractional domain based on fractional Fourier transform. The multi-view time series data is processed through a multi-view spatiotemporal data mining model to automatically extract abnormal event features and identify abnormal vehicle events. After detecting abnormal vehicle events, the business application layer executes an alarm push operation to promptly detect and prevent risks, thereby improving the safety management level of the transportation industry and improving transportation efficiency and safety.
[0093] As one possible implementation, step S101 specifically includes the following operations:
[0094] S201. The vehicle's position and speed information are collected by an omnidirectional wide-area millimeter-wave radar.
[0095] In this implementation, the omnidirectional wide-area millimeter-wave radar transmits millimeter-wave signals in all directions to detect reflected signals from surrounding objects. Whenever a vehicle enters the tollbooth area, the radar's emitted beam encounters the vehicle and is reflected back to the receiving antenna. The device calculates the distance between the vehicle and the radar by measuring the time difference between signal transmission and return. Simultaneously, utilizing the frequency variation of the reflected signal (Doppler effect), the radar can accurately measure the vehicle's speed.
[0096] S202: Vehicle images are captured by high-speed checkpoint cameras, and vehicle license plates, body colors and models are identified based on the vehicle images.
[0097] In this implementation, when a vehicle enters the monitoring area of the high-speed checkpoint camera, the high-speed checkpoint camera automatically captures vehicle images, which are used to identify information such as the vehicle's license plate, body color, and model.
[0098] S203. Use a medium-wave gas leak detector to identify whether a vehicle is experiencing a hazardous gas leak.
[0099] In this embodiment, the mid-wave gas leak detector emits mid-wave infrared light and receives infrared signals reflected from the vehicle surface and surroundings, generating a temperature distribution image of the vehicle through infrared imaging. When a leak occurs, the temperature of the leaking gas usually differs from the surrounding environment, thus displaying an abnormal temperature distribution in the corresponding infrared image.
[0100] In this embodiment, multi-view data is transmitted through the network transport layer. As one possible implementation, the network transport layer includes routers and switches. Routers are responsible for correctly guiding and forwarding data between different networks, while switches efficiently manage and transmit data streams within the local area network. The network transport layer quickly and stably sends multi-view spatiotemporal data, such as vehicle location information, speed information, vehicle images, and infrared images, to the computing service layer, 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 and extract the longitude E and latitude N of the vehicle's current location.
[0103] S302, Calculate the current distance D of the vehicle from 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. Based on the current position of the vehicle and the position of the vehicle in front or behind, calculate the distance D between the current vehicle and the vehicle in front. before And the distance D between the current vehicle and the vehicle behind it. after This allows for the construction of vehicle trajectory sequences.
[0107] S304. Calculate the vehicle acceleration a = (V1 - V0) / t, where V1 is the vehicle's current velocity, V0 is the vehicle's velocity at the previous moment, and t is the unit of time. This step obtains the current vehicle velocity V by parsing the vehicle velocity information, forming a vehicle velocity sequence.
[0108] S305, based on the vehicle's current speed V i The vehicle's current distance from the toll station Vehicle current acceleration a i Distance between the vehicle and the vehicle in front and behind Consider n time points, forming a time series dataset X of vehicles, whose expression is:
[0109] X = {x1, x2, ..., x} n}
[0110]
[0111] Where i represents the current time.
[0112] As another possible implementation, step S104 specifically includes the following operations:
[0113] S401. Given a time series x i Using a fractional Fourier transform of order p Transforming it to the fractional domain, the corresponding expression is:
[0114]
[0115] In the above formula, This represents a p-th order fractional Fourier transform, with order p ~ U[0,1], where u0 represents the initial domain, i.e., the time domain. p For a fractional field of order p, α = pπ / 2, the Fractional Fourier Transform (FRFT) is a more generalized version of the Fourier Transform, providing an intermediate domain between the time and frequency domains. Figuratively speaking, it is the fractional Fourier transform of a time series at an angle α. Specifically, 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 the fractional Fourier transform.
[0116] S402. Process the time series dataset using the fractional Fourier transform to calculate 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 viewpoints, |p|=V, v represents the viewpoint number, and X (v) This represents a time-series dataset from viewpoint v. This represents the time series from the perspective v.
[0119] S403. Since the data after fractional Fourier transform is complex, this embodiment only utilizes amplitude information. Therefore, the amplitude information of the fractional data is obtained by taking the absolute value operation Abs. For each viewpoint data, the formula is defined as follows:
[0120]
[0121] In this implementation, the order p is selected at equal intervals, taking values of [0, 0.2, 0.4, 0.6, 0.8, 1], therefore V = 6. An example of multi-view data generated through fractional Fourier transform is shown below. Figure 5 As shown.
[0122] As another possible implementation, for vehicle images, firstly, image recognition algorithms are used to analyze the vehicle image to obtain the vehicle's color and type information. Then, the license plate portion of the vehicle image is segmented and identified to obtain the vehicle's license plate number. Simultaneously, the vehicle's temperature information is extracted from the vehicle's infrared image. A gas leak detection model is used to judge the infrared image, and when the statistical information reaches a certain preset threshold, a gas leak event is triggered. When a gas leak event is triggered, the vehicle-related information is sent to the business application layer, where a data dashboard displays vehicle status information in the highway toll station area, including vehicle traffic statistics, vehicle information statistics, and vehicle status display.
[0123] As another possible implementation, in step S105, a multi-view spatiotemporal data mining model is used to analyze time series from different perspectives. The data is processed separately, specifically including:
[0124] S501. For the input vehicle time series, use m units of shape d. model A ×M filter is used to perform a convolution operation on the time series to obtain the multi-head embedding representation matrix E,d of the time series. model denoted by , where M 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, C = 5 channels, and L is the sequence length. model The value is 64, M = 64, and the number of long positions h is set to 8.
[0126] S502. To effectively capture the sequential information of time series, and considering that as the dimension of the embedding layer increases, traditional embedding methods often lead to sampling of position embedding values from low-frequency sine functions, which can easily result in anisotropy, i.e., the embedding vectors are distributed differently in different directions of the embedding space. Therefore, this implementation uses an improved absolute position embedding method to encode the embedding representation matrix E, with the corresponding expression 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 This represents the positional encoding value of sequence x at index i. Unlike traditional positional encoding methods, the above method considers the size of the input embedding dimension and the sequence length, thereby effectively mitigating anisotropy and ensuring a uniform distribution of the embedding vector in the embedding space.
[0131] S503. To enable the model to dynamically adapt to complex relationships between different time points, this implementation introduces a relative position encoding mechanism independent of the input embedding to encode the sequence, which is then applied to the self-attention mechanism. Specifically, for a time series of length L, a trainable parameter w of size 2L-1 is created. For two position indices i and j, the corresponding relative position scalar is w. i-j+L .
[0132] S504. Generate a QKV matrix, including a query matrix, through a linear layer. 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. The relative position encoding is fused into the self-attention mechanism to obtain the attention vector of the time series, and the corresponding expression is:
[0134]
[0135] In the above formula, w i-j W is a learnable positional encoding scalar representing the relative positional weights between positions i and j. QTo query the parameters of matrix Q, W K S represents the parameters of the key matrix K, and S represents the tensor filling, slicing, and reshaping operations.
[0136] S506. Considering a multi-head attention mechanism, the attention vectors from 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 Let h be the attention vector learned by the attention head, and W be 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, resulting in a representation vector. The formula is expressed as:
[0140]
[0141] in, and For the learnable weight matrix and bias terms, d z =4d model .
[0142] S508. Perform a skip-step connection operation, combining the model's input and output through matrix addition, expressed as follows:
[0143] S509. Extracting representation vectors using max pooling and global average pooling techniques. The feature information in the data. Max pooling aims to select the largest value in a set of data, representing the main feature of the data set, while global average pooling takes the average value of a set of data, representing the overall feature of the data set.
[0144] For example, given a set of data X = {x1, x2, ..., x...} n Max pooling (MaxPool) and global average pooling (GlobalAvg) are expressed by the following formulas:
[0145] MaxPool(X) = max(x1, x2, ..., x n )
[0146]
[0147] S510. Through a fully connected layer containing a softmax function, the representation vector is... Mapped to the class probability distribution space, the formula is expressed as:
[0148]
[0149] S511. Considering data from v viewpoints, the category probability distribution for each viewpoint can be obtained. Based on the viewpoint... Figure 1 The consistency assumption states that the true label or category information of data is the same from different perspectives. That is, although the features obtained when observing the same object from different perspectives may differ, they should still point to the same category or label. Based on this, the final category probability distribution is obtained by weighted averaging the category probability distributions of v perspectives, expressed by the formula:
[0150]
[0151] S512. Use the maximum index function argmax to obtain the model's prediction result 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. Calculate the loss of the multi-view spatiotemporal data mining model using the cross-entropy loss function, expressed by the formula:
[0154]
[0155] Where |I| represents the number of abnormal vehicle events. In this implementation, abnormal vehicle events include illegal parking, collisions between hazardous chemical vehicles, collisions between hazardous chemical vehicles and ordinary vehicles, collisions between ordinary vehicles, and normal vehicle operation; therefore, |I| = 5.
[0156] S602. In order to enable the model to learn the patterns in the data step by step, the mini-batch optimization method is used to divide the training data into multiple small batches for training the multi-view spatiotemporal data mining model.
[0157] For example, batch_size can be set to 128, thereby improving the accuracy of predictions for new data.
[0158] S603 employs the Radam optimizer for parameter optimization and introduces an early stopping mechanism. This means that when the model's test accuracy reaches a preset range and no longer improves, training is stopped. This prevents the model from "memorizing" the details of the training data, allowing it to learn general patterns from the data. In this way, the model won't perform poorly when processing new data due to "rote learning."
[0159] In one possible implementation of this embodiment, the model is trained, validated, and tested using simulated data. The five abnormal events of the vehicle can be represented by 0, 1, 2, 3, and 4, respectively.
[0160] Considering the potential for data incompleteness due to signal transmission distortion and weather factors, the model employs a masking operation on the simulated data. Specifically, a portion of the vehicle sequence data is randomly removed to simulate data gaps in real-world environments. If the change in verification loss does not exceed a preset threshold across multiple consecutive training epochs, the multi-view spatiotemporal data mining model is considered converged and saved. By inputting real-time vehicle data into the model, the model outputs predicted vehicle events. Simultaneously, the vehicle speed is compared with the set minimum and maximum speed thresholds to determine if any speeding or low-speed driving anomalies have occurred.
[0161] In summary, the model in this embodiment can predict 10 abnormal situations, including whether ordinary vehicles are speeding, whether ordinary vehicles are driving at low speeds, whether ordinary vehicles are illegally parked, whether ordinary vehicles collide with each other, whether hazardous chemical vehicles collide with ordinary vehicles, whether hazardous chemical vehicles are speeding, whether hazardous chemical vehicles are driving at low speeds, whether hazardous chemical vehicles are illegally parked, whether hazardous chemical vehicles collide with each other, and whether hazardous chemical vehicles are leaking gas.
[0162] In another possible implementation of this embodiment, step S106 specifically includes the following operations:
[0163] S801. Record detected abnormal vehicle events into the database.
[0164] S802. Vehicle anomaly information is sent to the front-end interface, which then alerts the user with high-priority visual and audio prompts, such as pop-up warning windows, displaying event details, and emitting alarm sounds. This ensures that management personnel receive timely notifications for rapid response.
[0165] For example, on the alarm interface, administrators can view detailed event information, such as event type, time, location, and vehicle type, and have confirmation or processing buttons to clear or update the alert status after the incident is resolved. The system will continue to send alerts until the event is processed to ensure timely response from administrators.
[0166] S803. Retrieves the contact information of configured relevant personnel from the recipient database, such as email address and mobile phone number, ensuring compliance with predefined acceptance permissions. Sends vehicle anomaly event information to the corresponding relevant personnel based on the contact information to achieve 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 principles of the present invention should be included within 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 includes: S101. Collect multi-view data information of vehicles entering the toll station area through physical sensing layer equipment; S102. The network transport layer transmits the multi-view data information collected by the physical sensing layer to the computing service layer. S103. The computing service layer receives and processes multi-view data information to obtain multi-view time series data of the vehicle. S104. Constructing multi-view time series data of vehicles in the fractional domain based on fractional Fourier transform; S105. Based on multi-view time series data of vehicles in the fractional domain, anomaly events of vehicles are identified through a multi-view spatiotemporal data mining model. Specifically, the multi-view time series data includes multi-view time series data of vehicles and multi-view time series data in the fractional domain constructed by fractional Fourier transforms of different orders on the multi-view time series data of vehicles. The time series data in each fractional domain perspective are input into the multi-view spatiotemporal data mining model, and convolution operation is performed to extract a multi-head embedding representation matrix. The embedding representation matrix is encoded with absolute position and relative position. A QKV matrix is generated based on the encoded time series. The relative position encoding is integrated into a self-attention mechanism to calculate the correlation between different times in the time series in the fractional domain perspective and obtain an attention vector. After multi-head attention concatenation, a nonlinear transformation is performed through a two-layer perceptron network, and global features in the fractional domain perspective are extracted through residual connection and pooling operations. Then, the fully connected layer is mapped to the probability distribution of each category in the fractional domain perspective. The category probability distribution output by each fractional domain perspective is weighted and fused, and the category with the highest probability is taken as the result of the anomaly event identification. S106. After detecting an abnormal vehicle event, the business application layer executes an alarm push operation.
2. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 1, characterized in that, Step S101 specifically includes the following operations: S201. Acquire vehicle position and speed information using omnidirectional wide-area millimeter-wave radar; S202. Vehicle images are captured by high-speed checkpoint cameras, and vehicle license plates, body colors and vehicle models are identified based on the vehicle images; S203. Use a medium-wave gas leak detector to identify whether a vehicle is experiencing a hazardous gas leak.
3. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 2, characterized in that, Step S103 specifically includes the following operations: S301. Process the vehicle location information and extract the longitude of the vehicle's current location. E and latitude N ; S302, Calculate the current distance of the vehicle from the toll station. The calculation formula is as follows: In the above formula, and These are the longitude and latitude of the toll station, respectively. Unit distance; S303. Based on the current position of the vehicle and the position of the vehicle in front or behind, calculate the distance between the current vehicle and the vehicle in front. And the distance between the current vehicle and the vehicle behind it. ; S304, Calculate vehicle acceleration ,in The vehicle's current speed. The speed of the vehicle at the previous moment. Unit of time; S305. Based on the vehicle's current speed, current distance from the toll station, current acceleration, and distances to the vehicle in front and behind, consider... The time-series dataset of vehicles consists of [number] moments. Its expression is: in This refers to the current moment.
4. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 3, characterized in that, Step S104 specifically includes the following operations: S401. Given a time series Using order of Fractional Fourier Transform Transforming it to the fractional domain, the corresponding expression is: In the above formula, express Fractional Fourier Transform, order , Represents the initial field, i.e., the time field. for fractional domain of order, , , For the angle, when The time series is represented in the time domain; At that time, the time series is represented in the frequency domain. Represents the Dirac delta function. The kernel function representing the fractional Fourier transform; S402. Process the time series dataset using the fractional Fourier transform to calculate the multi-view data of the time series. The calculation formula is as follows: In the above formula, Indicates the number of viewpoints. |p|=V , v Indicates the viewpoint number. Indicates perspective v The following time series dataset, Indicates perspective v The following time series; S403, using the absolute value operation Abs To obtain the amplitude information of fractional-order data, the formula is defined as follows for each viewpoint data: 。 5. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 4, characterized in that, In step S105, time series data from different perspectives are processed separately using a multi-view spatiotemporal data mining model, specifically including: S501, For the input vehicle time series, use m The shape is The filter performs a convolution operation on the time series to obtain the multi-head embedding representation matrix of the time series. E , Indicates the embedding layer dimension. M Indicates the size of the filter convolution kernel; S502, Embedding representation matrix E The encoding is performed, and the corresponding expression is as follows: In the above formula, , It is a sine function. It is a cosine function. Represents a sequence In the index The positional encoding value on; S503, for lengths of L Create a time series of data of size [size missing]. Trainable parameters w For two position indices i and j Its corresponding relative position scalar is Based on this, the time series is encoded with relative positions; S504. Generate a QKV matrix, including a query matrix, through a linear layer. Key matrix Value matrix ; S505. The relative position encoding is fused into the self-attention mechanism to obtain the attention vector of the time series, and the corresponding expression is: In the above formula, A learnable location encoding scalar, representing location. and location The relative position weights between them For query matrix The parameters, Key matrix K The parameters, S This represents tensor filling, slicing, and reshaping operations; S506. Considering a multi-head attention mechanism, the attention vectors from multiple attention heads are concatenated to generate the final attention matrix. H : in, For attention head h The learned attention vector, W It is a learnable parameter matrix; S507. Encode the attention vector using a two-layer perceptron network with a Gaussian error linear unit (GELU) as the activation function to obtain the representation vector. The formula is expressed as: in, and For learnable weight matrices and bias terms, ; S508. Perform a skip-step connection operation, combining the model's input and output through matrix addition, expressed as follows: ; S509. Extracting representation vectors using max pooling and global average pooling techniques. Feature information in; S510. Through a fully connected layer containing a softmax function, the representation vector is... Mapped to the class probability distribution space, the formula is expressed as: S511, through the v The final class probability distribution is obtained by weighted averaging the class probability distributions from each perspective, as expressed by the formula: S512, Using the maximum value index function argmax Obtain the model's prediction results .
6. The method for detecting abnormal behavior of hazardous chemical vehicles based on multi-view spatiotemporal data mining according to claim 5, characterized in that, The method also includes optimizing the multi-view spatiotemporal data mining model, specifically including the following operations: S601. Calculate the loss of the multi-view spatiotemporal data mining model using the cross-entropy loss function, expressed by the formula: in Indicates the number of abnormal vehicle events; S602. The mini-batch optimization method is used to divide the training data into multiple small batches for training the multi-view spatiotemporal data mining model. S603. Use the Radam optimizer to optimize parameters, and stop training when the test accuracy of the multi-view spatiotemporal data mining model reaches the 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, characterized in that, Before identifying abnormal vehicle events using a multi-view spatiotemporal data mining model, the model is trained, specifically including: S701. The multi-view spatiotemporal data mining model is trained using simulated data, and the simulated data is masked. S702. When the loss change does not exceed the preset change threshold in 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, characterized in that, Step S106 specifically includes the following operations: S801. Record detected abnormal vehicle events into the database; S802: Send vehicle abnormal event information to the front-end interface, and the front-end interface prompts the user with visual and audio means. S803. Read the contact information of the configured relevant personnel from the recipient database, and send the vehicle abnormal event information to the corresponding relevant personnel according to the contact information.