Intelligent traffic flow processing method and system based on knowledge distillation and LLM

Through the joint application of spatiotemporal graph convolution network and path planning network and federal distillation technology, the real-time control problem of intelligent transportation systems under complex road networks is solved, fast response and efficient multimodal task processing are achieved, and the adaptability and interpretability of the transportation system are improved.

CN120526596AActive Publication Date: 2025-08-22CHONGQING UNIV

Patent Information

Application Number
CN202510907136.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-22
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

When facing complex urban road networks, existing intelligent transportation systems are difficult to achieve real-time control in dynamic scenarios. Deep reinforcement learning has lack of strategic interpretability and model update delays. Graph neural networks delay decision-making in response to emergencies. Directly using large language model LLM has problems such as long inference delay and difficulty in taking into account the efficiency and accuracy of multimodal tasks.

Method used

The joint application of spatiotemporal graph convolution network and path planning network is adopted, and combined with the federal distillation network, a layered federal distillation framework is built to achieve the capture of spatiotemporal dynamics and road network heterogeneity of multimodal data, and knowledge transfer between various network models through federal distillation technology to maintain domain characteristics and global thinking.

Benefits of technology

It realizes rapid response to emergencies in urban traffic systems, improves real-time traffic control and the accuracy of multimodal tasks, reduces model inference delay, and improves the adaptability and interpretability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526596A_ABST
    Figure CN120526596A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent traffic flow processing method and system based on knowledge distillation and LLM, and the method comprises the following steps: predicting the traffic flow of a to-be-processed road section in a future preset time based on a space-time diagram convolution network according to multi-modal data; processing the traffic flow prediction result and the multi-modal data based on an A3C signal control network to obtain a signal lamp phase switching strategy and a green light duration adjustment factor; carrying out real-time traffic path distribution on the traffic flow according to the multi-modal data based on a path planning network; detecting a traffic abnormal event of the to-be-processed road section according to the multi-modal data based on an abnormal detection network; and respectively carrying out differential distillation strategies on each network based on the federated distillation network. Therefore, the space-time dynamism and the road network heterogeneity can be captured at the same time through combined application of the space-time diagram convolutional network and the path planning network; and meanwhile, a layered federated distillation framework is created, so that each network model can inherit global thinking while keeping domain characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle flow processing technology, and in particular to an intelligent vehicle flow processing method and system based on knowledge distillation and LLM. Background Art

[0002] With the exponential growth in the complexity of urban transportation systems, traditional intelligent traffic control systems are facing multiple technical bottlenecks. Existing control systems based on fixed rules or single models are unable to cope with the complex scenarios emerging in dynamic road networks. Current research is advancing along two main technical paths. 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 characteristics, they suffer from decision-making delays when responding to emergencies, making them difficult to meet real-time control requirements.

[0003] In recent years, the core model of the Large Language Model (LLM) has demonstrated unique advantages in the field of complex system scheduling. However, directly deploying LLM as the control core faces three major obstacles: First, urban traffic decisions must be completed within 300 milliseconds, while the inference latency of models with hundreds of billions of parameters generally exceeds 1 second; second, traffic data is highly regional, making centralized training difficult to adapt to the road network topology of different cities; third, traffic control involves multimodal tasks such as prediction, control, and planning, making it difficult for a single model to achieve both accuracy and efficiency.

[0004] Knowledge distillation technology offers a new path to address these issues. The Federated Distillation framework proposed by Google in 2024 demonstrates that, through layered knowledge transfer, small models can achieve 80% of the reasoning power of large models while maintaining over 10 times the inference speed. However, existing research has primarily focused on model compression, and has yet to explore how to build dynamic distillation mechanisms for multi-agent systems. Summary of the Invention

[0005] The present 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 enables each network model to inherit global thinking while retaining domain characteristics. First, an intelligent traffic flow processing method based on knowledge distillation and LLM is provided, including: Obtain multimodal data of traffic flow on the road section to be processed; Based on the multimodal data, the traffic flow of the road section to be processed within a preset time in the future is predicted based on the spatiotemporal graph convolutional network; The traffic flow prediction result and the multimodal data are processed based on the A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor of the road section to be processed; Based on the path planning network, real-time traffic path allocation is performed for traffic flow on the road section to be processed according to the multimodal data, and traffic efficiency of traffic flow on the allocated traffic path is optimized by combining the signal light phase switching strategy and the green light duration adjustment factor; Detecting traffic anomalies on the road section to be processed based on the multimodal data based on the anomaly detection 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, a differentiated distillation strategy is performed on each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge migration of each network.

[0006] Secondly, we provide an intelligent traffic flow processing system based on knowledge distillation and LLM, including: A data acquisition module is used to obtain multimodal data of traffic flow on the road section to be processed; A prediction module, in communication with the data acquisition module, for predicting the traffic flow of the road section to be processed within a preset future time based on the multimodal data using a spatiotemporal graph convolutional network; a signal control module, communicatively connected to the data acquisition module and the prediction module, configured to process the traffic flow prediction result and the multimodal data based on the A3C signal control network to obtain a signal light phase switching strategy and a green light duration adjustment factor for the road section to be processed; a path allocation module, communicatively connected to the data acquisition module and the signal control module, configured to allocate real-time traffic paths for traffic on the road section to be processed based on the path planning network and the multimodal data, and to optimize traffic 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, in communication with the data acquisition module, configured to detect abnormal traffic events on the road section to be processed based on the multimodal data based on an anomaly detection network; and A distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module, and is used to perform differentiated distillation strategies on each network based on the federated distillation network during 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 migration of each network.

[0007] Compared with the existing technology, the advantages of the present invention are as follows: by jointly applying the spatiotemporal graph convolutional network and the path planning network, the spatiotemporal dynamics and road network heterogeneity can be captured simultaneously; at the same time, based on the federated distillation network, each network model can inherit global thinking while retaining domain characteristics.

[0008] In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the intelligent traffic flow processing method based on knowledge distillation and LLM as described above is implemented.

[0009] In a fourth aspect, an electronic device is provided, comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor. When the processor executes the computer program, the intelligent traffic flow processing method based on knowledge distillation and LLM as described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a flow chart of an embodiment of an intelligent traffic flow processing method based on knowledge distillation and LLM of the present invention; Figure 2 This is a structural diagram of an intelligent traffic flow processing system based on knowledge distillation and LLM in the present invention. DETAILED DESCRIPTION

[0011] Reference will now be made in detail to specific embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Although the present invention will be described in conjunction with specific embodiments, it will be understood that the present invention is not intended to be limited to those embodiments. On the contrary, it is intended to cover variations, modifications, and equivalents within the spirit and scope of the present 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 the two.

[0012] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0013] Note: The following example is only a specific example and is not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequence, etc. Those skilled in the art can apply the concepts of the present invention to construct more embodiments not described in this specification by reading this specification.

[0014] See also Figure 1 The figure shows a flow chart of an intelligent traffic flow processing method based on knowledge distillation and LLM.

[0015] Step S100, obtaining multimodal data of traffic flow on the road section to be processed; To process the five types of heterogeneous data sources in the traffic flow of the road section to be processed, each of these heterogeneous data sources has its own characteristics and can reflect the dynamic changes of traffic flow from different angles. By fusing and analyzing heterogeneous data, we can more comprehensively understand and manage traffic conditions. Therefore, it is necessary to establish a unified tensor representation framework as follows: 1. Road network topology data.

[0016] Define a directed graph G=(V,E,W), where: V={v i} is a set of nodes at n intersections, E={e ij} is the set of directed edges of m road segments, W∈R^{n×n} is the adjacency matrix, and the element w ij =exp (-d ij / σ d ), where d ij is the length of the road section, σ d =500m is the scale parameter. On this basis, a dynamic weight update mechanism is designed: when the road section k is closed due to construction, the adjacency matrix is ​​modified: W' = W⊙M, M∈{0,1}^{n×n} is the mask matrix, where when w ij =0, (i,j)∈closed road segment set.

[0017] 2. GPS track of floating vehicle.

[0018] The original trajectory point pt=(lat,lon,speed,timestamp) needs to be: (1) Map matching: Use the hidden Markov model to map the point sequence to the road network edge: Observation probability: P (p t |e ij ) = N (proj (p t ,e ij );0,σ p ^2); Transition probability: P (e ij →e jk ) ∝ 1 / (t jk +ε); (2) Time-space discretization: Divide 24 hours into T = 288 5-minute intervals, and count the road sections e in each interval Δt. ij of: X_{flow} ∈ Z^T: number of passing vehicles.

[0019] X_speed ∈ R^T: average speed.

[0020] X_occ ∈ [0,1]^T: temporal occupancy.

[0021] 3. Monitor video streams.

[0022] Use YOLOv6+DeepSORT to achieve multi-target tracking, extract: vehicle count matrix C∈N^{n×T}, C i^t is the number of vehicles at intersection i in 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 is the physical length of the kth lane, q k is the number of vehicles detected in the queue.

[0023] 4. Weather event text.

[0024] Build a semantic parser to convert the meteorological bureau's text warning into a multi-dimensional vector: Use BERT to extract a 128-dimensional feature vector h weather ∈ R^{128}; construct the influencing factor matrix Γ∈R^{4×T}, the dimensions of which include: γ1: precipitation intensity mm / h; γ2: visibility level (1-5); γ3: road adhesion coefficient (0.2-0.8); γ4: driver reaction delay coefficient (1.0-1.5).

[0025] 5. Infrastructure status.

[0026] Define a 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 water depth: s3 = min (max(h,0),30cm) / 30; electronic road sign information: s4 ∈ {0,1}^8 (binary encoding).

[0027] Step S200, predicting the traffic flow of the road section to be processed within a preset future time based on the multimodal data using a spatiotemporal graph convolutional network, includes: Performing spectral convolution on the multimodal data based on a Chebyshev polynomial network in a spatiotemporal graph convolutional network to obtain a spatial feature matrix; Based on multiple time-gated convolutional networks in the spatiotemporal graph convolutional network, the spatial feature matrix is ​​processed in the time dimension respectively, and the obtained time dimension processing results are integrated to output the traffic flow within a preset time in the future.

[0028] Specifically, in this embodiment, during the spatial feature fusion process, the spatiotemporal graph data after multimodal processing is first input, and spectral convolution is performed using Chebyshev polynomials. The specific formula is as follows:

[0029] in, is the scaled Laplace matrix; T k is a Chebyshev polynomial with order K=3, are learnable parameters.

[0030] Final output: spatial feature matrix X spatial ∈ R^(n×T'), T' is the feature dimension.

[0031] Therefore, the spatiotemporal graph data is processed by Chebyshev polynomial spectral convolution, which means that filtering the graph data through spectral convolution can better capture the spatial structural 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 is to combine information from different sources on the graph data in order to better learn the overall characteristics of the spatiotemporal graph.

[0032] The Chebyshev spectral convolution is to approximate the spectral convolution of the graph by using Chebyshev polynomials, thereby avoiding the complete eigenvalue decomposition of the Laplace matrix. Chebyshev polynomials can effectively approximate the spectral information of the graph Laplace and have low computational complexity.

[0033] In the process of temporal feature fusion, input: spatial feature matrix X spatial , the time dimension is processed by convolution of the time-gated convolutional network, with a time window of k=5. The time-gated convolutional network is shown in the following formula:

[0034] Where W t 、W g is a 1D convolution kernel; Φ is the activation function, σ is the Sigmoid gate; then through multiple rounds of spatiotemporal block stacking (such as 2-3 layers), the spatiotemporal features are fused and the output is: spatiotemporal joint feature X spatiotemporal .

[0035] Step S300, based on the A3C signal control network, processes the traffic flow prediction result and the multimodal data to obtain the signal light phase switching strategy and green light duration adjustment factor for the road section to be processed, including: S310, constructing a state vector based on the multimodal data and the traffic flow prediction result, and generating a signal light discrete phase switching request and a continuous green light time scaling factor based on the state vector; S320, calculating the probability distribution of the signal light discrete phase switching request and the continuous green light time scaling factor based on the Actor network in the A3C signal control network; S330, evaluating the state value of the state vector based on the Critic network in the A3C signal control network, and obtaining an advantage function using the n-step TD error and the state vector; S340, generating an Actor loss of the Actor network according to the advantage function and the probability distribution, generating a Critic loss of the Critic network according to the state value; and combining the Actor loss, the Critic loss, and the distillation loss to obtain a total loss function; S350 , optimizing the A3C signal control network using the total loss function and the reward function, and processing the state vector using the optimized A3C signal control network to obtain a signal light phase switching strategy and a green light duration adjustment factor for the road section to be processed.

[0036] Specifically, in this embodiment, the state vector S is constructed by integrating multiple input sources. t , containing the output of the spatiotemporal graph convolutional network and the MinMax normalized future 5-minute traffic prediction ψ flow , intersection signal phase one-hot encoding ψ phase , logarithmically transformed real-time queue length ψ queue , weather impact factor Γ for the current period t , weather semantic vector h weather .

[0037] The action space design is based on the state vector S t Generate discrete phase switching request a d and continuous green time scaling factor a c , actual green light duration t green Satisfy min (max (a c ×t base ,15s),90s), and the same phase is maintained for at least 30 seconds to obtain the motion vector.

[0038] In the A3C algorithm architecture, an Actor-Critic dual network structure is constructed. The Actor network is based on the state vector S t As input, after two layers of 512-dimensional GELU hidden layers, the discrete and continuous action heads output the probability distribution of the signal light discrete phase switching request and the continuous green light time scaling factor π θ(a|s).

[0039] Critic network shared feature extraction layer evaluates state value V ϕ (s t ), the advantage function A is calculated using the n-step TD error. The calculation formula is as follows:

[0040] Where k=5 is the forward step length.

[0041] It's important to note that state value refers to the expected value of the cumulative reward an agent can expect to receive in the future, given its current state. State value is one of the core evaluation criteria of the critic network in reinforcement learning. By evaluating state value, the critic network provides important feedback about the current state. The critic network's role is to assess the effectiveness of the current policy and provide learning signals to the actor network. Actors use this feedback to refine their policies, enabling them to take better actions in more optimal states.

[0042] 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 time steps when making n-step predictions. Specifically, the n-step TD error is the difference between the estimated value of the current state and the estimate corrected based on the observed rewards over the next n time steps. Therefore, the n-step TD error updates the state value estimate by considering reward information over 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.

[0043] Combining the policy gradient, entropy regularization and Huber loss, we get the Actor loss L actor and Critic loss L critic , the calculation formula is as follows: Among them, λ H为 Control exploration intensity.

[0044]

[0045] The distillation mechanism obtains the state vector S from the central model t The corresponding action distribution π central (a|s), calculate L through KL divergence distill , combined with dynamic temperature regulation and linear attenuation of λ D ,λ D Used to balance strategy learning and knowledge inheritance, so the total loss Ltotal = L actor + 0.5L critic + λ D L distill To optimize the A3C signal control network parameters.

[0046] The reward function integrates delay reduction, throughput, and phase switching penalties, with weights of 0.6, 0.3, and 0.1. Ultimately, through iterative optimization, the system 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.

[0047] The reward function is calculated as follows:

[0048] Step S400: allocating real-time traffic paths for traffic on the road section to be processed based on the multimodal data based on the path planning network, and optimizing traffic efficiency on the allocated traffic paths by combining the signal light phase switching strategy and the green light duration adjustment factor. S410, calculating the attention coefficient between each intersection of the road section to be processed based on the multimodal data; S420, combining all the attention coefficients based on a multi-head attention mechanism in the path planning network to obtain multi-dimensional road network correlation features; S430, processing the time period feature and the weather influencing factor through an MLP multi-layer perceptron in the path planning network and then superimposing the processed time period feature and the multi-dimensional road network associated feature to generate an enhanced feature; S440, generating a path selection probability distribution by applying the enhanced features to a softmax function; S450, using the multi-objective loss function and the path selection probability distribution, the traffic flow selection path with the maximum probability of the processed section is allocated in real time, and combined with the signal light phase switching strategy and the green light duration adjustment factor, the traffic flow efficiency is optimized on the allocated path with the maximum probability.

[0049] Specifically, in this embodiment, in the path planning network model, the node v is first calculated based on the road segment characteristics including speed, capacity, and real-time flow. i v j The attention coefficient a ij , quantify the dependency between road sections, and the specific calculation formula is as follows:

[0050] Then, the 4-head attention splicing outputs the multi-dimensional road network correlation feature h i , as follows:

[0051] Then, the time period characteristics and weather influencing factors are processed by MLP and combined with the multi-dimensional road network correlation characteristics h i Superposition, generating enhanced features that adapt to dynamic scenes ; Finally based on The path selection probability distribution is generated by softmax, and the multi-objective loss function is optimized by combining cross entropy and KL divergence.

[0052] The multi-objective loss function is as follows:

[0053] Where, P route Choose a probability distribution for the path.

[0054] Finally, the path with the highest probability is selected to achieve real-time allocation. During this process, the dynamic graph attention mechanism constructs a road network influence map, and the spatiotemporal embedding layer injects dynamic features. After optimization, end-to-end path decision-making is completed.

[0055] Step S500, detecting traffic anomalies on the road section to be processed based on the multimodal data based on the anomaly detection network; Extracting and reconstructing features of the multimodal data based on an encoder and a decoder in an anomaly detection network; Calculate the score of the reconstructed data based on the anomaly scoring function and compare the score result with the preset normal score; If the comparison result is greater than a preset threshold, it is determined that there is traffic anomaly on the road section to be processed.

[0056] 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 through BiLSTM (128), MaxPooling, and Dense (32), and the decoder reconstructs the data through Dense (64), Upsampling, and LSTM (128), realizing traffic data feature extraction and reconstruction. The loss reconstruction optimization model ensures that normal data is accurately reconstructed. The anomaly scoring function calculation formula is as follows:

[0057] Then, using historical normal data as a dynamic threshold, an abnormality is determined when the reconstruction error exceeds the threshold. By associating the processes of data compression-reconstruction-error evaluation, abnormal traffic events can be detected.

[0058] 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 performed on each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge migration of each network.

[0059] The federated distillation network includes layered attention distillation, task-adaptive temperature mechanism and gradient mask mechanism; The convolutional adapter based on the layered attention distillation realizes the migration of multi-layer attention weights to the layered knowledge of each network; Based on the task-adaptive temperature mechanism, the temperature parameters in the distillation process are dynamically adjusted according to the task characteristics of each network to optimize the hierarchical knowledge transfer process; Based on the gradient mask mechanism, a mask matrix is ​​calculated according to the Fisher information to protect the private parameters of each network.

[0060] Specifically, in this embodiment, the federated distillation network includes layered attention distillation, task-adaptive temperature, and gradient masking mechanisms.

[0061] Layer-wise attention distillation defines the l-th layer distillation loss as follows:

[0062] It should be noted that distillation loss is a loss function used to measure the difference in output between the student model and the teacher model during the knowledge distillation process. By guiding the student model to learn the output distribution of the teacher model, the goals of model compression, performance improvement, and training efficiency improvement are achieved.

[0063] Where H = 12 is the number of attention heads. The 1×1 convolutional adapter φ is used to implement the layered migration of the attention weights of the 12 layers of the central model to each network. Layers 1-3 are local feature layers, layers 4-8 are regional reasoning layers, and layers 9-12 are global strategy layers.

[0064] Layers 1-3 (local feature layers): focus on the details of the input data and features within a small range. The attention mechanism in these layers may focus on the relative importance of local information, helping the model capture and learn subtle changes and details in the input.

[0065] Layers 4-8 (Regional Reasoning Layer): Combine local feature information to perform regional reasoning and understanding. In these layers, the network combines multiple local features and information to perform regional reasoning and infer the overall meaning or content of the region. Layers 9-12 (Global Strategy Layer): Make global inferences and decisions based on the entire input data. Therefore, the global strategy involves the network's comprehensive understanding and prediction of the entire input, guiding the model's final decision on a global scale.

[0066] The above hierarchical structure helps the model process local, regional and global information at different levels, gradually deepens its understanding of the input data, and ultimately makes comprehensive decisions or predictions.

[0067] The calculation formula for dynamically adjusting the temperature coefficient of the task adaptive temperature mechanism is as follows:

[0068] Used to adapt to the knowledge transfer requirements of different tasks.

[0069] The gradient mask mechanism calculates the mask matrix through the Fisher information as follows: ,γ=0; This protects the private parameters of each network, as follows:

[0070] The relationship between the gradient mask mechanism calculating the mask matrix through Fisher information and protecting the private parameters of each network model is: Fisher information can be used to identify parameters that contribute less to the output of each network model. This allows for the gradient masking mechanism to reduce updates to these parameters, 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.

[0071] Therefore, the gradient masking mechanism and the protection of private parameters work together to prevent the model from leaking private information and improve training stability by limiting the update of certain parameters (especially those that are sensitive or unimportant).

[0072] The above three realize efficient and secure transmission of knowledge between the hub and various networks through the "layered knowledge migration-dynamic temperature adjustment-gradient privacy protection" process.

[0073] Therefore, in summary, the core value of this invention lies in the innovative construction of the "cloud-edge collaboration" intelligent traffic management paradigm, as follows: 1. Achieve cross-modal knowledge fusion through an improved hub, and use its multi-layer sparse attention mechanism to extract the global features of the traffic situation.

[0074] 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 the spatiotemporal dynamics and road network heterogeneity.

[0075] 3. We created a hierarchical federated distillation framework. The central model uses differentiated migration of 12 layers of attention weights, enabling each sub-model to retain domain specificity while also inheriting a global perspective. This architecture avoids the accuracy loss associated with traditional "one model for multiple uses" approaches while overcoming the latency limitations of direct LLM control.

[0076] See also Figure 2 As shown, an embodiment of the present invention further provides an intelligent traffic flow processing system based on knowledge distillation and LLM, including: A data acquisition module is used to obtain multimodal data of traffic flow on the road section to be processed; A prediction module, in communication with the data acquisition module, for predicting the traffic flow of the road section to be processed within a preset future time based on the multimodal data using a spatiotemporal graph convolutional network; a signal control module, communicatively connected to the data acquisition module and the prediction module, configured to process the traffic flow prediction result and the multimodal data based on the A3C signal control network to obtain a signal light phase switching strategy and a green light duration adjustment factor for the road section to be processed; a path allocation module, communicatively connected to the data acquisition module and the signal control module, configured to allocate real-time traffic paths for traffic on the road section to be processed based on the path planning network and the multimodal data, and to optimize traffic 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, in communication with the data acquisition module, configured to detect abnormal traffic events on the road section to be processed based on the multimodal data based on an anomaly detection network; and A distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module, and is used to perform differentiated distillation strategies on each network based on the federated distillation network during 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 migration of each network.

[0077] This invention pioneers a "cloud-edge collaborative" intelligent traffic governance paradigm. This framework is based on a three-tiered collaborative architecture: a Transformer-based large-scale model hub (based on an improved GPT-4o architecture), specialized sub-model groups (four core network models), and a federated distillation strategy. The hub model is deployed in the cloud, while the sub-network models are distributed across edge computing nodes. Leveraging the improved GPT-4o hub's 128-layer sparse attention mechanism, this approach enables the first-ever global semantic fusion of cross-modal traffic data. This hub model utilizes a hybrid architecture of axial attention and locality-sensitive hashing to form a three-dimensional representation system comprising a traffic situation recognition layer (dynamic road network topology), a strategy deduction layer, and anomaly propagation layer (event impact field). Specialized sub-model groups utilize a combined architecture of ST-GCN and GAT to overcome spatiotemporal modeling bottlenecks. ST-GCN reduces modeling errors for road closures through a dynamic adjacency matrix update mechanism; GAT's multi-head attention mechanism empowers the path planning model with dynamic weight allocation, resulting in high prediction accuracy during peak hours. The two models simultaneously achieve co-evolution through parameter space constraints, and the gradient sharing mechanism in the joint loss function effectively suppresses model drift. The innovative nature of the hierarchical federated distillation framework lies in its differentiated attention weight transfer strategy, which divides the 12 attention layers of 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, this framework enables spatiotemporal adaptability in knowledge transfer. On the SUMO simulation platform, sub-models inherit the central knowledge while improving task performance.

[0078] Specifically, this embodiment corresponds one-to-one to the above method embodiment, and the functions of each module have been described in detail in the corresponding method embodiment, so they will not be repeated here.

[0079] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the method steps of the above method are implemented.

[0080] The present invention may implement all or part of the above-described method processes by instructing related hardware through a computer program. The computer program may be stored in a computer-readable storage medium. When executed by a processor, the computer program may implement the steps of each of the above-described method embodiments. The computer program includes computer program code, which may be in source code form, object code form, an executable file, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. It should be noted that the content of a computer-readable medium may be appropriately expanded or reduced based on the requirements of legislation and patent practice within a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media do not include electric carrier signals or telecommunications signals.

[0081] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, all or part of the method steps in the above method are implemented.

[0082] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor is the control center of a computer device, connecting all parts of the entire computer device using various interfaces and circuits.

[0083] The memory can be used to store computer programs and / or modules. The processor implements the various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (e.g., a sound playback function, an image playback function, etc.); the data storage area may store data generated based on the use of the mobile phone (e.g., audio data, video data, etc.). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0084] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, servers, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), servers, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0088] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. An intelligent traffic flow processing method based on knowledge distillation and LLM, characterized by: include: Obtain multimodal data of traffic flow on the road section to be processed; Based on the multimodal data, the traffic flow of the road section to be processed within a preset time in the future is predicted based on the spatiotemporal graph convolutional network; The traffic flow prediction result and the multimodal data are processed based on the A3C signal control network to obtain the signal light phase switching strategy and green light duration adjustment factor of the road section to be processed; Based on the path planning network, real-time traffic path allocation is performed for traffic flow on the road section to be processed according to the multimodal data, and traffic efficiency of traffic flow on the allocated traffic path is optimized by combining the signal light phase switching strategy and the green light duration adjustment factor; Detecting traffic anomalies on the road section to be processed based on the multimodal data based on the anomaly detection 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, a differentiated distillation strategy is performed on each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge migration of each network.

2. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 1 is characterized in that: The method of predicting the traffic flow of the road section to be processed within a preset future time based on the multimodal data based on the spatiotemporal graph convolutional network includes: Performing spectral convolution on the multimodal data based on a Chebyshev polynomial network in a spatiotemporal graph convolutional network to obtain a spatial feature matrix; Based on multiple time-gated convolutional networks in the spatiotemporal graph convolutional network, the spatial feature matrix is ​​processed in the time dimension respectively, and the obtained time dimension processing results are integrated to output the traffic flow within a preset time in the future.

3. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 1 is characterized in that: The traffic flow prediction result and the multimodal data are processed based on the A3C signal control network to obtain the signal light phase switching strategy and the green light duration adjustment factor of the road section to be processed, including: Constructing a state vector based on the multimodal data and the traffic flow prediction result, and generating a signal light discrete phase switching request and a continuous green light time scaling factor based on the state vector; Calculating the probability distribution of the signal light discrete phase switching request and the continuous green light time scaling factor based on the Actor network in the A3C signal control network; Evaluate the state value of the state vector based on the Critic network in the A3C signal control network, and obtain an advantage function using the n-stepTD error and the state vector; Generate the Actor loss of the Actor network according to the advantage function and the probability distribution, and generate the Critic loss of the Critic network according to the state value; and combine the Actor loss, the Critic loss and the distillation loss to obtain a total loss function; The total loss function and the reward function are used to optimize the A3C signal control network, and the state vector is processed by the optimized A3C signal control network to obtain the signal light phase switching strategy and the green light duration adjustment factor of the road section to be processed.

4. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 1 is characterized in that: The path planning network performs real-time traffic path allocation for traffic on the road section to be processed based on the multimodal data, and optimizes traffic efficiency on the allocated traffic path in combination with the signal light phase switching strategy and the green light duration adjustment factor, including: Calculating the attention coefficient between each intersection of the road section to be processed according to the multimodal data; Based on the multi-head attention mechanism in the path planning network, all the attention coefficients are spliced ​​together to obtain multi-dimensional road network correlation features; The time period characteristics and weather influencing factors are processed by the MLP multi-layer perceptron in the path planning network and then superimposed with the multi-dimensional road network related features to generate enhanced features; The enhanced features are passed through a softmax function to generate a path selection probability distribution; By using the multi-objective loss function and the path selection probability distribution, the path with the maximum probability of traffic flow selection on the processed section is allocated in real time, and the traffic efficiency is optimized on the allocated path with the maximum probability by combining the signal light phase switching strategy and the green light duration adjustment factor.

5. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 1 is characterized in that: The abnormality detection network detects abnormal traffic events on the road section to be processed according to the multimodal data, including: Extracting and reconstructing features of the multimodal data based on an encoder and a decoder in an anomaly detection network; Calculate the score of the reconstructed data based on the anomaly scoring function and compare the score result with the preset normal score; If the comparison result is greater than a preset threshold, it is determined that there is traffic anomaly on the road section to be processed.

6. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 1 is characterized in that: 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 performed on each network based on the federated distillation network to achieve spatiotemporal adaptability of knowledge transfer of each network, including: The federated distillation network includes layered attention distillation, task-adaptive temperature mechanism and gradient mask mechanism; The convolutional adapter based on the layered attention distillation realizes the migration of multi-layer attention weights to the layered knowledge of each network; Based on the task-adaptive temperature mechanism, the temperature parameters in the distillation process are dynamically adjusted according to the task characteristics of each network to optimize the hierarchical knowledge transfer process; A mask matrix is ​​calculated based on the Fisher information quantity based on the gradient mask mechanism.

7. The intelligent traffic flow processing method based on knowledge distillation and LLM according to claim 6 is characterized in that: The hierarchical attention distillation includes 12 layers of attention distillation, where the 1st to 3rd layers are local feature layers, the 4th to 8th layers are regional reasoning layers, and the 9th to 12th layers are global strategy layers.

8. An intelligent traffic flow processing system based on knowledge distillation and LLM, characterized by: include: A data acquisition module is used to obtain multimodal data of traffic flow on the road section to be processed; A prediction module, in communication with the data acquisition module, for predicting the traffic flow of the road section to be processed within a preset future time based on the multimodal data using a spatiotemporal graph convolutional network; a signal control module, communicatively connected to the data acquisition module and the prediction module, configured to process the traffic flow prediction result and the multimodal data based on the A3C signal control network to obtain a signal light phase switching strategy and a green light duration adjustment factor for the road section to be processed; a path allocation module, communicatively connected to the data acquisition module and the signal control module, configured to allocate real-time traffic paths for traffic on the road section to be processed based on the path planning network and the multimodal data, and to optimize traffic 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, in communication with the data acquisition module, configured to detect abnormal traffic events on the road section to be processed based on the multimodal data based on an anomaly detection network; and A distillation module is communicatively connected to the prediction module, the signal control module, the path allocation module, and the anomaly detection module, and is used to perform differentiated distillation strategies on each network based on the federated distillation network during 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 migration of each network.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the intelligent traffic flow processing method based on knowledge distillation and LLM as described in any one of claims 1 to 7 is implemented.

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor runs the computer program, it implements the intelligent traffic flow processing method based on knowledge distillation and LLM according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Traffic flow prediction method and system, storage medium, computer equipment and terminal

    CN118411825A

  • Dynamic traffic signal control method and device based on data fusion and medium

    CN119992852A

  • Traffic light intelligent adjustment method and system fused with Internet of Vehicles information

    CN120220435A

Cited By

  • Reversible lane control method, device and equipment and medium

    CN121191328A

  • Multi-modal fusion method based on optimal transmission and information difference guidance

    CN122153818A