Small sample spectrum sensing method based on time prediction and context contrast learning
By using time prediction and context comparison learning methods in spectrum perception, the problem of prior art dependence on prior knowledge and label data requirements is solved, and efficient spectrum perception in small sample scenarios is achieved, and excellent performance in low signal-to-noise ratio environments are performed.
Patent Information
- Application Number
- CN202510653118.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-21
AI Technical Summary
Existing spectrum perception methods rely on prior knowledge, supervised learning requires a large amount of label data, and insufficient detection performance in small sample scenarios.
The small sample spectrum perception method based on time prediction and context comparison learning is adopted, and the representation features of electromagnetic signals are extracted through a self-supervised encoder, and cross-sample time prediction and context comparison learning are used to make the representation features more discernible.
It significantly reduces the dependence on labeled data, improves detection performance in small sample scenarios, gets rid of the dependence on prior knowledge, and improves spectrum perception performance in low signal-to-noise ratio environments.
Smart Images

Figure CN120180241A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication signal processing, and in particular, to a few-shot spectrum sensing method based on time prediction and context contrast learning. Background Art
[0002] In cognitive radio, spectrum sensing technology not only improves spectrum utilization efficiency, reduces interference risk, supports dynamic spectrum access, and provides support for the development of emerging wireless communication technologies by implementing intelligent spectrum management. Spectrum sensing technology plays a crucial role in improving communication quality, ensuring network stability, and promoting wireless resource sharing, and is one of the basic technologies for realizing the next-generation wireless communication system. Due to the fact that traditional spectrum sensing methods rely on prior knowledge such as channel or noise distribution, traditional spectrum sensing algorithms have problems such as the signal-to-noise ratio wall, and their accuracy is limited.
[0003] With the development of deep learning technology, the powerful feature extraction ability of deep learning has improved spectrum sensing performance. Most existing deep learning-based spectrum sensing algorithms are based on supervised learning and can obtain excellent detection performance when there is sufficient training data, but network training depends on a large number of real labels. In a real radio environment, it is feasible to obtain a large number of actual signals using a receiver, but manually annotating these signals is a very time-consuming task and may also result in mislabeling. Currently, the research on spectrum sensing of limited-label samples at home and abroad is still in its infancy. Summary of the Invention
[0004] In view of the above analysis, the embodiments of the present invention aim to provide a few-shot spectrum sensing method based on time prediction and context contrast learning, which solves the technical problems of existing spectrum sensing methods relying on prior knowledge, supervised learning requiring a large amount of labeled data, and insufficient detection performance in a few-shot scenario.
[0005] The object of the present invention is mainly achieved through the following technical solutions: A few-shot spectrum sensing method based on time prediction and context contrast learning disclosed by the present invention includes the following steps: Preprocess the acquired original electromagnetic signal including a modulated signal to obtain a pre-training sample set without labeled tags and a fine-tuning sample set with labeled tags; wherein, the tags include the presence of a modulated signal and the absence of a modulated signal; Use the pre-training sample set to perform time prediction and context contrast pre-training on the few-shot spectrum sensing model to obtain a pre-trained few-shot spectrum sensing model; wherein, the few-shot spectrum sensing model includes a self-supervised encoder, and the self-supervised encoder is used to obtain an embedded feature vector of the input sample; After adding a flattening layer and a fully connected classification layer after the pre-trained self-supervised encoder, a fine-tuned encoder is obtained; the fine-tuned encoder is fine-tuned using the fine-tuning sample set to obtain a fine-tuned small-sample spectrum sensing model; The electromagnetic signal to be sensed is preprocessed and then input into the fine-tuned small-sample spectrum sensing model for spectrum sensing to obtain a spectrum sensing result.
[0006] Further, the preprocessing of the original electromagnetic signal including the modulation signal to obtain an unlabeled pre-training sample set and a labeled fine-tuning sample set includes: Normalize the electromagnetic signal including the modulation signal to obtain a normalized electromagnetic signal; Obtain the signal samples corresponding to the normalized electromagnetic signal and generate noise samples with the same number as the signal samples; Divide the signal samples and the corresponding noise samples into pre-training samples and fine-tuning samples; Perform strong augmentation and weak augmentation on the pre-training samples respectively to obtain strongly augmented samples and weakly augmented samples; where, The strongly augmented samples and the weakly augmented samples form a pre-training sample set; the fine-tuning samples and labels form a fine-tuning training set.
[0007] Further, the small-sample spectrum sensing model further includes a Transformer encoder, a first fully connected layer, and a second fully connected layer; where, The self-supervised encoder is used to obtain the embedded feature vectors corresponding to the strongly augmented samples and the weakly augmented samples; The Transformer encoder is used to obtain the corresponding context vectors based on the embedded feature vectors through the multi-head self-attention mechanism and the feed-forward neural network; The first fully connected layer is used to obtain a first positive sample pair and a first negative sample pair based on the context vectors; The second fully connected layer is used to obtain a second positive sample pair and a second negative sample pair based on the context vectors; When training the small-sample spectrum sensing model, the prediction contrast loss is used to maximize the similarity of the first positive sample pair and minimize the similarity of the first negative sample pair; and the context contrast loss is used to maximize the similarity of the second positive sample pair and minimize the similarity of the second negative sample pair.
[0008] Further, the self-supervised encoder includes a series of first, second, and third convolutional blocks; obtaining the embedded feature vectors corresponding to the strongly augmented samples and the weakly augmented samples includes: The strongly augmented samples and the weakly augmented samples Input the self-supervised encoder, and successively pass through the first, second, and third convolutional blocks, and are respectively mapped to the embedding space to obtain corresponding embedding feature vectors and .
[0009] Furthermore, based on the embedding feature vectors, corresponding context vectors are obtained through the multi-head self-attention mechanism and the feed-forward neural network, including: Based on a randomly selected time step t, divide the embedding feature vectors and into the current slice and the future slice respectively; Randomly initialize a context vector with the same dimension as the current slice; add the context vector to the starting position of the current slice to obtain the current slice with the context vector added and ; After passing the current slice with the context vector added through the multi-head self-attention layer, obtain the self-attention of each head node; merge all head nodes to obtain a feature vector and ; Based on and After passing through the first residual connection, the first addition, and the layer normalization layer, obtain and ; Pass and through the feed-forward network layer to obtain a feature vector and ; Pass and through the second residual connection, the second addition, and the layer normalization layer to obtain a feature vector and ; Extract from the starting positions of and the context vectors that have learned the attention relationships of themselves and , in other elements; Obtain the context vectors corresponding to the embedding feature vectors and respectively as and .
[0010] Furthermore, input the context vector into the first fully connected layer to predict the predicted value of the future slice of the corresponding weakly augmented sample ; And based on the context vector of the weakly augmented sample Input the first fully connected layer to predict the predicted values of the future slices corresponding to the strongly augmented samples. ; The predicted value and the true value of the future slice of the same pre-training sample form the first positive sample pair; the predicted value of the future slice of this pre-training sample and the true value of the future slices of other pre-training samples in the same training batch form the first negative sample pair. The second fully connected layer projects and into strongly augmented features and weakly augmented features respectively; and obtained from the same pre-training sample form the second positive sample pair; obtained from this pre-training sample and obtained from other pre-training samples in the same training batch form the second negative sample pair.
[0011] Furthermore, pre-train the small-sample spectrum sensing model based on the pre-training sample set, including: Load the strongly augmented samples and weakly augmented samples in the pre-training sample set into the self-supervised encoder. Pre-train the small-sample spectrum sensing model based on the joint loss function. Through backpropagation and gradient descent optimization algorithms, continuously adjust the model parameters to maximize the similarity of the first and second positive sample pairs and minimize the similarity of the first and second negative sample pairs. Stop pre-training until the joint loss function converges or reaches the preset maximum number of iterations. Save the model parameters of the small-sample spectrum sensing model to obtain the pre-trained small-sample spectrum sensing model. Among them, the joint loss function is as follows: ; Among them, is the prediction contrast loss based on to predict ; is the prediction contrast loss based on to predict ; is the context contrast loss; , are the weights of the prediction contrast loss and the context contrast loss respectively.
[0012] Furthermore, the prediction contrast loss based on to predict is as follows: ; Based on prediction prediction contrast loss , as follows: ; wherein, is the number of the first fully connected layers, is the set of other samples in the same batch except the current sample; , are the embedded feature vectors of other samples in the same batch except the current sample respectively; represents the th fully connected layer of the first fully connected layer, ; The context contrast loss , using the cosine similarity function and the temperature coefficient, maximizes the similarity of the second positive sample pair and minimizes the similarity of the second negative sample pair, as follows: ; wherein, is the number of samples per batch, , are the context vectors corresponding to the th strong augmented sample and weak augmented sample respectively and are the features projected by the second fully connected layer; is the weak augmented sample of other pre-trained samples in the same training batch; is the cosine similarity function; is the exponential function; is the temperature coefficient; is the sum of the similarities of all second negative sample pairs in the same training batch.
[0013] Furthermore, the fine-tuning training includes: loading the parameters of the self-supervised encoder in the pre-trained small-sample spectrum sensing model ; The flattening layer flattens the embedded feature vector into a one-dimensional vector; The fully connected classification layer performs classification calculation on the one-dimensional vector output by the flattening layer to obtain the prediction probabilities of the presence and absence of modulation signals and ; Using the cross-entropy loss function to measure the difference between the prediction probability and the true label, until the loss function converges or reaches the preset maximum number of fine-tuning training times, to obtain the fine-tuned small-sample spectrum sensing model.
[0014] Further, input the preprocessed electromagnetic signal obtained in real time into the fine-tuned few-shot spectrum sensing model for spectrum sensing, including: Load the fine-tuned few-shot spectrum sensing model and dynamically set the decision threshold based on a preset false alarm probability; Input the preprocessed electromagnetic signal obtained in real time into the fine-tuned few-shot spectrum sensing model; when the predicted probability value output by the fine-tuned few-shot spectrum sensing model is greater than or equal to the decision threshold, the spectrum sensing result is that there is a modulated signal, otherwise there is no modulated signal.
[0015] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. The few-shot spectrum sensing algorithm based on time prediction and context contrast learning proposed by the present invention is based on a self-supervised contrast learning strategy, and learns the similarity or difference in data through positive and negative sample pairs. Only a small amount of labeled sample data is required in the fine-tuning stage, significantly reducing the dependence on labeled data; solving the problem of the need for a large amount of labeled data in supervised learning in the prior art; 2. The present invention extracts the enhanced representation features of electromagnetic signal data through a self-supervised encoder, and uses cross-sample time prediction contrast learning and context contrast learning to make the representation features more discriminative, that is, to make the positive sample pairs as close as possible in the embedding space, while the negative sample pairs are far away, so as to maintain a high detection probability at a low false alarm probability; 3. Existing traditional spectrum sensing methods rely on prior knowledge such as channel or noise distribution, and there are problems such as the signal-to-noise ratio wall. The present invention does not require such prior knowledge, and realizes spectrum sensing by learning the intrinsic information of a large number of unlabeled electromagnetic signal samples, getting rid of the dependence on prior knowledge; 4. The performance of traditional spectrum sensing algorithms is limited in a low signal-to-noise ratio environment. The present invention uses a Transformer encoder to capture the time series dependence and dynamic changes of signals, combined with context contrast learning, enhancing the model's learning ability of signal features, thus overcoming the limitation of the signal-to-noise ratio wall and improving the spectrum sensing performance in a low signal-to-noise ratio environment; 5. The prior art faces costs and error risks when obtaining a large number of labeled samples. The present invention makes full use of unlabeled data through data augmentation and contrast learning, improving the data utilization efficiency and reducing the data acquisition and annotation costs.
[0016] In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination schemes. Other features and advantages of the present invention will be described in the subsequent specification, and some advantages can be made obvious from the specification, or understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained from the content specifically pointed out in the specification and the drawings. Brief Description of the Drawings
[0017] The drawings are only for the purpose of showing specific embodiments, and are not considered as a limitation of the present invention. Throughout the drawings, the same reference signs denote the same components; Figure 1 It is a flowchart of a few-shot spectrum sensing method based on time prediction and context contrast learning in an embodiment of the present invention; Figure 2 It is a schematic diagram of pre-training, fine-tuning training and spectrum sensing in an embodiment of the present invention; Figure 3 It is a schematic diagram of the self-supervised encoder structure in an embodiment of the present invention; Figure 4 It is a schematic diagram of the Transformer encoder structure in an embodiment of the present invention; Figure 5 It is a schematic diagram of the self-supervised encoder structure in the fine-tuning training stage in an embodiment of the present invention. Detailed Embodiments
[0018] The following will specifically describe the preferred embodiments of the present invention in conjunction with the drawings, where the drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, and are not used to limit the scope of the present invention.
[0019] The few-shot spectrum sensing method in the present invention aims to solve the technical problems of existing spectrum sensing methods relying on prior knowledge, scarce labeled data or difficult to obtain samples, and insufficient detection performance in few-shot scenarios.
[0020] A specific embodiment of the present invention discloses a few-shot spectrum sensing method based on time prediction and context contrast learning, as shown in Figure 1 and Figure 2 shown, including the following steps: Step S1, preprocess the acquired original electromagnetic signal including modulated signals to obtain a pre-training sample set without labeled tags and a fine-tuning sample set with labeled tags; wherein, the tags include the presence of modulated signals and the absence of modulated signals; Step S2, use the pre-training sample set to perform time prediction and context contrast pre-training on the few-shot spectrum sensing model to obtain a pre-trained few-shot spectrum sensing model; wherein, the few-shot spectrum sensing model includes a self-supervised encoder, and the self-supervised encoder is used to obtain the embedded feature vector of the input sample; Step S3, add a flattening layer and a fully connected classification layer after the pre-trained self-supervised encoder to obtain a fine-tuning encoder; use the fine-tuning sample set to perform fine-tuning training on the fine-tuning encoder to obtain a fine-tuned few-shot spectrum sensing model; Step S4: Preprocess the electromagnetic signal to be sensed and input it into the fine-tuned few-shot spectrum sensing model for spectrum sensing to obtain the spectrum sensing result.
[0021] In the present invention, the "few-shot" means that the number of labeled samples used for training and fine-tuning the spectrum sensing model is relatively small. In practical applications, it is difficult to obtain a large amount of labeled electromagnetic signal data. Labeling signals requires a large amount of manpower, material resources, and time, and there may also be cases of labeling errors. The present invention aims to achieve efficient spectrum sensing by making full use of the intrinsic information of a large number of unlabeled electromagnetic signal samples and combining a small number of labeled samples.
[0022] Specifically, the method of the present invention uses a self-supervised contrastive learning strategy to train with a large number of unlabeled pre-training samples in the pre-training stage to learn the feature representation of the signal. In the fine-tuning stage, only a small number of labeled fine-tuning samples are used to fine-tune the model, so that the few-shot spectrum sensing model can adapt to specific spectrum sensing tasks. This few-shot learning method significantly reduces the dependence on labeled data and improves the detection performance of the model in few-shot scenarios.
[0023] Step S1: Includes steps S11 - S12.
[0024] Step S11: Obtain the original electromagnetic signal including the modulation signal.
[0025] Collect the original electromagnetic signals (IQ signals) when AM (Amplitude Modulation), ASK (Amplitude Shift Keying), PSK (Phase Shift Keying), or 16QAM (16 - Quadrature Amplitude Modulation) modulation signals exist respectively.
[0026] The modulation signals include but are not limited to the four modulation signals of AM, ASK, PSK, and 16QAM.
[0027] Exemplarily, use MATLAB to generate electromagnetic IQ signals of four modulation types by simulation of AM, ASK, PSK, and 16QAM.
[0028] SNR (Signal - to - Noise Ratio) ranges from - 20dB to 4dB with an interval of 2dB, 13 SNRs; each original electromagnetic signal sample contains 1024 sampling points.
[0029] Step S12: Preprocess the original electromagnetic signal to obtain a pre-training sample set without labeled tags and a fine-tuning sample set with labeled tags.
[0030] Preprocessing the original electromagnetic signal including the modulation signal to obtain a pre-training sample set without labeled tags and a fine-tuning sample set with labeled tags includes: Normalize the electromagnetic signal including the modulation signal to obtain the normalized electromagnetic signal; Obtain the signal samples corresponding to the normalized electromagnetic signal and generate noise samples with the same number as the signal samples; Divide the signal samples and the corresponding noise samples into pre-training samples and fine-tuning samples; Perform strong augmentation and weak augmentation on the pre-training samples respectively to obtain strongly augmented samples and weakly augmented samples; where The strongly augmented samples and the weakly augmented samples form the pre-training sample set; the fine-tuning samples and labels form the fine-tuning training set.
[0031] All original electromagnetic signals Are normalized before training to obtain the normalized electromagnetic signal . Eliminate the dimensional difference of the signal amplitude, which is easier to learn features, but does not change the internal relationship of the IQ components.
[0032] The IQ signal consists of two orthogonal components: I (In-phase): In-phase signal, corresponding to the real part; Q (Quadrature-phase): Quadrature signal, corresponding to the imaginary part.
[0033] Electromagnetic signal , is expressed as follows: ; where is the imaginary unit.
[0034] Electromagnetic signal Is the complex synthesis result of the IQ signal and is directly used for spectrum analysis and modulation and demodulation processing.
[0035] (1) Generate a pre-training sample set without labeled tags.
[0036] At each SNR, 65 signal samples are generated for each modulation type of electromagnetic signal, with a total of: 4 modulation signals 13 SNRs 65 samples = 3380 signal samples Generate additive white Gaussian noise samples with the same number as the signal samples (mean is 0, variance ), 3,380 noise samples.
[0037] There are samples of modulated signals and an equal number of noise samples without modulated signals as pre-training samples, totaling 6,760 unlabeled pre-training samples.
[0038] Data augmentation is performed on a large number of unlabeled pre-training samples to increase the diversity of the pre-training samples. According to the characteristics of electromagnetic signals, two augmentation methods are used to improve the robustness and generalization ability of the learned representations. The two augmentation methods are strong augmentation and weak augmentation.
[0039] Strong augmentation performs a large-scale transformation on the original data to generate samples with significant differences from the original electromagnetic signals, enabling the model to learn a wider range of features and patterns of the data; in contrast, weak augmentation is a slight perturbation of the original electromagnetic signal, keeping the main features of the electromagnetic signal unchanged and simulating the minor changes that may occur in the actual environment.
[0040] Weak augmentation adopts a "jitter" strategy. In each normalized electromagnetic signal add Gaussian noise that follows a normal distribution . Obtain the weak augmentation samples corresponding to the electromagnetic signal , as follows: ; Weak augmentation is used to simulate slight environmental interference and maintain the main structure of the signal.
[0041] For strong augmentation, a "permutation-jitter" strategy is adopted, including: The first step, segmentation, divides the preprocessed signal into a maximum of random segments, ; Exemplarily, takes the value of 5.
[0042] The second step, permutation, randomly shuffles each segment after segmentation to disrupt the temporal relationship; The third step, jitter, adds noise that follows to the permuted signal to obtain the strong augmentation sample , as follows: ; Among them, The function represents randomly reordering the signal segments; is to divide the signal sample into segments.
[0043] For each unlabeled pre-training sample , each sample generates a pair of augmented samples , which are used as positive samples for contrastive learning; and are consistent in dimension. and constitute a pre-training sample set, and the pre-training sample set does not include .
[0044] All the hidden labels of the pre-training set samples are used for the self-supervised pre-training in the subsequent step S22. The hidden label means no label.
[0045] (2) Generate a fine-tuning sample set with labeled labels.
[0046] Similar to obtaining the pre-training samples above, for each electromagnetic signal with a specific signal-to-noise ratio and modulation type, 2 signal samples are generated, and at the same time, Gaussian white noise samples with the same number as the electromagnetic signals are generated. The signal samples and the noise samples form a fine-tuning sample set.
[0047] At each SNR, 2 signal samples are generated for each modulation type, with a total of: 4 types of signals 13 SNRs 2 samples = 104 signal samples Generate 104 Gaussian white noise samples with the same number.
[0048] There are samples with modulated signals and an equal number of noise samples without modulated signals, totaling 208 fine-tuning samples. The fine-tuning samples are labeled. The signal samples are labeled with the sample label "with modulated signal", and the noise samples are labeled with the sample label "without modulated signal", which are used for the model fine-tuning training in the subsequent step S3.
[0049] The function of step S1 is to obtain a pre-training sample set by processing the unlabeled pre-training samples through two data augmentation methods, strong augmentation and weak augmentation; and to obtain a fine-tuning sample set.
[0050] Step S2 includes steps S21 - S22.
[0051] Step S21, construct a small-sample spectrum sensing model, as Figure 2 shown.
[0052] The described small-sample spectrum sensing model includes a self-supervised encoder, and also includes a Transformer encoder, a first fully connected layer, and a second fully connected layer; among them, the self-supervised encoder is used to obtain the embedding feature vectors corresponding to the strong augmented samples and the weak augmented samples; The Transformer encoder is used to obtain corresponding context vectors based on the embedded feature vectors through a multi-head self-attention mechanism and a feed-forward neural network; The first fully-connected layer is used to obtain a first positive sample pair and a first negative sample pair based on the context vector; The second fully-connected layer is used to obtain a second positive sample pair and a second negative sample pair based on the context vector; When training the few-shot spectrum sensing model, the prediction contrast loss is used to maximize the similarity of the first positive sample pair and minimize the similarity of the first negative sample pair; and the context contrast loss is used to maximize the similarity of the second positive sample pair and minimize the similarity of the second negative sample pair.
[0053] The self-supervised encoder, the Transformer encoder, the first and second fully-connected layers are specifically as follows: (1) Self-supervised encoder The self-supervised encoder includes a series of first, second, and third convolutional blocks; obtaining the embedded feature vectors corresponding to the strongly augmented samples and weakly augmented samples includes: Input the strongly augmented sample and the weakly augmented sample into the self-supervised encoder, and successively pass through the first, second, and third convolutional blocks, and are respectively mapped to the embedding space to obtain the corresponding embedded feature vectors and .
[0054] As Figure 3 shown in the schematic diagram of the self-supervised encoder structure in the pre-training stage. The self-supervised encoder maps a large amount of high-dimensional unlabeled pre-training sample data to the embedding space to obtain a low-dimensional information-rich representation.
[0055] The input of the self-supervised encoder is two augmented versions of each unlabeled pre-training sample, the strongly augmented sample or the weakly augmented sample ; The output of the self-supervised encoder is a low-dimensional embedded feature vector representation and , and the dimension is ( is the set of real numbers, is the maximum time step, is the feature length at each time step).
[0056] As Figure 3 shown, for any one or , Through the non - linear transformation of the first, second, and third convolutional blocks, any high - dimensional input signal of two enhanced pre - training samples or is respectively mapped to the embedding space to obtain its low - dimensional and information - rich representation, as follows: ; ; where, is the self - supervised encoder, is the encoding result of the self - supervised encoder; is the embedding feature vector of each time step feature; is the embedding feature vector of each time step feature; is the maximum time step length, representing the time dimension length of the embedding feature vector; is the feature length of each time step, representing the feature dimension length of the embedding feature vector.
[0057] The embedding space maps high - dimensional, complex sample data to a low - dimensional continuous vector space. Vectors in the embedding space (called embedding vectors) can capture the essential features of the data, making similar data closer in the embedding space, thus facilitating model understanding and processing.
[0058] The self - supervised encoder enables the learned feature representation to maximize the similarity in the embedding space between two strong and weak augmented samples (regarded as positive sample pairs) generated from the same sample, while minimizing the similarity between two strong and weak augmented samples (regarded as negative sample pairs) generated from different samples. That is: ; where, is the distance function for measuring the similarity between samples, is significantly greater than; , are respectively the strong augmented sample and the weak augmented sample of the i - th pre - training sample, is the weak augmented sample of the j - th pre - training sample different from the i - th sample.
[0059] The distance function for measuring the similarity between samples used in the present invention is the cosine similarity function. As shown below: ; ; Cosine similarity is used to measure the similarity between two vectors in terms of direction. The closer the value is to 1, the more similar; the closer it is to - 1, the less similar.
[0060] The self-supervised encoder in the pre-training stage includes the first, second, and third convolutional blocks. The first convolutional block is ConvBlock-32, the second convolutional block is Conv Block-64, and the third convolutional block is Conv Block-128; The structures of the first, second, and third convolutional blocks are the same, except for the number of convolutional kernels.
[0061] For the first convolutional block, Conv Block-N, where N is 32, there are 32 convolutional kernels, and each convolutional kernel has a size of 8x1; For the second convolutional block, Conv Block-N, where N is 64, there are 64 convolutional kernels, and each convolutional kernel has a size of 8x1; For the third convolutional block, Conv Block-N, where N is 128, there are 128 convolutional kernels, and each convolutional kernel has a size of 8x1.
[0062] The structure of each convolutional block is as follows: "8x1Conv, N" represents N convolutional kernels with a size of 8x1 in length. The convolution operation is used to extract local features of the input data; N is 32, 64, or 128; Batch Norm represents batch normalization processing, which performs batch normalization on the output after the convolution operation. Batch normalization can accelerate the training process and improve the stability of the model; ReLU represents the activation function of neurons, which introduces non-linearity by setting all negative values to zero and retaining positive values; MaxPool represents max pooling, which downsamples the features activated by ReLU to reduce the spatial size of the features; The pooling operation reduces the computational complexity while retaining important feature information; Dropout is an operation to randomly inactivate neurons, randomly discarding the outputs of some neurons during the training process; Dropout is used to prevent overfitting and improve the generalization ability of the model.
[0063] Each unlabeled strongly augmented sample or weakly augmented sample is input into the first convolutional block, passes through the second and third convolutional blocks, and finally outputs an embedded feature vector or .
[0064] The self-supervised encoder provides a high-quality embedded feature vector representation for subsequent cross-sample time prediction and context contrast learning, which is the core part of few-shot spectrum sensing. The self-supervised encoder enables the learned representation to maximize the similarity in the embedding space between two strongly and weakly augmented samples (regarded as a positive sample pair) generated from the same sample, while minimizing the similarity between two strongly and weakly augmented samples (regarded as a negative sample pair) generated from different samples.
[0065] (2)Transformer Encoder The Transformer encoder consists of two sub-layer connection structures, as Figure 4 shown.
[0066] The first sub-layer connection structure includes a multi-head self-attention layer and a first addition and layer normalization layer, as well as a first residual connection input to the first addition and layer normalization layer; The second sub-layer connection structure includes a feed-forward fully connected layer and a second addition and layer normalization layer, as well as a second residual connection input from the feed-forward fully connected layer to the second addition and layer normalization layer.
[0067] Based on the embedded feature vector, the corresponding context vector is obtained through the multi-head self-attention mechanism and the feed-forward neural network, including: Based on a randomly selected time step t, the embedded feature vector and are respectively divided into a current slice and a future slice; Randomly initialize a context vector with the same dimension as the current slice; add the context vector to the starting position of the current slice to obtain the current slice with the context vector added and ; After passing the current slice with the context vector added through the multi-head self-attention layer, the self-attention of each head node is obtained; merge all head nodes to get the feature vector and ; Based on and after passing through the first residual connection and the first addition and layer normalization layer, and are obtained; Pass and through the feed-forward network layer to obtain the feature vector and ; Pass and through the second residual connection and the second addition and layer normalization layer to obtain the feature vector and ; From and extracts the starting position of and learns the context vectors of the attention relationships between itself and other elements in , ; obtains the embedded feature vectors and The corresponding context vectors are and .
[0068] Specifically, first randomly select a time step t, and divide into the current slice and the future slice ; divide into the current slice and the future slice .
[0069] Randomly initialize a context vector with the same dimension as the current dimension , and add it to the starting position of the current slice, as follows: ; The number of head nodes in the multi-head self-attention layer is ; exemplarily, is 3; for each head node , ( or ) generates a query matrix , a key matrix and a value matrix through linear transformation: ; wherein, , , are respectively , , 's transformation matrices, and d is the dimension of the input vector ( or ).
[0070] Then calculate the self-attention of ( or ) using Equation (11): ( or ): ; Merge the outputs of all head nodes , and linearly transform back to the original electromagnetic signal dimension to obtain the feature vector ( or ): ; Among them, ( or ) is the output of the multi-head attention layer, is a linear mapping used to transform the vector after concatenating the multi-head outputs back into a matrix of the original electromagnetic signal dimension d.
[0071] After passing through the first residual connection, the first addition, and the layer normalization layer, we get ( or ): ; Among them, ( or ) is the intermediate feature variable of the network output after passing through the first sub-layer connection structure; is the first residual connection. The input of the multi-head self-attention layer is directly added to its output, and then layer normalization is performed on the result of the first residual connection .
[0072] When ( or ) passes through the feed-forward network layer (Feed-Forward Neural NetworkLayer), we get ( and ): ; Among them, , are the weight parameters of the feed-forward network layer respectively, , are the constant biases respectively.
[0073] After passing through the second residual connection, the second addition, and the layer normalization layer again, we get ( and ): ; After training, etc., extract from the output ( and ) to obtain the context vectors corresponding to the embedded feature vectors and are and .
[0074] (3) The first fully connected layer Input the context vector into the first fully connected layer to predict the predicted value of the future slice corresponding to the weakly augmented sample ; and input the context vector based on the weakly augmented sample into the first fully connected layer to predict the predicted value of the future slice corresponding to the strongly augmented sample ; The predicted value and the true value of the future slice of the same pre-trained sample are the first positive sample pair; the predicted value of the future slice of this pre-trained sample and the true value of the future slice of other pre-trained samples in the same training batch are the first negative sample pair; And through parallel FC layers (Fully Connected Layer) to predict the future slice or , The above steps are expressed as follows: ; When performing cross-sample prediction, use the context vector of the strongly augmented sample of the same sample to predict the future slice of the weakly augmented sample, and use the context vector of the weakly augmented sample to predict the future slice of the strongly augmented sample, as shown below: ; Among them, represents the th FC layer, , , are respectively the estimated future slice of the weakly augmented sample and the true future slice of the weakly augmented sample; , are respectively the estimated future slice of the strongly augmented sample and the true future slice of the strongly augmented sample.
[0075] Regard the predicted value and the true value of the future slice of the same sample as the positive sample pair and maximize their similarity. At the same time, regard the predicted value of the future slice of this sample and the true value of the future slice in other sample sets in the same batch as the negative sample pair and minimize their similarity. In the pre-training process of step S22, it is implemented using formulas (19)-(20).
[0076] (4)The second fully connected layer The second fully connected layer projects and into the strongly augmented feature and the weakly augmented feature ; those obtained from the same pre-training sample and are the second positive sample pairs; those obtained from the same pre-training sample and those obtained from other pre-training samples in the same training batch are the second negative sample pairs.
[0077] In the present invention, a context contrast learning task is designed to capture the context information in the signal, enabling the model to understand more complex and abstract relationships in the signal. After obtaining the context features and , the projection layer is then used to obtain its and . The projection layer is a two-layer fully connected layer network. The contexts generated by different augmentation methods of the same sample are regarded as positive sample pairs , and the 2(M - 1) contexts generated by the remaining M - 1 samples in the same batch are regarded as negative samples.
[0078] The context contrast loss is used to maximize the context feature similarity between the strongly augmented sample and the weakly augmented sample of the same sample, and at the same time minimize the context feature similarity between the two augmented samples of different samples; in the pre-training process of step S22, it is achieved through formula (21).
[0079] Step S22: Use the pre-training sample set to pre-train the small-sample spectrum sensing model.
[0080] Pre-training the small-sample spectrum sensing model based on the pre-training sample set includes: Loading the strongly augmented samples and weakly augmented samples in the pre-training sample set into the self-supervised encoder; Pre-training the small-sample spectrum sensing model based on the joint loss function, and continuously adjusting the model parameters through the backpropagation and gradient descent optimization algorithms to maximize the similarity of the first and second positive sample pairs, and minimize the similarity of the first and second negative sample pairs; Until the joint loss function converges or reaches the preset maximum number of iterations, the pre-training ends, and the parameters of the small-sample spectrum sensing model are saved to obtain the pre-trained small-sample spectrum sensing model; wherein, the joint loss function is as follows: ; wherein, is the prediction contrast loss based on for predicting ; is the prediction contrast loss based on for predicting ; is the context contrast loss; 、 are the prediction contrast loss and the context contrast loss weights respectively. 。
[0081] Exemplarily, the preset maximum number of iterations epoch is set to 200 times.
[0082] Through contrastive learning, the quality and effect of data augmentation can be further improved, enabling the model to better learn more stable and robust features from the augmented data.
[0083] Based on prediction the prediction contrast loss is as follows: ; Based on prediction the prediction contrast loss is as follows: ; wherein, is the number of the first fully connected layers, is the set of other samples in the same batch except the current sample; 、 are the embedded feature vectors of other samples in the same batch except the current sample respectively; represents the th fully connected layer of the first fully connected layer, ; are both counters, the index of the current prediction step size; is used to calculate the similarity value between the two; is the exponential function, which is used to map the similarity value to the positive range and convert the similarity value into a comparable positive form for calculating probability; The number of
[0084] The context contrast loss uses the cosine similarity function and the temperature coefficient to maximize the similarity of the second positive sample pair and minimize the similarity of the second negative sample pair, as follows: ; wherein, is the number of samples in each batch, 、 are respectively the Context vectors corresponding to strongly augmented samples and weakly augmented samples and Features projected by the second fully connected layer; Weakly augmented samples of other pre-trained samples in the same training batch; Is the cosine similarity function; Is the exponential function; Is the temperature coefficient; Is the sum of similarities of all second negative sample pairs in the same training batch.
[0085] In a training batch with a training batch size of Since each sample has one weakly augmented and one strongly augmented sample, and excluding the current sample, the denominator is .
[0086] Denotes the cosine similarity between vectors and . Is an indicator function that has a value of 1 if and only if , and the smaller the temperature coefficient , the more obvious the similarity difference.
[0087] The function of step S2 is to construct and pre-train a small-sample spectrum sensing model. Through the collaborative work of the self-supervised encoder, Transformer encoder, first and second fully connected layers, and using the prediction contrast loss and context contrast loss functions, the small-sample spectrum sensing model learns discriminative feature representations, laying a foundation for subsequent fine-tuning training and spectrum sensing steps.
[0088] Step S3, specifically.
[0089] The fine-tuning training includes: Loading the parameters of the self-supervised encoder in the pre-trained small-sample spectrum sensing model ; The flattening layer flattens the embedded feature vector into a one-dimensional vector; The fully connected classification layer performs classification calculations on the one-dimensional vector output by the flattening layer to obtain the prediction probabilities of the presence and absence of modulation signals and ; Using the cross-entropy loss function to measure the difference between the prediction probability and the true label until the loss function converges or reaches the preset maximum number of fine-tuning training times to obtain a fine-tuned small-sample spectrum sensing model.
[0090] After the pre-training process of the small-sample spectrum sensing model is completed, load the self-supervised encoder network parameters obtained in the pre-training stage, and use a small number of labeled tags to fine-tune the samples for fine-tuning training, so that the self-supervised encoder model can accurately classify into the categories of the presence of a modulated signal ( ) and the absence of a modulated signal ( ).
[0091] In the fine-tuning, load the self-supervised encoder network parameters obtained in the pre-training stage , these parameters contain the features learned from a large amount of unlabeled data, and perform structural adjustment in the Figure 3 self-supervised encoder structure. After the third convolutional block, add a flatten Flatten layer and a fully connected classification layer (FC layer) one by one for the spectrum sensing classification task, as Figure 5 shown.
[0092] Flatten layer: Flatten the multi-dimensional embedded features (with a dimension of ) of the output of the third convolutional block into a one-dimensional column vector (with a dimension of 2944) to adapt to the input requirements of the fully connected layer.
[0093] Fully connected classification layer (FC layer): FC(2944,2) means that the input has 2944 neurons and the output has 2 neurons, corresponding to and respectively; : The probability that the input sample belongs to (presence of a modulated signal); : The probability that the input sample belongs to (absence of a modulated signal).
[0094] Then use the fine-tuning sample set , is the fine-tuning sample; is the fine-tuning sample label ( means , means ); is the number of fine-tuning samples; The fine-tuning training set includes 208 samples (104 signal samples and 104 noise samples).
[0095] Use the cross-entropy loss function to measure the difference between the model prediction probability and the true label; continue to update the self-supervised encoder network parameters , where and are the self-supervised encoder models in the fine-tuning training stage judged as and probability Indicates the presence of a modulation signal Indicates the absence of a modulation signal and is the sample label. The cross-entropy loss function is as follows ; ; Fine-tuning optimization objective, using a small number of labeled samples to let the self-supervised encoder learn to label. Minimize , and update the self-supervised encoder parameters .
[0096] Fine-tuning training configuration: The optimizer uses Adam or SGD; the learning rate is lower than the pre-training stage (for example, set to 0.0001). The preset maximum number of fine-tuning training times is set to 50 times (epoch = 50).
[0097] Feature reuse in the pre-training stage: The self-supervised encoder in the pre-training stage has learned the essential features of the signal, and only a small number of parameters need to be adjusted during fine-tuning training to adapt to the classification task
[0098] Only 208 labeled samples are required to achieve high classification accuracy, enabling efficient annotation and significantly reducing the annotation cost
[0099] The additional computational load of the flattening layer and the fully-connected classification layer is extremely small, enabling lightweight deployment and suitable for real-time inference on edge devices
[0100] The role of step S3 is to achieve efficient spectrum sensing classification in a small-sample scenario by fine-tuning the pre-trained small-sample spectrum sensing model, combining pre-trained features with supervised learning; using a small number of labeled samples to adapt it to the specific spectrum sensing classification task and improve the classification performance of the model in a small-sample scenario
[0101] Step S4, specifically
[0102] Input the preprocessed real-time acquired electromagnetic signal into the fine-tuned small-sample spectrum sensing model for spectrum sensing, including Load the fine-tuned small-sample spectrum sensing model and dynamically set the decision threshold based on the preset false alarm probability Input the preprocessed real-time acquired electromagnetic signal into the fine-tuned small-sample spectrum sensing model; when the predicted probability value output by the fine-tuned small-sample spectrum sensing model is greater than or equal to the decision threshold, the spectrum sensing result is that there is a modulation signal, otherwise there is no modulation signal
[0103] The preprocessed real-time acquired electromagnetic signal , it is input into the fine-tuned few-shot spectrum sensing model for spectrum sensing to determine whether there is a modulated signal.
[0104] Using the self-supervised encoder parameters obtained after fine-tuning training Perform spectrum sensing, and dynamically set the decision threshold according to the given false alarm probability Among them, the false alarm probability is the probability of judging that there is a modulated signal when there is no modulated signal, that is, the probability of misjudging noise as the existence of a modulated signal. The detection criterion is as follows:
[0105] ; When the output probability value is greater than the set threshold , it is determined that there is a modulated signal, otherwise it is determined that there is no modulated signal. Exemplarily, the threshold
[0106] is set to 0.5 and dynamically adjusted according to the actual scenario requirements . The finally obtained spectrum sensing result is that there is a modulated signal or there is no modulated signal.
[0107] Efficient spectrum sensing, directly outputs the probability through the fine-tuned self-supervised encoding model, quickly judges the signal existence; dynamically sets
[0108] according to the actual needs, balances the detection probability and the false alarm probability; the whole process from the input signal to the judgment result does not require manual intervention, which is suitable for large-scale spectrum monitoring scenarios. The function of step S4 is to use the fine-tuned few-shot spectrum sensing model to perform spectrum sensing on the real-time acquired electromagnetic signal, determine whether there is a modulated signal, and output the spectrum sensing result.
[0109] To sum up, a few-shot spectrum sensing method based on time prediction and context contrast learning according to an embodiment of the present invention has the following beneficial effects:
[0110] 1. The few-shot spectrum sensing algorithm based on time prediction and context contrast learning proposed by the present invention is based on the self-supervised contrast learning strategy, and learns the similarity or difference in the data through positive and negative sample pairs. Only a small amount of labeled sample data is required in the fine-tuning stage, which significantly reduces the dependence on labeled data; solves the problem of the need for a large amount of labeled data in supervised learning in the prior art; 2. The present invention extracts the enhanced representation features of electromagnetic signal data through a self-supervised encoder, and uses cross-sample time prediction contrast learning and context contrast learning to make the representation features more discriminative, that is, to make the positive sample pairs as close as possible in the embedding space, while the negative sample pairs are far away, so as to maintain a high detection probability under a low false alarm probability; 3. Existing traditional spectrum sensing methods rely on prior knowledge such as channel or noise distribution, and there are problems such as the signal-to-noise ratio wall. This invention does not require such prior knowledge. By learning the intrinsic information of a large number of unlabeled electromagnetic signal samples, spectrum sensing is achieved, getting rid of the dependence on prior knowledge; 4. The performance of traditional spectrum sensing algorithms is limited in a low signal-to-noise ratio environment. This invention uses a Transformer encoder to capture the time series dependencies and dynamic changes of signals, combined with context contrast learning, enhancing the model's ability to learn signal features, thus overcoming the limitation of the signal-to-noise ratio wall and improving the spectrum sensing performance in a low signal-to-noise ratio environment; 5. Existing technologies face costs and error risks when obtaining a large number of labeled samples. This invention makes full use of unlabeled data through data augmentation and contrast learning, improving the data utilization efficiency and reducing the data acquisition and annotation costs.
[0111] Those skilled in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disc, a read-only memory, or a random access memory, etc.
[0112] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.
Claims
1. A small sample spectrum sensing method based on time prediction and context contrastive learning, characterized in that: include: Preprocessing the acquired original electromagnetic signal including the modulation signal to obtain a pre-training sample set without labeled labels and a fine-tuning sample set with labeled labels; wherein the labels include the presence of the modulation signal and the absence of the modulation signal; Using the pre-trained sample set to perform time prediction and context comparison pre-training on the small sample spectrum sensing model, to obtain a pre-trained small sample spectrum sensing model; wherein the small sample spectrum sensing model includes a self-supervised encoder, and the self-supervised encoder is used to obtain an embedded feature vector of the input sample; Adding a flattening layer and a fully connected classification layer after the pre-trained self-supervised encoder to obtain a fine-tuning encoder; fine-tuning the fine-tuning encoder using the fine-tuning sample set to obtain a fine-tuned small sample spectrum perception model; The electromagnetic signal to be sensed is preprocessed and then input into the fine-tuned small sample spectrum sensing model to perform spectrum sensing to obtain a spectrum sensing result.
2. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 1 is characterized in that: The original electromagnetic signal including the modulated signal is preprocessed to obtain a pre-training sample set without labeled labels and a fine-tuning sample set with labeled labels, including: Normalizing the electromagnetic signal including the modulation signal to obtain a normalized electromagnetic signal; Obtaining signal samples corresponding to the normalized electromagnetic signal, and generating noise samples having the same number as the signal samples; Dividing the signal samples and corresponding noise samples into pre-training samples and fine-tuning samples; The pre-training samples are respectively subjected to strong enhancement and weak enhancement processing to obtain strong enhancement samples and weak enhancement samples; wherein, The strongly enhanced samples and the weakly enhanced samples constitute a pre-training sample set; the fine-tuning samples and labels constitute a fine-tuning training set.
3. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 2 is characterized in that: The small sample spectrum sensing model also includes a Transformer encoder, a first fully connected layer and a second fully connected layer; wherein, The self-supervised encoder is used to obtain the embedded feature vectors corresponding to the strongly enhanced samples and the weakly enhanced samples; The Transformer encoder is used to obtain a corresponding context vector based on the embedded feature vector through a multi-head self-attention mechanism and a feed-forward neural network; The first fully connected layer is used to obtain a first positive sample pair and a first negative sample pair based on the context vector; The second fully connected layer is used to obtain a second positive sample pair and a second negative sample pair based on the context vector; When training a small sample spectrum sensing model, the prediction contrast loss is used to maximize the similarity of the first positive sample pair and minimize the similarity of the first negative sample pair; and the context contrast loss is used to maximize the similarity of the second positive sample pair and minimize the similarity of the second negative sample pair.
4. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 3 is characterized in that: The self-supervisory encoder includes first, second and third convolution blocks connected in series; obtaining the embedded feature vectors corresponding to the strong enhancement samples and the weak enhancement samples includes: The strong enhancement sample and weakly enhanced samples Input the self-supervised encoder, and After passing through the first, second and third convolution blocks in sequence, they are mapped to the embedding space respectively to obtain the corresponding embedded feature vectors and .
5. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 4 is characterized in that: Based on the embedded feature vector, a corresponding context vector is obtained through a multi-head self-attention mechanism and a feedforward neural network, including: Based on a randomly selected time step t, the embedding feature vector and They are divided into current slices and future slices respectively; Randomly initialize a context vector with the same dimension as the current slice; add the context vector to the starting position of the current slice to obtain the current slice with the context vector added and ; After the current slice with the context vector added passes through the multi-head self-attention layer, the self-attention of each head node is obtained; all head nodes are merged to obtain the feature vector and ; based on and After the first residual connection, the first addition and the layer normalization layer, we get and ; Will and The feature vector is obtained through the feedforward network layer and ; Will and After the second residual connection and the second addition and layer normalization layer, the feature vector is obtained and ;from and The starting position extraction learns itself and , The context vector of the attention relationship of other elements in ; get the embedded feature vector and The corresponding context vectors are and .
6. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 5, characterized in that: The context vector Input the first fully connected layer to predict the predicted value of the future slice corresponding to the weakly enhanced sample ; And the context vector based on the weakly enhanced sample Input the first fully connected layer to predict the predicted value of the future slice corresponding to the strongly enhanced sample ; The predicted value and true value of future slices of the same pre-trained sample are the first positive sample pair; The predicted value of the future slice of the pre-training sample and the true value of the future slice of other pre-training samples in the same training batch are the first negative sample pair; The second fully connected layer and Projection is a strong enhancement feature and weak enhancement features ; The same pre-training sample obtained and is the second positive sample pair; the pre-training sample obtained Compared with other pre-training samples in the same training batch is the second negative sample pair.
7. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 2, characterized in that: Pre-training a small sample spectrum sensing model based on the pre-training sample set includes: Loading the strong enhancement samples and the weak enhancement samples in the pre-training sample set into the self-supervised encoder; Based on the joint loss function, the small sample spectrum sensing model is pre-trained, and the model parameters are continuously adjusted to maximize the similarity between the first and second positive sample pairs and minimize the similarity between the first and second negative sample pairs through back propagation and gradient descent optimization algorithms; Until the joint loss function converges or the pre-training ends when the preset maximum number of iterations is reached, the small sample spectrum sensing model parameters are saved to obtain a pre-trained small sample spectrum sensing model; Among them, the joint loss function ,as follows: ; in, Based on predict The prediction contrast loss of Based on predict The prediction contrast loss of is the context contrast loss; , They are respectively predicted contrast loss and contextual contrast loss The weight of .
8. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 7, characterized in that: based on predict The prediction contrast loss ,as follows: ; based on predict The prediction contrast loss ,as follows: ; in, is the number of the first fully connected layer, is the set of other samples in the same batch except the current sample; , are respectively the embedded feature vectors of other samples in the same batch except the current sample; Represents the first fully connected layer fully connected layers, ; The context contrast loss , using the cosine similarity function and the temperature coefficient to maximize the similarity of the second positive sample pair and minimize the similarity of the second negative sample pair, as follows: ; in, is the number of samples per batch, , Respectively The context vectors corresponding to the strong and weak enhancement samples and Features after projection by the second fully connected layer; It is a weakly enhanced sample of other pre-training samples in the same training batch; is the cosine similarity function; is an exponential function; is the temperature coefficient; is the sum of the similarities of all second negative sample pairs in the same training batch.
9. The small sample spectrum sensing method based on time prediction and context contrast learning according to claim 1, characterized in that: The fine-tuning training comprises: Load the parameters of the self-supervised encoder in the pre-trained small-sample spectrum sensing model ; The flattening layer flattens the embedded feature vector into a one-dimensional vector; The fully connected classification layer classifies the one-dimensional vector output by the flattening layer to obtain the predicted probability of the presence or absence of the modulated signal. and ; The cross entropy loss function is used to measure the difference between the predicted probability and the true label until the loss function converges or reaches the preset maximum number of fine-tuning training times to obtain a fine-tuned small sample spectrum sensing model.
10. The small sample spectrum sensing method based on time prediction and context contrast learning according to any one of claims 1 to 9, characterized in that: The preprocessed electromagnetic signal acquired in real time is input into the fine-tuned small sample spectrum sensing model to perform spectrum sensing, including: Loading the fine-tuned small sample spectrum sensing model, and dynamically setting a decision threshold based on a preset false alarm probability; The preprocessed electromagnetic signal acquired in real time is input into the fine-tuned small sample spectrum sensing model; when the predicted probability value output by the fine-tuned small sample spectrum sensing model is greater than or equal to the decision threshold, the perception result of the spectrum is that a modulated signal exists, otherwise, no modulated signal exists.
Citation Information
Patent Citations
Semi-supervised audio event labeling method based on self-supervised contrast learning
CN112820322A
End-to-end sound barrier speech recognition method based on comparative learning
CN113450777A
Small sample AMC method based on Transform coding network
CN114584440A
Spectrum sensing method based on Transform multi-head attention mechanism network under Alpha noise
CN115694692A
Intelligent spectrum sensing method, system, equipment and medium under non-Gaussian interference in cognitive radio network
CN116318477A
Cited By
Electric energy quality disturbance identification method based on self-supervised contrast learning
CN120372254A
A method for identifying power quality disturbances based on self-supervised contrastive learning
CN120372254B
Contrast learning coagulant addition prediction method based on characteristic disturbance enhancement
CN121034480A