Road illegal parking real-time monitoring method based on space-time Transform and congestion context

By constructing a highway illegal parking monitoring method based on spatiotemporal Transformer and congestion context, and utilizing millimeter-wave radar and machine learning algorithms, the problem of high false alarm rate and poor adaptability of illegal parking in complex highway environments has been solved. It has achieved all-weather monitoring with low false alarm rate and generation of credible evidence, and promoted the intelligent upgrade of highway management.

CN121034077APending Publication Date: 2025-11-28贵州省铜仁公路管理局 +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511288722.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing highway illegal parking monitoring technologies suffer from high false alarm rates, poor adaptability to dynamic scenarios, high model update and migration costs, and lack of law enforcement evidence chains in complex and ever-changing open highway environments, making it difficult to meet the needs for all-weather, high-precision monitoring.

Method used

By employing a spatiotemporal Transformer-based approach and congestion context, combined with millimeter-wave radar, unscented Kalman filtering, EWC-XGBoost, and deep Q-networks, an integrated perception-cognition-decision architecture is constructed. Through spatiotemporal feature extraction and dynamic threshold adjustment, illegal parking monitoring with a low false alarm rate is achieved, and tamper-proof electronic evidence is generated.

Benefits of technology

It has achieved all-weather, low false alarm rate monitoring of illegal parking, reduced construction and operation and maintenance costs, improved the accuracy and adaptability of monitoring, and provided reliable technical support for intelligent traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034077A_ABST
    Figure CN121034077A_ABST
Patent Text Reader

Abstract

The invention relates to a road illegal parking real-time monitoring method based on space-time Transform and congestion context, and belongs to the field of intelligent traffic. The method comprises the steps of obtaining a high-precision track through millimeter wave radar radial speed correction, constructing a congestion context in combination with a lane level / local congestion factor and a cumulative static time clock, outputting a parking probability by EWC-XGBoost after spatio-temporal features are fused through a spatio-temporal Transform, dynamically adjusting a residence time threshold value based on DQN, and finally triggering early warning when a direction angle criterion is met. And meanwhile, a 60-second AES encryption track evidence chain is generated. According to the invention, the real-time monitoring capability with a low false alarm rate is realized through a slow motion false alarm resisting design, a full-scene self-adaptive threshold value, continuous online learning and a backtraceable evidence mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of intelligent transportation, and relates to a highway illegal parking real-time monitoring method based on a space-time Transformer and congestion context. BACKGROUND

[0002] Illegal parking of motor vehicles on highways (urban main and secondary trunk roads, national and provincial roads, county and township roads, etc.) not only seriously disrupts the normal traffic order and reduces road traffic efficiency, but also poses a huge safety hazard and easily causes rear-end and other serious traffic accidents. In order to effectively curb such behavior, automatic monitoring and law enforcement technology has emerged.

[0003] Highway illegal parking automatic monitoring technology has undergone continuous development. In the early stage, it mainly relied on ground inductive coil triggering or single-function video snapshot. With the improvement of sensor technology and computing power, it gradually developed to the stage of integrating radar, video, lidar and other multi-source perception information, in order to improve the coverage and accuracy of monitoring. However, in an open highway environment, traffic conditions are extremely complex and changeable. Traffic density often fluctuates dramatically, motor vehicles and non-motor vehicles often mix, mutual occlusion between vehicles and between vehicles and roadside obstacles often occurs, and there are great differences in all-weather lighting conditions (such as strong light during the day, weak light at night, and adverse weather, etc.), which bring serious challenges to the accuracy, robustness and real-time performance of illegal parking monitoring. Existing technologies still cannot fully meet the actual needs of all-weather and high-precision law enforcement when dealing with these complex scenarios.

[0004] At present, the mainstream highway illegal parking monitoring technology can be divided into the following three categories:

[0005] (1) Fixed threshold method: This method is the earliest technology implementation. By installing a ground magnetic sensor, a microwave radar or a single-point camera, the speed of vehicles in the monitoring area is continuously tracked. When it is detected that the speed of a vehicle is continuously below a fixed threshold within a set time window, the system determines that it is illegal parking. The advantage of this method is that the logic is simple and the computing overhead is small. However, its fundamental defect is that it cannot distinguish between true illegal parking and legal temporary low speed or parking state. For example, in common scenarios such as traffic slowdown, intersection congestion, vehicles temporarily avoiding pedestrians or obstacles, etc., the vehicle speed will also be below the threshold for a long time, resulting in a large number of false positives of this method. In addition, the setting of the speed threshold and the duration time needs to rely on manual repeated debugging and calibration, and cannot be adjusted adaptively according to the real-time traffic state, so the scene adaptability is very poor.

[0006] (2) Trajectory clustering or anomaly detection based methods: To overcome the drawbacks of fixed threshold methods, researchers began to use video or radar devices to obtain the continuous motion trajectory of vehicles and analyze based on these trajectory data. Through trajectory clustering, isolation forest algorithm (Isolation Forest), shallow neural network and other machine learning models, the motion pattern "abnormal" or "significant static" trajectory segment is identified and marked as a potential illegal parking event. Compared with the fixed threshold method, this method improves the accuracy of discrimination to some extent by introducing more motion features (such as average speed, acceleration variance, lateral displacement, and residence time). However, its performance is highly dependent on the low-dimensional features designed by humans, which are often difficult to fully describe the dynamic behavior of vehicles over a long period of time and the complex interaction with surrounding vehicles. More importantly, the parameters of these models are fixed after offline training, and when deployed to new road scenes or when the road structure changes, their performance will often decline rapidly, lacking the ability to adapt to new environments.

[0007] (3) End-to-end framework based on deep learning: With the development of deep learning technology, some research began to try to build an end-to-end model, such as using convolutional neural network (CNN) or long short-term memory network (LSTM), to directly map the original image sequence or trajectory data sequence to the classification label of "parking" or "non-parking". This method can show excellent performance on specific, well-annotated closed test datasets. However, in practical applications, this method still has several insurmountable obstacles:

[0008] Strong data dependency: Deep learning models usually require large-scale, high-quality labeled data for training. In a diverse and complex highway scene, collecting and accurately labeling a large amount of illegal parking event data is extremely costly.

[0009] Large computational resource consumption: Complex network structure results in large model size and high inference delay, making it difficult to achieve real-time operation on resource-constrained edge computing devices, which is a major bottleneck for traffic law enforcement applications that require immediate response.

[0010] Lack of explainability: End-to-end models are like a "black box", although they can give discrimination results, they cannot clearly explain the specific basis for making decisions. This makes it difficult for law enforcement departments to provide complete and credible evidence chain of "why to determine", affecting the rigor and fairness of the law enforcement process.

[0011] Insufficient context awareness: Most existing models, in their design, do not fully consider the contextual information of local traffic congestion, as well as the spatiotemporal coupling relationship between illegal parking events and other traffic participants. Therefore, when encountering macroscopic traffic phenomena such as intersection queue overflows and ramp congestion, they are prone to misjudging normally queuing vehicles as illegally parked, leading to a surge in false alarm rates.

[0012] In summary, existing highway illegal parking monitoring technologies generally face common problems such as difficulty in balancing false alarm and false negative rates, poor adaptability to complex and changing scenarios, high costs of model updates and migrations, and missing chains of evidence for law enforcement. Therefore, there is an urgent need in this field for a new real-time highway illegal parking monitoring technology to solve these problems. Summary of the Invention

[0013] In view of this, the purpose of this invention is to provide a real-time monitoring method for illegal parking on highways based on spatiotemporal Transformer and congestion context, solving the technical challenges of high false alarm rate, poor adaptability to dynamic scenarios, and low evidence credibility in monitoring illegal parking in motor vehicle lanes under open highway scenarios. This method constructs an integrated "perception-cognition-decision" architecture to achieve all-weather, all-road-section, low false alarm rate (<1%) automatic detection and reliable evidence collection for illegal parking, significantly improving the accuracy, adaptability, and legal effectiveness of illegal parking monitoring, and providing reliable technical support for intelligent highway supervision.

[0014] To achieve the above objectives, the present invention provides the following technical solution:

[0015] A real-time monitoring method for illegal parking on highways based on spatiotemporal Transformer and congestion context is proposed. This method deeply integrates millimeter-wave radar, congestion context modeling, and spatiotemporal Transformer feature extraction to distinguish between genuine parking and legitimate slow-moving traffic in real time. It utilizes EWC-XGBoost online learning to continuously optimize the model, enabling the system to adaptively adjust judgment thresholds according to traffic conditions, weather, and time of day. Simultaneously, a dynamic decision-making mechanism based on Deep Q-Network (DQN) precisely controls alarm triggering timing under different spatiotemporal scenarios, significantly reducing false alarms and missed alarms. In particular, it generates a 60-second AES-encrypted trajectory evidence chain the instant the vehicle comes to a standstill, providing law enforcement agencies with complete, traceable, and tamper-proof electronic evidence.

[0016] The method includes the following steps:

[0017] S1: Radial velocity correction: The radial velocity of the vehicle is measured using millimeter-wave radar and corrected by unscented Kalman filtering (UKF) to eliminate cosine error and noise interference, thereby obtaining the vehicle's true horizontal velocity.

[0018] S2: Congestion Measurement: Based on the acquired real horizontal speed, calculate lane-level congestion factor and local congestion factor, and combine with the vehicle's cumulative stationary time to construct congestion context;

[0019] S3: Congestion Embedding: Taking vehicle trajectory features (including global coordinates, true horizontal speed, acceleration, heading angle, length, and time) and congestion context as input, a spatiotemporal Transformer encoder is used to extract high-dimensional features with spatiotemporal dependence and congestion perception capabilities.

[0020] S4: Parking probability determination: The high-dimensional features, congestion factors and cumulative stationary time output by the spatiotemporal Transformer are used as inputs, and the parking probability of the vehicle is output through the EWC-XGBoost model, where the EWC-XGBoost model means the XGBoost model combined with Elastic Weights Consolidation (EWC).

[0021] S5: Dynamic threshold adjustment: Based on real-time traffic conditions (including congestion level, weather and time, etc.), the dwell time threshold for illegal parking judgment is dynamically adjusted using a deep Q network (DQN) to balance false alarms and false negatives and ensure that the system maintains a low false alarm rate in different scenarios.

[0022] S6: Illegal Parking Detection and Warning: When the cumulative stationary time of a vehicle exceeds the dynamically adjusted dwell time threshold, and the deviation between its heading angle and the heading angle of the lane centerline is within the preset range, it is determined to be illegal parking and a warning is triggered.

[0023] Furthermore, in step S1, the radial velocity correction specifically includes the following steps:

[0024] S11: Calculate the angle φ between the radar line of sight and the horizontal plane. t ;

[0025] S12: The radial velocity v measured by millimeter-wave radar is calculated using the following formula. r (t) is converted to the vehicle's actual horizontal speed v true (t));

[0026]

[0027] S13: Use unscented Kalman filtering (UKF) to predict the true horizontal speed. When the relative error between the measured speed and the predicted speed exceeds 20%, the prediction result of UKF is used instead.

[0028] Furthermore, in step S2, the congestion measurement specifically includes the following steps:

[0029] S21: Calculate lane-level congestion factor ρ laneThis measures the degree to which the average speed of vehicles within a lane decreases relative to the free-flow speed; the local congestion factor ρ is calculated. local To measure the proportion of stationary vehicles within a 50-meter radius of a vehicle;

[0030] S22: Calculate the vehicle's cumulative stationary time False alarms in congested scenarios are suppressed by weighting congestion factors.

[0031] Furthermore, in step S3, the spatiotemporal Transformer encoder includes time-level multi-head self-attention and scene-level multi-head self-attention; the time-level multi-head self-attention is used to capture the temporal pattern of the vehicle's own historical trajectory, that is, to obtain time-level features, and the scene-level multi-head self-attention is used to capture the interaction relationship between the vehicle and neighboring vehicles, that is, to obtain scene-level features, and the two features are spliced ​​together to obtain congestion perception features.

[0032] Furthermore, in step S4, the objective function of the EWC-XGBoost model is:

[0033]

[0034] in, The total loss of the model, For logistic regression loss, L EWC For EWC regularization loss, Ω XGB ) represents the complexity of the XGBoost regularization term; y i Let i be the true label of the i-th sample. The model outputs the parking probability; N is the batch sample size, equal to the number of vehicles; λ is the EWC regularization strength coefficient, F k For parameter θ k Fisher information diagonal element, θ k Let θ be the k-th learnable parameter of the current model. A,k The k-th parameter value archived after the old task converges; γ XGB λ is the penalty coefficient for the number of leaf nodes in XGBoost, T is the number of decision trees, and λ is the number of leaf nodes. XGB Here, w represents the L2 regularization coefficients for the XGBoost leaf weights, T is the number of decision trees, and w is the number of decision trees. t Let be the weight vector of the leaf of the t-th tree.

[0035] Furthermore, in step S5, the deep Q-network (DQN) includes a state space s t Action Space A t and reward function R t ;

[0036] The state space s t Including lane-level congestion factor ρ laneLocal congestion factor ρ local Current lane average speed v avg Weather and time (hours);

[0037] The action space is a dwell time scaling factor A. t ;

[0038] The reward function R t Used to balance the false alarm and missed alarm rates in early warning systems, defined as:

[0039] R t =k1×R miss +k2×R fp +k3×R delay

[0040] Among them, R miss As a penalty for underreporting, R fp As a penalty for false alarms, R delay The penalty is delayed, and k1, k2, and k3 are the corresponding weights.

[0041] Furthermore, in step S5, the residence time threshold... The calculation formula is:

[0042]

[0043] Among them, T s,0 This is the baseline threshold.

[0044] Furthermore, in step S6, the determination of illegal parking is as follows:

[0045] 1) Cumulative stationary time τ i satisfy:

[0046] 2) Direction angle determination: |θ i -θ lane |≤10°;

[0047] Where, θ i Let θ be the heading angle of vehicle i. lane This is the heading angle of the lane centerline.

[0048] Furthermore, in step S6, when the warning is triggered, the vehicle's trajectory data for the previous 60 seconds is generated and encrypted with AES to form an immutable chain of evidence.

[0049] The beneficial effects of this invention are as follows: This invention constructs an integrated "perception-cognition-decision" architecture, deeply fusing the high-precision trajectory of millimeter-wave radar with congestion context, and introducing a spatiotemporal Transformer to complete multi-scale spatiotemporal feature extraction, enabling the system to distinguish between "real illegal parking" and "slow-moving traffic" in real time in open highway scenarios. Simultaneously, with the help of online learning using the EWC-XGBoost model, the model can continuously absorb new data without interrupting service, adaptively updating thresholds across time periods, weather conditions, and road segments, completely eliminating the need for repeated manual calibration.

[0050] Compared with existing fixed thresholds or offline models, this invention can complete millisecond-level inference at the edge, is plug-and-play in deployment, requires no additional cloud computing power, and significantly reduces construction and maintenance costs. Its high robustness and continuous evolution capabilities provide all-weather, low-cost support for illegal parking monitoring and enforcement on various types of highways, including urban main and secondary roads, national and provincial highways, and promote the rapid evolution of highway management towards intelligence and refinement.

[0051] This invention provides a universal, accurate, and reliable real-time monitoring solution for illegal parking in future smart highway systems, promoting the intelligent upgrading of highway management, reducing traffic congestion and secondary accidents caused by illegal parking, and helping to build a safer, more efficient, and greener road traffic environment.

[0052] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0053] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0054] Figure 1 This is a flowchart of the real-time monitoring method for illegal parking on highways based on spatiotemporal Transformer and congestion context according to the present invention. Detailed Implementation

[0055] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0056] Example 1:

[0057] Please see Figure 1 This invention provides a real-time monitoring method for illegal parking on highways based on a spatiotemporal Transformer and congestion context. It constructs an integrated "perception-cognition-decision" highway illegal parking monitoring architecture: High-precision trajectories are obtained through radial velocity correction using millimeter-wave radar; congestion context is constructed by combining lane-level / local congestion factors and cumulative stationary time; spatiotemporal features are fused using a spatiotemporal Transformer; the parking probability is output by EWC-XGBoost; and the dwell time threshold is dynamically adjusted based on DQN. Finally, an early warning is triggered when the direction angle criterion is met, and a 60-second AES encrypted trajectory evidence chain is generated. The system achieves a real-time monitoring capability with a false alarm rate of <1% through anti-slow-movement false alarm design, full-scenario adaptive thresholds, continuous online learning, and a traceable evidence mechanism. The core process is as follows: Figure 1 As shown.

[0058] 1. Radial velocity correction (millimeter wave → true velocity)

[0059] The radial velocity (velocity component along the radar line of sight) measured by millimeter-wave radar is converted into the vehicle's true horizontal velocity, eliminating the interference of cosine error on speed estimation. At the same time, speed correction is used to eliminate the influence of high speed noise of slow-moving vehicles that can easily cause abnormal fluctuations. Subsequently, congestion context, Transformer and threshold adaptation provide accurate input.

[0060] (1) Obtain the raw data:

[0061] Radar coordinate system: The millimeter-wave radar is installed at (x... r ,y r ,z r (UTM projected coordinate system, unit: meters), where z r This is the radar altitude.

[0062] Target vehicle coordinate system: The vehicle position detected by radar is (x... t ,y t ,z t), where z t For the vehicle height (assuming it is the ground), z t ≈0).

[0063] (2) Calculation of cosine angle:

[0064]

[0065] Where, φ t φ is the angle between the radar line of sight and the horizontal plane (i.e., the elevation angle). t The smaller the value of φ, the closer the radar line of sight is to the horizontal direction, and the smaller the cosine error; t The larger the value (e.g., if the radar is installed too high or the vehicles are too close), the more significant the cosine error becomes.

[0066] (3) Calculation of actual speed:

[0067] Radar-measured velocity v r (t) represents the vehicle's velocity component along the radar line of sight, i.e.:

[0068]

[0069] Among them, v true (t) represents the vehicle's actual horizontal speed.

[0070] (4) Anomaly Correction:

[0071] Radial velocity v r (t) Due to noise interference (such as multipath effect, target occlusion), direct correction may lead to v true (t) fluctuates drastically. Therefore, an unscented Kalman filter (UKF) is introduced to predict the velocity. When the relative error exceeds 20%, the UKF result is used instead.

[0072] like but

[0073] (5) The formula for calculating acceleration a(t) is:

[0074]

[0075] Where Δt is the radar data frame interval.

[0076] 2. Congestion Measurement

[0077] Accurately quantifying congestion intensity under different traffic scenarios (such as free flow, local congestion, and overall lane congestion) provides a key basis for subsequent feature extraction and threshold adaptation, ultimately achieving low false alarm and high detection rate for illegal parking monitoring.

[0078] (1) Lane-level congestion factors:

[0079] This measure assesses the degree to which the average speed of vehicles within a lane decreases relative to the free-flow speed, reflecting the overall congestion level of the lane. Based on the lane number l detected by radar, the set L of vehicles in the same lane is extracted. l (via the horizontal position y of the trajectory) lat judge).

[0080] Average speed of vehicles within lane l The calculation formula is:

[0081]

[0082] Among them, v true,j The actual horizontal speed of vehicle j;

[0083] Lane-level congestion factor ρ lane The calculation formula is:

[0084]

[0085] Among them, v free,l The free-flow velocity is calibrated offline (e.g., 120 km / h).

[0086] (2) Local congestion factors:

[0087] The severity of congestion in a localized area is reflected by measuring the proportion of stationary vehicles within a 50-meter radius of the vehicle.

[0088] The set of vehicles within a 50-meter radius of vehicle i. (Calculated and determined using Euclidean distance); Number of stationary vehicles N stop The calculation formula is:

[0089]

[0090] in, This is an indicator function.

[0091] Local congestion factor ρ local The calculation formula is:

[0092]

[0093] (3) Cumulative stationary time:

[0094] The cumulative stationary time of vehicle i is weighted by congestion factor to suppress false alarms in congestion scenarios (the more severe the congestion, the less likely a brief stop will trigger a stop determination).

[0095] Cumulative static time The calculation formula is:

[0096]

[0097] Where γ = 0.95 (attenuation factor), v th =0.3m / s (stationary threshold), Δt =0.1s (radar data frame interval 10Hz); v true,i (t) represents the actual horizontal speed of vehicle i at time t.

[0098] 3. Spatiotemporal Transformer Encoder (Congestion Embedding)

[0099] By deeply fusing vehicle trajectory features (position, speed, acceleration, etc.) with congestion context (lane-level / local congestion factors), high-dimensional features with spatiotemporal dependence and congestion perception capabilities are extracted, providing discriminative input for subsequent parking determination.

[0100] (1) Input embedding vector:

[0101]

[0102] Among them, (x i ,y i ) represents the global coordinates of vehicle i; v true,i a is the actual horizontal speed of vehicle i; i Let θ be the acceleration of vehicle i; i τ is the heading angle of vehicle i; i ρ is the cumulative stationary time of vehicle i; lane ,ρ local Lane-level / local congestion factor; y lat The lateral position of the lane; s i The length of vehicle i; hour t For time in hours (one-hot encoded);

[0103] Through a fully connected layer (weight matrix E∈R) 11*128 The 11-dimensional features are mapped to 128 dimensions to obtain the initial embedding vector.

[0104] Position encoding 128-dimensional sine and cosine → summation yields

[0105] (2) Time-level multi-head self-attention

[0106] Capture the temporal patterns of the vehicle's own historical trajectory (such as deceleration, stationary, and acceleration processes);

[0107] Time window: T w =20 frames;

[0108] The query, key, and value for time-level multi-head self-attention are:

[0109]

[0110] Among them, Q i,t K represents the query vector of vehicle i at time t, used to calculate the similarity with the key vectors of other vehicles; i,t′ V represents the key vector of vehicle i at time t′, used to calculate attention weights with the Query; i,t′ W represents the value vector of vehicle i at time t′, used for weighted summation to obtain the output feature. Q W is a linear transformation matrix that maps input features to a query vector. K W is a linear transformation matrix that maps input features to a key vector. V This is a linear transformation matrix that maps input features to a value vector. These matrices are typically learnable parameters with dimension W. Q W K W V ∈(d model ×d k ), where d model d is the input feature dimension. k The dimension of the attention map is 16 in this method.

[0111] Attention calculation:

[0112]

[0113] in, Let h be the attention weight of the h-th head and vehicle i at the current time t to the historical time t′. Let be the Query vector for vehicle i at time t. Let d be the key vector of vehicle i at time t′. k For a single-head dimension (total dimension 128 / 8 heads), t′ is the index of a historical moment in the sliding time window. For example, if the current frame t = 100, the window T W =20, then t′ is 20 frames from 81 to 100. h is the head number in the multi-head attention. This method has a total of 8 heads, h = 1, 2, ..., 8, each head has 16 dimensions, and together they form a 128-dimensional output.

[0114] Time aggregation:

[0115] ① Single-head time attention:

[0116]

[0117] in, Aggregate the feature vector (d) for vehicle i at the h-th head time. k dimension); Attention weights at time t′; Let be the Value vector (d) of vehicle i at time t′. k (Dimension); t′ is the index of the historical frame within the sliding time window; window length T w =20 frames; d k =16, which is a single-head dimension.

[0118] ②Multi-head splicing:

[0119]

[0120] in, The concatenated time feature vector (8×d) k =128 dimensions); ‖ is the vector concatenation operation; h=1,…,8: attention head number.

[0121] ③Scene-level spatial attention:

[0122]

[0123] in, Let be the spatial interaction feature vector (d) of vehicle i at the h-th head. k dimension); The query vector (d) for vehicle i k dimension); The key vector (d) of neighbor vehicle j k dimension); Let the Value vector (d) of neighbor vehicle j be... k dimension); Let d be the set of neighboring vehicles centered at vehicle i with a radius of 120m; k =16, which is a single-head dimension.

[0124] (3) Scene-level multi-head self-attention

[0125] Capture the interaction between the vehicle and neighboring vehicles;

[0126] Neighborhood definition: The set of vehicles within a radius of 120 meters centered on vehicle i.

[0127] The query, key, and value for scene-level multi-head self-attention are:

[0128]

[0129] Among them, Q′ i Let K′ be the query vector for vehicle i.j Let V′ be the key vector of neighboring vehicle j. j Let W′ be the value vector of neighboring vehicle j. Q 、W′ K 、W′ V It is a learnable projection matrix.

[0130] Attention calculation:

[0131]

[0132] in, Let i be the query vector at the h-th head of vehicle i, with dimension 16; Let J be the Key vector of neighbor vehicle J at the h-th head, with dimension 16; The h-th head is a learnable projection matrix; Let d be the set of neighboring vehicles centered at i with a radius of 120m; k =16, which is a single-head dimension used for scaling dot products.

[0133] Spatial aggregation:

[0134]

[0135] in, Let the value vector of neighbor vehicle j at the h-th head be 16 in dimension. The h-th head is a learnable projection matrix; Let h be the head attention weight of i to j; Let i be the spatial interaction characteristics of vehicle i at the h-th head.

[0136] (4) Final output

[0137] Time-level features Scene-level features By splicing the features together, we obtain a 256-dimensional congestion perception feature F. c :

[0138]

[0139] 4. Online learning of the EWC-XGBoost model

[0140] By combining Elastic Weight Consolidation (EWC) with the XGBoost algorithm, high-precision classification of illegal parking is achieved. At the same time, EWC is used to suppress catastrophic forgetting in online learning, ensuring that the model adapts to dynamic traffic environments.

[0141] (1) Training samples

[0142] The input feature x is:

[0143] x = [Fc ,ρ lane ,ρ local ,τ i ]

[0144] in, For the congestion perception features output by the spatiotemporal Transformer, ρ lane / ρ local τ is the congestion factor. i This represents the cumulative static time.

[0145] Label: y∈{0,1}.

[0146] (2) Objective function

[0147] Basic loss: Logistic Loss, which measures classification error.

[0148]

[0149] in, The logistic regression loss (cross-entropy) measures the difference between the predicted probability and the true label; y i The true label for the i-th sample is 0 (not parked) or 1 (parked); The parking probability is the output of the model, ranging from [0,1]; N is the batch sample size, which is equal to the number of vehicles.

[0150] EWC regularization: Suppresses modifications to historically important parameters, preserving key knowledge.

[0151]

[0152] Where λ is the EWC canonical intensity coefficient, determined by mesh parameter tuning; F k For parameter θ k The larger the diagonal element of the Fisher information, the more the old task relies on this parameter; θ k θ is the k-th learnable parameter of the current model. A,k This is the k-th parameter value archived after the old task converges (the baseline for calculating Fisher).

[0153] Fisher information matrix calculation:

[0154] Fisher information measurement parameter θ k The contribution to historical tasks (such as classification in previous traffic scenarios) is calculated as the expected square of the gradient of historical data:

[0155]

[0156] in, The average of the squared gradients over all historical training samples is used to estimate the diagonal element F of the Fisher information. k XGBoost regularization term: Prevents overfitting and controls model complexity Ω. XGB :

[0157]

[0158] Where, γ XGB XGBoost leaf node number penalty coefficient; T is the number of decision trees (total number of leaf nodes); λ XGB w represents the L2 regularization coefficients for the XGBoost leaf weights. t Let be the weight vector of the leaf of the t-th tree.

[0159] Overall objective function:

[0160]

[0161] 5. DQN Congestion Adaptive Threshold

[0162] The dwell time threshold for determining illegal parking is dynamically adjusted based on real-time traffic conditions (such as congestion level, weather, and time). Balance false alarms and false negatives to ensure the system maintains a low false alarm rate (<1%) in different scenarios.

[0163] (1) State space:

[0164] s t =[ρ lane ,ρ local ,v avg [weather, hour]

[0165] Where, ρ lane ,ρ local Lane-level / local congestion factor; v avg The current average speed of the lane (by (Calculation); weather represents the weather, 3D one-hot (sunny / rainy / foggy); hour represents the time (one-hot encoding, 0-23, 24 dimensions in total).

[0166] (2) Action space

[0167] Action is defined as dwell time scaling factor a t There are a total of 11 discrete actions:

[0168] a t ∈{-0.05,-0.04,…,0.05}

[0169] Duration of stay The calculation formula is as follows:

[0170]

[0171] Among them, T s,0 =15s is the baseline threshold.

[0172] (3) Reward Function (Multi-objective)

[0173] Reward function R t Used to balance the false alarm and missed alarm rates in early warning systems, defined as:

[0174] R t =k1×R miss +k2×R fp +k3×E delay

[0175] Among them, R miss The penalty for underreporting is calculated using the following formula:

[0176]

[0177] Among them, missRate v The percentage of events that actually occurred but were not warned of:

[0178]

[0179] Where, N miss N represents the number of missed reports, and N represents the total number of reports that should have been issued a warning.

[0180] R fp The penalty for false alarms is calculated using the following formula:

[0181]

[0182] Among them, fpRate v The percentage of events that actually occurred but were falsely reported:

[0183]

[0184] Where, N fp This represents the number of false alarms.

[0185] R delay The delay penalty is based on the actual push delay. actual Delay with target target Calculation deviation penalty:

[0186]

[0187] The values ​​of the weights k1, k2, and k3 corresponding to the missed detection penalty, false positive penalty, and delay penalty in the reward function are shown in Table 1.

[0188] Table 1. Weight values ​​of the reward function

[0189] ​ [ k2 ] [ k3 ] -1 -2 -0.1

[0190] (4) Network structure:

[0191] Input: 30 dimensions;

[0192] Hidden: 2×256 ReLU;

[0193] Output: 11-dimensional Q-value;

[0194] Experience pool: 50k, batch size: 32, target network synchronization every 1000 steps.

[0195] 6. Event chain backtracking and early warning

[0196] When illegal parking is detected, an early warning is triggered in real time and the vehicle's trajectory data for the previous 60 seconds is stored (encrypted), providing an tamper-proof chain of evidence for law enforcement.

[0197] Two-condition judgment logic:

[0198] (1) Cumulative stationary time:

[0199] (2) Direction angle determination: |θ i -θ lane |≤10°, where θ lane This is the heading angle of the lane centerline.

[0200] The real-time trigger condition is:

[0201]

[0202] Among them, Alarm i This is the illegal parking alarm flag for vehicle i (1 indicates an alarm is triggered, 0 indicates no alarm is triggered). This is an indicator function (condition = 1 if true, otherwise = 0).

[0203] Example 2:

[0204] Based on the real-time monitoring method for illegal parking on highways based on spatiotemporal Transformer and congestion context provided in Embodiment 1, this embodiment relates to a real-time monitoring system for illegal parking on highways, including a data perception layer, a data fusion processing layer, an intelligent decision-making layer, and an enforcement output layer.

[0205] The data perception layer obtains the vehicle's radial velocity along the radar's line of sight using millimeter-wave radar, and uses radial velocity correction (UKF filtering to eliminate cosine error) to obtain the vehicle's true horizontal velocity and acceleration.

[0206] The data fusion processing layer calculates lane-level congestion factors and local congestion factors based on the actual horizontal speed of vehicles; and constructs a congestion context by combining the cumulative stationary time of vehicles, and fuses the spatiotemporal features into dimensional features through a spatiotemporal Transformer encoder.

[0207] The intelligent decision-making layer inputs dimensional features, lane-level congestion factors, local congestion factors, and cumulative stationary time into EWC-XGBoost, outputs the parking probability, and dynamically adjusts the dwell time threshold based on DQN.

[0208] The enforcement output layer determines and warns of illegal parking incidents based on dual-condition judgment logic; when illegal parking is detected, it triggers an alert in real time and stores the vehicle's trajectory data for the previous 60 seconds (encrypted), providing an tamper-proof chain of evidence for law enforcement.

[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for real-time monitoring of illegal parking on highways based on spatiotemporal Transformer and congestion context, characterized in that, The method includes the following steps: S1: Measure the radial velocity of the vehicle using millimeter-wave radar and correct the radial velocity using unscented Kalman filtering to eliminate cosine error and noise interference, thereby obtaining the vehicle's true horizontal velocity. S2: Based on the acquired real horizontal speed, calculate the lane-level congestion factor and local congestion factor, and construct the congestion context by combining the vehicle's cumulative stationary time; S3: Using vehicle trajectory features and congestion context as input, a spatiotemporal Transformer encoder is used to extract high-dimensional features with spatiotemporal dependence and congestion perception capabilities. S4: The high-dimensional features, congestion factor and cumulative stationary time output by the spatiotemporal Transformer are used as inputs, and the vehicle parking probability is output through the EWC-XGBoost model, where the EWC-XGBoost model represents the XGBoost model combined with elastic weights for reinforcement. S5: Based on real-time traffic conditions, dynamically adjust the dwell time threshold for illegal parking judgment using a deep Q network to balance false alarms and false negatives; S6: When the cumulative stationary time of a vehicle exceeds the dynamically adjusted dwell time threshold, and the deviation of its heading angle from the heading angle of the lane centerline is within the preset range, it is determined to be illegal parking and a warning is triggered.

2. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, Step S1 specifically includes the following steps: S11: Calculate the angle φ between the radar line of sight and the horizontal plane. t ; S12: The radial velocity v measured by millimeter-wave radar is calculated using the following formula. r (t) is converted to the vehicle's actual horizontal speed v true (t)); S13: Use unscented Kalman filtering to predict the true horizontal speed. When the relative error between the measured speed and the predicted speed exceeds 20%, the prediction result of UKF is used instead.

3. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, Step S2 specifically includes the following steps: S21: Calculate lane-level congestion factor ρ lane This measures the degree to which the average speed of vehicles within a lane decreases relative to the free-flow speed; the local congestion factor ρ is calculated. local To measure the proportion of stationary vehicles within a 50-meter radius of a vehicle; S22: Calculate the vehicle's cumulative stationary time False alarms in congested scenarios are suppressed by weighting congestion factors.

4. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, In step S3, the spatiotemporal Transformer encoder includes time-level multi-head self-attention and scene-level multi-head self-attention; the time-level multi-head self-attention is used to capture the temporal pattern of the vehicle's own historical trajectory, that is, to obtain time-level features, and the scene-level multi-head self-attention is used to capture the interaction relationship between the vehicle and neighboring vehicles, that is, to obtain scene-level features, and the two features are spliced ​​together to obtain congestion perception features.

5. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, In step S4, the objective function of the EWC-XGBoost model is: in, The total loss of the model, For logistic regression loss, L EWC For EWC regularization loss, Ω XGB ) represents the complexity of the XGBoost regularization term; y i Let i be the true label of the i-th sample. The model outputs the parking probability; N is the batch sample size, equal to the number of vehicles; λ is the EWC regularization strength coefficient, F k For parameter θ k Fisher information diagonal element, θ k Let θ be the k-th learnable parameter of the current model. A,k The k-th parameter value archived after the old task converges; γ XGB λ is the penalty coefficient for the number of leaf nodes in XGBoost, T is the number of decision trees, and λ is the number of leaf nodes. XGB Here, w represents the L2 regularization coefficients for the XGBoost leaf weights, T is the number of decision trees, and w is the number of decision trees. t Let be the weight vector of the leaf of the t-th tree.

6. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, In step S5, the deep Q-network includes a state space s t Action Space A t and reward function R t ; The state space s t Including lane-level congestion factor ρ lane Local congestion factor ρ local Current lane average speed v avg Weather and time (hours); The action space is a dwell time scaling factor A. t ; The reward function R t Used to balance the false alarm and missed alarm rates in early warning systems, defined as: R t =k1×R miss +k2×R fp +k3×R delay Among them, R miss As a penalty for underreporting, R fp As a penalty for false alarms, R delay The penalty is delayed, and k1, k2, and k3 are the corresponding weights.

7. The method for real-time monitoring of illegal parking on highways according to claim 6, characterized in that, In step S5, the residence time threshold The calculation formula is: Among them, T s,0 This is the baseline threshold.

8. The method for real-time monitoring of illegal parking on highways according to claim 7, characterized in that, In step S6, the steps for determining illegal parking are as follows: 1) Cumulative stationary time τ i satisfy: 2) Direction angle determination: |θ i -θ lane |≤10°; Where, θ i Let θ be the heading angle of vehicle i. lane This is the heading angle of the lane centerline.

9. The method for real-time monitoring of illegal parking on highways according to claim 1, characterized in that, In step S6, when the warning is triggered, the vehicle's trajectory data for the previous 60 seconds is generated and encrypted with AES to form an immutable chain of evidence.

Citation Information

Cited By

  • Highway congestion length identification method based on aerial video

    CN121640713A

  • Traffic jam state real-time monitoring method based on Internet of Things multi-source data fusion

    CN122116648A