A path planning method, device and medium based on federated learning
By employing a collaborative architecture of federated learning and lightweight digital twins, the problems of poor adaptability and high resource consumption in dynamic obstacle handling of path optimization methods are solved, achieving lightweight deployment and efficient path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV OF SCI & TECH
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing path optimization methods are poorly adaptable to handling dynamic obstacles, difficult to deploy lightweight models, and consume excessive communication and computing resources.
By using federated learning, structured vehicle data is uploaded to the cloud to train a lightweight global path planning model. A lightweight digital twin is then built on the vehicle for decoupling verification and dynamic conflict detection. Combined with real-time sensor data, vehicle control commands are generated, realizing a collaborative architecture between cloud model training and edge real-time control.
While ensuring dynamic adaptability, it achieves an optimal balance between lightweight model deployment and communication computing resources, reducing communication load and improving the system's adaptability to complex environments.
Smart Images

Figure CN122170915A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent transportation and autonomous driving, and in particular to a path planning method, device and medium based on federated learning. Background Technology
[0002] Path planning in autonomous driving can be broadly categorized into traditional graph theory algorithms, data-driven methods, and methods incorporating emerging technologies. Traditional graph theory algorithms, such as Dijkstra's algorithm, A*, and RRT, while structurally clear, lack flexibility when dealing with dynamic obstacles or complex scenarios, exhibiting poor adaptability to dynamic environments and difficulty handling real-time changing traffic conditions. Data-driven methods, such as deep learning and reinforcement learning, require large amounts of labeled data for path planning, resulting in high model training costs. Emerging technologies, such as federated learning and digital twins, rely on 3D road network models, requiring significant GPU resources for modeling and exhibiting long convergence periods.
[0003] In summary, existing path optimization methods have some significant shortcomings: traditional algorithms rely on static environment assumptions, have poor adaptability to dynamic obstacles, have low road network computation efficiency, and are rigid in multi-objective optimization; data-driven methods are limited by the generalization ability of traffic scenarios and model interpretability, have high computing power requirements for large cloud models, and are not easy to achieve lightweight deployment; traditional federated learning schemes have heavy communication loads due to full data transmission, and digital twin high-precision modeling consumes a lot of resources and has a long convergence period. Summary of the Invention
[0004] This application provides a path planning method, device, and medium based on federated learning to solve the following technical problems: how to solve the problems of poor dynamic adaptability, difficulty in lightweight model deployment, and excessive consumption of communication and computing resources in traditional path optimization methods.
[0005] In a first aspect, embodiments of this application provide a path planning method based on federated learning. This method includes: performing self-tests on the vehicle's sensor modules and communication modules, and loading the vehicle's dynamic parameters to complete the vehicle's environmental initialization; extracting a structured dataset from the vehicle's local historical driving data, and uploading the structured dataset to the cloud, wherein the cloud is used to generate and train a global path planning model based on the received structured dataset, and to compress the global path planning model into a lightweight global path planning model and distribute it to the vehicle; receiving the lightweight global path planning model distributed by the cloud; and based on real-time... Traffic data is used to construct a lightweight digital twin of the vehicle. Within this lightweight digital twin, the global path generated by the lightweight global path planning model is decoupled, verified, and dynamically conflict-detected. A verified path point sequence is output to complete path pre-simulation. The verified path point sequence is loaded, and combined with real-time sensor data, a local path is generated using a dynamic windowing method. Smoothing is performed when abrupt changes in path curvature are detected to generate vehicle control commands for the vehicle. The decision data is recorded and uploaded to the cloud so that the cloud can update the global path planning model based on the decision data.
[0006] Secondly, embodiments of this application also provide a path planning device based on federated learning, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a path planning method based on federated learning as described in the first aspect above.
[0007] Thirdly, embodiments of this application also provide a computer storage medium storing computer-executable instructions, which, when executed, implement a path planning method based on federated learning as described in the first aspect above.
[0008] The path planning method, device, and medium based on federated learning provided in this application have the following beneficial effects: In this embodiment, the vehicle locally extracts and uploads a structured feature dataset to the cloud, instead of the raw data, significantly reducing communication load. The cloud then trains the model and generates a lightweight global path model through knowledge distillation, which is then sent to the vehicle, solving the deployment challenge of the model on resource-constrained vehicles. The vehicle constructs a lightweight digital twin based on real-time traffic data, decouples and verifies the global path generated by the model, and performs dynamic conflict detection, outputting a verified path point sequence. This significantly improves the system's adaptability to dynamic and complex environments by fusing real-time and predictive information in a virtual environment. Finally, the vehicle loads the verified path point sequence and integrates real-time sensor data, generating a local path using a dynamic windowing method. When a curvature abrupt change is detected, smoothing is performed to generate the final control command. This creates a highly efficient collaborative architecture where model training and knowledge distillation are performed in the cloud, while verification and real-time control are performed at the edge. The non-real-time, computationally intensive model iteration is placed in the cloud, while the highly real-time perception, verification, and control loop remains on the vehicle, thus achieving an optimal balance between lightweight model deployment and communication computing resources while ensuring dynamic adaptability. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a path planning method based on federated learning, provided for an embodiment of this application; Figure 2 A schematic diagram of path planning based on federated learning in an application scenario provided by an embodiment of this application; Figure 3 This is a schematic diagram of the internal structure of a path planning device based on federated learning, provided for an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0012] Figure 1This is a flowchart illustrating a path planning method based on federated learning, provided as an embodiment of this application. This method can be applied to in-vehicle terminals or vehicle-mounted systems. Figure 1 As shown in the figure, the path planning method based on federated learning provided in this application embodiment specifically includes the following steps: Step 101: Perform a self-test on the vehicle's sensor module and communication module, and load the vehicle's dynamic parameters to complete the vehicle's environmental initialization.
[0013] Autonomous driving path planning relies on real-time data input from sensors and communication modules (vehicle-to-everything, V2X communication). Hardware malfunctions, such as LiDAR failure or insufficient camera resolution, can directly lead to path planning failure or even safety accidents. Path planning algorithms depend on preset parameters such as maximum vehicle speed and minimum turning radius. If these parameters are not initialized or are incorrect, the planning results may not conform to vehicle dynamics constraints.
[0014] In practical applications, the LiDAR frame rate can be adjusted to ≥10Hz via self-testing to ensure the sensor and communication module are in normal working order and to prevent core processes from being interrupted due to hardware failure. The V2X communication latency is set to ≤50ms to ensure the input data quality meets the minimum requirements for path planning. Secondly, vehicle dynamics parameters are loaded, with a maximum speed of 60km / h and a minimum turning radius of 6m.
[0015] Step 102: Extract a structured dataset from the vehicle's local historical driving data and upload the structured dataset to the cloud.
[0016] The cloud platform is used to generate and train a global path planning model based on the received structured dataset, and to compress the global path planning model into a lightweight global path planning model and distribute it to the vehicle terminal.
[0017] In this embodiment, a powerful teacher model can be used to perform knowledge distillation on the student model in the cloud. In this way, the complex decision-making logic and generalization ability of the global path planning model (teacher model) can be compressed and transferred to a lightweight global path planning model with a simplified structure and fewer parameters.
[0018] The aforementioned lightweight global path planning model is specifically designed for edge computing constraints. While ensuring core performance (security and rationality), it reduces computational complexity and memory consumption, making real-time operation on automotive embedded platforms possible. Furthermore, the vehicle-mounted device uploads processed structured datasets, rather than the raw, massive amounts of sensor data, significantly compressing uplink bandwidth. The cloud primarily distributes the lightweight global path planning model, which has a small data volume and low update frequency, conserving communication resources.
[0019] Step 103: Receive the lightweight global path planning model sent from the cloud.
[0020] Step 104: Based on real-time traffic data, construct a lightweight digital twin corresponding to the vehicle. In the lightweight digital twin, perform decoupling verification and dynamic conflict detection on the global path generated by the lightweight global path planning model, and output the verified path point sequence to complete the path pre-play.
[0021] Before the vehicle actually executes control commands, local computing power can be used in the virtual environment of a lightweight digital twin to decouple and verify the global path and detect dynamic conflicts in advance, thereby identifying and eliminating risks and outputting a tested, safe and reliable reference path.
[0022] The aforementioned lightweight digital twin is a virtual environment highly synchronized with the real world and capable of high-speed computation. However, it does not need to be a complete replica; it only needs to include the core elements necessary for path planning and verification. For example, based on real-time sensor data (cameras, radar, lidar, etc.), it can reconstruct the current state of lane lines, traffic signs, and surrounding obstacles such as other vehicles and pedestrians in the virtual world. It can also integrate real-time information received from the cloud (such as traffic congestion, accidents, and traffic light timings) and the predicted trajectories of other traffic participants for the next few seconds.
[0023] In practical applications, if the path is safe, the original path can be directly output as a reliable preliminary result. If a conflict is detected, an avoidance strategy can be generated within the lightweight digital twin, such as slightly adjusting the speed or lateral position to avoid the conflict, and then the corrected, verified safe path point sequence can be output.
[0024] Step 105: Load the verified path point sequence, combine it with real-time sensor data, generate a local path using the dynamic window method, and perform smoothing processing when a sudden change in path curvature is detected, so as to generate the vehicle control command corresponding to the vehicle.
[0025] In this embodiment, a verified path point sequence can be loaded, that is, a path that has been pre-rehearsed and verified in the aforementioned lightweight digital twin can be formally set as the reference path that the vehicle will currently execute. After obtaining the verified path point sequence, driving is not directly based on this sequence; real-time decision-making is still required at the edge, that is, the path is fine-tuned according to the actual situation in the real scenario, because the pre-rehearsal is based on prediction and model, while execution faces the absolutely real physical world. In this way, the vehicle can be controlled to drive safely and comfortably on real roads. In practical applications, the verified path point sequence can be used as a baseline reference line for this trip. The vehicle can drive along this baseline while using sensors to perceive unpredictable or suddenly appearing obstacles in real time (such as pedestrians suddenly appearing or falling cargo). At this time, the Dynamic Window Approach (DWA) algorithm can be used to plan a local path that can avoid real-time obstacles with reference to the baseline, and then output specific vehicle control commands for steering wheel, accelerator, and brake. At the same time, the adjusted path can be smoothed to ensure a comfortable ride.
[0026] In practical applications, traditional centralized processing or high-frequency communication methods result in significant bandwidth pressure and latency. However, in this embodiment, a cloud-edge collaborative task is implemented. The cloud is responsible for data aggregation and knowledge distillation, while the vehicle-mounted terminal handles real-time, low-latency tasks such as building lightweight digital twins, path pre-simulation, and real-time path planning and decision-making. Time-consuming model training and global optimization are placed in the cloud, while the real-time-critical perception, decision-making, and control loops remain local. This not only avoids the enormous computing power requirements and network latency associated with centralizing all computation in the cloud but also avoids the extremely high onboard computing power costs required for entirely local computation.
[0027] Step 106: Record the decision data for this transaction and upload the decision data to the cloud so that the cloud can update the global path planning model based on the decision data.
[0028] In practical applications, decision-making data can be stored, such as adjusted waypoints, actual energy consumption (SOC change rate), and conflict events (number of emergency brakings), and uploaded to the cloud via V2X communication. Data is then aggregated in the cloud to trigger incremental training, i.e., returning to the model distillation process to update the global path planning model.
[0029] In this embodiment, the vehicle locally extracts and uploads a structured feature dataset to the cloud, instead of the raw data, significantly reducing communication load. The cloud then trains the model and generates a lightweight global path model through knowledge distillation, which is then sent to the vehicle, solving the deployment challenge of the model on resource-constrained vehicles. The vehicle constructs a lightweight digital twin based on real-time traffic data, decouples and verifies the global path generated by the model, and performs dynamic conflict detection, outputting a verified path point sequence. This significantly improves the system's adaptability to dynamic and complex environments by fusing real-time and predictive information in a virtual environment. Finally, the vehicle loads the verified path point sequence and integrates real-time sensor data, generating a local path using a dynamic windowing method. When a curvature abrupt change is detected, smoothing is performed to generate the final control command. This creates a highly efficient collaborative architecture where model training and knowledge distillation are performed in the cloud, while verification and real-time control are performed at the edge. The non-real-time, computationally intensive model iteration is placed in the cloud, while the highly real-time perception, verification, and control loop remains on the vehicle, thus achieving an optimal balance between lightweight model deployment and communication computing resources while ensuring dynamic adaptability.
[0030] In one possible implementation, the extraction of the structured feature dataset from the vehicle's local historical driving data includes: Extract the coordinates of congested road sections from the vehicle's local historical driving data; Based on the vehicle's local historical driving data, the frequency of emergency braking of the vehicle is calculated using the sliding window statistical method. Based on the vehicle's local historical driving data, the battery state-of-charge consumption rate of the vehicle is analyzed, and the energy consumption peak area is extracted.
[0031] In practical applications, each vehicle can continuously record its own GPS track points, timestamps, speed, braking signals, battery state of charge (SOC) status and other information during daily driving. This data is stored on the vehicle's onboard equipment and constitutes the vehicle's local historical driving data.
[0032] In practical applications, vehicles can leverage their computing power to extract advanced, semantic features from this raw data. For example, by analyzing the density of their own GPS trajectory points (even if a road has only been traveled a few times) and combining this with simple statistics, they can identify the coordinates of congested road sections, such as the speed being below 5 km / h each time they pass intersection A. After algorithmic processing, structured information such as the center coordinates of intersection A can be output, instead of all the raw GPS points. Sliding window statistics can also be used to calculate the frequency of sudden braking, such as the frequency of sudden braking on road section B. Simultaneously, the SOC consumption rate can be analyzed to identify peak energy consumption regions; for example, the SOC consumption rate is significantly higher on road section C. This results in a lightweight, structured dataset.
[0033] In practical applications, the sliding window statistical method can be used to calculate the frequency of emergency braking of vehicles.
[0034] The formula for detecting emergency braking time is as follows: ; The formula for frequency calculation is as follows: ; in, express The vehicle's acceleration at all times Indicates an emergency braking event. Indicates a time window.
[0035] In practical applications, peak energy consumption regions can also be extracted by analyzing the SOC consumption rate.
[0036] The formula for calculating the rate of change of SOC is as follows: ; in, For driving distance, Vehicle speed is the reference value, and SOC indicates the battery state of charge (0%~100%). The distance traveled (km) These are the endpoints of the time interval.
[0037] For example, the obtained structured dataset can be uploaded to the cloud using AES-256-GCM encryption.
[0038] The formula for key generation is as follows: ; in, For the root key of the vehicle-mounted SE chip, K is a random number, and K represents the encryption key.
[0039] The formula for encrypted calculation is as follows: ; Where C represents the ciphertext, T represents the authentication tag, IV represents the initialization vector, AAD represents the V2X header information, and P represents the plaintext feature data.
[0040] In practical applications, the cloud can train the global path planning model and compress it into a lightweight model, which can then be distributed to the vehicle.
[0041] In practical applications, the cloud can use a spatial clustering algorithm based on GPS point density (DBSCAN) to extract the coordinates of congested road sections. The entire city's road network is divided into 100m × 100m grids. Then, based on the feature point locations reported by all vehicles during the same time period, the number of vehicles in each grid (unit: vehicles / minute) is counted. When the number of vehicles counted in a certain grid exceeds a threshold, the cloud can determine that the grid area is a globally recognized high-frequency congestion area. In this way, globally validated coordinates of the congestion area center can be obtained, a result that is more accurate and authoritative than local guesses from individual vehicles.
[0042] Core formula: For data points ,That - The number of points within the domain satisfies: ; in, Indicates the side length of the road network grid. It is a Euclidean distance.
[0043] Specifically, density calculation: ; Congestion determination: If The network is marked as a congested area based on the number of vehicles per minute, and the coordinates of its center are output. .
[0044] Alternatively, frequency filtering can be used to identify high-frequency congestion areas.
[0045] Core formula: ; in, For the statistical period, This refers to the number of traffic jams per day.
[0046] In practical applications, the cloud can use the Transformer encoder to encode the features of the input data and use the gated loop unit decoder to generate path planning results. During model compression, a knowledge distillation algorithm is used to soften the output probability distribution of the large model through the temperature coefficient, and the KL divergence loss between this distribution and the softened probability distribution of the small model is calculated. The small model is then updated with the joint task loss.
[0047] The architecture of the global path planning model described above is as follows. This model includes a Transformer encoder, where the multi-head attention formula is as follows: ; The formula for single-head calculation is as follows: ; The formula for position coding is as follows: ; The aforementioned global path planning model also includes a GRU decoder, in which, The formula for the candidate state is as follows:
[0048] The formula for hidden state update is as follows:
[0049] In practical applications, after the global path planning model is trained in the cloud, it is necessary to perform knowledge distillation on the model to achieve knowledge transfer.
[0050] The formula for temperature scaling using Softmax is as follows: ; in, The temperature coefficient controls the smoothness of the output distribution. Indicates the large model for the first The original output of the category.
[0051] The formula for KL divergence loss is as follows:
[0052] in, This represents the softening probability distribution of the large model. This represents the softening probability distribution of the small model. This represents the gradient scaling factor, used to offset the effect of the temperature coefficient on the magnitude of the loss value. This represents the total number of categories, i.e., the number of feasible areas in path planning.
[0053] Specifically, jointly optimize task losses With distillation loss : ; in, These are the weighting coefficients. This represents the prediction results from the small model.
[0054] calculate For the gradient of the small model parameters, update the parameters until convergence.
[0055] In one possible implementation, constructing a lightweight digital twin of the vehicle based on real-time traffic data includes: The lidar point cloud is projected onto a two-dimensional plane and divided into grids according to a preset resolution. The occupancy probability of each grid is calculated to mark obstacles. Lane coordinates are extracted from camera images by B-spline curve fitting. The target detection algorithm is executed to identify dynamic obstacles from the camera image and output the bounding boxes of the dynamic obstacles; The status and remaining duration of traffic lights can be analyzed through V2X communication between any two things in the vehicle.
[0056] In practical applications, lightweight digital twins can be constructed based on three types of real-time traffic data: LiDAR point clouds, camera images, and V2X traffic light status. Specifically, when rasterizing LiDAR point clouds, the point cloud can be projected onto a two-dimensional plane, divided into grids with a resolution of 0.5m × 0.5m, and the occupancy probability of each grid cell can be calculated. ; in, For grid The number of lidar points inside, This represents the total number of point clouds in a single frame. Judgment rule: If... Marked as an obstacle, with a grid value of 1.
[0057] In practical applications, B-spline curve fitting can be performed to extract lane line coordinates.
[0058] Given control points The equation of the B-spline curve is: ; in, The basis functions are of degree P, and the node vectors are uniformly distributed. This represents the coordinates of the control points extracted from the camera image; The curve is made of cubic B-spline to ensure smoothness.
[0059] In practical applications, it can be used for dynamic obstacle detection (YOLOv8).
[0060] The formula for calculating the confidence score of object detection is as follows: ; in, This indicates the probability that the predicted bounding box contains an object. Intersection over Union (IoU) of predicted and ground truth bounding boxes. Output: Bounding boxes with a confidence level > 0.8. .
[0061] In practical applications, traffic light status analysis can be performed.
[0062] Logical rule: Receive the status (red / green) and remaining duration of the traffic light via V2X. If it is a red light and It is marked as "need to slow down in advance".
[0063] In one possible implementation, the global path generated by the lightweight global path planning model is decoupled and dynamically conflict detected within the lightweight digital twin, and the verified path point sequence is output, including: In the Frenet coordinate system, the global path generated by the lightweight global path planning model is decomposed into lateral displacement and longitudinal displacement, and the path curvature change rate is calculated to verify continuity. Long Short-Term Memory (LSTM) networks are used to predict the future trajectories of dynamic obstacles, calculate the conflict risk between the obstacle and the vehicle's global path, and mark the conflict areas. If the conflict time exceeds the time threshold, the dynamic window method is used to replan the path corresponding to the conflict area, and a verified path point sequence is obtained.
[0064] In practical applications, the paths generated by the lightweight global path planning model can be decoupled and verified. Lateral and longitudinal control are separated in the Frenet coordinate system, reducing computational complexity. The Frenet coordinate system is a dynamic coordinate system based on reference lines. By decomposing the motion of a vehicle or object into two independent dimensions—the longitudinal dimension (s-axis) along the reference line and the lateral dimension (d-axis) perpendicular to the reference line—it simplifies path planning and control problems in complex road environments.
[0065] global coordinates Mapping to Frenet coordinate system The formula is as follows: ; ; in, This refers to the longitudinal displacement along the lane centerline. Horizontal offset ( ).
[0066] The formula for calculating the target vehicle speed based on the remaining time of the traffic light is as follows: ; in, The distance from the car's current position to the stop line. For a safe buffer distance.
[0067] In practical applications, numerical differentiation can be used to verify the continuity of path curvature. The purpose of verifying the continuity of path curvature is to check whether the ride is comfortable and to ensure that the planned path is not a sharp zigzag line, but a smooth curve. At this point, the curvature (the degree of sharpness of the curve) at each point on the path can be calculated, and then the change in curvature can be checked to see if it is gradual.
[0068] Path point sequence The formula for calculating the rate of change of curvature is as follows: .
[0069] Judgment rule: If The path curvature is continuous.
[0070] If the curvature changes too rapidly (e.g., |Δk|≥0.1 / ㎡), it indicates abrupt turns in the path, which will cause a bumpy ride for the vehicle and may make passengers uncomfortable. Such a path needs to be corrected or smoothed.
[0071] In practical applications, dynamic collision detection can be performed to predict obstacle trajectories and generate avoidance strategies. Specifically, a Long Short-Term Memory (LSTM) network can be used for trajectory prediction.
[0072] The formula for updating the state of an LSTM cell is as follows:
[0073] in, Indicates a hidden state. This is the historical coordinate sequence of the obstacle, with a time step of 0.1.
[0074] When marking conflict areas, the waypoints from the vehicle can be calculated. To obstacle prediction point The Euclidean distance is given by the following formula: ; Judgment rule: If And time difference , marked as conflict zone.
[0075] Rule logic: When there is a conflict time At that time, longitudinal speed adjustment Conflict time This triggers the Dynamic Window Method (DWA) to replan the local path.
[0076] In practical applications, the global path can be embedded in a lightweight digital twin built based on real-time data. Vehicles virtually travel along this global path, while other traffic participants move according to trajectories predicted by the model. By calculating spatiotemporal distances, it accurately detects whether the vehicle's path will conflict with the predicted obstacle trajectory at a future point in time. In this case, the global path serves as the assessment object for risk detection. The output of the pre-simulation directly determines how the edge devices treat this global path. If the pre-simulation verifies that the path is smooth and conflict-free, it can be marked as safe and directly distributed to subsequent modules as a reference trajectory. If a potential, low-risk conflict is detected in the long term, the pre-simulation system can generate speed adjustment suggestions. For example, if a vehicle might cut in 3 seconds, the global path remains unchanged, but a deceleration point needs to be marked. If a high-risk conflict is detected in the near term (e.g., a collision is imminent within 1 second), a local path to avoid the collision can be urgently planned using the Dynamic Window Method (DWA) starting from the current vehicle state. The role of the global path at this point is to provide the long-term target direction.
[0077] In one possible implementation, after decomposing the global path generated by the lightweight global path planning model into lateral and longitudinal displacements in the Frenet coordinate system and calculating the rate of change of path curvature to verify continuity, the method further includes: Continuously monitor scenarios that fail to rehearse or have a high risk of conflict. If a rehearsal failure is detected, a failure scenario feature is generated and encrypted before being uploaded to the cloud. The scenarios where the pre-simulation fails or has a high risk of conflict include at least one of the following: a collision-free path cannot be planned within a preset time, the estimated conflict probability of all candidate trajectories exceeds the safety threshold, or the curvature continuity of the planned path does not meet the standard.
[0078] In practical applications, during the digital twin path rehearsal process, when performing lightweight digital twin path rehearsal at the edge, not only can feasible paths be generated, but also "failure" or "high conflict risk" scenarios can be continuously monitored during the rehearsal process. For example, a collision-free path cannot be planned within a preset time, the estimated conflict probability of all candidate trajectories exceeds the safety threshold, or the planned path's curvature continuity or comfort level is substandard. When a rehearsal failure is detected, the key features of the scenario can be automatically packaged to generate a lightweight failure scenario feature package. This data package can include: a scenario vector, vehicle status, and a failure type label. The scenario vector can indicate information such as the current grid twin extracted by the encoder and the status of traffic participants (position, speed, predicted trajectory). The vehicle status indicates information such as the vehicle's speed, orientation, and lane at the time of failure. The failure type label can be "unsolvable congestion entry," "failure to avoid intersection conflict," or "curvature discontinuity." This feature package is encrypted and uploaded to the cloud along with regular driving data. Compared to recording raw sensor data, this method greatly protects privacy and reduces upload bandwidth.
[0079] Simultaneously, the cloud can receive "failure scenario feature packages" from massive amounts of vehicles, then decode and cluster them to identify frequently occurring or novel difficult scenario patterns. In the training dataset for the next round of federated learning, the weights of historical or augmented samples similar to these "failure patterns" can be significantly increased. Specifically, this can be achieved by calculating the similarity between the features of the training samples and the centers of the "failure scenario clusters" and dynamically adjusting their weight coefficients in the federated learning loss function.
[0080] The steps described above represent a leap from passively recording real conflicts to proactively uncovering virtual risks. This allows the federated learning process to prioritize strengthening known weaknesses in the system, enabling the global model to rapidly evolve its ability to handle complex and peripheral cases. This forms a closed loop of proactive learning—virtual testing, weakness identification, and targeted reinforcement—that achieves unique technological effects that transcend traditional data collection methods, resulting from the deep integration of digital twins and federated learning.
[0081] In practical applications, the vehicle terminal can integrate the downloaded lightweight global path planning model into the lightweight digital twin as the core decision-maker for path pre-simulation. The lightweight digital twin provides an offline or online simulation testing environment for the lightweight global path planning model and generates feedback data from model decision-making defects found during testing. The feedback data is encrypted and uploaded to the cloud to guide the targeted optimization of the lightweight global path planning model in the next round of knowledge distillation.
[0082] Thus, knowledge distillation and edge digital twins are not independent modules, but rather constitute a collaborative system that empowers and evolves together: the lightweight model obtained through knowledge distillation in the cloud ultimately proves valuable in making reliable decisions in resource-constrained in-vehicle environments. The lightweight digital twin at the edge provides a simulation testing environment for this model. After the model is deployed, vehicles can use the twin to conduct massive offline or online stress tests covering various extreme scenarios. Model decision-making defects discovered during testing (such as path planning significantly inferior to the teacher model in certain scenarios) can be quickly located and formed into the aforementioned failure feature package, fed back to the cloud to guide the next round of distillation. This transforms the distillation process from black-box compression to a goal-oriented, continuous optimization process. The core advantage of the lightweight model is the integration of the teacher model's "knowledge." When this model is integrated into the digital twin pre-simulation for trajectory scoring, risk assessment, or direct generation of candidate trajectories, it enables the "virtual driving agent" within the twin to possess decision-making intelligence approaching that of a large model. This means that, with the same computational budget, digital twins can predict higher-quality and safer paths. Conversely, a more intelligent prediction core can more effectively identify planning bottlenecks and generate higher-quality feedback data. Therefore, a powerful synergy exists between knowledge distillation and lightweight digital twins: the twin provides the distillation model with targeted optimization objectives and a verification environment, while the distillation model significantly improves the logic and security of the prediction within the twin. Together, they form an enhanced closed loop of model optimization and simulation verification, which cannot be achieved by simply combining "federated learning" and "digital twins."
[0083] In one possible implementation, the loaded and verified path point sequence, combined with real-time sensor data, generates a local path using a dynamic windowing method, including: Map the verified path point sequence to a local coordinate system with the vehicle's current position as the origin; A dynamic window is constructed based on real-time obstacle distance and vehicle dynamics constraints. Multiple future trajectories are sampled within the dynamic window, and the weighted cost value of each trajectory is calculated. The weighted cost value includes the cost of moving toward the target, the cost of moving away from the obstacle, and the smoothness cost. The trajectory whose weighted cost value is less than a preset cost value threshold is selected as the local path.
[0084] In practical applications, global pathpoints can be mapped to the vehicle's local coordinate system, with the origin at the vehicle's current position. The formula is: .
[0085] in, The vehicle's current global coordinates, These are path points in the local coordinate system.
[0086] Then, a low-latency obstacle avoidance path can be generated based on real-time obstacle distance and vehicle dynamics constraints.
[0087] The dynamic window is determined by vehicle speed. With steering angle The feasible range is defined by the following formula: ; in, The maximum permissible speed of the vehicle. This is the maximum steering angle.
[0088] Sampling within a dynamic window Combined, simulate the vehicle's trajectory for the next 3 seconds, with a time step of 0.1 seconds. Calculate the weighted cost of each trajectory using the following formula: ; The formula for the distance to the target cost is as follows: ; The formula for the cost of moving away from an obstacle is as follows: ; The formula for smoothness cost is as follows: ( path point (curvature); in, This represents the weighting coefficient, which is optimized based on simulation results. Indicates the number of trajectory points.
[0089] In practical applications, the trajectory with a cost less than a preset threshold (or the minimum) can be selected as the local path based on the calculation results.
[0090] In one possible implementation, the smoothing process upon detecting abrupt changes in local path curvature includes: Calculate the rate of change of curvature of the local path; If the absolute value of the rate of change of curvature is greater than or equal to a preset continuity threshold, the local path is smoothed using a Bezier curve.
[0091] In practical applications, the aforementioned emergency smoothing process serves to quickly correct the last potential problem (a sharp turn) on the path before the vehicle executes its course, ensuring smooth control commands and improving ride comfort and safety. When performing curvature abrupt change detection, the rate of curvature change |Δk| between each point on the path and its preceding and following points can be calculated. Curvature k can be simply understood as the degree of sharpness of the curve.
[0092] Calculate the rate of change of curvature between adjacent path points: .
[0093] Judgment rule: If This triggers smoothing processing.
[0094] If |Δk| is greater than a preset continuity threshold (e.g., 0.2), a curvature abrupt change point can be identified. When a vehicle travels along this path, it may experience noticeable jerking or shaking at this point, causing discomfort to passengers and requiring smoothing.
[0095] In practical applications, Bézier curves can be used for emergency smoothing.
[0096] Equation of a quadratic Bézier curve (three points) The formula is as follows: ; in, For the original path point, For control points (take) and Midpoint, offset by a lateral distance d = 0.3m.
[0097] Output smooth path point sequence .
[0098] The purpose of Bézier curves is to replace harsh paths containing abrupt changes with a mathematically smooth curve. Bézier curves can generate an extremely smooth curve with continuously varying curvature using only a few control points, making them suitable for path smoothing. Finally, the original sequence can be replaced with a series of new path points obtained by upsampling from this Bézier curve. In this way, points with excessively large or unnatural curvature changes can be automatically identified and adjusted in the final output path point sequence.
[0099] In practical applications, adjusted waypoints, actual energy consumption (SOC change rate), and conflict event (number of emergency braking) data can be stored and uploaded to the cloud via V2X communication. Data is aggregated in the cloud to trigger incremental training, i.e., returning to the model distillation process to update the global path planning model.
[0100] In one possible implementation, after generating the vehicle control command corresponding to the vehicle, the method further includes: Trip data within the planning period is stored hierarchically and archived with encryption, wherein the planning period is used to instruct the vehicle to complete a complete autonomous driving trip; If the frequency of conflict events exceeds a frequency threshold or the energy consumption deviation exceeds an energy consumption deviation threshold within a preset period, the cloud will be triggered to incrementally update the lightweight global path planning model.
[0101] In practical applications, trip data within the planning cycle (when a vehicle completes a full autonomous driving trip), such as complete path trajectories, energy consumption records, and conflict events, can be stored and encrypted in a tiered manner. Data can be divided into different levels, stored on storage media with varying performance and costs, and with different retention periods. High-priority data, including fragments of conflict events (such as emergency braking and obstacle avoidance) and energy consumption anomalies (deviation >15%), retains the original sensor data (LiDAR point clouds, camera images) for 30 days. Low-priority data, representing normal driving segments, retains only structured features (path point sequences, vehicle speed, energy consumption) and is automatically cleared after 7 days. This approach satisfies regulatory and liability definitions, significantly reduces the overall system storage cost, and ensures efficient access to frequently used data. Furthermore, encryption ensures that even during long-term data storage, privacy and core algorithm trajectories are not leaked.
[0102] In practical applications, when the frequency of conflict events exceeds 10 times per day or the energy consumption deviation exceeds 15%, an incremental update request for the lightweight global path planning model can be triggered. It can also dynamically clear the lightweight digital twin cache and release GPU resources, achieving closed-loop data management and lightweight model iteration, balancing storage resource consumption with long-term optimization needs, and avoiding redundant computing power consumption while ensuring long-term optimization capabilities.
[0103] To provide a more detailed explanation of the methods in the embodiments of this application, the following supplementary descriptions are also provided in the embodiments of this application: Figure 2 This diagram illustrates the processing flow of a federated learning-based path planning method in an application scenario provided by an embodiment of this application. Figure 2 As shown, the path planning method based on federated learning in this application embodiment may further include the following execution process: (1) System preparation, including equipment self-test and loading dynamic parameters.
[0104] (2) Cloud collaboration and model generation, including extracting key features based on spatial clustering algorithm, uploading structured datasets to the cloud, knowledge distillation, parsing lightweight models, and generating real-time path point sequences.
[0105] (3) Path simulation and verification, including generating a dynamic traffic environment model, decoupling and verifying the path, detecting conflicts and predicting obstacle trajectories, and generating avoidance strategies.
[0106] (4) Local path generation and control, including: parsing path point sequence, generating low-latency obstacle avoidance path, emergency smoothing processing, and outputting smooth path point sequence.
[0107] (5) Iterative optimization, which mainly includes data archiving and model iteration.
[0108] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a path planning device based on federated learning, the structure of which is as follows: Figure 3 As shown.
[0109] Figure 3 This is a schematic diagram of the internal structure of a path planning device based on federated learning, provided as an embodiment of this application. Figure 3 As shown, the device includes: At least one processor 301; And a memory 302 that is communicatively connected to at least one processor; The memory 302 stores instructions that can be executed by at least one processor. The instructions are executed by at least one processor 301 so that at least one processor 301 can: execute the above-described federated learning-based path planning method.
[0110] In one possible implementation, the processor can perform self-tests on the vehicle's sensor and communication modules, and load the vehicle's dynamic parameters to complete the vehicle's environmental initialization; extract a structured dataset from the vehicle's local historical driving data, and upload the structured dataset to the cloud, wherein the cloud is used to generate and train a global path planning model based on the received structured dataset, and compress the global path planning model into a lightweight global path planning model and distribute it to the vehicle; receive the lightweight global path planning model distributed by the cloud; construct a lightweight digital twin corresponding to the vehicle based on real-time traffic data, and perform decoupling verification and dynamic conflict detection on the global path generated by the lightweight global path planning model in the lightweight digital twin, outputting a verified path point sequence to complete path pre-playing; load the verified path point sequence, combine it with real-time sensor data, generate a local path using the dynamic window method, and perform smoothing processing when a sudden change in path curvature is detected to generate vehicle control commands corresponding to the vehicle; record the decision data for this decision, and upload the decision data to the cloud so that the cloud can update the global path planning model based on the decision data.
[0111] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium stores computer-executable instructions, which are configured to execute the above-mentioned path planning method based on federated learning.
[0112] In one possible implementation, the computer-executable instructions are configured to perform self-tests on the vehicle's sensor and communication modules, and load the vehicle's dynamic parameters to complete the vehicle's environmental initialization; extract a structured dataset from the vehicle's local historical driving data, and upload the structured dataset to the cloud, wherein the cloud is used to generate and train a global path planning model based on the received structured dataset, and to compress the global path planning model into a lightweight global path planning model and distribute it to the vehicle; receive the lightweight global path planning model distributed by the cloud; and based on real-time traffic data... A lightweight digital twin corresponding to the vehicle is constructed. Within this lightweight digital twin, the global path generated by the lightweight global path planning model is decoupled, verified, and dynamically conflict-detected. The verified path point sequence is output to complete path pre-simulation. The verified path point sequence is loaded, and combined with real-time sensor data, a local path is generated using a dynamic window method. Smoothing is performed when a sudden change in path curvature is detected to generate vehicle control commands corresponding to the vehicle. The decision data is recorded and uploaded to the cloud so that the cloud can update the global path planning model based on the decision data.
[0113] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for IoT devices and media are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0114] The systems, media, and methods provided in this application are one-to-one correspondences. Therefore, the systems and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be repeated here.
[0115] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application 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, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. 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.
[0117] 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.
[0118] 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.
[0119] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0120] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0121] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0122] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A path planning method based on federated learning, characterized in that, The method includes: Perform self-tests on the vehicle's sensor and communication modules, and load the vehicle's dynamic parameters to complete the vehicle's environmental initialization; A structured dataset is extracted from the vehicle's local historical driving data and uploaded to the cloud. The cloud is used to generate and train a global path planning model based on the received structured dataset, and to compress the global path planning model into a lightweight global path planning model and distribute it to the vehicle. Receive the lightweight global path planning model sent from the cloud; Based on real-time traffic data, a lightweight digital twin corresponding to the vehicle is constructed. In the lightweight digital twin, the global path generated by the lightweight global path planning model is decoupled and verified and dynamic conflict detection is performed. The verified path point sequence is output to complete the path pre-playing. The verified path point sequence is loaded and combined with real-time sensor data to generate a local path using a dynamic window method. If a sudden change in path curvature is detected, a smoothing process is performed to generate the vehicle control command corresponding to the vehicle. Record the decision data and upload it to the cloud so that the cloud can update the global path planning model based on the decision data.
2. The method according to claim 1, characterized in that, The extraction of structured feature datasets from the vehicle's local historical driving data includes: Extract the coordinates of congested road sections from the vehicle's local historical driving data; Based on the vehicle's local historical driving data, the frequency of emergency braking of the vehicle is calculated using the sliding window statistical method. Based on the vehicle's local historical driving data, the battery state-of-charge consumption rate of the vehicle is analyzed, and the energy consumption peak area is extracted.
3. The method according to claim 1, characterized in that, The construction of a lightweight digital twin of the vehicle based on real-time traffic data includes: The lidar point cloud is projected onto a two-dimensional plane and divided into grids according to a preset resolution. The occupancy probability of each grid is calculated to mark obstacles. Lane coordinates are extracted from camera images by B-spline curve fitting. The target detection algorithm is executed to identify dynamic obstacles from the camera image and output the bounding boxes of the dynamic obstacles; The status and remaining duration of traffic lights can be analyzed through V2X communication between any two things in the vehicle.
4. The method according to claim 1, characterized in that, In the lightweight digital twin, the global path generated by the lightweight global path planning model is decoupled and dynamically conflict-detected, and the verified path point sequence is output, including: In the Frenet coordinate system, the global path generated by the lightweight global path planning model is decomposed into lateral displacement and longitudinal displacement, and the path curvature change rate is calculated to verify continuity. Long Short-Term Memory (LSTM) networks are used to predict the future trajectories of dynamic obstacles, calculate the conflict risk between the obstacle and the vehicle's global path, and mark the conflict areas. If the conflict time exceeds the time threshold, the dynamic window method is used to replan the path corresponding to the vehicle and obtain the verified path point sequence.
5. The method according to claim 4, characterized in that, After decomposing the global path generated by the lightweight global path planning model into lateral and longitudinal displacements in the Frenet coordinate system and calculating the path curvature change rate to verify continuity, the method further includes: Continuously monitor scenarios that fail to rehearse or have a high risk of conflict. If a rehearsal failure is detected, a failure scenario feature is generated and encrypted before being uploaded to the cloud. The scenarios where the pre-simulation fails or has a high risk of conflict include at least one of the following: a collision-free path cannot be planned within a preset time, the estimated conflict probability of all candidate trajectories exceeds the safety threshold, or the curvature continuity of the planned path does not meet the standard.
6. The method according to claim 1, characterized in that, The verified path point sequence, combined with real-time sensor data, generates a local path using a dynamic windowing method, including: Map the verified path point sequence to a local coordinate system with the vehicle's current position as the origin; A dynamic window is constructed based on real-time obstacle distance and vehicle dynamics constraints. Multiple future trajectories are sampled within the dynamic window, and the weighted cost value of each trajectory is calculated. The weighted cost value includes the cost of moving toward the target, the cost of moving away from the obstacle, and the smoothness cost. Trajectories with a weighted cost value less than a preset cost value threshold are selected as local paths.
7. The method according to claim 1, characterized in that, And in the event of a detected abrupt change in path curvature, smoothing is performed, including: Calculate the rate of change of curvature of the local path; If the absolute value of the rate of change of curvature is greater than or equal to a preset continuity threshold, the local path is smoothed using a Bezier curve.
8. The method according to claim 1, characterized in that, After generating the vehicle control command corresponding to the vehicle, the method further includes: Trip data within the planning period is stored hierarchically and archived with encryption, wherein the planning period is used to instruct the vehicle to complete a complete autonomous driving trip; If the frequency of conflict events exceeds a frequency threshold or the energy consumption deviation exceeds an energy consumption deviation threshold within a preset period, the cloud will be triggered to incrementally update the lightweight global path planning model.
9. A path planning device based on federated learning, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a federated learning-based path planning method as described in any one of claims 1-8.
10. A computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement a path planning method based on federated learning as described in any one of claims 1-8.