A multi-collaborative spectrum sensing classification method based on federated learning
Patent Information
- Application Number
- CN202310893080.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-07-20
AI Technical Summary
[0005]正如上述介绍所说,近年来很多学者充分利用了机器学习方法,提出了许多相关方法应用于频谱感知领域以解决性能问题,尽管有些方法取得了很好的效果,但仍存在一些问题,诸如训练时间过长、对参数的选择敏感、对噪声和异常值敏感、可能出现局部最优解问题、多用户场景的低信噪比时的性能差等仍然是需要解决的难题
[0061]与现有技术相比,本发明具有如下改进及优点:1、通过基于残差块的联邦学习模型,解决模型训练时间长、信号特征提取不完全的问题;同时简化学习目标的难度,有效缓解梯度问题;减少训练时长,提高多用户场景的低信噪比时的性能。
Smart Images

Figure CN116667955B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless communication technology, specifically relating to a multi-cooperative spectrum sensing classification method based on federated learning. Background Technology
[0002] Traditional single-node spectrum sensing methods include energy detection, matched filtering detection, cyclostationary feature detection, and multi-resolution spectrum sensing. However, in environments with latency and fading, single-node spectrum sensing results are unreliable, and the computational complexity and spectrum observation time required are also high. Multi-node cooperative spectrum sensing technology treats all secondary users as a group of cooperative users, sharing sensing information and sending the results of all secondary user sensing to a common fusion center. The fusion center selects an appropriate fusion method to fuse the results and makes a global decision.
[0003] With the development of artificial intelligence technology, many machine learning techniques are used for spectrum sensing of cognitive radio. Machine learning-based spectrum sensing can identify and classify signals without determining a detection threshold, which greatly improves the shortcomings of traditional spectrum sensing methods.
[0004] To better adapt to the needs of real-world scenarios, recent research hotspots include: (1) Spectrum sensing algorithms based on support vector machines (SVMs). SVMs can handle high-dimensional data and nonlinear problems. Their goal is to find the optimal hyperplane so that the data can be correctly segmented and the gap between hyperplanes is as large as possible. Based on this, SVMs have good robustness and generalization ability. This type of algorithm extracts features from the received signal and then uses them as input to the SVM to train a classification model; (2) Spectrum sensing algorithms based on decision trees. This type of algorithm divides the dataset into multiple subsets through feature queries and obtains a complete model through the combination of features and subsets. This type of algorithm builds a classification model based on the ability of decision trees to classify and predict data, thereby performing spectrum sensing; (3) Spectrum sensing algorithms based on clustering. Clustering is an unsupervised learning method that can divide the dataset into different clusters or groups, making samples within the same cluster as similar as possible while samples between different clusters are as different as possible. Common clustering algorithms include K-means clustering, hierarchical clustering, etc. This type of algorithm clusters the features of the data into different categories through clustering algorithms; (4) Spectrum sensing algorithm based on deep learning. As a powerful machine learning algorithm, deep learning can automatically learn complex features. Commonly used learning models include convolutional neural networks, recurrent neural networks, and deep belief networks. These algorithms use existing data to train the model through deep learning models in order to obtain a trained model for prediction.
[0005] As mentioned above, in recent years, many scholars have made full use of machine learning methods and proposed many related methods to solve performance problems in the field of spectrum sensing. Although some methods have achieved good results, there are still some problems, such as excessively long training time, sensitivity to parameter selection, sensitivity to noise and outliers, the possibility of local optima, and poor performance in low signal-to-noise ratio scenarios in multi-user scenarios. These are still difficult problems that need to be solved. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-cooperative spectrum-aware classification method based on federated learning to solve the problems mentioned in the background art.
[0007] The objective of this invention is achieved as follows: a multi-cooperative spectrum-aware classification method based on federated learning, characterized by the following steps:
[0008] Step S1: Data preprocessing;
[0009] For each secondary user channel, the historical transmission signal is converted into an image using the Gram corner field algorithm to obtain a subset (X,Y), which serves as the input to the federated learning model.
[0010] Step S2: Construct a federated learning model;
[0011] The federated learning model includes a master user, M sub-users, and a central aggregator. The central aggregator is used to aggregate the parameters and threshold values trained locally by the sub-users and to perform convergence judgment. The sub-users are used to perceive the training of the master user and the federated learning model, and upload the parameters and local threshold values to the central aggregator when the training ends.
[0012] Step S3: Train the federated learning model;
[0013] Step S4: Use the threshold decision algorithm to make a decision on the dataset and output the final decision result.
[0014] Preferably, the data preprocessing in step S1 specifically includes the following steps:
[0015] Step S1-1: Assume there are M secondary users, and the primary user transmits signal x. i (n), then the received signal when the secondary user receiver i senses the transmitted signal is:
[0016]
[0017] Among them, h i H0 represents the channel gain between the primary user and receiver i, where H0 indicates that the received signal is pure noise and H1 indicates that the received signal is a noisy signal.
[0018] Step S1-2: For the received signal z of user i i (n), after energy normalization, the signal is:
[0019]
[0020] Where N is the signal length;
[0021] Steps S1-3: Encode the image using the Gram corner field algorithm to obtain the corresponding Gram corner field image X. Combine it with the prior label Y to obtain the subset (X,Y) of the sub-user i.
[0022] Preferably, in steps S1-3, the Gram angle field algorithm is used to encode it into an image to obtain the corresponding Gram angle field image X. Combined with the prior label Y, the subset (X,Y) of the sub-user i is obtained. The specific operation is as follows:
[0023] Step S1-3-1: Normalize the data to [-1,1];
[0024]
[0025]
[0026] Where Z = z(n)′, n = 1, 2, ..., N;
[0027] Step S1-3-2: ... Perform polar coordinate transformation on the data;
[0028]
[0029] Step S1-3-3: Define the inner product using the angle relationship to obtain the final Gram angle field matrix;
[0030]
[0031] By combining the prior label Y, we obtain the subset (X,Y) of user i.
[0032] Preferably, the federated learning model is constructed based on residual blocks, and the specific operation is as follows:
[0033] The input image first goes through a 64-channel 3x3 convolutional layer to increase the number of channels, and then through a max pooling layer to downsample it.
[0034] Next, after three layers of residual connections, there are 3, 2, and 1 residual blocks in the order of the layers, and the channels are increased to 64, 128, and 256 channels in the order of the layers, respectively. Each residual block has a structure of 1x1 convolution, 3x3 convolution, and 1x1 convolution concatenation. Batch normalization and activation functions are performed between each layer of convolution. Downsampling is performed at the 3x3 convolution of the residual blocks in the second and third layers.
[0035] Then, the average pooling layer further reduces the dimensionality to facilitate the final judgment. Finally, it goes through two fully connected layers and a regularization layer, which are mainly used to improve the generalization ability of the network. The final output is the category judgment for the input signal.
[0036] Preferably, step S4 uses a threshold decision algorithm to make a decision on the dataset, specifically including the following steps:
[0037] Step S4-1: Local threshold decision: The sub-user calculates the local threshold value based on the output obtained from local iterative training, and uploads the local threshold value and the federated learning model parameters to the central aggregator;
[0038] Step S4-2: Use global threshold decision: Aggregate the local threshold values uploaded by all secondary users through the central aggregator, calculate the average threshold value of the current global iteration, and compare it with the average threshold value of the previous global iteration.
[0039] Preferably, the local threshold decision is performed as follows:
[0040] Step S4-1-1: Subuser i, based on its subset D i Obtain the local model output matrix S i
[0041]
[0042] Where k is the subset D i The length of P j (H0), (1≤j≤k) are the probabilities of the local model outputting the current signal as pure noise, P j (H1) represents the probability that the federated learning model determines the current signal to be a noisy signal; it also records the set V of correctly determined signals.
[0043] V={S i,j |S i,j =Y i,j ,1≤i≤M,1≤j≤k}
[0044] Among them, Y i,j The tag identifier for the current user i;
[0045] Step S4-1-2: Subuser i calculates the local decision threshold value for the t-th round of global iteration based on the accuracy of the local dataset:
[0046]
[0047] Among them, L (i) The length of V is then used by the user to determine the current local decision threshold. and local model parameters W t (i) Upload to the central aggregator.
[0048] Preferably, the global threshold decision is specifically performed as follows:
[0049] Step S4-2-1: Aggregate the local decision threshold values to obtain the average threshold value γ for round t. t :
[0050]
[0051] in, Let i be the theoretical decision threshold under the constant false alarm probability of user i.
[0052] Step S4-2-1: The central aggregator uses the average threshold value γ from the previous global iteration. t-1 Perform a global threshold decision:
[0053] |γ t -γ t-1 |≤Q·γ t
[0054] Where Q is a constant correction factor, typically taken as 10. -3 ;
[0055] If the condition is not met, update the current average threshold value γ. t =γ t-1 And in the form:
[0056]
[0057] Update the parameters of the federated learning model, redistribute the federated learning model to each sub-user, and start the next round of global iteration. If the condition is met, it means that the current federated learning model has converged. Stop the iteration, use the current federated learning model parameters for verification, and use the average threshold value to make a decision on the output of the federated learning model to obtain the final decision result.
[0058]
[0059] Where γ is the global threshold value at which the federated learning model reaches convergence, and P j(H1) represents the probability that the federated learning model outputs the current signal as a noisy signal during the j-th global iteration.
[0060] If the threshold value is greater than or equal to the probability of the added noise signal, it is determined that the main signal exists; otherwise, it is determined that the main signal does not exist.
[0061] Compared with the prior art, the present invention has the following improvements and advantages: 1. By using a federated learning model based on residual blocks, the problems of long model training time and incomplete signal feature extraction are solved; at the same time, the difficulty of the learning objective is simplified, effectively alleviating the gradient problem; the training time is reduced, and the performance in low signal-to-noise ratio scenarios in multi-user scenarios is improved.
[0062] 2. By setting threshold decisions, the sensing results utilize idle spectrum, minimizing interference to the main user; by incorporating historical data into the threshold decisions, the setting of the decision threshold is rationalized, the unreliability of single-user sensing results is addressed, and a correct judgment of spectrum occupancy status is obtained, thus improving the accuracy of spectrum sensing. Attached Figure Description
[0063] Figure 1 This is the overall flowchart of the present invention.
[0064] Figure 2 This is a structural diagram of the federated learning model.
[0065] Figure 3 This is a flowchart of the threshold decision process. Detailed Implementation
[0066] The invention will be further summarized below with reference to the accompanying drawings.
[0067] like Figure 1 This paper presents a multi-cooperative spectrum-aware classification method based on federated learning, which includes the following steps:
[0068] Step S1: Data preprocessing;
[0069] For each secondary user channel, the historical transmission signal is converted into an image using the Gram corner field algorithm to obtain a subset (X,Y), which serves as the input to the federated learning model.
[0070] The data preprocessing in step S1 specifically includes the following steps:
[0071] Step S1-1: Assume there are M secondary users, and the primary user transmits signal x. i (n), then the received signal when the secondary user receiver i senses the transmitted signal is:
[0072]
[0073] Among them, hi H0 represents the channel gain between the primary user and receiver i, where H0 indicates that the received signal is pure noise and H1 indicates that the received signal is a noisy signal.
[0074] Step S1-2: For the received signal z of user i i (n), after energy normalization, the signal is:
[0075]
[0076] Where N is the signal length;
[0077] Steps S1-3: Encode the image using the Gram corner field algorithm to obtain the corresponding Gram corner field image X. Combine it with the prior label Y to obtain the subset (X,Y) of the sub-user i.
[0078] In steps S1-3, the Gram angle field algorithm is used to encode it into an image, obtaining the corresponding Gram angle field image X. Combined with the prior label Y, the subset (X,Y) of the sub-user i is obtained. The specific operation is as follows:
[0079] Step S1-3-1: Normalize the data to [-1,1];
[0080]
[0081]
[0082] Where Z = z(n)′, n = 1, 2, ..., N;
[0083] Step S1-3-2: ... Perform polar coordinate transformation on the data;
[0084]
[0085] Step S1-3-3: Define the inner product using the angle relationship to obtain the final Gram angle field matrix;
[0086]
[0087] By combining the prior label Y, we obtain the subset (X,Y) of user i.
[0088] Step S2: Construct a federated learning model;
[0089] like Figure 2 As shown, the federated learning model includes one master user, M sub-users, and a central aggregator. The central aggregator is used to aggregate the parameters and threshold values trained locally by the sub-users and to perform convergence judgment. The sub-users are used to perceive the training of the master user and the federated learning model, and upload the parameters and local threshold values to the central aggregator when the training ends.
[0090] The input image first undergoes channel augmentation via a 64-channel 3x3 convolutional layer, followed by downsampling via a max pooling layer. Next, it passes through three residual connection layers, with 3, 2, and 1 residual blocks respectively, performing channel augmentation of 64, 128, and 256 channels respectively. Each residual block is a concatenation of 1x1, 3x3, and 1x1 convolutions, with batch normalization and activation functions applied between each convolutional layer. Downsampling is only performed at the 3x3 convolutions in the second and third residual blocks. Then, an average pooling layer further reduces dimensionality for easier final judgment. Finally, it passes through two fully connected layers and a regularization layer, primarily to improve the network's generalization ability, ultimately outputting a category judgment for the input signal. The specific operation is as follows:
[0091] Step S2-1: Perform a convolutional layer with a kernel of 3x3 and a stride of 1 on the input part of the original image to obtain a first feature map with 64 channels and the same resolution as the original image;
[0092] Step S2-2: The first feature map is processed by a max pooling layer with a kernel of 3 and a stride of 2 to obtain a second feature map with a resolution of 1 / 2 of the original image and 64 channels.
[0093] Step S2-3: The second feature map is processed by the residual block in the first stage to obtain a third feature map with the same number of channels and resolution as the original image;
[0094] Step S2-4: Perform residual concatenation between the third feature map and the second feature map to obtain a fourth feature map with a resolution of 1 / 2 of the original image and 64 channels;
[0095] Step S2-5: The fourth feature map is processed by the residual block in the second stage to obtain the fifth feature map with a resolution of 1 / 4 of the original image and 128 channels.
[0096] Step S2-6: Perform residual concatenation between the fifth feature map and the fourth feature map to obtain a sixth feature map with a resolution of 1 / 4 of the original image and 128 channels;
[0097] Step S2-7: The sixth feature map is processed by the residual block in the third stage to obtain the seventh feature map with a resolution of 1 / 7 of the original image and 256 channels.
[0098] Step S2-8: Perform residual connection between the seventh feature map and the sixth feature map to obtain an eighth feature map with a resolution of 1 / 7 of the original image and 256 channels;
[0099] Step S2-9: Perform average pooling layer processing on the eighth feature map to obtain a ninth feature map with a resolution of 1 / 28 of the original image and 256 channels;
[0100] Step S2-10: Pass the ninth feature map through two linear layers to obtain the final output result.
[0101] Step S3: Train the federated learning model;
[0102] Step S4: Use the threshold decision algorithm to make a decision on the dataset and output the final decision result.
[0103] The threshold decision algorithm is used to make decisions on the dataset, specifically including:
[0104] Local threshold decision is adopted: the sub-user calculates the local threshold value based on the output obtained from local iterative training, and uploads the local threshold value and the parameters of the federated learning model to the central aggregator;
[0105] A global threshold decision is adopted: the local threshold values uploaded by all sub-users are aggregated by the central aggregator, the average threshold value of the current global iteration is calculated, and the average threshold value of the current global iteration is compared with the average threshold value of the previous global iteration.
[0106] The specific steps for local threshold determination are as follows:
[0107] Step S4-1-1: Subuser i, based on its subset D i Obtain the local model output matrix S i
[0108]
[0109] Where k is the subset D i The length of P j (H0), (1≤j≤k) are the probabilities of the local model outputting the current signal as pure noise, P j (H1) represents the probability that the federated learning model determines the current signal to be a noisy signal; it also records the set V of correctly determined signals.
[0110] V={S i,j |S i,j =Y i,j ,1≤i≤M,1≤j≤k}
[0111] Among them, Y i,j The tag identifier for the current user i;
[0112] Step S4-1-2: Subuser i calculates the local decision threshold value for the t-th round of global iteration based on the accuracy of the local dataset:
[0113]
[0114] Among them, L (i)The length of V is then used by the user to determine the current local decision threshold. and local model parameters W t (i) Upload to the central aggregator.
[0115] The specific operation of global threshold decision is as follows:
[0116] Step S4-2-1: Aggregate the local decision threshold values to obtain the average threshold value γ for round t. t :
[0117]
[0118] in, Let i be the theoretical decision threshold under the constant false alarm probability of user i.
[0119] Step S4-2-1: The central aggregator uses the average threshold value γ from the previous global iteration. t-1 Perform a global threshold decision:
[0120] |γ t -γ t-1 |≤Q·γ t
[0121] Where Q is a constant correction factor, typically taken as 10. -3 ;
[0122] If the condition is not met, update the current average threshold value γ. t =γ t-1 And in the form:
[0123]
[0124] Update the parameters of the federated learning model, redistribute the federated learning model to each sub-user, and start the next round of global iteration. If the condition is met, it means that the current federated learning model has converged. Stop the iteration, use the current federated learning model parameters for verification, and use the average threshold value to make a decision on the output of the federated learning model to obtain the final decision result.
[0125]
[0126] Where γ is the global threshold value at which the federated learning model reaches convergence, and P j (H1) represents the probability that the federated learning model outputs the current signal as a noisy signal during the j-th global iteration.
[0127] If the threshold value is greater than or equal to the probability of the added noise signal, it is determined that the main signal exists; otherwise, it is determined that the main signal does not exist.
[0128] Table 1 shows the test accuracy under different false alarm probabilities.
[0129] 0.1 87.66% 0.01 87.58% 0.001 87.58%
[0130] As shown in Table 1, the unreliability of single-user perception results using the classification method of this invention is reduced, but the correct judgment of spectrum occupancy status is obtained, thus improving the accuracy of spectrum perception.
[0131] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A multi-cooperative spectrum-aware classification method based on federated learning, characterized in that: The method includes the following steps: Step S1: Data preprocessing; For each secondary user channel, the historical transmitted signal is converted into an image using the Gram corner field algorithm to obtain a subset of the dataset. , as input to the federated learning model; Step S2: Construct a federated learning model; The federated learning model includes a master user, There are one secondary user and one central aggregator. The central aggregator is used to aggregate the parameters and threshold values trained locally by the secondary users and to perform convergence judgment. The secondary users are used to perceive the training of the primary user and the federated learning model, and upload the parameters and local threshold values to the central aggregator when the training is completed. Federated learning models are built based on residual blocks, and the specific operations are as follows: The input image first goes through a 64-channel 3x3 convolutional layer to increase the number of channels, and then through a max pooling layer to downsample it. Next, after three layers of residual connections, there are 3, 2, and 1 residual blocks in the order of the layers, and the channels are increased to 64, 128, and 256 channels in the order of the layers, respectively. Each residual block has a structure of 1x1 convolution, 3x3 convolution, and 1x1 convolution concatenation. Batch normalization and activation functions are performed between each layer of convolution. Downsampling is performed at the 3x3 convolution of the residual blocks in the second and third layers. Then, the average pooling layer further reduces the dimensionality to facilitate the final judgment. Finally, it goes through two fully connected layers and a regularization layer to improve the generalization ability of the network and finally outputs the category judgment of the historical transmission signal. Step S3: Train the constructed federated learning model; Step S4: Use a threshold decision algorithm to make decisions on the dataset and output the final decision results. This includes the following steps: Step S4-1: Local Threshold Decision: The sub-user calculates the local threshold value based on the output obtained from local iterative training, and uploads the local threshold value and the federated learning model parameters to the central aggregator. Specifically: Step S4-1-1: Secondary User Based on its sub-dataset Obtain the local model output matrix : ;; in, For a subset of datasets Length, The local model outputs the probability that the current signal is pure noise, where, ; The federated learning model outputs the probability that the current signal is a noisy signal; it also records the set of correctly identified signals. : ; in, For the current secondary user Label identification; Step S4-1-2: Secondary User The accuracy of the local dataset was calculated. Local decision threshold for round-robin global iteration: ; in, for The length, after which the user will set the current local decision threshold. and local model parameters Uploaded to the central aggregator; Step S4-2: Global Threshold Decision: The central aggregator aggregates the local threshold values uploaded by all secondary users, calculates the average threshold value of the current global iteration, and compares it with the average threshold value of the previous global iteration. Specifically: Step S4-2-1: Aggregate the local decision threshold values to obtain the first... Wheel average threshold : ; in, For secondary users The theoretical decision threshold under constant false alarm probability; Step S4-2-2: The central aggregator determines the threshold value based on the average threshold value of the previous global iteration. Perform a global threshold decision: ; in, Let be a constant correction factor, take ; If the condition is not met, update the current average threshold value. And in the form: ; Update the parameters of the federated learning model, redistribute the federated learning model to each sub-user, and start the next round of global iteration; if the condition is met, it means that the current federated learning model has converged, stop the iteration, use the current federated learning model parameters for verification, and use the average threshold value to make a decision on the output of the federated learning model to obtain the final decision result. ; in, This is the global threshold value at which the federated learning model converges. In the first During the next global iteration, the federated learning model outputs the probability that the current signal is a noisy signal; If the threshold value is greater than or equal to If not, it is determined that the main signal does not exist.
2. The multi-cooperative spectrum-aware classification method based on federated learning according to claim 1, characterized in that: The data preprocessing in step S1 specifically includes the following steps: Step S1-1: Assume that it exists Each secondary user transmits a signal as follows: Then the secondary user receiver The received signal when sensing the transmitted signal is: ; in, It is the main user and the receiver Channel gain between This indicates that the received signal is pure noise; This indicates that the received signal is a noisy signal; Step S1-2: For users Received signal After energy normalization, the signal obtained is: ; in, The signal length; Steps S1-3: Encode it into an image using the Gram corner field algorithm to obtain the corresponding Gram corner field image. Combined with prior labels , to obtain secondary users Subdataset .
3. The multi-cooperative spectrum-aware classification method based on federated learning according to claim 2, characterized in that: In steps S1-3, the Gram angle field algorithm is used to encode it into an image, resulting in the corresponding Gram angle field image. Combined with prior labels , to obtain secondary users Subdataset The specific operation is as follows: Step S1-3-1: Normalize the data to [-1,1]; ; ; in ; Step S1-3-2: ... , Perform polar coordinate transformation on the data; ; Step S1-3-3: Define the inner product using the angle relationship to obtain the final Gram angle field matrix; ; ; Combine prior labels , to obtain secondary users Subdataset .
Citation Information
Patent Citations
Centralized cooperative spectrum sensing system and method based on cognitive radio
CN113285776A
Distributed cooperative multi-antenna cooperative spectrum intelligent sensing method, system and device under non-Gaussian noise and medium
CN116192307A