Lightweight spectrum prediction method based on knowledge distillation

By constructing a spectrum prediction method based on knowledge distillation, and utilizing temporal convolutional network self-transfer optimization and knowledge distillation techniques, the problems of insufficient training samples and high complexity of existing spectrum prediction models are solved, and efficient spectrum prediction is achieved under limited resources.

CN116709409BActive Publication Date: 2026-02-27NAT UNIV OF DEFENSE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310808568.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2026-02-27
Estimated Expiration
2043-07-04

AI Technical Summary

Technical Problem

Existing spectrum prediction models are difficult to deploy effectively in practical applications due to the lack of training samples and high complexity, especially when the electromagnetic environment changes.

Method used

A knowledge distillation-based spectrum prediction method is adopted. By constructing a dual-branch neural network, utilizing temporal convolutional network self-transfer optimization and knowledge distillation techniques, the training parameters are reduced, the network structure is optimized, and a spectrum prediction model based on the knowledge distillation strategy is built.

Benefits of technology

While ensuring prediction performance, the model complexity is reduced, and the computation speed and applicability are improved, making it suitable for prediction of small amounts of spectrum data in practical communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116709409B_ABST
    Figure CN116709409B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electromagnetic spectrum management, more particularly to a light spectrum prediction method based on knowledge distillation, comprising the following steps: S1, pre-processing the received spectrum data; S2, determining the step of input data according to the time domain autocorrelation of the collected spectrum data; S3, constructing a spectrum prediction network model based on a knowledge distillation strategy; S4, training the spectrum prediction network model using training set data; S5, determining whether the training is completed; if yes, inputting the training set data into the trained spectrum prediction network model, obtaining the output of the prediction result and ending the training process; if no, returning to S4 after adding one to the iteration number of the training. The present application introduces knowledge in the technical field of knowledge distillation, overcomes the model complexity of traditional deep learning networks, and has good applicability in small sample cases.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electromagnetic spectrum management, more particularly, to a light spectrum prediction method based on knowledge distillation. BACKGROUND

[0002] Spectrum prediction technology is considered an effective technology to supplement spectrum sensing. Usually, based on the analysis of characteristic parameters of idle spectrum and usage rules of licensed users, secondary users (SU) select the optimal usage strategy to switch secondary users to appropriate idle spectrum for data transmission in time, reduce communication delay, and thus improve channel throughput.

[0003] Spectrum prediction technology is still in the development stage, but some achievements have been made, such as moving average autoregressive model, hidden Markov model, minimum Bayesian risk, multilayer perception, recurrent neural network, and convolutional long short-term memory neural network.

[0004] The Chinese patent document with publication number CN113840297A discloses a spectrum prediction method based on a radio frequency machine learning model driven. The implementation steps are: spectrum data acquisition; spectrum data preprocessing; determining the input data step according to the Akaike information criterion for the model, thereby determining the input data step; expanding the linear combination structure of the autoregressive model into a multi-layer network; adding new trainable parameters in the network to construct a spectrum prediction framework based on a radio frequency machine learning model driven; training the network model using training data; determining whether the network training is complete; inputting test set data into the network; and outputting the prediction result.

[0005] However, most of the existing research assumes that the training samples are ideal and complete. In actual application, when the cognitive radio (CR) device frequently switches the target frequency or the electromagnetic environment changes, the relative lack of expected historical data makes it difficult to ensure the good performance of the model.

[0006] When addressing the problem of spectrum prediction based on deep learning, the high complexity of existing models is another focus of widespread concern. Due to limited storage and computing resources, complex models are often difficult to implement in actual deployment, which puts higher requirements on the size of the model. SUMMARY

[0007] To overcome the above-mentioned shortcomings, the present application aims to provide a spectrum prediction method, system, device and storage medium based on knowledge distillation.

[0008] The present application provides the following technical solutions:

[0009] In a first aspect, the present application provides a spectrum prediction method based on knowledge distillation, comprising the following steps:

[0010] S1, preprocessing the received spectrum data;

[0011] S2, determining the step size of the input data according to the time domain autocorrelation of the collected spectrum data;

[0012] S3, constructing a spectrum prediction network model based on a knowledge distillation strategy;

[0013] S4, training the spectrum prediction network model using the training set data;

[0014] S5, determining whether the training is completed; if yes, inputting the training set data into the trained spectrum prediction network model, obtaining the output of the prediction result and ending the training process; if no, adding one to the iteration number of the training and returning to S4.

[0015] As an optional implementation of the first aspect, preprocessing the received spectrum data includes the following steps:

[0016] S1.1, according to the received spectrum data, converting the power spectrum density value of the collected signal into a power value that can be weighted averaged;

[0017] S1.2, taking H consecutive data in the time dimension for weighted average to obtain the final spectrum data.

[0018] Further, in S1.1, the power spectrum density value of the collected signal is converted into a power value that can be weighted averaged by using the following formula:

[0019] ;

[0020] In S1.2, let H be 100, and the final spectrum data is calculated by using the following formula:

[0021] .

[0022] As an optional implementation of the first aspect, in S2, the autocorrelation coefficient of the spectrum signal is calculated by using the following formula:

[0023] ,

[0024] wherein, represents the spectrum data at time t, represents the covariance, represents the sample standard deviation;

[0025] The autocorrelation coefficient greater than 0.8 corresponding to the sliding window size is selected as the step size c of the input data.

[0026] Further, when the adaptive model makes time series prediction, the spectral data is divided using a sliding window with a length of c+1, and the first c data are taken as input data, and the (c+1)th data are taken as data to be predicted. wherein T is the total length of the spectral data.

[0027] As an optional implementation of the first aspect, in S3, a self-migration optimization of the time convolution network is taken as a teacher model, a double-branch neural network is constructed as a student model, and a spectral prediction network model based on a knowledge distillation strategy is constructed according to the teacher model and the student model.

[0028] Further, the method of taking the self-migration optimization of the time convolution network as the teacher model is as follows: the time convolution network is pre-trained using the collected spectral data to obtain a time convolution network with high accuracy but large parameter quantity; and a part of layers of the time convolution network is frozen as a network to be trained, and the network layers that are not frozen are trained again.

[0029] Further, the method of constructing the double-branch neural network as the student model by combining the encoder structure is as follows:

[0030] The double-branch neural network is constructed by constructing an encoding-reconstruction branch and an encoding-prediction branch Each branch has a corresponding loss function, and the optimized network parameters are obtained by minimizing the loss function;

[0031] The loss function calculation formula of the encoding-reconstruction branch is as follows:

[0032] ,

[0033] wherein is the parameter of the encoder, is the parameter of the reconstructor, is the intermediate layer feature output of the teacher network, is the true value label, is the final output of the encoding-reconstruction branch.

[0034] The loss function calculation formula of the encoding-prediction branch is as follows:

[0035] ,

[0036] wherein is the parameter of the encoder, ​​​​​​The predictor parameter is for predicting, The real spectrum value is for predicting, The future spectrum value is for predicting.

[0037] Further, the method for constructing the spectrum prediction network model based on the knowledge distillation strategy according to the teacher model and the student model is:

[0038] The soft target loss function is constructed to reduce the difference between the outputs of the student model and the teacher model, and the calculation formula of the soft target loss is:

[0039] ,

[0040] Among them, The teacher model is for predicting, The soft target is the output result of the teacher model, The student model is for predicting, The prediction result of the intermediate layer output of the time convolution network as the input of the student model is for predicting;

[0041] The hard target loss function is constructed to reduce the difference between the student model and the real value, and the calculation formula of the hard target loss is:

[0042] .

[0043] Further, in S4, the method for training the spectrum prediction network model using the training set data is: randomly initializing the trainable parameters of the double-branch neural network; setting the iteration number and the learning rate, and taking the RMSprop optimization algorithm as the network training optimizer; setting the value of the iteration number epoch to 1; inputting the training data in batches into the spectrum prediction network model for training, and performing back propagation on the training error of each batch to optimize the network parameters; the error loss adopts the target loss function constructed as follows:

[0044] ,

[0045] Among them, The coefficient is used to adjust the balance weight between the hard target loss and the soft target loss;

[0046] When all the data in the training data are back propagated, the value of epoch is set to epoch+1, and the back propagation is continued until the value of epoch reaches the maximum iteration number.

[0047] In a second aspect, the present application provides a spectrum prediction system based on knowledge distillation, which comprises a fusion center, a processing module and a prediction module; wherein the processing module is used for pre-processing the spectrum data received by the fusion center, and determining the step length of the input data according to the time domain autocorrelation of the collected spectrum data;

[0048] The prediction module is used to construct a spectrum prediction network model based on a knowledge distillation strategy, train the spectrum prediction network model using training set data, and determine whether the training is complete. If so, the training set data is input into the trained spectrum prediction network model to obtain the prediction result output and end the training process. If not, the number of training iterations is incremented by one, and then the spectrum prediction network model is trained again using the training set data.

[0049] Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements a knowledge distillation-based spectrum prediction method as described in the first aspect or any embodiment of the first aspect.

[0050] Fourthly, the present invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the knowledge distillation-based spectrum prediction method as described in the first aspect or any embodiment of the first aspect.

[0051] Compared with the prior art, the technical solution provided by this invention has the following advantages:

[0052] First, this invention introduces knowledge distillation technology into the field of spectrum prediction. Compared with traditional deep learning frameworks, it can reduce the number of training parameters and improve the model's computation speed while ensuring the model's prediction performance.

[0053] Second, this invention employs self-transfer technology to optimize the parameters of the temporal convolutional network. By freezing certain layers of the network and updating only some weights, it avoids the problem of hidden layer information retention caused by a high hole factor. A dual-branch neural network model is constructed, using the low-dimensional representation of the data for both encoding reconstruction and encoding prediction. By utilizing the inherent representation of the data, the proposed model achieves more efficient prediction.

[0054] Third, compared to models trained with large-scale data, this invention does not require the ideal assumption of sufficient training data. By using knowledge distillation techniques, the model can be adapted to a small amount of spectrum data and can be applied to future practical communication systems. Attached Figure Description

[0055] Figure 1 This is a flowchart of a spectrum prediction method based on knowledge distillation in one embodiment of the present invention;

[0056] Figure 2 This is a diagram of the predictive network framework of the present invention;

[0057] Figure 3 This is a comparison diagram of the self-transfer optimization method of the present invention and other existing spectrum prediction methods;

[0058] Figure 4 A comparison chart of training convergence speed of the spectrum prediction method of the present application and other existing spectrum prediction methods;

[0059] Figure 5 A comparison chart of prediction curves of the spectrum prediction method of the present application and other existing spectrum prediction methods. DETAILED DESCRIPTION

[0060] For a further understanding of the present application, reference will be made to the following detailed description taken in conjunction with the accompanying drawings and examples.

[0061] The structures, proportions, sizes, etc. shown in the drawings of the present specification are merely used to cooperate with the content disclosed in the present specification, to be understood and read by those skilled in the art, and are not used to limit the defined conditions under which the present application can be implemented, and therefore do not have substantial technical significance. Any modification of the structure, change of the proportional relationship, or adjustment of the size, without affecting the effects that can be produced by the present application and the purposes that can be achieved, should still fall within the scope of the technical content disclosed by the present application. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and the like used in the present specification are merely for the convenience of clear understanding of the description, and are not used to limit the scope of implementation, and the change or adjustment of the relative relationship, without substantially changing the technical content, is also considered as the scope of implementation of the present application.

[0062] Example 1

[0063] As shown in Figure 1 , a spectrum prediction method based on knowledge distillation includes the following steps:

[0064] S1, pre-processing the received spectrum data;

[0065] S2, determining the step size of the input data according to the time domain autocorrelation of the collected spectrum data;

[0066] S3, constructing a spectrum prediction network model based on a knowledge distillation strategy;

[0067] S4, training the spectrum prediction network model using the training set data;

[0068] S5, determining whether the training is completed; if yes, inputting the training set data into the spectrum prediction network model after the training is completed, obtaining the output of the prediction result and ending the training process; if no, returning to S4 after increasing the iteration number by one.

[0069] The application introduces knowledge distillation technology field knowledge, overcomes the model complexity defect of a traditional deep learning network, has good applicability under a small sample condition, the network structure is simple, the trainable parameters are few, the network training speed is accelerated, and the network structure can be applied to actual deployment in a communication scene; compared with a traditional deep learning network model, the spectrum prediction performance is improved.

[0070] Embodiment two

[0071] In this embodiment, a typical centralized cognitive radio network (CR) is composed of one fusion center (FC) and K sparsely distributed secondary users (SU). The secondary users continuously detect N frequency points, and send the received signal strength (RSS) to the fusion center, and the fusion center processes the collected data to obtain N frequency point data .

[0072] For the obtained spectrum data, the following steps are performed for pretreatment:

[0073] S1.1, according to the received spectrum data, converting the power spectrum density value of the collected signal into a power value that can be weighted and averaged;

[0074] S1.2, taking H data in the time dimension to be continuously weighted and averaged, and calculating to obtain the final spectrum data.

[0075] Further, in step S1.1, the power spectrum density value of the collected signal is converted into a power value that can be weighted and averaged by using the following formula:

[0076] ;

[0077] In step S1.2, let H be 100, that is, take 100 data in the time dimension to be continuously weighted and averaged, and calculate to obtain the final spectrum data by using the following formula:

[0078] .

[0079] For a deep neural network structure, although a deeper network can further extract features, it will inevitably cause the problem of gradient disappearance or gradient explosion. Therefore, after the weighted average of the data is completed, the input data is subjected to an initial normalization operation.

[0080] Embodiment three

[0081] The autocorrelation coefficient refers to the correlation degree between variables at different time points. If the autocorrelation coefficient is greater than 0, it means that the value observed at this time point may be observed at a later time point. Therefore, the greater the autocorrelation coefficient, the greater the correlation between sequences, meaning that it is more likely to make spectrum prediction through historical time slot spectrum data. Therefore, in this embodiment, the autocorrelation coefficient of the spectrum signal is calculated in step S2 using the following formula:

[0082]

[0083] wherein, represents the spectrum data at time t, represents the covariance, represents the sample standard deviation;

[0084] The autocorrelation coefficient gradually decreases with the lag time step. In order to balance the calculation cost and the prediction effect, we choose the sliding window size corresponding to the autocorrelation coefficient greater than 0.8 as the step length c of the input data, where c can be 20.

[0085] Further, in order to adapt the model to time series prediction, the spectrum data is divided using a sliding window with a length of c+1, the first c data are used as input data, and the data is used as predicted data , then the data of the nth frequency point is transformed into , wherein , and T is the total length of the spectrum data .

[0086] Embodiment Four

[0087] In this embodiment, the self-transfer optimization of the time convolution network is used as the teacher model in step S3, a double-branch neural network is constructed as the student model, and a spectrum prediction network model based on the knowledge distillation strategy is constructed according to the teacher model and the student model.

[0088] Specifically, the method of using the self-transfer optimization of the time convolution network as the teacher model is: using the collected spectrum data to pre-train the time convolution network to obtain a time convolution network with high accuracy but large parameter quantity; freezing part of the layers of the time convolution network as a network to be trained, and training the layers that are not frozen again.

[0089] The method of constructing a double-branch neural network as a student model by combining an encoder structure is: in order to more fully extract the spectrum data features, a double-branch neural network is constructed in this paper. The network consists of two branches, an encoding-reconstruction branch and an encoding-prediction branch ​The encoding-reconstruction branch and the encoding-prediction branch Each branch has a corresponding loss function, and the optimized network parameters are obtained by minimizing the loss function.

[0090] The encoding-reconstruction branch compresses the data into an encoded form and then reconstructs it into an output close to the original data through the decoder, allowing the model to learn the low-dimensional representation of the data. The loss function calculation formula of the encoding-reconstruction branch is:

[0091] ,

[0092] where, is the parameter of the encoder, is the parameter of the reconstructor, is the intermediate layer feature output of the teacher network, is the true value label, is the final output of the encoding-reconstruction branch.

[0093] The encoding-prediction branch shares the encoder of the encoding-reconstruction branch and predicts the output value. This branch receives data and predicts future spectrum values The loss function calculation formula of the encoding-prediction branch is:

[0094] ,

[0095] where, is the parameter of the encoder, is the parameter of the predictor, is the true spectrum value, is the predicted future spectrum value.

[0096] The encoding-reconstruction branch can help the model learn the intrinsic representation of the data and reduce the noise and redundancy of the input data. By sharing the encoder output, the reconstructor and the predictor can simultaneously use the low-dimensional representation of the data, thereby improving the training efficiency and generalization performance of the model.

[0097] As shown in Figure 2 , the framework mainly includes: a soft target loss for measuring the difference between the output of the student model and the output of the teacher model, aiming to retain the knowledge of the teacher model. The output of the teacher model is referred to as a soft label, which is used as the target variable of the student model.

[0098] The soft target loss function is constructed to reduce the difference between the output of the student model and the output of the teacher model. The soft target loss calculation formula is:

[0099] ,

[0100] where, is a teacher model, is a soft target, which is the output of the teacher model, is a student model, is a prediction result of the output of the intermediate layer of the time convolution network as the input of the student model.

[0101] The hard target loss is used to measure the difference between the output of the student model and the real label, aiming to improve the prediction accuracy of the student model. The real data is called a hard label as the target variable of the student model.

[0102] The hard target loss function is constructed to reduce the difference between the student model and the real value, and the calculation formula of the hard target loss is:

[0103] .

[0104] In step S4, the method for training the spectrum prediction network model using the training set data is: randomly initializing the trainable parameters of the double-branch neural network; setting the number of iterations and the learning rate, and using the RMSprop optimization algorithm as the network training optimizer; and setting the value of the number of iterations epoch to 1. Then the training data is input into the spectrum prediction network model in batches, and the training error of each batch is back propagated to optimize the network parameters; the error loss adopts the constructed target loss function, and the calculation is as follows:

[0105] ,

[0106] wherein, is a coefficient for adjusting the balance weight between the hard target loss and the soft target loss;

[0107] When all the data in the training data are back propagated, epoch=epoch+1, and the back propagation is continued until the epoch reaches the maximum number of iterations. Finally, the test set data is input into the network, and the prediction result is output.

[0108] The effect of the present application is further illustrated by simulation experiments.

[0109] The simulation experiment of the present application is carried out on a simulation platform of python3.7 and TensorFlow2.3.0. The CPU model of the computer is Ryzen R7-6800H, and the independent graphics card model is NVIDIA DeForce RTX2050.

[0110] The input step of the network is determined to be 20 by calculating the autocorrelation coefficient of the spectrum data. The maximum number of iterations of the network is 50, the learning rate is 0.01, the RMSprop optimization algorithm is selected as the network training optimizer, and the data amount of each batch is 12.

[0111] Figure 6 is a comparison chart of the prediction effect of the self-migration teacher model of the present application and the prior art in the root mean square error. The time convolution network (TCN) is set to have a hollow factor of 2, and the network structure includes an input layer, a one-dimensional convolution layer, five residual blocks, a full connection layer, and a final regression output layer. Each one-dimensional convolution layer is assigned 64 convolution kernels, the convolution kernel size is set to 3, and the spatial loss layer loss factor is 0.05. The RMSprop optimizer is selected for back propagation. After multiple experiments, it is found that the TCN model with the first 27 layers frozen has the smallest RMSE value, so this model is selected as the teacher model of the present application. Figure 3

[0112] Figure 3 The horizontal coordinate is different network models, and the vertical coordinate represents the predicted root mean square error. As can be seen from the figure, the method proposed in the present application has certain performance improvement compared with the original TCN network, and the evaluation indexes RMSE and MAE are improved by 5.8% and 4.2% respectively. At the same time, it can also be found that the TCN network has obvious advantages in processing spectrum data prediction problems, and the optimized TCN reduces the RMSE by 19.5% and 18.8% compared with the long short-term memory neural network (LSTM) and CNN-LSTM respectively. The method proposed in the present application also reduces the MAE by 14.6% compared with the LSTM. This shows that the method proposed in the present application is more suitable for processing spectrum prediction problems, and the TCN network model based on self-migration can further improve the network prediction accuracy.

[0113] Table 1 and Table 2 are the root mean square error and mean absolute error error comparison charts of the knowledge distillation spectrum prediction of the present application and the prior art in different frequency bands. As can be seen from the table, compared with other algorithms, the algorithm proposed in the present application significantly reduces the number of training parameters, with a maximum reduction of 133,132 parameters and a minimum reduction of 22,200 parameters. Compared with the double-branch neural network, the model only increases 2816 training parameters, but the prediction performance is significantly improved. We found that the double-branch neural network proposed has relatively low RMSE, but is higher in MAE. The most likely reason is that there are extreme outliers between the predicted value and the actual value, because MAE is more sensitive to outliers. However, when we add the knowledge distillation technology, i.e. the method proposed in the present application, the model has higher accuracy and more stable performance. Although TCN-KD is not as good as the teacher model TCN in prediction effect, the prediction error is not much different and the number of parameters is significantly reduced. Compared with other networks in the table, TCN-KD has lower prediction error, indicating that the use of knowledge distillation technology can help TCN-KD to improve the prediction performance of the model while maintaining the simplicity of the model.

[0114] Table 1 Comparison of RMSE in each frequency band ​​

[0115]

[0116] Table 2 Comparison of MAE in different frequency bands

[0117]

[0118] Appendix Figure 4 This is a comparison chart of network training speed using the present invention and existing technologies. Figure 4 The horizontal axis represents the number of training epochs, and the vertical axis represents the loss function value. The straight line marked with 'x' represents the convergence curve of the method described in this invention; the straight line marked with a diamond represents the training convergence curve of CNN-LSTM; the straight line marked with an asterisk (*) represents the training convergence curve of gated recurrent units; and the straight line marked with a rectangle represents the training convergence curve of Long Short-Term Memory (LSTM) neural networks. By comparing the training speed convergence curves of these four methods under small sample conditions, it can be seen that the training speed of this invention is significantly faster than other algorithms. The method described in this invention converges in only about 10 training epochs, while LSTM neural networks require 16 epochs to converge.

[0119] Appendix Figure 5 This is a graph showing the prediction results of using the present invention and existing technologies in a small sample situation. Figure 5 The horizontal axis represents the time slot, and the vertical axis represents the power spectral density value. Due to significant data fluctuations, we only present the actual values, the gated loop unit, and the algorithm proposed in this invention. We can observe that, with the help of knowledge distillation, the algorithm proposed in this invention can capture more complex new boundaries in the spectral data and better match the actual data fluctuations, while the gated loop unit exhibits significant errors.

[0120] This application also proposes a spectrum prediction system based on knowledge distillation, including a fusion center, a processing module, and a prediction module. The processing module preprocesses the spectrum data received by the fusion center and determines the step size of the input data based on the temporal autocorrelation of the acquired spectrum data. The prediction module constructs a spectrum prediction network model based on a knowledge distillation strategy, trains the spectrum prediction network model using training set data, and determines whether training is complete. If so, the training set data is input into the trained spectrum prediction network model to obtain the prediction result output and end the training process. If not, the number of training iterations is incremented by one, and the spectrum prediction network model is trained again using the training set data.

[0121] This application also proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the knowledge distillation-based spectrum prediction method described in the above embodiments.

[0122] The application further provides a computer storage medium, the computer storage medium storing a computer program, and the computer program is executed by a processor to realize the knowledge distillation-based spectrum prediction method in the above embodiment.

[0123] The above describes the application and its embodiments in a schematic manner, and the description is not restrictive, and the embodiments shown in the drawings are only one of the embodiments of the application, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by the above, without departing from the purpose of the application, similar structure modes and embodiments can be designed without creativity, and all of them should belong to the protection scope of the application.

Claims

1. A method for spectrum prediction based on knowledge distillation, characterized in that, The method comprises the following steps: S1, preprocessing the received spectrum data; S2, determining the step size of the input data according to the time domain autocorrelation of the collected spectrum data; S3, constructing a spectrum prediction network model based on a knowledge distillation strategy; S4, training the spectrum prediction network model using training set data; S5, determining whether the training is completed; if yes, inputting the training set data into the trained spectrum prediction network model, obtaining the output of the prediction result and ending the training process; if no, returning to S4 after increasing the iteration number by one; In S2, the autocorrelation coefficient of the spectrum signal is calculated using the following formula: , wherein, represents the spectral data at time t, represents the covariance, represents the sample standard deviation; The sliding window size corresponding to the autocorrelation coefficient greater than 0.8 is selected as the step size c of the input data; When the adaptive model performs time series prediction, a sliding window of length c+1 is used to process the spectral data. Divide the data into the first c data. As input data, the first One data point is used as the data to be predicted. Then the data at the nth frequency point is transformed as follows: ,in T represents the spectrum data. Total length; In S3, the time convolution network is self-migrated and optimized as a teacher model, a double-branch neural network is constructed as a student model, and a spectrum prediction network model based on a knowledge distillation strategy is constructed according to the teacher model and the student model; The method of self-migrating and optimizing the time convolution network as a teacher model is: pre-training the time convolution network with the collected spectrum data to obtain a time convolution network with high accuracy but large parameter quantity; freezing part of the layers of the time convolution network as a network to be trained, and training the network layers that are not frozen again; The method of constructing a double-branch neural network as a student model by combining an encoder structure is: by constructing an encoding-reconstruction branch and an encoding-prediction branch composing a double-branch neural network, each branch has a corresponding loss function, and the optimized network parameters are obtained by minimizing the loss function The loss function calculation formula of the encoding-reconstruction branch is: , wherein, are parameters of the encoder, are the reconstructor parameters of, are the intermediate layer feature outputs of the teacher network, are the ground truth labels, is the final output of the encoding-reconstruction branch; The loss function calculation formula of the encoding-prediction branch is: , wherein, is a parameter of the encoder, is a predictor parameter of the, is a real spectral value, is a predicted future spectral value; The method of constructing a spectrum prediction network model based on a knowledge distillation strategy according to the teacher model and the student model is: A soft target loss function is constructed to reduce the difference between the student model and the teacher model output, and the soft target loss calculation formula is: , wherein, is the teacher model, is the soft target is the output of the teacher model, is the student model, is the prediction result of the intermediate layer output of the temporal convolution network as the input of the student model; A hard target loss function is constructed to reduce the difference between the student model and the true value, and the hard target loss calculation formula is: ; In S4, the method of training the spectrum prediction network model using training set data is: randomly initializing the trainable parameters of the double-branch neural network; setting the iteration number and learning rate, and using the RMSprop optimization algorithm as the network training optimizer; setting the value of the iteration number epoch to 1; inputting the training data in batches into the spectrum prediction network model for training, and performing back propagation on each batch of training errors to optimize the network parameters; the error loss adopts the target loss function constructed, and the calculation is as follows: , wherein, is a coefficient for adjusting the balance weight between the hard target loss and the soft target loss; When all the data in the training data are back propagated, epoch=epoch+1, and the back propagation is continued until the epoch reaches the maximum iteration number.

2. The knowledge distillation based spectrum prediction method of claim 1, wherein, The preprocessing of the received spectrum data comprises the following steps: S1.1, converting the power spectral density value of the collected signal into a power value that can be weighted and averaged according to the received spectrum data; S1.2, taking H consecutive data in the time dimension for weighted average to obtain the final spectrum data.

3. The knowledge distillation based spectrum prediction method of claim 2, wherein, In S1.1, the power spectral density value of the collected signal is converted into a power value that can be weighted and averaged using the following formula: ; In S1.2, let H be 100, and the final spectrum data is calculated by the following formula: 。 4. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor implements the knowledge distillation-based spectrum prediction method in any one of claims 1-3 when the computer program is executed.

5. A computer storage medium, the storage medium having stored thereon a computer program, the computer program comprising: The computer program is executed by the processor to implement the knowledge distillation-based spectrum prediction method in any one of claims 1-3.

Citation Information

Patent Citations

  • Frequency spectrum prediction method based on radio frequency machine learning model driving

    CN113840297A