A Federated Learning Traffic Flow Prediction Method Based on UAV Collaboration

By employing a decentralized model aggregation method based on fuzzy membership evaluation and consensus confirmation, and combining reputation theory to design an incentive mechanism, the free-rider attack and energy delay problems in drone-assisted federated learning are solved, achieving efficient, accurate, and reliable model aggregation for traffic flow prediction.

CN118968760BActive Publication Date: 2025-10-28HANGZHOU NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411201779.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-10-28
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Drone-assisted air-ground integrated federated learning faces issues such as free-rider attacks, model accuracy and credibility in traffic flow prediction, and it is difficult to balance the relationship between drone energy consumption and training latency.

Method used

The trust level of drones is assessed using a fuzzy membership evaluation method. A fair incentive mechanism is designed using a consensus-based decentralized model aggregation method and a reputation-based multidimensional contract theory to ensure the reliability of global model aggregation and the efficiency of resource utilization.

Benefits of technology

It improves the accuracy of traffic flow prediction and system reliability, balances the energy consumption and training latency of UAVs, and ensures the fairness and rationality of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968760B_ABST
    Figure CN118968760B_ABST
Patent Text Reader

Abstract

This invention discloses a federated learning traffic flow prediction method based on UAV collaboration. It unites ground vehicles and UAVs to promote information sharing and fusion. First, ground vehicles and UAVs collect data; ground vehicles are responsible for training local models and updating model parameters. Then, the UAV swarm adopts a consensus-based global model aggregation method to ensure model reliability and global applicability. During the global aggregation process, a fuzzy membership evaluation method is used to comprehensively assess the trustworthiness of UAVs, ensuring that only trusted UAVs participate in the model aggregation process. A reputation-based multidimensional contract theory method is employed to achieve fairness, rationality, and incentive compatibility among UAVs participating in the federated learning process, thereby optimizing UAV resource allocation. This invention provides a fair incentive and robust model aggregation strategy, while balancing energy consumption and training latency, thereby improving traffic flow prediction performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic flow prediction technology and relates to a federated learning traffic flow prediction method based on UAV collaboration. Background Technology

[0002] Drones, as efficient and flexible monitoring tools, can collect traffic information in real time and cover a wide monitoring area. Drones assisting vehicles in traffic monitoring can fully leverage their advantages, significantly improving the efficiency and accuracy of traffic monitoring. However, drones face threats such as cyberattacks and privacy breaches in traffic monitoring, potentially leading to data distortion and system performance degradation. Drone-assisted air-to-ground federated learning for traffic flow prediction is an innovative approach that leverages the aerial perspective of drones and ground data from vehicles for joint traffic monitoring and prediction. This method combines federated learning and drone technology to address challenges in traditional traffic prediction methods, such as data privacy and communication overhead. In drone-assisted air-to-ground federated learning, each participant trains a local model based on local data and sends the model parameters to a parameter server for global model aggregation. By embedding training capabilities among network nodes, drone-assisted air-to-ground federated learning can fully utilize distributed data resources and model knowledge, improving the accuracy and generalization ability of traffic prediction models, thereby providing efficient and reliable support for traffic management and decision-making.

[0003] However, due to the inherently distributed data and model training characteristics of federated learning, it is vulnerable to poisoning attacks. Malicious actors may manipulate local datasets or model updates to affect the accuracy and reliability of the global model. Furthermore, due to the heterogeneity and different types of drones, including variations in perception capabilities, training costs, and communication latency, some drones may attempt to benefit from federated learning without making substantial contributions to the overall learning process, such as free-riding attacks. This behavior reduces model accuracy and undermines the incentive for legitimate drones to participate in federated learning. Therefore, providing fair incentives and robust model aggregation strategies for drone-assisted air-to-ground integrated federated learning services remains a crucial issue.

[0004] Furthermore, drones have limited battery life, and the resource consumption required for both local computation and data transmission is significant. On one hand, to reduce energy consumption, drones might want to minimize local computation and communication operations. However, this would increase training latency, as data needs to be transmitted to a central server and await model parameter updates. On the other hand, to reduce training latency, drones might perform local computation and data transmission more frequently to update model parameters promptly, reducing communication overhead and waiting time during training and improving the real-time performance of traffic predictions. However, frequent local computation and communication consume more energy, shortening drone battery life. Therefore, when using air-to-ground federated learning for traffic prediction, a trade-off between energy consumption and training latency is necessary to ensure the accuracy and real-time performance of traffic predictions. Summary of the Invention

[0005] The purpose of this invention is to address the problems existing in existing federated learning-based traffic flow prediction technologies by providing a federated learning traffic flow prediction method based on drone collaboration, which can resist free-rider attacks and has robustness and high prediction accuracy.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] In a first aspect, the present invention provides a federated learning traffic flow prediction method based on UAV collaboration, the method comprising the following steps:

[0008] Step S1, Data Collection:

[0009] target area Divided into Sub-regions and determine sub-regions The coverage area is determined, and then suitable drones are selected. Using the drones' onboard sensors such as cameras, radar, and GPS, traffic data within the coverage area is collected. The drones' communication modules support communication links between drones and between drones and vehicles. The traffic data includes the location, speed, and timestamps of ground vehicles. Collect local data and build a local dataset The local dataset ,in Indicates ground vehicles The collected has The first feature One data sample, It refers to the corresponding The dimension is The tag, ;

[0010] Step S2, Local Model Training:

[0011] ground vehicles Using local datasets Perform local model training, obtain local training results, and update local model parameters;

[0012] Step S3, Trust Assessment:

[0013] On the ground vehicles Before uploading local model parameters to the drone for model aggregation, a fuzzy membership evaluation method is used to comprehensively evaluate the trustworthiness of the drone based on data transmission rate, model aggregation latency, and flight energy consumption. Trustworthy drones are selected for global model aggregation, thereby improving the reliability and security of federated learning.

[0014] Step S4, Global Model Aggregation:

[0015] The drones perform comprehensive model aggregation with trusted drones through federated learning, generate global model parameters based on local training results, and broadcast the parameters to ground vehicles. When the global model reaches the required accuracy, model training stops, and the prediction result is obtained. A decentralized model aggregation method based on consensus confirmation is used to solve the untrustworthiness problem in the global model aggregation process, ensuring the global applicability and credibility of the prediction model.

[0016] By employing a reputation-based multidimensional contract theory approach, we ensure the fairness, rationality, and incentive compatibility of drones during the federated learning process. We match the drone with the highest utility to each sub-region and balance the relationship between energy consumption and training latency, thereby optimizing the system's predictive performance and resource utilization efficiency.

[0017] In the traffic flow prediction process based on UAV-assisted federated learning, ground vehicles utilize local datasets. By performing local model training, the drone generates global model parameters through federated learning and model aggregation. The update, and will Broadcast to ground vehicles. Continue until the global model reaches the required accuracy. When the time is right, stop model training and obtain the prediction results.

[0018] In a second aspect, the present invention provides a traffic flow prediction system for implementing the above method, comprising:

[0019] The traffic data collection module uses drone sensors to collect traffic data within the coverage area and utilizes the drone's communication module to support communication links between drones and between drones and vehicles.

[0020] The traffic flow prediction module uses drone-assisted federated learning methods and model aggregation to predict traffic flow.

[0021] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the method described above.

[0022] Compared with the prior art, the present invention has the following advantages:

[0023] (1) This invention uses a fuzzy membership evaluation method to comprehensively evaluate the credibility of drones, ensuring that the prediction system selects trustworthy drones for global model aggregation, thereby improving the overall reliability and security of the federated learning system.

[0024] (2) This invention utilizes a reputation-based multidimensional contract theory approach to design fair contracts, promoting fairness, impartiality, and incentive compatibility in the federated learning training process for UAVs, matching the UAV with the highest utility to each sub-region. Simultaneously, it balances the relationship between energy consumption and training latency, thereby optimizing system predictive performance and resource utilization efficiency.

[0025] (3) This invention proposes a decentralized model aggregation method based on consensus confirmation to solve the trust problem related to global model aggregation and ensure the global applicability and reliability of the prediction model.

[0026] In summary, this invention is used for traffic flow prediction. It utilizes an air-ground integrated federated learning method with UAV-assisted swarm intelligence perception to provide fair incentives and robust model aggregation strategies, while balancing the relationship between energy consumption and training latency, thereby improving the performance of traffic flow prediction. Attached Figure Description

[0027] Figure 1 This is a block diagram of an air-ground integrated federated learning system for drone-assisted swarm intelligent perception.

[0028] Figure 2 Utility diagrams for different types of drones;

[0029] Figure 3 The prediction results of the velocity features on the test set. Detailed Implementation

[0030] The present invention will now be further analyzed with reference to the accompanying drawings.

[0031] This invention proposes a federated learning traffic flow prediction method based on drone collaboration. The technical solution is as follows: First, drones utilize their rich sensor array to collect traffic data within their coverage area. Then, ground vehicles train local models using the local dataset. Drones, through federated learning, aggregate their models with other trustworthy drones to generate global model parameters, which are then broadcast to ground vehicles. When the global model reaches the required accuracy, model training stops, and the prediction result is obtained. During the model aggregation phase, a decentralized model aggregation method based on consensus confirmation is used to ensure the global applicability and reliability of the global model. To address the untrustworthiness issue in global model aggregation, a fuzzy membership evaluation method is used to comprehensively assess the trustworthiness of drones, ensuring the system can select trustworthy drone participants for model aggregation. Considering information asymmetry and the heterogeneity of drone cost types, a reasonable contract is designed using reputation-based multidimensional contract theory to ensure fairness, rationality, and incentive compatibility in the federated learning process, matching the drone with the highest utility to each sub-region, thereby optimizing the system's prediction performance and resource utilization efficiency.

[0032] A block diagram of an air-ground integrated federated learning system for drone-assisted swarm intelligent perception is shown below. Figure 1 Specifically:

[0033] Step 1: Target area The area is divided into zones, and the coverage area of ​​each zone is determined. Then, based on factors such as the drone's communication capabilities, latency, and energy consumption costs, a suitable drone for covering each zone is selected. The drone's onboard sensors are used to collect traffic data (e.g., location, speed, timestamps) within the coverage area.

[0034] Step 2: Ground vehicles utilize local datasets Perform local model training;

[0035] Step 3: The UAV performs comprehensive model aggregation with other trusted UAVs through federated learning to generate global model parameters, which are then broadcast to ground vehicles. When the global model reaches the required accuracy, model training stops, and the prediction results are obtained.

[0036] In step one, during the execution of the federated learning task, the first step is to analyze the target area. Divide into, into Sub-regions Then, the coverage area of ​​the sub-region is determined. Finally, based on factors such as the drone's communication capabilities, latency, and energy consumption costs, a suitable drone for covering the sub-region is selected. and This indicates a combination of ground vehicles and drones. This indicates the number of ground vehicles participating in the traffic flow prediction task. This indicates the number of drones participating in the federal learning mission.

[0037] First, a communication model for the UAV is established. During global iteration, the coordinates of the ground vehicle and the UAV are approximately represented as follows: and The distance between the ground vehicle and the drone is expressed as The channel model between the vehicle and the drone node can be modeled as a probability-weighted LoS and NLoS model. Therefore, the probability of a LoS link existing between the vehicle and the drone can be expressed as:

[0038]

[0039] in It is the deviation angle of the drone node, which can be expressed as , and It is a constant factor related to the environment. Therefore, the probability of an NLoS link is expressed as... Therefore, the channel gain between the vehicle and the drone can be expressed as:

[0040]

[0041] in This is the channel gain at a distance of 1m. It is the road attenuation factor under NLoS channel conditions. It is a modeling factor related to path loss.

[0042] After local training is complete, the vehicle uses Frequency Division Multiple Access (FDMA) to send local model updates to the UAV via the uplink for model fusion. The uplink data transmission rate to the drone can be expressed as:

[0043]

[0044] in , It is a vehicle bandwidth, transmit power, noise power density, This is the maximum launch power of the drone.

[0045] Secondly, a latency model for the UAV is established. During the training of the federated learning model, the main latency includes local model parameter transmission latency, local model parameter processing latency, and global model parameter aggregation latency. Local model latency is related to the size of the training data for the federated learning model. In the next iteration, the data size of the local model transmitted from the ground vehicle to the UAV was [data size]. Then the drone to the ground vehicle Local model transmission delay and processing delay Represented as:

[0046]

[0047] in It is the time interval of the iteration. Indicates ground vehicles The processing frequency of the central processing unit, It represents the total number of local iterations.

[0048] After the UAV receives the local model parameters from each ground vehicle, it will perform model aggregation and generate an updated global model. The latency of global model aggregation depends on the number and size of the local model parameters, as well as the complexity of the aggregation algorithm. The specific calculation method is as follows:

[0049]

[0050] in Indicates the size of the global model parameters. It is the complexity of the aggregation algorithm. Indicates the first The processing frequency of the UAV's central processing unit during each iteration.

[0051] Therefore, the total latency during the training process of a federated learning model can be expressed as:

[0052]

[0053] Next, an energy consumption model for the UAV is established. The total energy consumption during the federated learning model training process includes energy consumption for model parameter computation, energy consumption for model parameter transmission, and energy consumption for UAV flight. During each local task iteration, the computing resources used by the ground vehicle depend on the required task load, resulting in the following total computing energy consumption:

[0054]

[0055] in Indicates ground vehicles The number of CPU cycles required for a central processing unit to process a single data sample.

[0056] In air-to-ground federated learning, ground vehicles need to transmit local model parameters to UAVs for model aggregation and receive global model parameter updates. The data size and transmission distance will affect the communication energy consumption, specifically the energy consumption for transmitting local model parameters. The total transmission energy consumption is calculated as follows:

[0057]

[0058] The energy consumption of a drone during flight includes kinetic energy and gravitational potential energy. Since the model assumes the drone flies at a fixed altitude, the gravitational potential energy consumption will remain constant. Therefore, we only consider the kinetic energy consumption of the drone during flight, which is related to the drone's speed and flight time, and is calculated as follows:

[0059]

[0060] in It is the flight energy consumption coefficient. It is the real-time speed of the drone.

[0061] Therefore, the total energy consumption can be expressed as:

[0062]

[0063] Finally, a utility model for drones is established. If drones... Assigned to sub-region The probability is , Those who participated in the training The contract remuneration is The higher the reputation score of a drone node, the higher the reward it receives. Overall credit score ,but The calculation is as follows:

[0064]

[0065] Then the drone selects the contract project The utility can be expressed as:

[0066]

[0067] in They represent The total latency used for training the federated learning model, the maximum training latency during global iterations, and the total energy consumption. express Unit energy consumption cost This indicates the reputation threshold.

[0068] In step two, the ground vehicle utilizes the local dataset. Local model training incorporates the understanding and prediction capabilities of ground vehicles regarding traffic conditions. ,in Indicates ground vehicles The collected has The first feature One data sample, It refers to the corresponding The dimension is The tag. Represents the real number field. express The size of the total dataset is expressed as... .

[0069] The local model update process will continuously use the gradient method to iteratively solve the local optimization problem. The established local model optimization problem is as follows:

[0070]

[0071] in Indicates training loss function, This represents the weighted average loss. It is the gradient operator. Indicates ground vehicles The local loss function, This indicates the ground vehicle during the m-th training session. Local model parameters, These represent the hyperparameters used to train the local model. It is the difference between the local model and the global model. This represents an update of the local model. Represents the global model parameters, and T represents the transpose matrix. express Size, The meaning is to satisfy. It is a local optimization objective function. The goal of minimization is to adjust To improve the performance of local models, This represents the weighted average loss function value after the m-th iteration. This indicates an assignment operation.

[0072] Local optimization problems aim to minimize To achieve the goal, continuous updates are needed. until the optimal value is found. , The update process is as follows:

[0073]

[0074] in, Indicate steps The difference between the local model and the global model during the i-th local iteration. This indicates the step size.

[0075] Find the optimal value hour achieve Level of local precision, which means satisfying the following conditions:

[0076]

[0077] in Steps The initial difference value in.

[0078] In step three, a comprehensive drone reputation evaluation mechanism based on fuzzy membership assessment is used to ensure that the system can select trustworthy drone participants for model aggregation. The drones' participation in federated learning training will be evaluated based on three types of evaluation factors. , These represent data transmission rate, model aggregation latency, and flight energy consumption, respectively. Considering the dynamic training behavior of UAVs, a time decay mechanism is introduced into the reputation assessment model, assigning higher weights to recent UAV behavior to ensure that changes in UAV behavior do not have an excessive impact on reputation assessment. The introduction of a time decay factor... Credit rating Represented as:

[0079]

[0080] in yes The number of ground vehicles within the monitored area express The degree of contribution to the model training process, This represents the credit rating at the previous moment.

[0081] Then drone node right Trust value Represented as:

[0082]

[0083] in yes right Trust assessment weight.

[0084] Ground vehicles within the monitoring area A direct trust assessment will be conducted based on actual observations and interactions with the drone. The direct trust value is calculated as follows:

[0085]

[0086] in These categories, representing trustworthiness, uncertainty, and untrustworthiness, are quantifications of trust rating levels. This represents element-wise multiplication. Indicates the level of trust rating The weight value, It is a weighted fuzzy vector, and , Indicates the level of trust rating membership degree The membership matrix is ​​calculated using the trapezoidal membership function, as follows:

[0087]

[0088] in Indicates the center of the membership function. This parameter controls the width of the membership function.

[0089] The final overall trust value of the drone is shown below:

[0090]

[0091] in express The monitored area yes Vehicle data within the monitored area, express and Work together to complete the task. Is with The number of drones involved in the collaboration. It is a weighting factor, the magnitude of which is determined by the number of communications and the amount of data transmitted.

[0092] In step three, reputation-based multidimensional contract theory is used to design reasonable contracts to ensure fairness, rationality, and incentive compatibility of drones in the federated learning process. This ensures that the drone with the highest utility is matched to each sub-region, thereby optimizing the system's predictive performance and resource utilization efficiency. The designed three-dimensional contract is represented as follows: Includes latency items Drones were assigned to sub-regions probability Drone flight energy consumption .

[0093] If the set of drones participating in the mission training is defined as ,and The ground vehicle set with shared parameter information is defined as , The amount of data processed is defined as And the data volume satisfies an ascending order, that is , This indicates the number of drones participating in the training. Indicates and The number of ground vehicles sharing parameter information.

[0094] For the contract ,when The reputation score is below the reputation threshold. ,at this time The contract remuneration is 0, which satisfies the condition. .in This refers to the set of drones participating in the mission training, when The reputation score is higher than At that time, its optimal contract remuneration The following conditions should be met:

[0095]

[0096] The optimal contract design problem can then be described as:

[0097]

[0098] This leads to the conclusion that the most suitable sub-area for coverage is... drones for:

[0099]

[0100] For any region ( The model owner uses a reputation-based multidimensional contract to find a UAV that can achieve the highest probability of covering the region at the lowest cost and with the highest utility. Then, substituting the optimal probability coverage into the utility of the UAV, the optimal contract design problem can be transformed into:

[0101]

[0102] In step three, the model aggregation phase utilizes a consensus-based decentralized model aggregation method to ensure the global applicability and reliability of the global model. The specific process is as follows:

[0103] (1) Initial selection: During the nth global model aggregation process, the UAV server selects n1 clients from all ground vehicles participating in local model training based on the client's contribution and participation frequency. The uploaded local training results, among which ;

[0104] (2) Preliminary model aggregation: The UAV server aggregates the n1 local training results collected to obtain the initial global weights. The calculation is as follows: ,in Indicates received Local model gradient;

[0105] (3) Weight consensus: The server selects n² nearby drones based on Euclidean distance for weight consensus, and chooses the weight with higher test accuracy as the global weight. , , Indicates the use of weights The test accuracy of the generated aggregate model;

[0106] (4) Global model aggregation: The server is determined based on the final global weight. Aggregate local models and Broadcast to all drones participating in the mission .

[0107] Finally, global model parameters are generated through federated learning and model aggregation. The update, and will The broadcast was given to the ground vehicles, among which This represents the number of iterations in the training process. The goal of federated learning is to find the globally optimal model parameters. Make the global loss function Minimum.

[0108] The method for updating global model parameters is as follows:

[0109]

[0110] Repeat the federated learning process described in steps two and three until the global model reaches the required accuracy. , means as follows:

[0111]

[0112] in This represents the loss function value of the global model after the nth iteration. This represents the target loss function value of the global model. This represents the loss function value of the initial global model. This represents the weighted average loss.

[0113] Example:

[0114] This invention uses real-world data related to traffic, roads, and highways provided by Highways England for performance evaluation. Data was collected over four months, from February 21, 2023 to May 21, 2023, including routes A550, A49, and A14. The selected road monitoring area was 3000 square meters, and the drone flew at an altitude of 80 meters. The prediction algorithm selected in this invention is a federated learning-based Long Short-Term Memory (FL-LSTM) algorithm, and the training task of the LSTM-based traffic flow prediction algorithm is performed using a federated learning architecture.

[0115] The specific implementation steps of the present invention will now be described in detail with reference to the accompanying drawings:

[0116] Step 1: Data preparation. The collected features related to driving status, such as speed and acceleration, are Z-score standardized, and the dataset is divided into training and test sets.

[0117] Step 2: Contract Optimality Analysis. Based on factors such as the communication capabilities, latency, and energy consumption costs of drones, five types of drones are considered, undertaking six different types of contract projects. The utility of different types of drones is analyzed.

[0118] Figure 2 A utility diagram for drones is presented. Various drone types can only achieve maximum non-negative utility by selecting the optimal contract project designed for them.

[0119] Step 3: Traffic flow prediction. Ground vehicles and drones are combined to promote information sharing and integration. Ground vehicles are responsible for training local models, and then the drone swarm adopts a global model aggregation method based on consensus confirmation. Model training stops when the global model reaches the required accuracy, and the prediction results are obtained.

[0120] Figure 3 The figure shows the prediction results of the velocity features of the test set. As can be seen from the figure, the average prediction error of the method of the present invention is 2.1 miles / hour, which confirms that the prediction performance and accuracy of the method of the present invention are better than other methods.

[0121] Obviously, the above embodiments are illustrative examples of traffic flow prediction methods and are not intended to limit the implementation. Those skilled in the art can make other variations or modifications based on the above description. Any modifications and variations made to this invention are still within the scope of protection of this invention.

Claims

1. A federated learning traffic flow prediction method based on drone collaboration, characterized in that, Includes the following steps: Step S1, Data Collection: target area Divided into K sub-regions A k and determine subregion A k The coverage area is determined, and then a suitable drone is selected. The drone's onboard sensors collect traffic data within the coverage area. The traffic data includes the location, speed, and timestamp of ground vehicle v. Simultaneously, ground vehicle v collects local data to construct a local dataset D. v The local dataset D v ={(x v,1 ,y v,1 ),(x v,2 ,y v,2 ),…,(x v,j ,y v,j )},in This represents the j-th data sample with m1 features collected by ground vehicle v. It refers to the corresponding x v,j Labels of dimension m2, j = 1, 2, ..., |D v |; Step S2, Local Model Training: Ground vehicle v utilizes local dataset D v Local model training is performed to obtain local training results and update local model parameters. Specifically, step S2, which updates local model parameters, uses the gradient method to iteratively solve the local optimization problem. The established local model optimization problem is as follows: Where F v (·) indicates training D v The loss function is F(·), which represents the weighted average loss. It is the gradient operator, f v (·) indicates ground vehicles The local loss function, Let v represent the local model parameters in training step n, λ represent the hyperparameters used to train the local model, and d represent the local model parameters. v It is the difference between the local model and the global model, l v φ represents the update of the local model. (n) Denotes the global model parameters, T represents the transpose matrix, and |D j | represents D j The size of st means satisfying l v (φ (n) ,d v ) is the local optimization objective function. The goal is to minimize by adjusting d. v To improve the performance of the local model, F(φ) (n) ) represents the weighted average loss function value after the nth iteration, and := represents the assignment operation; The local optimization problem aims to minimize l v (φ (n) ,d v With ) as the goal, continuously update d v Until the optimal value is found d v The update process is as follows: in, η represents the difference between the local model and the global model during the i-th local iteration in step n, and η represents the step size. Find the optimal value time l v (φ (n) ,d v To achieve a local accuracy level of κ, the following conditions must be met: in This is the initial difference value in step n; Step S3, Trust Assessment: Before the ground vehicle V uploads local model parameters to the UAV for model aggregation, a fuzzy membership evaluation method is used to comprehensively evaluate the trustworthiness of the UAV based on data transmission rate, model aggregation latency and flight energy consumption, and select trustworthy UAVs for global model aggregation. Step S4, Global Model Aggregation: The drones aggregate global models with trusted drones through federated learning, generate global model parameters based on local training results, and broadcast the global model parameters to ground vehicles. When the global model reaches the required accuracy, model training stops and the prediction results are obtained.

2. The drone-based federated learning traffic flow prediction method according to claim 1, characterized in that, Step S1 uses a reputation-based multidimensional contract theory method to establish communication, latency, and energy consumption models for UAVs to evaluate their utility. Based on the utility of the UAVs, the UAV with the highest utility is matched for each sub-region.

3. The drone-based federated learning traffic flow prediction method according to claim 2, characterized in that, The formula for the communication model is as follows: in This represents the bandwidth of the ground vehicle v. Let N represent the transmit power of ground vehicle v, and N0 represent the noise power density of ground vehicle v. This indicates the channel gain between the vehicle and the drone. This represents the maximum transmit power of the drone, calculated as follows. Indicates the data transmission rate; The formula for the time delay model is as follows: in This represents the local model parameter transmission delay. This indicates the local model parameter processing delay. This indicates the global model parameter aggregation delay; The formula for the energy consumption model is as follows: in The model parameters are used to calculate energy consumption. This represents the energy consumption for model parameter transmission. This indicates the energy consumption of the drone during flight.

4. The federated learning traffic flow prediction method based on UAV collaboration according to claim 1, characterized in that, The fuzzy membership evaluation method described in step S3 is as follows: Considering the dynamic training behavior of drones, a time decay mechanism is introduced into the reputation assessment model, assigning higher weight to recent drone behavior to ensure that changes in drone behavior do not have an excessive impact on reputation assessment; the drone u with the introduced time decay factor j Credit rating Er j (t) is represented as: Q j is u j The number of ground vehicles in the monitored area, α j Indicate u j In terms of contribution to the model training process, Er j (t) represents the credit assessment value at the previous moment; Then the drone node u l For u j Trust value De lj (t) is represented as: The lj (t)=κ lj ×He j (t) Among them κ lj is u l For u j Trust assessment weighting; u j Ground vehicles within the monitoring area v i A direct trust assessment will be conducted based on actual observations and interactions with the drone. The direct trust value is calculated as follows: in W represents the quantification of trust rating levels, W = {w z } is the weighted fuzzy vector, and w1+w2+w3=1, B={B z } represents the membership matrix, which is calculated using the trapezoidal membership function. The calculation method is as follows: Where c represents the center of the membership function, and σ represents the parameter that controls the width of the membership function; The final overall trust score for the drone is shown below: Where A k Indicate u j The monitored area, |A k |is u j Vehicle data within the monitored area, j→l represents u j with u l Cooperate to complete the task, |n j |is with u j The number of cooperating drones; ξ∈(0,1] is the weighting factor.

5. The drone-based federated learning traffic flow prediction method according to claim 1, characterized in that, Step S4, global model aggregation, includes the following steps: S41. Initial Selection: During the nth global model aggregation process, the UAV server selects n1 clients from all ground vehicles participating in local model training based on the clients' contributions and participation frequency. The uploaded local training results, among which S42. Preliminary Model Aggregation: The drone server aggregates the n1 local training results collected to obtain the initial global weights. The calculation is as follows: in Indicates the received v i Local model gradient; S43, Weighted Consensus: u j The server selects n² nearby drones based on Euclidean distance for weight consensus, and chooses the weight with higher test accuracy as the global weight. The calculation formula is as follows: l∈{1,2,…,n²-1}, where Indicates the use of weights The test accuracy of the generated aggregate model; S44, Global Model Aggregation: u j The server is determined based on the final global weight. Aggregate local models and Broadcast to all participating drones l ; S45. Update global model parameters: Generate global model parameters φ through federated learning and model aggregation. (n) The update, and φ (n) Broadcast to ground vehicles to find the globally optimal model parameters φ * Make the global loss function F(φ) * (Minimum) 6. The drone-based federated learning traffic flow prediction method according to claim 5, characterized in that, The method for updating global model parameters is as follows: Where M represents the number of ground vehicles participating in the traffic flow prediction task, φ (n) Represents global model parameters. d v The optimal value; Training stops when the global model reaches the required accuracy ω, where accuracy ω satisfies the following formula: F(φ (n) )-F(φ * )≤ω(F(φ (0) )-F(φ * ))。 7. The drone-based federated learning traffic flow prediction method according to claim 1, characterized in that, In step S4, a reasonable contract is designed using reputation-based multidimensional contract theory to ensure fairness, rationality, and incentive compatibility of the drones in the federated learning process. The three-dimensional contract is represented as Θ(Δ,σ). k ,Ξ), including delay terms The probability σ of a drone being assigned to sub-region k k Drone flight energy consumption If the set of drones participating in the mission training is defined as with u j The ground vehicle set with shared parameter information is defined as u j The amount of data processed is defined as And the data volume satisfies an ascending order, that is This indicates the number of drones participating in the training. Indicates with u j The number of ground vehicles sharing parameter information; For contract Θ(Δ,σ) k ,Ξ), when u j When the reputation value is lower than the reputation threshold e, u j The contract remuneration is 0, which satisfies the condition. in This represents the set of drones participating in the mission training, when u j When the credit score is higher than e, the optimal contract remuneration is... The following conditions must be met: The optimal contract design problem can then be described as: This leads to the conclusion that the most suitable coverage sub-region A is... k drones j for: For any region A k For any k∈{1,2,…,K}, using a reputation-based multidimensional contract to find the drone that can achieve the highest probability of covering the area at the lowest cost and with the highest utility, we can substitute the optimal probability coverage rate into the drone's utility. The optimal contract design problem can then be transformed into:

8. A traffic flow prediction system based on UAV-assisted federated learning that implements the method of any one of claims 1-7, characterized in that, include: The traffic data collection module uses drone sensors to collect traffic data within the coverage area and utilizes the drone's communication module to support communication links between drones and between drones and vehicles. The traffic flow prediction module uses drone-assisted federated learning methods and model aggregation to predict traffic flow.

9. An electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Unmanned aerial vehicle deployment and flight path optimization method and system for intelligent transportation

    CN111949703A

  • V2X-based air-ground cooperation vehicle networking height optimization and resource allocation method and system

    CN116709262A