Intelligent vehicle flow processing method and system based on knowledge distillation and LLM
By combining spatiotemporal graph convolutional networks and path planning networks with federated distillation techniques, the decision delay and efficiency problems of traditional intelligent transportation systems in complex scenarios are solved, achieving efficient traffic management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2025-07-02
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional intelligent traffic control systems struggle to cope with complex scenarios in dynamic road networks. Deep reinforcement learning suffers from a lack of policy interpretability and model update delays. Prediction based on graph neural networks suffers from decision delays. Directly deploying large language models (LLMs) presents inference latency issues and struggles to balance efficiency and accuracy for multimodal tasks.
By combining spatiotemporal graph convolutional networks and path planning networks with federated distillation networks, an intelligent traffic flow processing method is constructed through hierarchical knowledge transfer. This method captures spatiotemporal dynamics and road network heterogeneity, enabling spatiotemporal adaptability of each network model.
While retaining domain characteristics, it improves the efficiency and accuracy of traffic decisions, reduces decision delays, adapts to the road network topology of different cities, and optimizes traffic flow efficiency.
Smart Images

Figure CN120526596B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic flow management technology, and in particular to an intelligent traffic flow management method and system based on knowledge distillation and LLM. Background Technology
[0002] With the exponential growth in the complexity of urban transportation systems, traditional intelligent traffic management systems are facing multiple technical bottlenecks. Existing control systems based on fixed rules or single models are struggling to cope with the complex scenarios emerging in dynamic road networks. Current research is mainly advancing along two technical routes: On the one hand, while end-to-end control methods, represented by deep reinforcement learning, have made progress in signal optimization, their black-box nature leads to a lack of policy interpretability, and model updates require full retraining. On the other hand, while predictions based on graph neural networks can capture spatiotemporal features, they suffer from decision-making delays when responding to sudden events, making it difficult to meet real-time control requirements.
[0003] In recent years, the central model of the Large Language Model (LLM) has demonstrated unique advantages in the field of complex system scheduling. However, there are three major obstacles to directly deploying LLM as the control core: First, urban traffic decisions need to be completed within 300ms, while the inference latency of models with hundreds of billions of parameters generally exceeds 1 second; second, traffic data has strong regional characteristics, and centralized training is difficult to adapt to the road network topology of different cities; third, traffic management involves multimodal tasks such as prediction, control, and planning, and a single model cannot balance accuracy and efficiency.
[0004] To address the aforementioned issues, knowledge distillation technology offers a new approach. In 2024, Google proposed a federated distillation framework that demonstrated that hierarchical knowledge transfer can enable smaller models to acquire 80% of the reasoning capabilities of larger models while maintaining more than 10 times the reasoning speed. However, current research largely focuses on model compression and has not yet explored how to construct dynamic distillation mechanisms for multi-agent systems. Summary of the Invention
[0005] This invention provides an intelligent traffic flow processing method and system based on knowledge distillation and LLM. By utilizing the joint application of spatiotemporal graph convolutional networks and path planning networks, it can simultaneously capture spatiotemporal dynamics and road network heterogeneity. At the same time, it creates a hierarchical federated distillation framework, which allows each network model to inherit global thinking while retaining domain characteristics.
[0006] Firstly, a smart traffic flow processing method based on knowledge distillation and LLM is provided, including:
[0007] Acquire multimodal traffic flow data for the road segment to be processed;
[0008] Based on the multimodal data, a spatiotemporal graph convolutional network is used to predict the traffic flow of the road segment to be processed within a future preset time.
[0009] Based on the A3C signal control network, the traffic flow prediction results and the multimodal data are processed to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed.
[0010] Based on the path planning network, the traffic flow of the road segment to be processed is allocated in real time according to the multimodal data, and combined with the traffic light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated traffic path.
[0011] An anomaly detection network is used to detect abnormal traffic events on the road segment to be processed based on the multimodal data;
[0012] During the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, a differentiated distillation strategy is applied to each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer in each network.
[0013] Secondly, a smart traffic flow processing system based on knowledge distillation and LLM is provided, including:
[0014] The data acquisition module is used to acquire multimodal traffic flow data of the road segment to be processed;
[0015] The prediction module, which is communicatively connected to the data acquisition module, is used to predict the traffic flow of the road segment to be processed within a future preset time based on the multimodal data using a spatiotemporal graph convolutional network.
[0016] The signal control module is communicatively connected to the data acquisition module and the prediction module. It is used to process the traffic flow prediction results and the multimodal data based on the A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed.
[0017] The path allocation module is communicatively connected to the data acquisition module and the signal control module. It is used to allocate traffic paths in real time for the traffic flow of the road segment to be processed based on the path planning network and the multimodal data. It also optimizes the traffic flow efficiency on the allocated traffic paths by combining the signal light phase switching strategy and the green light duration adjustment factor.
[0018] An anomaly detection module, communicatively connected to the data acquisition module, is used to detect abnormal traffic events on the road segment to be processed based on the multimodal data using the anomaly detection network; and,
[0019] The distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module. It is used to perform differentiated distillation strategies on each network based on the federated distillation network during the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, so as to achieve spatiotemporal adaptability of knowledge transfer in each network.
[0020] Compared with the prior art, the advantages of the present invention are as follows: by utilizing the joint application of spatiotemporal graph convolutional networks and path planning networks, spatiotemporal dynamics and road network heterogeneity can be captured simultaneously; at the same time, based on federated distillation networks, each network model can inherit global thinking while retaining domain characteristics.
[0021] Thirdly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the intelligent traffic flow processing method based on knowledge distillation and LLM as described above.
[0022] Fourthly, an electronic device is provided, including a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein the processor, when executing the computer program, implements the intelligent traffic flow processing method based on knowledge distillation and LLM as described above. Attached Figure Description
[0023] Figure 1 This is a schematic flowchart of an embodiment of the intelligent traffic flow processing method based on knowledge distillation and LLM of the present invention;
[0024] Figure 2 This is a schematic diagram of the structure of an intelligent traffic flow processing system based on knowledge distillation and LLM according to the present invention. Detailed Implementation
[0025] Referring now to specific embodiments of the invention, examples of which are illustrated in the accompanying drawings. Although the invention will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the invention to the described embodiments. Rather, it is intended to cover variations, modifications, and equivalents included within the spirit and scope of the invention as defined by the appended claims. It should be noted that the method steps described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of both.
[0026] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Note: The examples described below are merely specific examples and are not intended to limit the embodiments of the present invention to the specific steps, values, conditions, data, order, etc. Those skilled in the art can utilize the concept of the present invention to construct more embodiments not mentioned herein by reading this specification.
[0028] See Figure 1 The diagram shown is a flowchart of an intelligent traffic flow processing method based on knowledge distillation and LLM.
[0029] Step S100: Obtain multimodal data of traffic flow on the road segment to be processed;
[0030] Five types of heterogeneous data sources are used to process traffic flow in the road segment to be processed. Since these heterogeneous data sources each have their own characteristics and can reflect the dynamic changes of traffic flow from different perspectives, by fusing and analyzing heterogeneous data, a more comprehensive understanding and management of traffic conditions can be achieved. Therefore, a unified tensor representation framework needs to be established as follows:
[0031] 1. Road network topology data.
[0032] Define a directed graph G=(V,E,W), where: V={v i Let E be the set of nodes for n intersections, where E = {e...} ij Let} be the set of directed edges for m road segments, and W∈R^{n×n} be the adjacency matrix, with elements w ij =exp (-d ij / σ d In the formula, d ij σ is the length of the road segment. d =500m is the scale parameter. Based on this, a dynamic weight update mechanism is designed: when road segment k is closed for construction, the adjacency matrix is corrected: W' = W⊙M, M∈{0,1}^{n×n} is the mask matrix, where when w ij When =0, (i,j)∈closed road segment set.
[0033] 2. Floating car GPS trajectory.
[0034] The original trajectory point pt=(lat,lon,speed,timestamp) needs to be processed as follows:
[0035] (1) Map matching: Hidden Markov Model is used to map the point sequence to the road network edge:
[0036] Observation probability: P (p t |e ij ) = N (proj (p t ,e ij );0,σ p ^2);
[0037] Transition probability: P(e ij →e jk ) ∝ 1 / (t jk +ε);
[0038] (2) Spatiotemporal discretization: Divide 24 hours into T=288 5-minute intervals, and count the road segment e within each interval Δt. ij of:
[0039] X_{flow} ∈ Z^T: Number of vehicles passing through.
[0040] X_speed ∈ R^T: Average speed.
[0041] X_occ ∈ [0,1]^T: Time occupancy rate.
[0042] 3. Monitor video stream.
[0043] Multi-target tracking is implemented using YOLOv6+DeepSORT. The vehicle counting matrix C∈N^{n×T} is extracted. i^t Let Q be the number of vehicles at intersection i during time period t; the queue length matrix Q ∈ R^{n×T}, Q i^t =Σ_{k=1}^K l k •I (q) k >th); where l k Let q be the physical length of lane k. k This represents the number of vehicles detected in the queue.
[0044] 4. Weather event text.
[0045] A semantic parser is built to transform meteorological bureau text warnings into multi-dimensional vectors: BERT is used to extract a 128-dimensional feature vector h. weather ∈ R^{128}; Construct an influence factor matrix Γ∈R^{4×T}, with dimensions including: γ1: precipitation intensity mm / h; γ2: visibility level (1-5); γ3: road surface adhesion coefficient (0.2-0.8); γ4: driver reaction delay coefficient (1.0-1.5).
[0046] 5. Infrastructure status.
[0047] Define the device state tensor S∈R^{d×n×T}, which includes: traffic light phase state: s1 ∈ {0,1}^4 (red light phase is 1); geomagnetic sensor reading: s2 = Z-score (ΔB / Δt); road surface water depth: s3 = min (max(h,0),30cm) / 30; electronic road sign information: s4 ∈ {0,1}^8 (binary encoding).
[0048] Step S200, based on the spatiotemporal graph convolutional network and the multimodal data, predicts the traffic flow of the road segment to be processed within a future preset time period, including:
[0049] The multimodal data is spectral convolution is performed using a Chebyshev multinomial network in a spatiotemporal graph convolutional network to obtain a spatial feature matrix;
[0050] Multiple temporally gated convolutional networks in a spatiotemporal graph convolutional network process the spatial feature matrix in terms of time dimension, and the resulting time dimension processing results are fused to output the traffic flow within a preset future time period.
[0051] Specifically, in this embodiment, during the spatial feature fusion process, the spatiotemporal map data after multimodal processing is first input, and spectral convolution is performed using Chebyshev polynomials, as shown in the following formula:
[0052]
[0053] in, T is the scaled Laplace matrix; k For Chebyshev polynomials, K=3rd order. These are learnable parameters.
[0054] Final output: Spatial feature matrix X spatial ∈ R^(n×T'), where T' is the feature dimension.
[0055] Therefore, the spatiotemporal graph data is processed by Chebyshev polynomial spectral convolution. This means that filtering the graph data through spectral convolution can better capture the spatial structure features in the graph data. Spatial feature fusion refers to combining spatiotemporal data from different modalities through Chebyshev polynomials to form a comprehensive spatial feature representation. Therefore, spatial feature fusion combines information from different sources on the graph data in order to better learn the overall features of the spatiotemporal graph.
[0056] Chebyshev spectral convolution approximates the spectral convolution of a graph using Chebyshev polynomials, thus avoiding a complete eigenvalue decomposition of the Laplacian matrix. Chebyshev polynomials can effectively approximate the spectral information of the graph Laplacian and have low computational complexity.
[0057] In the temporal feature fusion process, the input is: spatial feature matrix X. spatial The temporal dimension is processed through convolutions using a temporally gated convolutional network with a temporal window of k=5. The temporally gated convolutional network is shown in the following equation:
[0058]
[0059] In the formula, W t W g The kernel is a 1D convolution; Φ is the activation function, and σ is the sigmoid gate; then, through multiple rounds of spatiotemporal block stacking (e.g., 2-3 layers), spatiotemporal features are fused, and the output is: spatiotemporal joint feature X. spatiotemporal .
[0060] Step S300: Based on the A3C signal control network, the traffic flow prediction results and the multimodal data are processed to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed, including:
[0061] S310, construct a state vector based on the multimodal data and traffic flow prediction results, and generate a traffic light discrete phase switching request and a continuous green light time scaling factor based on the state vector;
[0062] S320, calculates the probability distribution of the discrete phase switching request of the traffic light and the continuous green light time scaling factor based on the Actor network in the A3C signal control network;
[0063] S330, evaluate the state value of the state vector based on the Critic network in the A3C signal control network, and obtain the advantage function using the n-step TD error and the state vector;
[0064] S340, Generate the Actor loss of the Actor network based on the advantage function and the probability distribution, generate the Critic loss of the Critic network based on the state value, and combine the Actor loss, the Critic loss and the distillation loss to obtain the total loss function;
[0065] S350, the A3C signal control network is optimized using the total loss function and reward function, and the state vector is processed through the optimized A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed.
[0066] Specifically, in this embodiment, the state vector S is constructed by integrating multiple input sources. t The future 5-minute traffic prediction ψ, including the output of a spatiotemporal graph convolutional network and normalized by MinMax. flow One-hot encoding of intersection signal phase ψ phase Real-time queue length ψ after logarithmic transformation queue Current weather influencing factors Γ t Weather semantic vector h weather .
[0067] Action space design based on state vector S t Generate discrete phase switching request a d and continuous green light time scaling factor a c Actual green light duration t green Satisfy min (max (a) c ×t base The motion vector is obtained by maintaining the same phase for at least 30 seconds (15s, 90s).
[0068] In the A3C algorithm architecture, an Actor-Critic dual network structure is constructed. The Actor network uses a state vector S. t As input, after passing through two 512-dimensional GELU hidden layers, the discrete and continuous action heads output the probability distribution π of the traffic light discrete phase switching request and the continuous green light time scaling factor. θ (a|s).
[0069] The Critic network's shared feature extraction layer evaluates the state value V. ϕ (s t The dominance function A is calculated using the n-step TD error, and the specific calculation formula is as follows:
[0070]
[0071] Where k=5 is the forward step size.
[0072] It's important to note that state value refers to the expected cumulative reward an agent can obtain in the future, given a current state. In other words, state value is one of the core evaluation objects of Critic networks in reinforcement learning. Critic networks provide crucial feedback about the current state by evaluating state value. The role of the Critic network is to assess the quality of the current policy and provide learning signals to the Actor network. Based on the Critic's feedback, the Actor improves its policy, enabling it to take better actions in more favorable states.
[0073] The n-step TD error refers to the difference between the actual reward and the expected reward based on the current state and the next n steps during an n-step prediction process. Specifically, the n-step TD error is the difference between the value estimate of the current state and the estimate after correction based on the actual rewards observed in the next n steps. Therefore, the n-step TD error updates the value estimate of the state by considering reward information across multiple time steps, combining the advantages of TD and Monte Carlo methods. It reduces the variance of traditional single-step TD, improves learning stability, and enables efficient value estimate updates in a shorter time.
[0074] Combining the policy gradient, entropy regularization, and Huber loss, we obtain the Actor loss L. actor and Critic loss L critic The specific calculation formula is as follows:
[0075] Where, λ H为 Control the intensity of exploration.
[0076]
[0077] The distillation mechanism obtains the state vector S from the central model. t The corresponding action distribution π central (a|s), L is calculated using KL divergence. distill Combining dynamic temperature regulation and linear decay of λ D , λ D This is used to balance policy learning and knowledge inheritance, thus yielding the total loss L. total = L actor + 0.5L critic + λ D L distill To optimize the parameters of the A3C signal control network.
[0078] The reward function integrates delay reduction, throughput, and phase switching penalty, with weights of 0.6, 0.3, and 0.1, respectively. Through iterative optimization, it outputs phase switching decisions and green light duration adjustment factors for each intersection, which are then applied to signal equipment to optimize traffic flow efficiency.
[0079] The formula for calculating the reward function is as follows:
[0080]
[0081] Step S400: Based on the path planning network, real-time traffic path allocation is performed on the traffic flow of the road segment to be processed according to the multimodal data, and combined with the traffic light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated traffic path.
[0082] S410, Calculate the attention coefficients between intersections of the road segment to be processed based on the multimodal data;
[0083] S420, based on the multi-head attention mechanism in the path planning network, all the attention coefficients are concatenated to obtain multi-dimensional road network association features;
[0084] S430, after the time cycle features and weather influencing factors are processed by the MLP multilayer perceptron in the path planning network, they are superimposed with the multidimensional road network association features to generate enhanced features;
[0085] S440, The enhanced features are used to generate a path selection probability distribution through the softmax function;
[0086] S450: Using the multi-objective loss function and the path selection probability distribution, the path with the highest probability of traffic flow selection for the road segment to be processed is allocated in real time. Combined with the traffic light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated path with the highest probability.
[0087] Specifically, in this embodiment, in the path planning network model, node v is first calculated based on road segment characteristics including speed, capacity, and real-time traffic. i For v j Attention coefficient a ij The dependency relationships between road segments are quantified, and the specific calculation formula is as follows:
[0088]
[0089] Then, by concatenating the four attention heads, multi-dimensional road network association features h are output. i The details are as follows:
[0090]
[0091] The time cycle characteristics and weather influencing factors are then processed by MLP and associated with the multi-dimensional road network characteristics h. i Overlay to generate enhanced features that adapt to dynamic scenes. Finally based on The path selection probability distribution is generated by softmax and optimized using a multi-objective loss function that combines cross-entropy and KL divergence.
[0092] The multi-objective loss function is as follows:
[0093]
[0094] In the formula, P route Choose a probability distribution for the path.
[0095] Finally, the path with the highest probability is selected for real-time allocation. During the process, a dynamic graph attention mechanism is used to construct a road network influence graph, and dynamic features are injected into the spatiotemporal embedding layer. After optimization, the end-to-end path decision is completed.
[0096] Step S500: Based on the anomaly detection network, traffic anomaly events in the road segment to be processed are detected according to the multimodal data;
[0097] Feature extraction and reconstruction of the multimodal data are performed based on the encoder and decoder in the anomaly detection network;
[0098] The score of the reconstructed data is calculated based on the anomaly scoring function, and the score result is compared with the preset normal score.
[0099] If the comparison result is greater than the preset threshold, it is determined that there is an anomaly in the traffic of the road segment to be processed.
[0100] Specifically, in this embodiment, abnormal events such as traffic accidents and road construction are identified by detecting sudden changes in traffic data. The anomaly detection network adopts an encoder and decoder architecture. The encoder compresses the data using BiLSTM (128), MaxPooling, and Dense (32), while the decoder reconstructs the data using Dense (64), Upsampling, and LSTM (128), thus achieving traffic data feature extraction and reconstruction. A loss reconstruction optimization model is used to ensure accurate reconstruction of normal data. The anomaly scoring function is calculated as follows:
[0101]
[0102] Then, using historical normal data as a dynamic threshold, anomalies are determined when the reconstruction error exceeds the threshold. Through the process of data compression-reconstruction-error assessment, traffic anomaly event detection is achieved.
[0103] In step S600, during the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, a differentiated distillation strategy is applied to each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer in each network.
[0104] The federated distillation network includes hierarchical attention distillation, a task-adaptive temperature mechanism, and a gradient masking mechanism.
[0105] The convolutional adapter based on the hierarchical attention distillation realizes the transfer of multi-layer attention weights to hierarchical knowledge of each network;
[0106] Based on the task-adaptive temperature mechanism, the temperature parameters during the distillation process are dynamically adjusted according to the task characteristics of each network to optimize the hierarchical knowledge transfer process.
[0107] The gradient masking mechanism is used to calculate the mask matrix based on Fisher information to protect the private parameters of each network.
[0108] Specifically, in this embodiment, the federated distillation network includes hierarchical attention distillation, task-adaptive temperature, and gradient masking mechanism.
[0109] The loss of the l-th layer of attention distillation is defined as follows:
[0110]
[0111] It should be noted that distillation loss is a loss function used in the knowledge distillation process to measure the output difference between the student model and the teacher model. By guiding the student model to learn the output distribution of the teacher model, the goals of model compression, performance improvement, and training efficiency enhancement are achieved.
[0112] In the formula, H=12 represents the number of attention heads. The attention weights of the 12 layers of the central model are transferred to each network through a 1×1 convolutional adapter φ. Layers 1-3 are local feature layers, layers 4-8 are regional inference layers, and layers 9-12 are global policy layers.
[0113] Layers 1-3 (Local Feature Layers): These layers focus on the details and small-scale features of the input data. Attention mechanisms in these layers may concentrate on the relative importance of local information, helping the model capture and learn subtle changes and details in the input.
[0114] Layers 4-8 (Region Inference Layers): These layers combine local feature information to perform regional inference and understanding. In these layers, the network combines multiple local features and information to perform regional inference and infer the meaning or content of the region or its overall structure.
[0115] Layers 9-12 (Global Policy Layer): Based on the entire input data, these layers make global inferences and decisions. Therefore, the global policy involves the network's comprehensive understanding and prediction of the entire input, guiding the model to make the final decision on a global scale.
[0116] This hierarchical structure helps the model process local, regional, and global information at different levels, gradually deepening its understanding of the input data and ultimately making comprehensive decisions or predictions.
[0117] The calculation formula for the temperature coefficient dynamically adjusted by the task adaptive temperature mechanism is as follows:
[0118]
[0119] It is used to adapt to the knowledge transfer needs of different tasks.
[0120] The gradient masking mechanism calculates the mask matrix using Fisher information as follows:
[0121] γ=0;
[0122] This protects the private parameters of each network, as detailed below:
[0123]
[0124] The relationship between the gradient masking mechanism, which calculates the mask matrix using Fisher information, and the protection of private parameters for each network model lies in:
[0125] Fisher information can be used to identify which parameters contribute less to the output of each network model. This allows for the reduction of updates to these parameters through gradient masking, effectively protecting private parameters. By selectively masking gradient information or parameter updates, the leakage of private information can be effectively avoided, reducing the risk of exposing sensitive model parameters.
[0126] Therefore, gradient masking and protecting private parameters work together to prevent the model from leaking private information and improve training stability by restricting the updates of certain parameters (especially those that are sensitive or unimportant).
[0127] The above three components achieve efficient and secure knowledge transmission between the central hub and various networks through a process of "layered knowledge transfer - dynamic temperature regulation - gradient privacy protection".
[0128] Therefore, in summary, the core value of this invention lies in its innovative construction of a "cloud-edge collaboration" intelligent traffic governance paradigm, as detailed below:
[0129] 1. Cross-modal knowledge fusion is achieved through an improved central processing unit, and its multi-layer sparse attention mechanism is used to extract global features of traffic situation.
[0130] 2. Design specialized network sub-model groups to solve specific tasks. The joint application of the spatiotemporal graph convolutional network ST-GCN and the path planning network GAT can simultaneously capture spatiotemporal dynamics and road network heterogeneity.
[0131] 3. A hierarchical federated distillation framework is created. The central model uses differentiated transfer of attention weights across 12 layers, enabling each sub-model to retain domain characteristics while inheriting global thinking. This architecture avoids the accuracy loss associated with "one model for multiple uses" in traditional solutions and overcomes the latency limitations of direct control in LLM.
[0132] See also Figure 2 As shown, this embodiment of the invention also provides an intelligent traffic flow processing system based on knowledge distillation and LLM, including:
[0133] The data acquisition module is used to acquire multimodal traffic flow data of the road segment to be processed;
[0134] The prediction module, which is communicatively connected to the data acquisition module, is used to predict the traffic flow of the road segment to be processed within a future preset time based on the multimodal data using a spatiotemporal graph convolutional network.
[0135] The signal control module is communicatively connected to the data acquisition module and the prediction module. It is used to process the traffic flow prediction results and the multimodal data based on the A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed.
[0136] The path allocation module is communicatively connected to the data acquisition module and the signal control module. It is used to allocate traffic paths in real time for the traffic flow of the road segment to be processed based on the path planning network and the multimodal data. It also optimizes the traffic flow efficiency on the allocated traffic paths by combining the signal light phase switching strategy and the green light duration adjustment factor.
[0137] An anomaly detection module, communicatively connected to the data acquisition module, is used to detect abnormal traffic events on the road segment to be processed based on the multimodal data using the anomaly detection network; and,
[0138] The distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module. It is used to perform differentiated distillation strategies on each network based on the federated distillation network during the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, so as to achieve spatiotemporal adaptability of knowledge transfer in each network.
[0139] This invention pioneers a cloud-edge collaborative intelligent traffic governance paradigm, based on a three-tiered collaborative architecture: a large Transformer-based central model (an improvement on the GPT-4o architecture) + specialized sub-model groups (four core network models) + federated distillation strategies. The central model is deployed in the cloud, while the network sub-models are distributed across edge computing nodes. Through the 128-layer sparse attention mechanism of the improved GPT-4o central model, global semantic fusion of cross-modal traffic data is achieved for the first time. This central model employs a hybrid structure of axial attention and locality-sensitive hashing to form a three-dimensional representation system comprising a traffic situation awareness layer (dynamic road network topology), a strategy inference layer, and an anomaly propagation layer (event impact field). The specialized sub-model group adopts a joint architecture of ST-GCN and GAT to overcome the bottleneck of spatiotemporal modeling: ST-GCN reduces the modeling error of road closure events through a dynamic adjacency matrix update mechanism; GAT's multi-head attention mechanism endows the path planning model with dynamic weight allocation capabilities, achieving high prediction accuracy during peak periods. Simultaneously, the two achieve co-evolution through parameter space constraints, and the gradient sharing mechanism in the joint loss function effectively suppresses model drift. The innovation of the hierarchical federated distillation framework lies in the differentiated transfer strategy of attention weights, dividing the 12 layers of attention in the central model into local feature layers (layers 1-3), regional inference layers (layers 4-8), and global policy layers (layers 9-12). Combined with a dynamic temperature field adjustment function, it achieves spatiotemporal adaptability of knowledge transfer, enabling sub-models to inherit central knowledge while improving task performance on the SUMO simulation platform.
[0140] Specifically, this embodiment corresponds one-to-one with the above method embodiments. The functions of each module have been described in detail in the corresponding method embodiments, so they will not be repeated here.
[0141] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements all or part of the method steps of the above method.
[0142] The present invention can implement all or part of the processes in the above methods, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0143] Based on the same inventive concept, embodiments of this application also provide an electronic device, including a memory and a processor. The memory stores a computer program that runs on the processor. When the processor executes the computer program, it implements all or part of the method steps described above.
[0144] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting all parts of the computer device through various interfaces and lines.
[0145] Memory can be used to store computer programs and / or modules. The processor performs various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system and at least one application program required for a function (e.g., sound playback, image playback, etc.); the data storage area can store data created based on the use of the mobile phone (e.g., audio data, video data, etc.). Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMedia Cards (SMC), Secure Digital (SD) cards, Flash Cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0146] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, servers, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0147] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), servers, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0148] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0149] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0150] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An intelligent vehicle flow processing method based on knowledge distillation and LLM, characterized in that, include: Acquire multimodal traffic flow data for the road segment to be processed; Based on the multimodal data, a spatiotemporal graph convolutional network is used to predict the traffic flow of the road segment to be processed within a future preset time. Based on the A3C signal control network, the traffic flow prediction results and the multimodal data are processed to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed. Based on the path planning network, the traffic flow of the road segment to be processed is allocated in real time according to the multimodal data, and combined with the traffic light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated traffic path. An anomaly detection network is used to detect abnormal traffic events on the road segment to be processed based on the multimodal data; In the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, a differentiated distillation strategy is applied to each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer in each network. In the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, a differentiated distillation strategy is applied to each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer in each network, including: The federated distillation network includes hierarchical attention distillation, a task-adaptive temperature mechanism, and a gradient masking mechanism. The convolutional adapter based on the hierarchical attention distillation realizes the transfer of multi-layer attention weights to hierarchical knowledge of each network; Based on the task-adaptive temperature mechanism, the temperature parameters during the distillation process are dynamically adjusted according to the task characteristics of each network to optimize the hierarchical knowledge transfer process. The mask matrix is calculated based on the Fisher information content using the gradient masking mechanism.
2. The intelligent vehicle flow processing method based on knowledge distillation and LLM according to claim 1, wherein, The spatiotemporal graph convolutional network predicts the traffic flow of the road segment to be processed within a preset time period based on the multimodal data, including: The multimodal data is spectral convolution is performed using a Chebyshev multinomial network in a spatiotemporal graph convolutional network to obtain a spatial feature matrix; Multiple temporally gated convolutional networks in a spatiotemporal graph convolutional network process the spatial feature matrix in terms of time dimension, and the resulting time dimension processing results are fused to output the traffic flow within a preset future time period.
3. The intelligent traffic flow processing method based on knowledge distillation and LLM as described in claim 1, characterized in that, The traffic flow prediction results based on the A3C signal control network are processed with the multimodal data to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed, including: A state vector is constructed based on the multimodal data and traffic flow prediction results, and a discrete phase switching request for traffic lights and a continuous green light time scaling factor are generated based on the state vector. The probability distribution of the discrete phase switching request of the traffic light and the continuous green light time scaling factor is calculated based on the Actor network in the A3C signal control network. The state value of the state vector is evaluated based on the Critic network in the A3C signal control network, and the advantage function is obtained by using the n-step TD error and the state vector. The Actor loss of the Actor network is generated based on the advantage function and the probability distribution, and the Critic loss of the Critic network is generated based on the state value; and the total loss function is obtained by combining the Actor loss, the Critic loss, and the distillation loss. The A3C signal control network is optimized using the total loss function and reward function, and the state vector is processed through the optimized A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed.
4. The intelligent traffic flow processing method based on knowledge distillation and LLM as described in claim 1, characterized in that, The path planning-based network performs real-time traffic path allocation for the traffic flow of the road segment to be processed based on the multimodal data, and optimizes traffic flow efficiency on the allocated traffic paths by combining the traffic light phase switching strategy and the green light duration adjustment factor, including: The attention coefficients between intersections of the road segment to be processed are calculated based on the multimodal data. By concatenating all the attention coefficients based on the multi-head attention mechanism in the path planning network, multi-dimensional road network association features are obtained. The time cycle features and weather influencing factors are processed by the MLP multilayer perceptron in the path planning network and then superimposed with the multidimensional road network association features to generate enhanced features. The enhanced features are used to generate a path selection probability distribution using the softmax function; Using a multi-objective loss function and the path selection probability distribution, the path with the highest probability of traffic flow selection for the road segment to be processed is allocated in real time. Combined with the traffic light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated path with the highest probability.
5. The intelligent traffic flow processing method based on knowledge distillation and LLM as described in claim 1, characterized in that, The anomaly detection network detects traffic anomalies in the road segment to be processed based on the multimodal data, including: Feature extraction and reconstruction of the multimodal data are performed based on the encoder and decoder in the anomaly detection network; The score of the reconstructed data is calculated based on the anomaly scoring function, and the score result is compared with the preset normal score. If the comparison result is greater than the preset threshold, it is determined that there is an anomaly in the traffic of the road segment to be processed.
6. The intelligent traffic flow processing method based on knowledge distillation and LLM as described in claim 1, characterized in that, The hierarchical attention distillation includes 12 layers of attention distillation, with layers 1 to 3 being local feature layers, layers 4 to 8 being region reasoning layers, and layers 9 to 12 being global policy layers.
7. An intelligent traffic flow processing system based on knowledge distillation and LLM, characterized in that, include: The data acquisition module is used to acquire multimodal traffic flow data of the road segment to be processed; The prediction module, which is communicatively connected to the data acquisition module, is used to predict the traffic flow of the road segment to be processed within a future preset time based on the multimodal data using a spatiotemporal graph convolutional network. The signal control module is communicatively connected to the data acquisition module and the prediction module. It is used to process the traffic flow prediction results and the multimodal data based on the A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor for the road segment to be processed. The path allocation module is communicatively connected to the data acquisition module and the signal control module. It is used to allocate traffic paths in real time for the traffic flow of the road segment to be processed based on the path planning network and the multimodal data. It also optimizes the traffic flow efficiency on the allocated traffic paths by combining the signal light phase switching strategy and the green light duration adjustment factor. An anomaly detection module, communicatively connected to the data acquisition module, is used to detect abnormal traffic events on the road segment to be processed based on the multimodal data using the anomaly detection network; and, The distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module. It is used to perform differentiated distillation strategies on each network based on the federated distillation network during the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, so as to achieve spatiotemporal adaptability of knowledge transfer in each network. In the data processing of the spatiotemporal graph convolutional network, the A3C signal control network, the path planning network, and the anomaly detection network, a differentiated distillation strategy is applied to each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer in each network, including: The federated distillation network includes hierarchical attention distillation, a task-adaptive temperature mechanism, and a gradient masking mechanism. The convolutional adapter based on the hierarchical attention distillation realizes the transfer of multi-layer attention weights to hierarchical knowledge of each network; Based on the task-adaptive temperature mechanism, the temperature parameters during the distillation process are dynamically adjusted according to the task characteristics of each network to optimize the hierarchical knowledge transfer process. The mask matrix is calculated based on the Fisher information content using the gradient masking mechanism.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the intelligent traffic flow processing method based on knowledge distillation and LLM as described in any one of claims 1 to 6.
9. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that, When the processor runs the computer program, it implements the intelligent traffic flow processing method based on knowledge distillation and LLM as described in any one of claims 1 to 6.