UAV dynamic spectrum sharing method and device based on edge federated learning
Through the dynamic spectrum sharing method of edge federated learning and reinforcement learning, the real-time, reliability and privacy issues of drone spectrum allocation are solved, efficient spectrum sharing and communication quality improvement are achieved, which is suitable for high-density drone systems.
Patent Information
- Application Number
- CN202510772144.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing drone spectrum allocation methods have deficiencies in real-time, reliability, robustness and privacy protection, and are unable to meet the collaborative communication needs of high-density drone systems in dynamic and complex electromagnetic environments.
A dynamic spectrum sharing method based on edge federated learning is adopted. The spectrum is scanned by the scanning equipment carried by the drone, the local model is trained and the local model gradient is uploaded to the central server to update the global model. Dynamic frequency band selection is performed by combining reinforcement learning and Byzantine fault-tolerant consensus algorithm to achieve real-time spectrum prediction and interference feature extraction.
It improves spectrum utilization, reduces communication interruption rate and anti-interference capability, ensures communication security and privacy protection, and adapts to the dynamic environment requirements of high-density UAV systems.
Smart Images

Figure CN120282149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of drone technology, and in particular to a method and device for dynamic spectrum sharing of drones based on edge federated learning. Background Art
[0002] With the rapid growth of low-altitude drone swarms, the demands for real-time, reliable, and secure communication spectrum in complex airspace environments have become increasingly challenging to meet. In high-density flight and frequent communication scenarios, drone swarms often face challenges such as frequency band conflicts, high transmission latency, and poor anti-interference capabilities. These issues severely restrict the application of drone systems in areas such as military reconnaissance, emergency communications, and intelligent logistics.
[0003] In the existing technology, there are mainly the following types of spectrum allocation methods: First, the method of using a centralized control center for unified spectrum allocation is relatively common. However, this type of solution relies on a central node to collect spectrum status and make scheduling decisions, resulting in high overall system communication latency, often exceeding 500 milliseconds, and there is a single point failure risk that the entire communication system will be paralyzed if the central node fails. Second, some solutions adopt a fixed frequency band pre-configuration method, which allocates exclusive frequency bands to each flight unit through static mapping. However, this method cannot dynamically perceive the spectrum usage and interference situation in the airspace, resulting in generally low spectrum utilization and may cause a large amount of spectrum resources to be idle or conflicting. Third, in recent years, existing technologies have attempted to improve the intelligence level of spectrum allocation by introducing traditional machine learning methods. However, such methods usually rely on centralized training modes and require uploading data collected by each drone to a central server for unified modeling and optimization. Not only does this pose a large risk of data privacy leakage, but due to the long model parameter update cycle (often exceeding 24 hours), it is difficult to adapt to dynamically changing environmental needs and rapid decision-making requirements.
[0004] Therefore, the existing spectrum allocation and management methods still have significant deficiencies in real-time performance, reliability, robustness and privacy protection. There is an urgent need for a new spectrum sharing method that combines dynamic intelligent scheduling capabilities, distributed secure communication mechanisms and rapid response capabilities to meet the collaborative communication needs of future high-density UAV systems in dynamic and complex electromagnetic environments. Summary of the Invention
[0005] The present invention provides a method and device for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning, which is used to solve the defects of the existing technology in terms of real-time performance, reliability, robustness and privacy protection.
[0006] The present invention provides a method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning, comprising:
[0007] The target frequency range is scanned by the scanning equipment on each drone to obtain the spectrum information of each frequency band collected by each drone. The local model deployed on the corresponding drone is trained based on the spectrum information of each frequency band collected by each drone.
[0008] If the global update time node is reached, the local model gradient of each drone end is calculated and uploaded based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band;
[0009] Each drone performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0010] According to the present invention, a method for dynamic spectrum sharing among drones based on edge federated learning is provided. The method comprises: performing spectrum scanning on a target frequency range based on a scanning device carried by each drone to obtain spectrum information of each frequency band collected by each drone end, including:
[0011] Set the spectrum scanning parameters of each drone;
[0012] Based on the scanning equipment on each drone, spectrum scanning is performed according to the spectrum scanning parameters of the corresponding drone end, and a three-dimensional spectrum heat map containing the distribution of spectrum energy in each frequency band over time and frequency is obtained;
[0013] Each UAV terminal performs feature extraction on the three-dimensional spectrum heat map to obtain interference feature vectors of each frequency band;
[0014] Obtain historical channel quality records for each frequency band;
[0015] The three-dimensional spectrum heat map, the interference feature vector of each frequency band, and the historical signal quality record are combined into the spectrum information of each frequency band.
[0016] According to the present invention, a method for dynamic spectrum sharing among drones based on edge federated learning is provided. The method calculates and uploads the local model gradients of each drone based on the local model of each drone and the spectrum information of each frequency band collected by the corresponding drone. The method enables the central server to update the global model of the central server based on the received local model gradients of each drone. The method includes:
[0017] Based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone, the local model gradient of each drone is calculated;
[0018] On the drone side, the local model gradient of the corresponding drone side is encrypted based on the homomorphic encryption algorithm to obtain the encrypted local model gradient;
[0019] Each drone uploads the encrypted local model gradient to the central server, so that the central server can decrypt the encrypted local model gradient based on the decryption algorithm to obtain the original local model gradient, and update the global model of the central server based on the original local model gradient.
[0020] According to a method for dynamic spectrum sharing of UAVs based on edge federated learning provided by the present invention, each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by a local model, including:
[0021] For any UAV, obtain the channel capacity of the communication channel in each frequency band and the mission importance level of the mission undertaken by the UAV, and use the local model of the UAV to predict the channel quality of each frequency band based on the spectrum information of each frequency band collected by the UAV;
[0022] Constructing a state space based on the channel capacity of the communication channel of each frequency band, the mission importance level of the mission undertaken by any of the UAVs, and the channel quality of each frequency band;
[0023] Construct an action space based on the currently used frequency band and the preset candidate frequency band set;
[0024] Based on the state space, the action space, and a preset reward function, a Q-Learning algorithm is used to perform dynamic frequency band selection to determine the optimal communication frequency band currently corresponding to any of the drones.
[0025] According to a method for dynamic spectrum sharing of drones based on edge federated learning provided by the present invention, the reward function is specifically:
[0026] R = α×C+β / I-γ×Δf
[0027] Wherein, C is the channel capacity of the communication channel of any frequency band, I is the channel quality of any frequency band, Δf is the switching overhead of switching from the currently used frequency band to any frequency band, and α, β and γ are preset weights.
[0028] According to a method for dynamic spectrum sharing of UAVs based on edge federated learning provided by the present invention, each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by a local model, and then further includes:
[0029] After any UAV performs dynamic frequency band selection to obtain the optimal communication frequency band, 21 UAVs are selected from all UAVs as verification nodes;
[0030] Sending the optimal communication frequency band to the verification nodes, so that each verification node can reach a consensus on the optimal communication frequency band based on a Byzantine fault-tolerant consensus algorithm, thereby obtaining a consensus conclusion of each verification node;
[0031] If the consensus conclusion of more than 2 / 3 of the verification nodes is confirmed, the optimal communication frequency band is broadcast to the neighboring drones of any drone.
[0032] The present invention also provides a UAV dynamic spectrum sharing device based on edge federated learning, comprising:
[0033] The spectrum scanning unit is used to perform spectrum scanning on the target frequency range based on the scanning equipment carried by each drone, obtain the spectrum information of each frequency band collected by each drone end, and train the local model deployed on the corresponding drone end based on the spectrum information of each frequency band collected by each drone end;
[0034] The federated learning unit is configured to calculate and upload the local model gradients of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal when a global update time node is reached, so that the central server terminal can update the global model of the central server terminal based on the received local model gradients of each drone terminal, and send the updated global model parameters to each drone terminal; each drone terminal updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band;
[0035] The dynamic frequency band selection unit is used for each UAV to dynamically select the frequency band based on the channel quality of each frequency band output by the local model.
[0036] According to the present invention, a UAV dynamic spectrum sharing device based on edge federated learning is provided. The method calculates and uploads the local model gradient of each UAV based on the local model of each UAV and the spectrum information of each frequency band collected by the corresponding UAV, so that the central server can update the global model of the central server based on the received local model gradient of each UAV, including:
[0037] Based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone, the local model gradient of each drone is calculated;
[0038] On the drone side, the local model gradient of the corresponding drone side is encrypted based on the homomorphic encryption algorithm to obtain the encrypted local model gradient;
[0039] Each drone uploads the encrypted local model gradient to the central server, so that the central server can decrypt the encrypted local model gradient based on the decryption algorithm to obtain the original local model gradient, and update the global model of the central server based on the original local model gradient.
[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning as described above is implemented.
[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning as described above is implemented.
[0042] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning.
[0043] The present invention provides a method and device for dynamic spectrum sharing of drones based on edge federated learning. The method and device perform spectrum scanning of the target frequency range through the scanning equipment carried by each drone to obtain the spectrum information of each frequency band collected by each drone end, and train the local model deployed by the corresponding drone end based on the spectrum information of each frequency band collected by each drone end. When the global update time node is reached, the local model gradient of each drone end is calculated and uploaded based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters to realize real-time spectrum prediction driven by federated learning; each drone end performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, constructs dual protection and improves communication quality through interference feature extraction and reinforcement learning, and most of the calculations are completed at the edge, which greatly reduces communication overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 Schematic diagram of the process of the UAV dynamic spectrum sharing method based on edge federated learning provided by the present invention;
[0046] Figure 2 This is a schematic diagram of the architecture of the UAV dynamic spectrum sharing system provided by the present invention;
[0047] Figure 3 This is a comparison chart of the effects of the method provided by the present invention and the traditional method;
[0048] Figure 4 This is a structural diagram of a UAV dynamic spectrum sharing device based on edge federated learning provided by the present invention;
[0049] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0050] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0051] Figure 1 This is a flow chart of the method for UAV dynamic spectrum sharing based on edge federated learning provided by the present invention. Figure 1 As shown, the method includes:
[0052] Step 110: Perform spectrum scanning on the target frequency range using the scanning equipment carried by each drone to obtain spectrum information of each frequency band collected by each drone, and train the local model deployed on the corresponding drone based on the spectrum information of each frequency band collected by each drone.
[0053] Step 120: If the global update time node is reached, the local model gradient of each drone terminal is calculated and uploaded based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal, so that the central server terminal updates the global model of the central server terminal based on the received local model gradient of each drone terminal, and sends the updated global model parameters to each drone terminal; each drone terminal updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band;
[0054] In step 130, each UAV performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0055] Here, if Figure 2 As shown in the figure, the architecture of the entire UAV dynamic spectrum sharing system includes:
[0056] (1) Physical layer
[0057] Responsible for real-time environmental perception and data collection, this system includes the drone's onboard scanning equipment (an onboard software-defined radio (SDR) module) and an edge computing unit. The SDR module scans the 20MHz-6GHz frequency band at millisecond speeds, generating a spectrum heat map containing three-dimensional information: frequency, time, and space. The edge computing unit (such as the NVIDIA Jetson) performs signal preprocessing and feature extraction, providing high-precision input data to the upper layer.
[0058] (2) Intelligent layer
[0059] Distributed intelligent decision-making is achieved based on a federated learning framework. Each drone trains a lightweight AI model locally to analyze spectrum availability, predict interference risks, and determine the channel quality of each frequency band. Encrypted communication aggregates model parameters across multiple drones to generate a global optimization strategy, protecting data privacy while improving the accuracy of channel quality predictions.
[0060] (3) Control layer
[0061] It performs dynamic spectrum allocation and multi-machine collaboration. It uses a reinforcement learning algorithm to select the optimal communication frequency band in real time, and a blockchain consensus protocol ensures rapid policy synchronization. When malicious interference is detected, it automatically switches to an alternative frequency band and marks the interference source, forming a closed-loop control system of "perception-decision-execution."
[0062] The three layers work efficiently together through 5G / self-organizing networks, greatly improving spectrum utilization while ensuring communication security, and providing a reliable spectrum resource management solution for high-density drone swarms.
[0063] Specifically, to achieve dynamic spectrum sharing, each drone can perform a spectrum scan across a target frequency range (e.g., the 20MHz-6GHz band) using scanning equipment onboard. This allows spectrum information for each frequency band collected by each drone to be obtained. In some embodiments, spectrum scanning parameters can be set for each drone. The scanning equipment (SDR module) onboard each drone performs a spectrum scan based on the corresponding drone's spectrum scanning parameters. Kriging interpolation is used to fuse spectrum scan data from multiple drones, and then a sliding window is updated at 0.1-second intervals. This generates a three-dimensional spectrum heat map showing the distribution of spectrum energy over time and frequency for each frequency band. Feature extraction can then be performed on each drone to obtain interference feature vectors for each frequency band. Furthermore, historical channel quality records for each frequency band are obtained, and the three-dimensional spectrum heat map, interference feature vectors for each frequency band, and historical signal quality records are combined to form the spectrum information for each frequency band.
[0064] The SDR spectrum scanning parameters can be configured as follows:
[0065] def sdr_scan_config():
[0066] frequency_range = (20e6, 6e9) # Scan frequency band 20MHz-6GHz
[0067] scan_step = 1e6 # 1MHz step
[0068] dwell_time = 100e-3 # The dwell time for each frequency point is 100ms
[0069] gain = 30# RF front-end gain 30dB
[0070] return generate_sweep_table(frequency_range, scan_step, dwell_time,gain)
[0071] The configuration table generated here is passed to the SDR hardware control module to configure the real-time spectrum scanning parameters and serves as the basic data structure for subsequent spectrum heat map generation.
[0072] The following function can be used to extract features from the three-dimensional spectrum heat map to obtain the interference feature vector of each frequency band:
[0073] def wavelet_feature_extract(raw_signal):
[0074] # The input raw_signal is the raw I / Q signal data collected by the SDR receiver in the three-dimensional spectrum heat map. It is 1024 samples long and contains electromagnetic environment information within a specific frequency band.
[0075] # Output is interference feature vector (12 dimensions)
[0076] coeffs = pywt.wavedec(raw_signal, 'db4', level=5)# 5-layer wavelet decomposition
[0077] energy_ratio = [np.linalg.norm(c) / N for c in coeffs]
[0078] entropy = [shannon_entropy(c) for c in coeffs[:3]]
[0079] return normalize(energy_ratio + entropy)
[0080] Based on the spectrum information of each frequency band collected by each drone, a local model deployed on the corresponding drone can be trained. The local model can be a convolutional neural network that is used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band.
[0081] In some embodiments, the local model may be constructed as follows:
[0082] class SpectrumCNN(nn.Module):
[0083] # CNN model input includes 2D heatmap slices (1×F×S) of 3D spectrum heatmap, where F is the frequency dimension and S is the number of spatial grids, as well as the interference feature vectors and historical signal quality records of the corresponding frequency bands
[0084] def __init__(self):
[0085] super().__init__()
[0086] self.layers = nn.Sequential(
[0087] nn.Conv2d(1, 16, kernel_size=(3,5)), # Input channel 1 (spectral intensity)
[0088] nn.ReLU(),
[0089] nn.MaxPool2d((2,3)),
[0090] nn.Conv2d(16, 32, kernel_size=(3,3)),
[0091] nn.ReLU(),
[0092] nn.AdaptiveAvgPool2d((4,4)),
[0093] nn.Flatten(),
[0094] nn.Linear(32 × 4 × 4, 64),
[0095] nn.Linear(64, 3))# Output: Channel quality score of the communication channel in any frequency band [excellent / medium / poor], used to guide subsequent channel selection decisions
[0096] If the global update time node is reached, the local model gradients of each drone are calculated and uploaded based on the local model of each drone and the spectrum information of each frequency band collected by the corresponding drone. The central server then updates the global model based on the received local model gradients of each drone and sends the updated global model parameters to each drone. The structure and function of the global model are the same as those of the local model of each drone, and it is also used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band.
[0097] In some embodiments, the local model gradient of each drone can be calculated based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone. Subsequently, the local model gradient of the corresponding drone is encrypted on the drone side using a homomorphic encryption algorithm to obtain an encrypted local model gradient. Each drone side then uploads the encrypted local model gradient to the central server side. On the central server side, the encrypted local model gradient can be decrypted using a decryption algorithm corresponding to the homomorphic encryption algorithm to obtain the original local model gradient, and the global model on the central server side is updated based on the original local model gradient.
[0098] After the central server distributes the updated global model parameters to each drone, each drone can then update its local model based on the updated global model parameters. Each drone can then dynamically select the frequency band based on the channel quality of each frequency band output by its local model to achieve optimal communication.
[0099] In some embodiments, for any drone, the channel capacity (the theoretical maximum transmission rate per second of the currently used channel) of the communication channel for each frequency band and the mission importance level of the drone's mission can be obtained. The drone's local model can then be used to predict the channel quality of each frequency band based on the spectrum information collected by the drone using the methods described in the above embodiments. During dynamic frequency band selection, a state space is constructed based on the channel capacity of the communication channel for each frequency band, the mission importance level of the drone's mission, and the channel quality of each frequency band. An action space is then constructed based on the currently used frequency band and a set of preset candidate frequency bands. Based on this state space, action space, and a preset reward function, a Q-Learning algorithm is used to perform dynamic frequency band selection and determine the optimal communication frequency band for the drone.
[0100] Among them, the update mechanism of the Q-Learning algorithm is as follows:
[0101] Q[state][action]+= learning_rate ×
[0102] (reward+gamma×np.max(Q[next_state])-Q[state][action])
[0103] return Q
[0104] In some embodiments, the reward function is specifically:
[0105] R = α×C+β / I-γ×Δf
[0106] Wherein, C is the channel capacity of the communication channel of any frequency band, I is the channel quality of the frequency band, Δf is the switching overhead of switching from the currently used frequency band to the frequency band, and α, β, and γ are preset weights.
[0107] After each drone performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, it can also synchronize the current optimal communication frequency band to adjacent drone nodes through a distributed consensus protocol. Specifically, after any drone performs dynamic frequency band selection and obtains the optimal communication frequency band, it can select a number of drones (for example, 21) from among the drones as verification nodes and send the optimal communication frequency band to each verification node. These verification nodes then reach a consensus on the optimal communication frequency band based on the Byzantine Fault Tolerance consensus algorithm, resulting in a consensus conclusion from each verification node. If the consensus conclusion of more than two-thirds of the verification nodes is confirmed, the optimal communication frequency band is broadcast to the drone's neighboring drones, achieving dynamic spectrum sharing.
[0108] In summary, the method provided by the embodiment of the present invention performs spectrum scanning on the target frequency range through the scanning device carried by each drone, obtains the spectrum information of each frequency band collected by each drone end, and trains the local model deployed on the corresponding drone end based on the spectrum information of each frequency band collected by each drone end. When the global update time node is reached, the local model gradient of each drone end is calculated and uploaded based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters to realize real-time spectrum prediction driven by federated learning; each drone end performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, constructs dual protection and improves communication quality through interference feature extraction and reinforcement learning, and most of the calculations are completed at the edge, which greatly reduces communication overhead.
[0109] The effect comparison diagram of the method provided by the present invention and the traditional method is as follows Figure 3 As shown in the figure, the spectrum utilization rate has increased to more than 80% (measured data: 83.7% in urban environment and 89.2% in outdoor environment), the communication interruption rate has dropped to less than 3% (comparative experiment: 15.6% for traditional method), and the anti-wideband interference capability has increased by 8.2% (maintaining QoS at -90dBm interference intensity).
[0110] The following describes the UAV dynamic spectrum sharing device based on edge federated learning provided by the present invention. The UAV dynamic spectrum sharing device based on edge federated learning described below and the UAV dynamic spectrum sharing method based on edge federated learning described above can refer to each other.
[0111] Based on any of the above embodiments, Figure 4 This is a structural diagram of the UAV dynamic spectrum sharing device based on edge federated learning provided by the present invention. Figure 4 As shown, the device includes:
[0112] The spectrum scanning unit 410 is configured to perform spectrum scanning on a target frequency range based on the scanning device carried by each UAV, obtain spectrum information of each frequency band collected by each UAV, and train a local model deployed on the corresponding UAV based on the spectrum information of each frequency band collected by each UAV.
[0113] The federated learning unit 420 is configured to calculate and upload the local model gradients of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal when a global update time node is reached, so that the central server terminal can update the global model of the central server terminal based on the received local model gradients of each drone terminal, and send the updated global model parameters to each drone terminal; each drone terminal updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band;
[0114] The dynamic frequency band selection unit 430 is used for each UAV terminal to perform dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0115] The apparatus provided by an embodiment of the present invention performs spectrum scanning of a target frequency range through a scanning device carried by each drone, obtains spectrum information of each frequency band collected by each drone end, and trains a local model deployed on the corresponding drone end based on the spectrum information of each frequency band collected by each drone end. When a global update time node is reached, the local model gradient of each drone end is calculated and uploaded based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters, realizing real-time spectrum prediction driven by federated learning; each drone end performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, constructs dual protection and improves communication quality through interference feature extraction and reinforcement learning, and most of the calculations are completed at the edge, greatly reducing communication overhead.
[0116] Based on any of the above embodiments, the spectrum scanning of the target frequency range by the scanning device carried by each drone to obtain the spectrum information of each frequency band collected by each drone terminal includes:
[0117] Set the spectrum scanning parameters of each drone;
[0118] Based on the scanning equipment on each drone, spectrum scanning is performed according to the spectrum scanning parameters of the corresponding drone end, and a three-dimensional spectrum heat map containing the distribution of spectrum energy in each frequency band over time and frequency is obtained;
[0119] Each UAV terminal performs feature extraction on the three-dimensional spectrum heat map to obtain interference feature vectors of each frequency band;
[0120] Obtain historical channel quality records for each frequency band;
[0121] The three-dimensional spectrum heat map, the interference feature vector of each frequency band, and the historical signal quality record are combined into the spectrum information of each frequency band.
[0122] Based on any of the above embodiments, the calculation and uploading of the local model gradients of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal, so that the central server terminal updates the global model of the central server terminal based on the received local model gradients of each drone terminal, includes:
[0123] Based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone, the local model gradient of each drone is calculated;
[0124] On the drone side, the local model gradient of the corresponding drone side is encrypted based on the homomorphic encryption algorithm to obtain the encrypted local model gradient;
[0125] Each drone uploads the encrypted local model gradient to the central server, so that the central server can decrypt the encrypted local model gradient based on the decryption algorithm to obtain the original local model gradient, and update the global model of the central server based on the original local model gradient.
[0126] Based on any of the above embodiments, each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, including:
[0127] For any UAV, obtain the channel capacity of the communication channel in each frequency band and the mission importance level of the mission undertaken by the UAV, and use the local model of the UAV to predict the channel quality of each frequency band based on the spectrum information of each frequency band collected by the UAV;
[0128] Constructing a state space based on the channel capacity of the communication channel of each frequency band, the mission importance level of the mission undertaken by any of the UAVs, and the channel quality of each frequency band;
[0129] Construct an action space based on the currently used frequency band and the preset candidate frequency band set;
[0130] Based on the state space, the action space, and a preset reward function, a Q-Learning algorithm is used to perform dynamic frequency band selection to determine the optimal communication frequency band currently corresponding to any of the drones.
[0131] Based on any of the above embodiments, the reward function is specifically:
[0132] R = α×C+β / I-γ×Δf
[0133] Wherein, C is the channel capacity of the communication channel of any frequency band, I is the channel quality of any frequency band, Δf is the switching overhead of switching from the currently used frequency band to any frequency band, and α, β and γ are preset weights.
[0134] Based on any of the above embodiments, each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, and then further includes:
[0135] After any UAV performs dynamic frequency band selection to obtain the optimal communication frequency band, 21 UAVs are selected from all UAVs as verification nodes;
[0136] Sending the optimal communication frequency band to the verification nodes, so that each verification node can reach a consensus on the optimal communication frequency band based on a Byzantine fault-tolerant consensus algorithm, thereby obtaining a consensus conclusion of each verification node;
[0137] If the consensus conclusion of more than 2 / 3 of the verification nodes is confirmed, the optimal communication frequency band is broadcast to the neighboring drones of any drone.
[0138] Figure 5 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (processor) 510, a memory (memory) 520, a communication interface (Communications Interface) 530 and a communication bus 540, wherein the processor 510, the memory 520, and the communication interface 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 520 to execute the UAV dynamic spectrum sharing method based on edge federated learning, which includes: performing spectrum scanning on the target frequency range based on the scanning equipment carried by each UAV, obtaining the spectrum information of each frequency band collected by each UAV terminal, and training the local model deployed by the corresponding UAV terminal based on the spectrum information of each frequency band collected by each UAV terminal; if the global update time node is reached, then based on the local model of each UAV terminal and the spectrum information of each frequency band collected by the corresponding UAV terminal, calculate and upload the local model gradient of each UAV terminal, so that the central server terminal updates the global model of the central server terminal based on the received local model gradient of each UAV terminal, and sends the updated global model parameters to each UAV terminal; each UAV terminal updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band; each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0139] In addition, the logic instructions in the aforementioned memory 520 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0140] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the UAV dynamic spectrum sharing method based on edge federated learning provided by the above methods, the method comprising: performing spectrum scanning on the target frequency range based on the scanning equipment carried by each UAV, obtaining the spectrum information of each frequency band collected by each UAV end, and training the local model deployed by the corresponding UAV end based on the spectrum information of each frequency band collected by each UAV end; if the global update time is reached The node calculates and uploads the local model gradient of each drone end based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band; each drone end performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0141] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned method for dynamic spectrum sharing of drones based on edge federated learning, the method comprising: performing spectrum scanning on the target frequency range based on the scanning device carried by each drone, obtaining spectrum information of each frequency band collected by each drone end, and training the local model deployed on the corresponding drone end based on the spectrum information of each frequency band collected by each drone end; if the global update time node is reached, then based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, calculating and uploading the local model gradient of each drone end, so that the central server end updates the global model of the central server end based on the received local model gradient of each drone end, and sends the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band; each drone end performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model.
[0142] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0143] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for dynamic spectrum sharing of UAVs based on edge federated learning, characterized in that: include: Set spectrum scanning parameters for each drone end, perform spectrum scanning based on the spectrum scanning parameters of the corresponding drone end based on the scanning equipment carried by each drone end, use Kriging interpolation to fuse the spectrum scanning data of multiple drone ends, and then update the sliding window at intervals of 0.1 seconds to obtain a three-dimensional spectrum heat map containing the distribution of spectrum energy of each frequency band as a function of time and frequency. Each drone end performs feature extraction on the three-dimensional spectrum heat map to obtain the interference feature vector of each frequency band, obtain the historical channel quality record of each frequency band, combine the three-dimensional spectrum heat map, the interference feature vector of each frequency band, and the historical signal quality record into the spectrum information of each frequency band, and train the local model deployed on the corresponding drone end based on the spectrum information of each frequency band collected by each drone end. If the global update time node is reached, the local model gradient of each drone end is calculated and uploaded based on the local model of each drone end and the spectrum information of each frequency band collected by the corresponding drone end, so that the central server end can update the global model of the central server end based on the received local model gradient of each drone end, and send the updated global model parameters to each drone end; each drone end updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band; For any UAV, the channel capacity of the communication channel of each frequency band and the task importance level of the task undertaken by the any UAV are obtained, and the local model of the any UAV is used to predict the channel quality of each frequency band based on the spectrum information of each frequency band collected by the any UAV. Based on the channel capacity of the communication channel of each frequency band, the task importance level of the task undertaken by the any UAV, and the channel quality of each frequency band, a state space is constructed. Based on the currently used frequency band and the preset candidate frequency band set, an action space is constructed. Based on the state space, the action space and the preset reward function, the Q-Learning algorithm is used to perform dynamic frequency band selection to determine the optimal communication frequency band currently corresponding to the any UAV.
2. The method for dynamic spectrum sharing of UAVs based on edge federated learning according to claim 1 is characterized in that: The method of calculating and uploading the local model gradient of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal, so that the central server terminal updates the global model of the central server terminal based on the received local model gradient of each drone terminal, includes: Based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone, the local model gradient of each drone is calculated; On the drone side, the local model gradient of the corresponding drone side is encrypted based on the homomorphic encryption algorithm to obtain the encrypted local model gradient; Each drone uploads the encrypted local model gradient to the central server, so that the central server can decrypt the encrypted local model gradient based on the decryption algorithm to obtain the original local model gradient, and update the global model of the central server based on the original local model gradient.
3. The method for dynamic spectrum sharing of UAVs based on edge federated learning according to claim 1 is characterized in that: The reward function is specifically: R = α×C+β / I-γ×Δf Wherein, C is the channel capacity of the communication channel of any frequency band, I is the channel quality of any frequency band, Δf is the switching overhead of switching from the currently used frequency band to any frequency band, and α, β and γ are preset weights.
4. The method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning according to claim 1 or 2, characterized in that: Each UAV terminal performs dynamic frequency band selection based on the channel quality of each frequency band output by the local model, and then further includes: After any UAV performs dynamic frequency band selection to obtain the optimal communication frequency band, 21 UAVs are selected from all UAVs as verification nodes; Sending the optimal communication frequency band to the verification nodes, so that each verification node can reach a consensus on the optimal communication frequency band based on a Byzantine fault-tolerant consensus algorithm, thereby obtaining a consensus conclusion of each verification node; If the consensus conclusion of more than 2 / 3 of the verification nodes is confirmed, the optimal communication frequency band is broadcast to the neighboring drones of any drone.
5. A UAV dynamic spectrum sharing device based on edge federated learning, characterized in that: include: The spectrum scanning unit is used to set the spectrum scanning parameters of each UAV end, perform spectrum scanning based on the spectrum scanning parameters of the corresponding UAV end based on the scanning equipment carried by each UAV end, use Kriging interpolation to fuse the spectrum scanning data of multiple UAV ends, and then update the sliding window at intervals of 0.1 seconds to obtain a three-dimensional spectrum heat map containing the distribution of spectrum energy of each frequency band as a function of time and frequency. Each UAV end performs feature extraction on the three-dimensional spectrum heat map to obtain the interference feature vector of each frequency band; obtain the historical channel quality record of each frequency band, combine the three-dimensional spectrum heat map, the interference feature vector of each frequency band and the historical signal quality record into the spectrum information of each frequency band, and train the local model deployed on the corresponding UAV end based on the spectrum information of each frequency band collected by each UAV end; The federated learning unit is configured to calculate and upload the local model gradients of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal when a global update time node is reached, so that the central server terminal can update the global model of the central server terminal based on the received local model gradients of each drone terminal, and send the updated global model parameters to each drone terminal; each drone terminal updates its own local model based on the updated global model parameters; the local model and the global model are used to predict the channel quality of each frequency band based on the input spectrum information of each frequency band; A dynamic frequency band selection unit is used to obtain, for any UAV, the channel capacity of the communication channel of each frequency band and the task importance level of the task undertaken by the any UAV, and use the local model of the any UAV end to predict the channel quality of each frequency band based on the spectrum information of each frequency band collected by the any UAV end; based on the channel capacity of the communication channel of each frequency band, the task importance level of the task undertaken by the any UAV and the channel quality of each frequency band, construct a state space; based on the currently used frequency band and the preset candidate frequency band set, construct an action space; based on the state space, the action space and the preset reward function, use the Q-Learning algorithm to perform dynamic frequency band selection to determine the optimal communication frequency band currently corresponding to the any UAV.
6. The device for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning according to claim 5, characterized in that: The method of calculating and uploading the local model gradient of each drone terminal based on the local model of each drone terminal and the spectrum information of each frequency band collected by the corresponding drone terminal, so that the central server terminal updates the global model of the central server terminal based on the received local model gradient of each drone terminal, includes: Based on the local model deployed on each drone and the spectrum information of each frequency band collected by the corresponding drone, the local model gradient of each drone is calculated; On the drone side, the local model gradient of the corresponding drone side is encrypted based on the homomorphic encryption algorithm to obtain the encrypted local model gradient; Each drone uploads the encrypted local model gradient to the central server, so that the central server can decrypt the encrypted local model gradient based on the decryption algorithm to obtain the original local model gradient, and update the global model of the central server based on the original local model gradient.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning as described in any one of claims 1 to 4 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for dynamic spectrum sharing of unmanned aerial vehicles based on edge federated learning as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Federal learning method based on homomorphic encryption and related equipment thereof
CN116451804A
Multi-unmanned aerial vehicle spectrum dynamic authorization and interference coordination method based on block chain
CN118488452A
Unmanned aerial vehicle group spectrum resource allocation method and system based on cooperative spectrum sensing
CN119485695A
Cognitive unmanned aerial vehicle network spectrum sharing method based on multi-agent reinforcement learning
CN119697646A