A micro-traffic state real-time sensing method and system for unmanned aerial vehicle edge computing
By constructing a dual complementary graph structure and M-STGCN Block for UAV edge computing, the problems of high computational complexity and lagging traffic condition response in UAV edge computing are solved, achieving lightweight, fast response and high-precision micro-traffic condition perception.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNIV OF TECH
- Filing Date
- 2026-04-23
- Publication Date
- 2026-06-26
AI Technical Summary
Existing deep learning-based traffic prediction methods suffer from high computational complexity, poor edge adaptability, inability to quickly respond to sudden changes in traffic conditions, and lack of dynamic fusion of physical and semantic features in UAV edge computing scenarios, resulting in insufficient accuracy and real-time performance in microscopic traffic state perception.
A dual complementary graph structure is constructed, including a static physical graph and a component-aware dynamic semantic graph. Spatiotemporal feature encoding is performed by combining M-STGCN Block, and Mamba layer is used to replace Transformer. A gated sparsity mechanism is introduced to achieve lightweight and fast response.
It significantly improves the accuracy of micro-state recognition of mixed traffic flow, reduces computational complexity and memory usage, achieves millisecond-level real-time inference and rapid capture of high-frequency changes in traffic flow, enhances early warning capabilities, and reduces deployment costs and the impact of noise interference.
Smart Images

Figure CN122289796A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent transportation and deep learning technology, specifically to a method and system for real-time perception of microscopic traffic conditions using edge computing of unmanned aerial vehicles (UAVs). Background Technology
[0002] With the acceleration of global urbanization, Intelligent Transportation Systems (ITS) have become a core technological support for alleviating traffic congestion and improving road safety and efficiency. At the perception layer of intelligent transportation, traditional devices such as geomagnetic coils and fixed cameras suffer from limitations such as fixed deployment locations, limited monitoring fields of view, and blind spots, making it difficult to achieve precise capture of highly dynamic traffic flow across the entire road surface. Drones, with their high mobility, panoramic wide field of view, and flexible on-demand deployment, have become important equipment for high spatiotemporal resolution microscopic traffic dynamic monitoring, and are widely used in scenarios such as traffic flow data collection, accident monitoring, and congestion early warning.
[0003] Microscopic traffic state perception focuses on instantaneous dynamic changes at the vehicle and fleet levels, placing stringent demands on the real-time performance, accuracy, and edge deployment adaptability of algorithms. As typical edge computing devices, drones face strict limitations in onboard computing resources, battery life, and storage capacity. Achieving rapid processing and accurate state inference of high-frequency, nonlinear microscopic trajectory data under these resource constraints has become a critical technical challenge that urgently needs to be addressed in the field of intelligent transportation.
[0004] Existing deep learning-based traffic prediction methods have the following significant drawbacks when applied to edge computing scenarios using drones: 1. Insufficient modeling of the heterogeneity of traffic flow physical components: Mainstream graph neural networks (such as ST-GCN and DCRNN) mostly construct graph structures based on static geometric distance or statistical similarity, treating traffic data as a general numerical sequence. They do not explicitly encode prior knowledge of physical components such as vehicle type, size, and mass, making it difficult to model the fluid instability characteristics driven by heterogeneous vehicle types, resulting in insufficient prediction accuracy in mixed traffic flow scenarios.
[0005] 2. High computational complexity and poor edge adaptability: Transformer and its variants rely on global self-attention. The computation and memory usage increase quadratically with the sequence length. Even lightweight variants still cannot meet the millisecond-level real-time inference requirements of UAV embedded chips, and are prone to problems such as excessive inference latency and inability to provide timely warnings of traffic shock waves.
[0006] 3. Insufficient ability to capture high-frequency abrupt state changes: RNN-type models have memory inertia, and Transformer tends to smooth global aggregation. When faced with step-like state changes such as free flow-congestion shock waves, they are prone to lag response or over-smoothing, and cannot quickly and accurately identify state changes.
[0007] 4. Lack of dynamic fusion mechanism of physical and semantic dual features: Existing methods only rely on physical adjacency or data-driven statistical relationships, and have not built a dynamic graph structure that integrates spatial location and vehicle component semantics, resulting in weak generalization ability in complex scenarios.
[0008] Based on the above-mentioned shortcomings, there is an urgent need for a real-time microscopic traffic condition perception method that is adapted to edge computing of UAVs, lightweight, high-precision, and can quickly respond to sudden changes in traffic conditions. Summary of the Invention
[0009] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, one object of this invention is to propose a method and system for real-time perception of microscopic traffic conditions using UAV edge computing, in order to achieve the following objectives: 1. Explicitly model the heterogeneity of vehicle physical components to improve the accuracy of micro-state recognition in mixed traffic flows; 2. Reduce model computational complexity and memory usage to adapt to real-time inference on drone edge devices; 3. Quickly capture high-frequency changes in traffic flow, eliminate lag effects, and accurately warn of traffic shock waves; 4. Construct a dual complementary physical-semantic graph structure to achieve efficient integration of spatial neighborhood and semantic association.
[0010] To achieve the above objectives, this invention provides a method for real-time perception of microscopic traffic conditions using UAV edge computing, comprising the following steps: S1. Data acquisition, preprocessing, and component features extraction: Data cleaning and discretization, spatiotemporal feature tensor construction, and extraction of vehicle physical component feature matrix are completed from the raw vehicle trajectory data from the perspective of UAV. S2. Construct a dual complementary graph structure. Based on the processing results of step S1, construct a static physical graph and a component-aware dynamic semantic graph respectively to form a dual complementary graph structure system of physical and semantic elements. S3. Spatiotemporal alternating structure feature encoding based on M-STGCN Block: The spatiotemporal feature tensor constructed in step S1 is input into the stacked M-STGCNB lock encoder, and the spatiotemporal feature encoding process is completed by combining the dual complementary graph structure in step S2, and a high-dimensional spatiotemporal representation is output. S4. Infer the micro-traffic state. Input the high-dimensional spatiotemporal representation output from step S3 into the decoder. Through decoding operations, obtain the probability distribution of the micro-traffic state for several future time steps, and realize the real-time perception of the micro-traffic state.
[0011] Preferably, step S1 specifically includes: S1.1 Data Cleaning and Discretization: Obtain vehicle trajectory data from the perspective of the drone, including vehicle ID, timestamp, instantaneous speed, and lane location. Divide the continuous trajectory data into non-overlapping time windows. Based on the instantaneous speed of the vehicle and the following distance, discretize the micro traffic flow into a preset dynamic phase, which serves as a supervision label for model training. S1.2 Tensor Construction: Construct a spatiotemporal feature tensor with dimensions of [batch size, time series length, number of vehicle nodes, number of feature channels]; S1.3 Component Knowledge Feature Index: Reserve specific dimensions in the feature channels of the spatiotemporal feature tensor to encode vehicle physical component information, define a knowledge index list, and extract the component feature matrix from the last time step of the spatiotemporal feature tensor.
[0012] Preferably, step S2 specifically includes: S2.1 Constructing a static physical graph: Construct an adjacency matrix based on the Euclidean distance between vehicle nodes, use a threshold Gaussian kernel function to calculate the physical proximity between nodes, and perform Laplace normalization on the adjacency matrix to obtain a normalized Laplace matrix. S2.2 Constructing a component-aware dynamic semantic graph: Using the component feature matrix extracted in step S1.3, a semantic adjacency matrix is dynamically generated through the component-aware knowledge graph module, specifically including: S2.2.1 Component Projection: Input the physical component features into a multilayer perceptron and map them from a low-dimensional statistical space to a high-dimensional semantic embedding space to obtain the semantic embedding; S2.2.2 Interactive Attention Calculation: Using the self-attention mechanism, a query matrix and a key matrix are generated through a linear layer, and a preliminary association score matrix between nodes is calculated. S2.2.3, Gated Physical Sparsity: Introduce a learnable gating threshold parameter, retain only the connections in the association score matrix whose association scores are greater than the gating threshold parameter, and generate a sparse dynamic semantic adjacency matrix.
[0013] Preferably, the M-STGCN Block in step S3 adopts a "temporal-spatial-temporal" mezzanine architecture, using a state-space model to replace the traditional Transformer to achieve linear complexity computation, specifically including: S3.1 Temporal Preprocessing Flow: The spatiotemporal feature tensor is input into the Mamba layer containing the selective state-space model. The state transition parameters are dynamically adjusted according to the current input through the selective scanning mechanism, and the temporally enhanced features are output. S3.2, Dual-Stream Spatial Interaction Stream: Executes two graph convolutional paths in parallel, one for physical flow and one for semantic flow, fusing physical and semantic spatial information, specifically: Path A Physical Flow: Receives static physical graph and temporal enhancement features, and applies Chebyshev graph convolution to aggregate physical space neighborhood information; Path B Semantic Flow: Receives component-aware dynamic semantic graphs and temporal enhancement features, and applies knowledge-aware graph convolution to achieve non-local semantic information exchange; The spatial aggregation features are obtained by adding the outputs of path A and path B element by element, followed by layer normalization and activation function processing. S3.3, Temporal Correction Flow: The spatial aggregation features are input into the Mamba layer again, and the temporal evolution path is corrected and smoothed a second time according to the latest spatial context. The output block output features are then used to complete the encoding of the high-dimensional spatiotemporal representation.
[0014] Preferably, in step S4, the decoder consists of a fully connected layer and a Softmax classification layer, which maps the high-dimensional spatiotemporal representation to the traffic state probability distribution of several future time steps, and outputs the micro-dynamic phase to which each vehicle node belongs in the future time. The micro-dynamic phase includes free flow phase, initial stage of synchronous flow phase, close following phase, shock wave generation phase, and congestion phase.
[0015] Preferably, in step S2.1, the physical distance threshold is 50 meters, and the connection relationship between vehicle nodes whose physical distance is within the threshold is filtered out by the threshold Gaussian kernel function.
[0016] Preferably, the Mamba layers in steps S3.1 and S3.3 transmit information through compressed hidden states, eliminating the need to store the complete historical context and thus optimizing memory usage.
[0017] A real-time microscopic traffic condition perception system based on UAV edge computing includes: The data processing and feature extraction module is used to execute step S1, which completes the cleaning and discretization of vehicle trajectory data from the perspective of the UAV, the construction of spatiotemporal feature tensors, and the extraction of vehicle physical component feature matrices. The dual graph structure construction module connects the data processing and feature extraction modules and is used to execute step S2, which constructs a static physical graph and a component-aware dynamic semantic graph based on the extracted component feature matrix and the constructed spatiotemporal feature tensor, respectively. The spatiotemporal feature encoding module is connected to the data processing and feature extraction module and the dual graph structure construction module, respectively. It is used to execute step S3, input the spatiotemporal feature tensor into the stacked M-STGCN Block encoder, and complete the spatiotemporal feature encoding by combining the dual complementary graph structure to output a high-dimensional spatiotemporal representation. The traffic state inference module is connected to the spatiotemporal feature encoding module and is used to execute step S4, inputting the high-dimensional spatiotemporal representation into the decoder for decoding, obtaining the micro-traffic state probability distribution, and realizing real-time perception of micro-traffic state.
[0018] Preferably, the dual graph structure construction module includes a physical graph construction unit and a semantic graph construction unit; The physical graph construction unit is used to construct an adjacency matrix based on the Euclidean distance between vehicle nodes, and obtains a static physical graph through threshold Gaussian kernel function calculation and Laplace normalization. The semantic graph construction unit includes a component projection subunit, an attention computation subunit, and a gated sparsification subunit. The component projection subunit maps physical component features to a high-dimensional semantic embedding space. The attention computation subunit obtains the inter-node association score matrix through a self-attention mechanism. The gated sparsification subunit introduces a gate threshold parameter to achieve physical sparsification of the semantic graph and generates a dynamic semantic adjacency matrix.
[0019] Preferably, the M-STGCN Block encoder in the spatiotemporal feature coding module includes a temporal preprocessing unit, a dual-stream spatial interaction unit, and a temporal correction unit; The time series preprocessing unit uses a Mamba layer with a selective state-space model to enhance the processing of time series features; The dual-stream spatial interaction unit includes a physical stream convolutional subunit and a semantic stream convolutional subunit, which respectively aggregate and fuse physical space and semantic space information through Chebyshev graph convolution and knowledge-aware graph convolution. The temporal correction unit again uses the Mamba layer to perform temporal correction and smoothing on the spatial aggregation features, and outputs a high-dimensional spatiotemporal representation.
[0020] The advantages of this invention compared to the prior art are: 1. Accurate modeling of heterogeneous traffic flow to improve recognition accuracy: Explicitly encode vehicle physical component knowledge, construct component-aware dynamic semantic graphs, accurately distinguish the fluid stability differences of different vehicle combinations under the same density, and significantly improve the accuracy of microstate and shock wave prediction of mixed traffic flow.
[0021] 2. Lightweight edge adaptation enables millisecond-level inference: Replacing Transformer with Mamba reduces the temporal modeling complexity to linear; combined with gated sparsity pruning of redundant connections, the computational load is significantly reduced, the inference speed is increased by 4-5 times, and the inference latency is about 36ms, meeting the real-time perception requirements of UAVs.
[0022] 3. Reduced memory usage and lower deployment costs: Mamba uses compressed hidden state to pass information, eliminating the need to cache the full historical context, thus reducing memory usage by about 40% and enabling deployment on low-cost embedded edge hardware.
[0023] 4. Enhanced early warning capability with no lag in capturing sudden changes: The Mamba selective scanning mechanism has dynamic state adaptation capability, which can quickly respond to step changes in traffic flow, accurately identify and warn at the shock wave initiation point, and avoid safety risks caused by lag.
[0024] 5. Improved noise robustness: Learnable gating thresholds automatically filter noise connections, reducing interference from UAV trajectory positioning errors, and maintaining stable and accurate predictions in long-term and noisy environments. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart of the method of the present invention, clearly illustrating the complete steps from raw data input to final traffic state output. The flowchart highlights the "component-aware dynamic semantic graph construction" process in step 2, particularly through gating thresholds. The innovative aspects of physical sparsity and the core algorithm flow for spatiotemporal feature encoding using M-STGCN Block in step 3.
[0027] Figure 2 This diagram shows the internal network structure of the core algorithm module M-STGCN Block in this invention. The diagram visually presents a temporal-spatial alternation structure of "temporal-spatial-temporal," where the Mamba layer is used for efficient temporal modeling, and the dual-stream spatial interaction layer processes the dependencies between the physical and semantic spaces in parallel. (Static physical diagram) and dynamic semantic graph As external inputs, they are applied to the corresponding convolutional branches, fully demonstrating the invention's ability to model heterogeneous traffic flows. Detailed Implementation
[0028] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0029] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0030] The present invention will now be described in further detail with reference to the accompanying drawings.
[0031] This invention provides a lightweight real-time perception method and system for microscopic traffic conditions using edge computing for unmanned aerial vehicles (UAVs). The method is based on a deep learning architecture and can be deployed on resource-constrained UAV onboard computing platforms. The method includes the following specific steps: S1. Data Acquisition, Preprocessing, and Component Feature Extraction This step aims to construct tensors suitable for spatiotemporal network inputs from raw UAV video stream data and explicitly isolate the physical component knowledge for subsequent graph construction.
[0032] S1.1 Data Cleaning and Discretization Acquire vehicle trajectory data from the perspective of the drone, including vehicle ID, timestamp, instantaneous speed, and lane information. Divide the continuous trajectory data into non-overlapping time windows. Based on the instantaneous speed and following distance of the vehicles, discretize the micro-traffic flow into preset dynamic phases (e.g., free flow phase, initial stage of synchronous flow phase, close following phase, shock wave generation phase, and congestion phase) as supervision labels for model training.
[0033] S1.2 Tensor Construction Constructing the spatiotemporal feature tensor ,in For batch size, The length of the time series. To observe the number of vehicle nodes within the road segment, This represents the number of feature channels.
[0034] S1.3 Component Knowledge Feature Index In feature channels In this process, specific dimensions are reserved for encoding the physical component information of the vehicle. A knowledge index list is defined, derived from the input tensor. The component feature matrix is extracted at the last time step. ,in Dimensions of component characteristics.
[0035] S2. Construct a dual complementary graph structure To compensate for the lack of explicit topological connections in UAV trajectory data, this invention constructs two types of graph structures: static physical graphs and dynamic component-aware semantic graphs.
[0036] S2.1 Constructing a Static Physical Graph An adjacency matrix is constructed based on the Euclidean distance between vehicle nodes. The physical proximity between nodes is calculated using a threshold Gaussian kernel function, and then Laplace normalized to obtain the normalized Laplace matrix. It is used to capture geographic location-based neighborhood influences.
[0037] S2.2 Constructing a component-aware dynamic semantic graph This is one of the core innovations of this invention. The component feature matrix extracted in step S1.3 is utilized. The semantic adjacency matrix is dynamically generated through the component-aware knowledge graph module. The specific implementation process is as follows: 1. Component Projection: The physical component features are input into a multilayer perceptron, which maps them from a low-dimensional statistical space to a high-dimensional semantic embedding space to obtain the semantic embedding. This process enables the model to understand the potential dynamic differences between different vehicle model combinations.
[0038] 2. Interactive Attention Calculation: Semantic relevance between nodes is calculated using a self-attention mechanism. Query matrices are generated through linear layers. Bond matrix ,calculate This yields a preliminary correlation score matrix.
[0039] 3. Gated Physical Sparsity: To simulate the sparsity of micro-interactions and reduce edge computing overhead, a learnable gating threshold parameter is introduced. Only retain those with a correlation score greater than [a certain value]. The connection, i.e. Through this mechanism, the model can automatically filter out redundant interactions that have little impact on fluid stability, generating sparse and semantically valuable dynamic graphs.
[0040] S3. Spatiotemporal alternation structure feature encoding based on M-STGCN Block The preprocessed feature tensor X is input into the stacked M-STGCN Block encoder. Each M-STGCNBlock adopts a temporal-spatial-temporal mezzanine architecture, using a state-space model (SSM) instead of the traditional Transformer to achieve linear complexity computation.
[0041] S3.1 Temporal Preprocessing Flow: The input sequence is processed using a Mamba layer (containing a selective state-space model). The Mamba layer dynamically adjusts the state transition parameters based on the current input through a selective scanning mechanism.
[0042] How it works: This mechanism acts as an "event trigger," allowing the model to rapidly adjust its internal state to capture high-frequency features when a sudden change in traffic flow is detected; during periods of steady flow, it maintains a stable state. This step outputs features enhanced by time series processing. .
[0043] S3.2 Two-Stream Spatial Interaction Stream: Executes two graph convolutional paths in parallel to fuse physical and semantic spatial information: Path A (Physical Flow): Receives static physical graph and characteristics By applying Chebyshev graph convolution, neighborhood information in the physical space is aggregated to capture the car-following effect between neighboring vehicles.
[0044] Path B (Semantic Flow): Receives the dynamic component-aware semantic graph generated in step 2.2. and characteristics This involves applying knowledge-aware graph convolution. This convolution operation utilizes a dynamically changing semantic adjacency matrix, enabling nodes that are spatially distant but have similar fluid compositions to exchange information.
[0045] Feature fusion: The outputs of path A and path B are added element-wise, and then processed by layer normalization and activation function to obtain spatial aggregated features. .
[0046] S3.3 Timing Correction Flow Spatial aggregation features The data is then fed into a second Mamba layer. This layer acts as a post-processor, performing secondary corrections and smoothing of the temporal evolution path based on the latest spatial context, and outputting the final block output features.
[0047] S4. Micro-level traffic condition inference The high-dimensional spatiotemporal representation output by the encoder is input into the decoder.
[0048] The decoder consists of a fully connected layer and a softmax classification layer, mapping features to future... The probability distribution of traffic states at each time step.
[0049] The output prediction results are the micro-dynamic phases (such as states 0-4) to which each vehicle node belongs in the future.
[0050] The technical principle of this invention is as follows: 1. Explicit modeling of component isomerism By constructing a component-aware dynamic semantic graph in S2.2, the physical knowledge of vehicle type composition is explicitly transformed into a graph topology for the first time. This enables the model to distinguish the differences in fluid stability caused by different vehicle type combinations at the same density, solving the problem of low prediction accuracy in heterogeneous traffic flows in existing technologies.
[0051] 2. Edge computing friendly and lightweight: The Mamba model was introduced in S3, which reduced the time complexity and memory usage of timing modeling from the quadratic level of the Transformer. Reduce to linear level .
[0052] In S2.2, a gated sparsity mechanism is introduced. The algorithm automatically prunes redundant weak connections in the graph, significantly reducing the floating-point computation of subsequent graph convolution operations, enabling the algorithm to achieve millisecond-level real-time inference with the limited onboard computing power of the UAV.
[0053] 3. High-frequency mutation capture capability: By utilizing Mamba's selective scanning mechanism (S3.1), the model possesses dynamic adaptability similar to a control system, enabling it to follow the shock wave generation and dissipation process in microscopic traffic flow without lag, thus overcoming the smoothing lag effect present in traditional RNNs and Transformers.
[0054] To more clearly illustrate the specific embodiments of the present invention, an example is provided below: This embodiment discloses a lightweight, real-time microscopic traffic condition perception method for edge computing of unmanned aerial vehicles (UAVs). For example... Figure 1 As shown, the method includes the following physical steps: Step S1: Tensor quantization and component feature extraction of micro-traffic flow data A drone's onboard camera captures traffic video streams, which are then processed by an edge computing module to obtain vehicle trajectory data. This trajectory data is then used to construct a spatiotemporal feature tensor. .in, Batch Size; The time window length (Time Steps); This represents the total number of vehicle nodes within the observed road segment; The number of characteristic channels (including speed, acceleration, lane ID, etc.).
[0055] Based on the preset knowledge indices, from the feature channels Extracting vehicle component feature matrix .in, Dimensions representing vehicle type (e.g.) (These correspond to the counting or one-hot coding of small cars, medium cars, and heavy cars, respectively). The physical significance of this step lies in explicitly separating the "physical quality" attribute that has a decisive impact on traffic flow stability.
[0056] Step S2: Construct a dual complementary graph structure To address the issue of insufficient explicit topology in drone data, this step constructs two graphs: S1. Constructing a static physical graph: Calculating the normalized Laplacian matrix based on the spatial coordinates of vehicle nodes. .
[0057] Mathematical model: Physical meaning: Indicates vehicle and The Euclidean distance; This is a physical distance threshold (e.g., 50 meters). This step establishes a physical connection based on the "nearest neighbor effect".
[0058] S2. Constructing a component-aware dynamic semantic graph: utilizing... Dynamically generate semantic adjacency matrix .
[0059] Sub-step S2.1 (Component Projection): Map the component features to a high-dimensional semantic space.
[0060] Physical meaning: These are learnable projection weights. This step transforms discrete vehicle counts into continuous hydrodynamic semantic vectors.
[0061] Sub-step S2.2 (Interactive Attention and Gated Sparsity): Physical meaning and logical judgment: This indicates the potential interaction strength between the two vehicles based on their model combinations. This is a learnable gating threshold parameter. Technical function: Logical judgment It simulates the effective interaction boundary in the physical world. Only when the potential semantic impact exceeds the threshold... Edges are only activated when there is a situation (such as the feeling of a heavy truck pressing against a car behind). This achieves physical sparsity of the graph, removes noisy connections, and reduces subsequent computation.
[0062] Step S3: Spatiotemporal feature encoding based on M-STGCN Block tensor Input is fed into the stacked M-STGCN Block. For example... Figure 2 As shown, the data flow of each block follows a mezzanine pattern of "time-space-time": 1. Temporal Pre-processing: Using Mamba layers to process feature sequences.
[0063] Mathematical model: Selective state-space model (SSM) is adopted.
[0064] Physical meaning: This is a compressed, hidden state. Due to the parameters... It is input The model uses a selective scanning function to dynamically adjust the forgetting rate based on current traffic flow conditions (such as sudden braking signals). This allows the model to respond to high-frequency shock changes at millisecond speeds.
[0065] 2. Two-stream spatial interaction: Parallel execution of physical and semantic stream convolutions.
[0066] Physical flow (Cheb Conv): By using Chebyshev polynomial approximation, spatial car-following behavior between vehicles can be captured.
[0067] Semantic Flow (Knowledge Conv): Using the dynamic graph generated in step 2, nonlocal semantic interactions between heterogeneous vehicle models are captured.
[0068] Fusion: .
[0069] Step S4: Microstate Inference. The encoded features are mapped to the probability space through a fully connected layer: Output the probability that each vehicle will be in one of five micro-dynamic phases (free flow, synchronous flow, close following, shock wave generation, and congestion) at a future time.
[0070] Finally, any aspects not fully described in this invention utilize existing mature products and technologies.
[0071] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method for real-time perception of microscopic traffic conditions using edge computing on unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: S1. Data acquisition, preprocessing, and component feature extraction: Data cleaning and discretization, spatiotemporal feature tensor construction, and extraction of vehicle physical component feature matrix are completed from the raw vehicle trajectory data from the perspective of UAV. S2. Construct a dual complementary graph structure. Based on the processing results of step S1, construct a static physical graph and a component-aware dynamic semantic graph respectively to form a dual complementary graph structure system of physical and semantic elements. S3. Spatiotemporal alternating structure feature encoding based on M-STGCN Block: The spatiotemporal feature tensor constructed in step S1 is input into the stacked M-STGCN Block encoder, and the spatiotemporal feature encoding is completed by combining the dual complementary graph structure in step S2, and a high-dimensional spatiotemporal representation is output. S4. Infer the micro-traffic state. Input the high-dimensional spatiotemporal representation output from step S3 into the decoder. Through decoding operations, obtain the probability distribution of the micro-traffic state for several future time steps, and realize the real-time perception of the micro-traffic state.
2. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 1, characterized in that: Step S1 specifically includes: S1.1 Data Cleaning and Discretization: Obtain vehicle trajectory data from the perspective of the drone, including vehicle ID, timestamp, instantaneous speed, and lane location. Divide the continuous trajectory data into non-overlapping time windows. Based on the instantaneous speed of the vehicle and the following distance, discretize the micro traffic flow into a preset dynamic phase, which serves as a supervision label for model training. S1.2 Tensor Construction: Construct a spatiotemporal feature tensor with dimensions of [batch size, time series length, number of vehicle nodes, number of feature channels]; S1.3 Component Knowledge Feature Index: Reserve specific dimensions in the feature channels of the spatiotemporal feature tensor to encode vehicle physical component information, define a knowledge index list, and extract the component feature matrix from the last time step of the spatiotemporal feature tensor.
3. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 1, characterized in that: Step S2 specifically includes: S2.1 Constructing a static physical graph: Construct an adjacency matrix based on the Euclidean distance between vehicle nodes, use a threshold Gaussian kernel function to calculate the physical proximity between nodes, and perform Laplace normalization on the adjacency matrix to obtain a normalized Laplace matrix. S2.2 Constructing a component-aware dynamic semantic graph: Using the component feature matrix extracted in step S1.3, a semantic adjacency matrix is dynamically generated through the component-aware knowledge graph module, specifically including: S2.2.1 Component Projection: Input the physical component features into a multilayer perceptron and map them from a low-dimensional statistical space to a high-dimensional semantic embedding space to obtain the semantic embedding; S2.2.2 Interactive Attention Calculation: Using the self-attention mechanism, a query matrix and a key matrix are generated through a linear layer, and a preliminary association score matrix between nodes is calculated. S2.2.3, Gated Physical Sparsity: Introduce a learnable gating threshold parameter, retain only connections in the association score matrix whose association scores are greater than the gating threshold parameter, and generate a sparse dynamic semantic adjacency matrix.
4. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 1, characterized in that: The M-STGCN Block in step S3 adopts a "temporal-spatial-temporal" mezzanine architecture, using a state-space model to replace the traditional Transformer to achieve linear complexity computation, specifically including: S3.1 Temporal Preprocessing Flow: The spatiotemporal feature tensor is input into the Mamba layer containing the selective state-space model. The state transition parameters are dynamically adjusted according to the current input through the selective scanning mechanism, and the temporally enhanced features are output. S3.2, Dual-Stream Spatial Interaction Stream: Executes two graph convolutional paths in parallel, one for physical flow and one for semantic flow, fusing physical and semantic spatial information, specifically: Path A Physical Flow: Receives static physical graph and temporal enhancement features, and applies Chebyshev graph convolution to aggregate physical space neighborhood information; Path B Semantic Flow: Receives component-aware dynamic semantic graphs and temporal enhancement features, and applies knowledge-aware graph convolution to achieve non-local semantic information exchange; The spatial aggregation features are obtained by adding the outputs of path A and path B element by element, followed by layer normalization and activation function processing. S3.3, Temporal Correction Flow: The spatial aggregation features are input into the Mamba layer again, and the temporal evolution path is corrected and smoothed a second time according to the latest spatial context. The output block output features are then used to complete the encoding of the high-dimensional spatiotemporal representation.
5. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 1, characterized in that: In step S4, the decoder consists of a fully connected layer and a Softmax classification layer, which maps the high-dimensional spatiotemporal representation to the probability distribution of traffic state at several future time steps and outputs the micro-dynamic phase state to which each vehicle node belongs at a future time. The micro-dynamic phase state includes free flow phase, initial stage of synchronous flow phase, close following phase, shock wave generation phase, and congestion phase.
6. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 3, characterized in that: In step S2.1, the physical distance threshold is 50 meters, and the connection relationship between vehicle nodes whose physical distance is within the threshold is filtered out by the threshold Gaussian kernel function.
7. The method for real-time perception of microscopic traffic conditions using UAV edge computing according to claim 4, characterized in that: In steps S3.1 and S3.3, the Mamba layer transmits information through compressed hidden states, eliminating the need to store the complete historical context and thus optimizing video memory usage.
8. A system used in the real-time microscopic traffic state perception method using UAV edge computing as described in claim 1, characterized in that, include: The data processing and feature extraction module is used to execute step S1, which completes the cleaning and discretization of vehicle trajectory data from the perspective of the UAV, the construction of spatiotemporal feature tensors, and the extraction of vehicle physical component feature matrices. The dual graph structure construction module, connected to the data processing and feature extraction module, is used to execute step S2, which constructs a static physical graph and a component-aware dynamic semantic graph based on the extracted component feature matrix and the constructed spatiotemporal feature tensor, respectively. The spatiotemporal feature encoding module is connected to the data processing and feature extraction module and the dual graph structure construction module, respectively. It is used to execute step S3, input the spatiotemporal feature tensor into the stacked M-STGCN Block encoder, and complete the spatiotemporal feature encoding by combining the dual complementary graph structure to output a high-dimensional spatiotemporal representation. The traffic state inference module is connected to the spatiotemporal feature encoding module and is used to execute step S4, inputting the high-dimensional spatiotemporal representation into the decoder for decoding to obtain the microscopic traffic state probability distribution, thereby realizing real-time perception of microscopic traffic state.
9. The system used in the real-time microscopic traffic state perception method using UAV edge computing according to claim 8, characterized in that: The dual graph structure construction module includes a physical graph construction unit and a semantic graph construction unit; The physical graph construction unit is used to construct an adjacency matrix based on the Euclidean distance between vehicle nodes, and obtain a static physical graph through threshold Gaussian kernel function calculation and Laplace normalization. The semantic graph construction unit includes a component projection subunit, an attention calculation subunit, and a gated sparsity subunit. The component projection subunit maps physical component features to a high-dimensional semantic embedding space. The attention calculation subunit obtains the inter-node association score matrix through a self-attention mechanism. The gated sparsity subunit introduces a gate threshold parameter to achieve physical sparsity of the semantic graph and generates a dynamic semantic adjacency matrix.
10. The system used in the real-time microscopic traffic state perception method using UAV edge computing according to claim 8, characterized in that: The M-STGCN Block encoder in the spatiotemporal feature coding module includes a temporal preprocessing unit, a dual-stream spatial interaction unit, and a temporal correction unit; The time series preprocessing unit uses a Mamba layer with a selective state-space model to enhance the processing of time series features; The dual-stream spatial interaction unit includes a physical stream convolutional subunit and a semantic stream convolutional subunit, which respectively aggregate and fuse physical space and semantic space information through Chebyshev graph convolution and knowledge-aware graph convolution; The temporal correction unit again uses the Mamba layer to perform temporal correction and smoothing on the spatial aggregation features, and outputs a high-dimensional spatiotemporal representation.