Intelligent spectrum prediction method, system and device based on adaptive graph structure and medium
By adopting an adaptive graph structure method in spectrum prediction technology, combining graph convolutional neural networks and bidirectional long and short-term memory neural networks, the problems of single-step prediction and single-dimensional consideration in the existing technology are solved, and more accurate prediction of future multi-step spectrum states are achieved, and the performance and applicability of spectrum prediction are improved.
Patent Information
- Application Number
- CN202510250810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-06
AI Technical Summary
The existing spectrum prediction technology mainly focuses on single-step prediction, and cannot obtain rich information on more time slots in the future. Most of them are considered in a single dimension in the time domain, so the potential correlation and usage rules between data are not fully mined.
Using a spectrum intelligent prediction method based on adaptive graph structure, a fixed graph structure is constructed by performing correlation analysis on the spectrum data, and an adaptive graph learning method is used to build an adaptive graph structure. The two are combined, and the frequency domain correlation of spectrum data is extracted using graph convolutional neural networks, and the time domain correlation of spectrum data is extracted using bidirectional long and short-term memory neural networks to achieve multi-step prediction of future spectrum states.
It improves the accuracy and generalization ability of spectrum prediction, can predict future multi-step spectrum states more accurately, and has a wider application range.
Smart Images

Figure CN120110573A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of spectrum prediction in cognitive radio technology, and in particular relates to a spectrum intelligent prediction method, system, device and medium based on an adaptive graph structure. Background Art
[0002] Spectrum occupancy state prediction technology mainly summarizes the relevance and usage rules of the spectrum through historical spectrum information, so as to make reasonable predictions on the spectrum occupancy state in the upcoming time slot, so as to obtain channel usage information in advance. As an important supplement to cognitive radio technology, spectrum prediction technology can effectively make up for its limitations. By optimizing the process of spectrum sensing, spectrum decision-making, spectrum switching and spectrum sharing, it can improve the system throughput, reduce unnecessary energy loss and delay, and ultimately promote more efficient use of spectrum resources. Therefore, spectrum prediction technology plays a vital role in improving the overall performance of cognitive radio networks.
[0003] At present, many spectrum prediction technologies have been proposed, which are mainly divided into traditional spectrum prediction technologies and spectrum prediction technologies based on deep learning. Traditional spectrum prediction technologies include those based on regression analysis, hidden Markov model, support vector machine, etc. For example, there are prediction methods based on autoregression (Z. Wen, T. Luo, W. Xiang, et al. Autoregressive Spectrum Hole Prediction Model for Cognitive Radio Systems [C]. IEEE International Conference on Communications Workshops, 2008: 154-157.), and methods based on the combination of autoregression and sliding average (Wang Z, Salous S. Spectrum occupancy statistics and timeseries models for cognitive radio [J]. Journal of signal processing systems, 2011, 62 (2): 145-155.). However, the methods based on regression analysis are limited to solving linear problems and are more suitable for single-step prediction. They have poor performance for multi-step prediction. Therefore, people have turned their attention to hidden Markov models, such as hidden Markov model prediction methods based on Bayesian inference (Xing X, Jing T, Huo Y, et al. Channel quality prediction based on Bayesian inference in cognitive radio networks [C]. 2013 Proceedings IEEE INFOCOM, 2013: 1465-1473.), Hidden Markov Model Prediction Algorithm Based on Density Clustering[J]. Journal of Computer Applications, 2018, 45(9): 129-134.), Hidden Markov Model Prediction Algorithm Based on Generalized Bernoulli Model(Eltom H, Kandeepan S. Performance Analysis of HMM-Based Hard Fusion Cooperative Spectrum Prediction[C].2022RIVFInternational Conference on Computing and Communication Technologies(RIVF),HoChi Minh City,Vietnam,2022:283-288.), prediction method based on support vector machine (Elias FGM,Fernández EMG,Reguera V A.Multi-step-ahead Spectrum Prediction forCognitive Radio in Fading Scenarios[J].Journal of Microwaves,Optoelectronicsand Electromagnetic Applications,2020,19(4):457-484.). .
[0004] Traditional spectrum prediction methods usually rely on complex algorithm design and require a lot of resources and time. With the emergence of deep learning, especially neural networks, they have shown excellent performance in the classification and prediction of complex systems. Since it does not require prior knowledge and has obvious advantages in solving nonlinear problems, researchers have gradually applied it to spectrum prediction technology. Such as the prediction method based on multi-layer perceptron (VK Tumuluru, P. Wang and D. Niyato. A Neural Network Based Spectrum Prediction Scheme for Cognitive Radio [C]. 2010 IEEE International Conference on Communications, 2010: 1-5.), the prediction method based on CNN (Yu L, Chen J, Zhang Y, et al. Deep spectrum prediction in high frequency communication based on temporal-spectral residual network [J]. China Communications, 2018, 15 (9): 25-34.), the prediction method based on LSTM (Hernández, Johana, López, Danilo, N. Vera. Primary user characterization for cognitive radio wireless networks using long short-term memory [J]. International Journal of Distributed Sensor Networks, 2018, 14 (11).), and the prediction method based on CNN-LSTM (Zhang L and Jia M. Accurate Spectrum Prediction Based on Joint LSTM with CNN toward SpectrumSharing[C].2021IEEE Global Communications Conference(GLOBECOM),Madrid,Spain,2021:1-6.),
[0005] Existing spectrum prediction methods mainly focus on the prediction of a single dimension and a single time slot, that is, only predicting the spectrum occupancy status at the next moment based on the historical spectrum data of a certain frequency band. Only a few studies involve multi-step prediction algorithms, which greatly limits the performance of spectrum prediction. Therefore, it is possible to consider combining data from multiple frequency bands for multi-step prediction and improve the spectrum prediction performance by designing a spectrum intelligent prediction method based on an adaptive graph structure.
[0006] Through the above analysis, the problems and defects of the prior art are as follows:
[0007] (1) Most existing spectrum prediction technologies are based on single-step prediction and cannot obtain rich information about more future time slots.
[0008] (2) Most existing spectrum prediction technologies consider a single dimension in the time domain. Models should be established from multiple dimensions to explore the potential correlations and usage patterns between data and realize future spectrum prediction. Summary of the invention
[0009] In order to overcome the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a spectrum intelligent prediction method, system, device and medium based on an adaptive graph structure, by constructing a fixed graph structure through correlation analysis of spectrum data, and using an adaptive graph learning method to construct an adaptive graph structure, combining these two graph structures to obtain the final graph structure, using a graph convolutional neural network to extract the frequency domain correlation of spectrum data and using a bidirectional long short-term memory neural network to extract the time domain correlation of spectrum data, modeling the correlation of spectrum data in the frequency domain and time domain, and realizing multi-step prediction of future spectrum status; having stronger generalization ability and a wider range of applications.
[0010] In order to achieve the above object, the technical solution adopted by the present invention is:
[0011] A spectrum intelligent prediction method based on an adaptive graph structure, the specific steps include:
[0012] Step 1: Use queuing theory to construct spectrum occupancy data and divide the data into training set and test set;
[0013] Step 2: Perform correlation analysis on the training set data to obtain correlation coefficients, thereby constructing an adjacency matrix based on correlation, and using an adaptive graph learning method to construct an adaptive adjacency matrix, and combining the two adjacency matrices to obtain a final adjacency matrix;
[0014] Step 3: The graph convolutional neural network uses the final adjacency matrix to extract the frequency domain correlation of the data and passes the result to the bidirectional long short-term memory neural network;
[0015] Step 4: Use a bidirectional long short-term memory neural network to extract the time domain correlation of the spectrum data to obtain the predicted spectrum data;
[0016] Step 5: Calculate the mean absolute error between the predicted spectrum data and the training set data, reversely train the graph convolutional neural network and the bidirectional long short-term memory neural network, and after the training is completed, input the test set data into the trained graph convolutional neural network to obtain the prediction results.
[0017] The specific process of step one is:
[0018] The channel occupancy state includes two states: idle and occupied. The channel state information (CSI) is expressed as:
[0019] CSI(t,f)=ε,ε=0,1
[0020] Where t represents time, f represents frequency, "0" represents channel idle, and "1" represents channel occupied;
[0021] The M / G / C model in queuing theory is used to model the spectrum occupancy state, where C represents the number of channels and M represents that the arrival of users in the input process follows a Poisson process with parameter λ, that is, the probability distribution of the number of arriving users x in any time t is:
[0022]
[0023] Where P(·) is the probability distribution function and n is the number of users. When the user arrivals follow a Poisson process with parameter λ, the time intervals between user arrivals follow an exponential distribution with parameter 1 / λ, that is:
[0024]
[0025] Among them, λ represents the average number of users arriving per unit time, and 1 / λ represents the average interval time between users arriving one after another.
[0026] G represents the service time, i.e. the channel occupancy time, which follows a geometric distribution with parameter μ, namely:
[0027] P(x=k)=(1-μ) k-1 μ,k=1,2,3,…N
[0028] Among them, P(·) is the probability distribution function, k is the number of users, μ represents the number of users that can be served per unit time, which is called the average service rate, and 1 / μ represents the average service time for each user;
[0029] By setting the parameters λ, μ, the number of channels and the number of users, the spectrum occupancy data is finally obtained and divided into a training set and a test set.
[0030] The specific process of step 2 is as follows:
[0031] First, based on the training set obtained in step 1, construct the adjacency matrix A based on correlation cor ,By combining the Pearson correlation coefficient and the Phi correlation coefficient, an adjacency matrix is established to reduce the error in spectrum prediction and enhance the error correction ability of the algorithm;
[0032] The Pearson correlation coefficient is used to measure the correlation between two variables X and Y. It is calculated using the covariance between the two variables X and Y and the standard deviation of the variables. The Pearson correlation coefficient ranges between -1 and 1. The specific calculation formula is:
[0033]
[0034] in, represents the Pearson correlation coefficient, X i ,X j denote the spectrum occupancy status of channels i and j respectively, cov(·,·) denotes the covariance function, and σ denotes the standard deviation;
[0035] The Phi correlation coefficient is applicable to the correlation analysis between binary variables. Its value range is between -1 and 1, where 0 indicates no correlation between the two variables, -1 indicates a complete negative correlation, and 1 indicates a complete positive correlation. The calculation formula of the Phi correlation coefficient is:
[0036]
[0037] in, represents the Phi correlation coefficient, a represents the number of samples where both variables are 1, b represents the number of samples where the first variable is 1 and the second variable is 0, c represents the number of samples where the first variable is 0 and the second variable is 1, and d represents the number of samples where both variables are 0;
[0038] Finally, the average of the Pearson correlation coefficient and the Phi correlation coefficient is calculated to obtain the adjacency matrix A based on correlation. cor , the formula is as follows:
[0039]
[0040] Then, construct the adaptive adjacency matrix A adp , automatically capture and adjust the size of the sequential correlation relationship between nodes from the input data;
[0041] The generation process of the adaptive adjacency matrix is as follows: First, a learnable matrix E consisting of node embedding vectors is randomly initialized for all nodes A , then, through the matrix EA and its transposed matrix To infer the correlation between each node and construct an adaptive normalized adjacency matrix, the specific formula is:
[0042]
[0043] Among them, SoftMax and ReLU are activation functions. The ReLU function retains values greater than 0 and sets values less than 0 to 0. Based on this feature of the ReLU function, node connections with negative correlation weights are eliminated; the SoftMax function normalizes the adjacency matrix;
[0044] Finally, by combining the correlation-based adjacency matrix A cor and the adaptive adjacency matrix A adp , and obtain the final adjacency matrix A of the graph.
[0045] The specific process of step three is:
[0046] Based on the input feature X of the channel and the adjacency matrix A of the graph obtained in step 2, the frequency domain correlation of the extracted data is calculated using a multi-layer graph convolutional network model. The calculation formula is:
[0047]
[0048] in, To add the self-connected adjacency matrix, I N is the identity matrix, is the degree matrix, H (l) is the input of the lth layer, the initial input H (0) =X, θ is the learnable parameter in the network, σ(·) is the sigmoid activation function; the two-layer graph convolution formula is expressed as:
[0049]
[0050] in, is the normalized adjacency matrix, W 0 and W 1 is the learnable parameter in the network, f g (X, A) is the output result, which is passed to the bidirectional long short-term memory neural network.
[0051] The specific process of step 4 is as follows:
[0052] The calculation formula of the bidirectional long short-term memory neural network is:
[0053]
[0054] Among them, x tand h t Respectively represent the input and output of the bidirectional long short-term memory network, f t 、i t , o t They represent the forget gate, input gate and output gate respectively. is a candidate memory unit, C t is the final memory unit, is the output of the forward LSTM neural network, is the output of the backward long short-term memory neural network, and is the weight matrix, b p is the bias term, p∈(i,f,o,c), ⊙ is the Hadamard product, tanh is the activation function, is a forward long short-term memory neural network, It is a backward long short-term memory neural network; it completes the time domain correlation extraction of spectrum data.
[0055] The specific process of step five is as follows:
[0056] All learnable parameters in the graph convolutional neural network and the bidirectional long short-term memory neural network are randomly initialized, the network model optimizer selects the Adam optimizer, the loss function selects the mean absolute error (MAE), and the maximum number of iterations and learning rate are customized. The training set data is randomly shuffled and input into the graph convolutional neural network and the bidirectional long short-term memory neural network in batches for training. The training error between the predicted value of each batch and the true value of the training set is calculated and back-propagated to optimize all learnable parameters. The MAE calculation formula is:
[0057]
[0058] Where n is the number of samples, y i is the i-th true value, is the i-th prediction value; when the data of the training set is forward output and back-propagated, an iteration is completed. When the number of iterations reaches the maximum number of iterations, the training is completed, and the data of the test set is input into the trained graph convolutional neural network to obtain the final prediction result.
[0059] A spectrum intelligent prediction system based on an adaptive graph structure, comprising:
[0060] A preprocessing module, used in step 1, to construct spectrum occupancy data using queuing theory and divide the data into a training set and a test set;
[0061] The adjacency matrix construction module is used in step 2 to perform correlation analysis on the training set data to obtain the correlation coefficient, thereby constructing an adjacency matrix based on correlation, and to construct an adaptive adjacency matrix using an adaptive graph learning method, and the two adjacency matrices are combined to obtain the final adjacency matrix;
[0062] The spectrum data prediction module is used to extract the frequency domain correlation of the spectrum data from the final adjacency matrix using the graph convolutional neural network in step 3, and pass it to the bidirectional long short-term memory neural network; in step 4, the bidirectional long short-term memory neural network is used to extract the time domain correlation of the spectrum data to obtain the predicted spectrum data; finally, the mean absolute error between the predicted spectrum data and the training set data is calculated in step 5 to reversely train the graph convolutional neural network and the bidirectional long short-term memory neural network. After the training is completed, the test set data is input into the trained graph convolutional neural network to obtain the prediction result.
[0063] A spectrum intelligent prediction device based on an adaptive graph structure, comprising:
[0064] Memory for storing computer programs;
[0065] A processor is used to implement the spectrum intelligent prediction method based on the adaptive graph structure as described in claims 1 to 6 when executing the computer program.
[0066] A computer-readable storage medium stores a computer program, which, when executed by a processor, can implement spectrum intelligent prediction based on an adaptive graph structure based on the method described in steps one to five.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] 1. The present invention constructs a graph adjacency matrix by adopting an adaptive graph learning method, including a correlation-based adjacency matrix and an adaptive adjacency matrix, wherein the correlation-based adjacency matrix is realized by combining the Pearson correlation coefficient and the Phi correlation coefficient. The adjacency matrix constructed by the above method can better establish the correlation between frequency bands, increase the error correction capability of the algorithm, and has higher adaptability.
[0069] 2. The network model of intelligent spectrum prediction of the present invention extracts the frequency domain correlation of spectrum data through a graph convolutional neural network and extracts the time domain correlation of spectrum data through a bidirectional long short-term memory neural network, thereby realizing correlation analysis of spectrum data in the frequency domain and time domain, performing more in-depth feature extraction on spectrum data, and realizing multi-step prediction of future spectrum occupancy status with higher prediction accuracy.
[0070] 3. Compared with the prior art, the spectrum intelligent prediction method based on the adaptive graph structure of the present invention has an accuracy of 97.9%, and the spectrum prediction accuracy curve of the method proposed in the present invention converges faster, which can prove that the method proposed in the present invention has better prediction performance; for the prediction accuracy of different methods under different historical step sizes, the method of the present invention will have an accuracy of more than 90% after the historical step size reaches 30, and when the historical step size is 50, the accuracy of the method proposed in the present invention reaches 95.5%; with the increase of the prediction step size, the method proposed in the present invention still has an accuracy of about 70% when the prediction step size is 10.
[0071] In summary, the present invention constructs a fixed graph structure by performing correlation analysis on spectral data, and uses an adaptive graph learning method to construct an adaptive graph structure, and combines these two graph structures to obtain the final graph structure, uses a graph convolutional neural network to extract the frequency domain correlation of spectral data, and uses a bidirectional long short-term memory neural network to extract the time domain correlation of spectral data, models the correlation of spectral data in the frequency domain and time domain, and realizes multi-step prediction of future spectral states with higher prediction accuracy; it has stronger generalization ability and a wider range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0073] Figure 1 It is a flow chart of a spectrum intelligent prediction method based on an adaptive graph structure according to an embodiment of the present invention.
[0074] Figure 2 This is a comparison chart of the spectrum prediction accuracy of the method of the present invention and the LSTM-based and CNN-LSTM methods as a function of the number of iterations.
[0075] Figure 3 This is a comparison chart of the spectrum prediction accuracy of the method of the present invention and the LSTM-based and CNN-LSTM methods at different historical step sizes.
[0076] Figure 4 This is a comparison chart of spectrum prediction accuracy between the method of the present invention and the LSTM-based and CNN-LSTM methods at different prediction step sizes. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0078] In view of the problems existing in the prior art, the present invention provides a spectrum intelligent prediction method based on an adaptive graph structure, and the present invention is described in detail below with reference to the accompanying drawings.
[0079] like Figure 1 As shown, the spectrum intelligent prediction method based on the adaptive graph structure of the embodiment of the present invention includes the following steps:
[0080] S101, construct spectrum occupancy data using queuing theory, and divide the data into a training set and a test set; the specific method is:
[0081] The channel occupancy status generally includes two states: idle and occupied. The channel state information (CSI) is expressed as:
[0082] CSI(t,f)=ε,ε=0,1
[0083] Where t represents time, f represents frequency, "0" represents channel idle, and "1" represents channel occupied;
[0084] The M / G / C model in queuing theory is used to model the spectrum occupancy state, where C represents the number of channels and M represents that the arrival of users in the input process follows a Poisson process with parameter λ, that is, the probability distribution of the number of arriving users x in any time t is:
[0085]
[0086] Where P(·) is the probability distribution function and n is the number of users. When the user arrivals follow a Poisson process with parameter λ, the time intervals between user arrivals follow an exponential distribution with parameter 1 / λ, that is:
[0087]
[0088] Among them, λ represents the average number of users arriving per unit time, and 1 / λ represents the average interval time between users arriving one after another.
[0089] G represents the service time, i.e. the channel occupancy time, which follows a geometric distribution with parameter μ, namely:
[0090] P(x=k)=(1-μ) k-1 μ,k=1,2,3,…N
[0091] Among them, P(·) is the probability distribution function, k is the number of users, μ represents the number of users that can be served per unit time, which is called the average service rate, and 1 / μ represents the average service time for each user;
[0092] By setting the parameters λ, μ, the number of channels and the number of users, the spectrum occupancy data is finally obtained and divided into a training set and a test set.
[0093] S102, performing correlation analysis on the training set data to obtain a correlation coefficient, thereby constructing an adjacency matrix based on correlation, and using an adaptive graph learning method to construct an adaptive adjacency matrix, and combining these two adjacency matrices to obtain a final adjacency matrix; the specific method is:
[0094] First, based on the training set obtained in step 1, construct the adjacency matrix A based on correlation cor ,By combining the Pearson correlation coefficient and the Phi correlation coefficient, an adjacency matrix is established to reduce the error in spectrum prediction and enhance the error correction ability of the algorithm;
[0095] The Pearson correlation coefficient is used to measure the correlation between two variables X and Y. It is calculated using the covariance between the two variables X and Y and the standard deviation of the variables. The Pearson correlation coefficient ranges between -1 and 1. The specific calculation formula is:
[0096]
[0097] in, represents the Pearson correlation coefficient, X i ,X j denote the spectrum occupancy status of channels i and j respectively, cov(·,·) denotes the covariance function, and σ denotes the standard deviation;
[0098] The Phi correlation coefficient is applicable to the correlation analysis between binary variables. Its value range is between -1 and 1, where 0 indicates no correlation between the two variables, -1 indicates a complete negative correlation, and 1 indicates a complete positive correlation. The calculation formula of the Phi correlation coefficient is:
[0099]
[0100] in, represents the Phi correlation coefficient, a represents the number of samples where both variables are 1, b represents the number of samples where the first variable is 1 and the second variable is 0, c represents the number of samples where the first variable is 0 and the second variable is 1, and d represents the number of samples where both variables are 0;
[0101] Finally, the average of the Pearson correlation coefficient and the Phi correlation coefficient is calculated to obtain the adjacency matrix A based on correlation. cor , the formula is as follows:
[0102]
[0103] Then, construct the adaptive adjacency matrix A adp , automatically capture and adjust the size of the sequential correlation relationship between nodes from the input data;
[0104] The generation process of the adaptive adjacency matrix is as follows: First, a learnable matrix E consisting of node embedding vectors is randomly initialized for all nodes A , then, through the matrix E A and its transposed matrix To infer the correlation between each node and construct an adaptive normalized adjacency matrix, the specific formula is:
[0105]
[0106] Among them, SoftMax and ReLU are activation functions. The ReLU function retains values greater than 0 and sets values less than 0 to 0. Based on this feature of the ReLU function, node connections with negative correlation weights are eliminated; the SoftMax function normalizes the adjacency matrix;
[0107] Finally, by combining the correlation-based adjacency matrix A cor and the adaptive adjacency matrix A adp , and obtain the final adjacency matrix A of the graph.
[0108] S103, the graph convolutional neural network uses the final adjacency matrix to extract the frequency domain correlation of the data and passes the result to the bidirectional long short-term memory neural network; the specific process is:
[0109] Based on the input feature X of the channel and the adjacency matrix A of the graph obtained by S102, the frequency domain correlation of the extracted data is calculated using a multi-layer graph convolutional network model. The calculation formula is:
[0110]
[0111] in, To add the self-connected adjacency matrix, I N is the identity matrix, is the degree matrix, H (l) is the input of the lth layer, the initial input H (0) =X, θ is the learnable parameter in the network, σ(·) is the sigmoid activation function; the two-layer graph convolution formula is expressed as:
[0112]
[0113] in, is the normalized adjacency matrix, W 0 and W 1 is the learnable parameter in the network, f g (X, A) is the output result, which is passed to the bidirectional long short-term memory neural network.
[0114] S104, using a bidirectional long short-term memory neural network to extract the time domain correlation of the spectrum data to obtain predicted spectrum data; the specific process is:
[0115] The calculation formula of the bidirectional long short-term memory neural network is:
[0116]
[0117]
[0118] Among them, x t and h t Respectively represent the input and output of the bidirectional long short-term memory network, f t 、i t , o t They represent the forget gate, input gate and output gate respectively. is a candidate memory unit, C t is the final memory unit, is the output of the forward LSTM neural network, is the output of the backward long short-term memory neural network, and is the weight matrix, b p is the bias term, p∈(i,f,o,c), ⊙ is the Hadamard product, tanh is the activation function, is a forward long short-term memory neural network, It is a backward long short-term memory neural network; it completes the time domain correlation extraction of spectrum data.
[0119] S105, calculate the mean absolute error between the predicted spectrum data and the training set data, reversely train the graph convolutional neural network and the bidirectional long short-term memory neural network, and after the training is completed, input the test set data into the trained graph convolutional neural network to obtain the prediction result; the specific process is:
[0120] All learnable parameters in the graph convolutional neural network and the bidirectional long short-term memory neural network are randomly initialized, the network model optimizer selects the Adam optimizer, the loss function selects the mean absolute error (MAE), and the maximum number of iterations and learning rate are customized. The training set data is randomly shuffled and input into the graph convolutional neural network and the bidirectional long short-term memory neural network in batches for training. The training error between the predicted value of each batch and the true value of the training set is calculated and back-propagated to optimize all learnable parameters. The MAE calculation formula is:
[0121]
[0122] Where n is the number of samples, y i is the i-th true value, is the i-th prediction value; when the data of the training set is forward output and back-propagated, an iteration is completed. When the number of iterations reaches the maximum number of iterations, the training is completed, and the data of the test set is input into the trained graph convolutional neural network to obtain the final prediction result.
[0123] The technical effects of the present invention are described in detail below in conjunction with simulation experiments.
[0124] In order to evaluate the performance of the present invention, simulation verification was performed. In the simulation experiment, Python 3.9 and PyTorch 1.12 simulation platforms were used, and the queuing theory M / G / C model was used to generate spectrum state data. The division ratio of the training set data and the test set data was 8:2. The MAE loss function was used, and the back propagation algorithm was used to adjust the parameters. After multiple cycles, the optimal parameters were obtained. The Adam optimizer was used during the training process, and the trained network model was finally obtained.
[0125] The comparison of the spectrum prediction accuracy of the method proposed in this invention (spectrum intelligent prediction method based on adaptive graph structure) and the method based on LSTM and the CNN-LSTM method is shown in Figure 2. Figure 2 As shown. It can be seen that the accuracy of the method proposed in the present invention reaches 97.9%, the accuracy of the spectrum prediction method based on CNN-LSTN reaches 94.6%, and the accuracy of the spectrum prediction method based on LSTN reaches 89.9%. Compared with the CNN-LSTM method, the accuracy is improved by 3.5%, and compared with the LSTM method, the accuracy is improved by 8.9%. In addition, the prediction accuracy curve of the method proposed in the present invention converges faster, which can prove that the method proposed in the present invention has better prediction performance.
[0126] The prediction accuracy of different methods under different historical step lengths is as follows Figure 3As shown, it can be seen that with the increase of the historical step length, the accuracy curves of the method proposed in the present invention (spectrum intelligent prediction method based on adaptive graph structure), the method based on LSTM, and the method based on CNN-LSTM are all rising. This is because with the increase of the length of historical input data, the network model can use more historical information to learn, thereby improving the accuracy of the prediction. The method proposed in the present invention has an accuracy of more than 90% after the historical step length reaches 30. In addition, when the historical step length is 50, the accuracy of the method proposed in the present invention reaches 95.5%, the accuracy of the spectrum prediction method based on CNN-LSTN reaches 90.3%, and the accuracy of the spectrum prediction method based on LSTN reaches 85.8%. Compared with the CNN-LSTM method, the accuracy is increased by 5.8%, and compared with the LSTM method, the accuracy is increased by 11.3%. It can be seen that the method proposed in the present invention has better prediction performance.
[0127] The prediction accuracy of different methods under different prediction step sizes is as follows Figure 4 As shown, it can be seen that with the increase of the prediction step length, the accuracy of the method proposed in the present invention (spectrum intelligent prediction method based on adaptive graph structure), the method based on LSTM, and the method based on CNN-LSTM are all decreasing. This is easy to understand. The more distant the time slot, the higher the uncertainty of the spectrum state, the more unpredictable it is, and the accuracy naturally decreases. However, the method proposed in the present invention still has an accuracy of about 70% when the prediction step length is 10, which has a higher prediction accuracy than LSTM and CNN-LSTM.
[0128] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A spectrum intelligent prediction method based on adaptive graph structure, characterized in that: The specific steps include: Step 1: Use queuing theory to construct spectrum occupancy data and divide the data into training set and test set; Step 2: Perform correlation analysis on the training set data to obtain correlation coefficients, thereby constructing an adjacency matrix based on correlation, and using an adaptive graph learning method to construct an adaptive adjacency matrix, and combining the two adjacency matrices to obtain a final adjacency matrix; Step 3: The graph convolutional neural network uses the final adjacency matrix to extract the frequency domain correlation of the data and passes the result to the bidirectional long short-term memory neural network; Step 4: Use a bidirectional long short-term memory neural network to extract the time domain correlation of the spectrum data to obtain the predicted spectrum data; Step 5: Calculate the mean absolute error between the predicted spectrum data and the training set data, reversely train the graph convolutional neural network and the bidirectional long short-term memory neural network, and after the training is completed, input the test set data into the trained graph convolutional neural network to obtain the prediction results.
2. The spectrum intelligent prediction method based on adaptive graph structure according to claim 1, characterized in that: The specific process of step one is: The channel occupancy state includes two states: idle and occupied. The channel state information (CSI) is expressed as: CSI(t,f)=ε,ε=0,1 Where t represents time, f represents frequency, "0" represents channel idle, and "1" represents channel occupied; The M / G / C model in queuing theory is used to model the spectrum occupancy state, where C represents the number of channels and M represents that the arrival of users in the input process follows a Poisson process with parameter λ, that is, the probability distribution of the number of arriving users x in any time t is: Where P(·) is the probability distribution function and n is the number of users. When the user arrivals follow a Poisson process with parameter λ, the time intervals between user arrivals follow an exponential distribution with parameter 1 / λ, that is: Among them, λ represents the average number of users arriving per unit time, and 1 / λ represents the average interval time between users arriving one after another. G represents the service time, i.e. the channel occupancy time, which follows a geometric distribution with parameter μ, namely: P(x=k)=(1-μ) k-1 μ,k=1,2,3,…N Among them, P(·) is the probability distribution function, k is the number of users, μ represents the number of users that can be served per unit time, which is called the average service rate, and 1 / μ represents the average service time for each user; By setting the parameters λ, μ, the number of channels and the number of users, the spectrum occupancy data is finally obtained and divided into a training set and a test set.
3. The spectrum intelligent prediction method based on adaptive graph structure according to claim 1, characterized in that: The specific process of step 2 is as follows: First, based on the training set obtained in step 1, construct the adjacency matrix A based on correlation cor ,By combining the Pearson correlation coefficient and the Phi correlation coefficient, an adjacency matrix is established to reduce the error in spectrum prediction and enhance the error correction ability of the algorithm; The Pearson correlation coefficient is used to measure the correlation between two variables X and Y. It is calculated using the covariance between the two variables X and Y and the standard deviation of the variables. The Pearson correlation coefficient ranges between -1 and 1. The specific calculation formula is: in, represents the Pearson correlation coefficient, X i ,X j denote the spectrum occupancy status of channels i and j respectively, cov(·,·) denotes the covariance function, and σ denotes the standard deviation; The Phi correlation coefficient is applicable to the correlation analysis between binary variables. Its value range is between -1 and 1, where 0 indicates no correlation between the two variables, -1 indicates a complete negative correlation, and 1 indicates a complete positive correlation. The calculation formula of the Phi correlation coefficient is: in, represents the Phi correlation coefficient, a represents the number of samples where both variables are 1, b represents the number of samples where the first variable is 1 and the second variable is 0, c represents the number of samples where the first variable is 0 and the second variable is 1, and d represents the number of samples where both variables are 0; Finally, the average of the Pearson correlation coefficient and the Phi correlation coefficient is calculated to obtain the adjacency matrix A based on correlation. cor , the formula is as follows: Then, construct the adaptive adjacency matrix A adp , automatically capture and adjust the size of the sequential correlation relationship between nodes from the input data; The generation process of the adaptive adjacency matrix is as follows: First, a learnable matrix E consisting of node embedding vectors is randomly initialized for all nodes A , then, through the matrix E A and its transposed matrix To infer the correlation between each node and construct an adaptive normalized adjacency matrix, the specific formula is: Among them, SoftMax and ReLU are activation functions. The ReLU function retains values greater than 0 and sets values less than 0 to 0. Based on this feature of the ReLU function, node connections with negative correlation weights are eliminated; the SoftMax function normalizes the adjacency matrix; Finally, by combining the correlation-based adjacency matrix A cor and the adaptive adjacency matrix A adp , and obtain the final adjacency matrix A of the graph.
4. The spectrum intelligent prediction method based on adaptive graph structure according to claim 1, characterized in that: The specific process of step three is: Based on the input feature X of the channel and the adjacency matrix A of the graph obtained in step 2, the frequency domain correlation of the extracted data is calculated using a multi-layer graph convolutional network model. The calculation formula is: in, To add the self-connected adjacency matrix, I N is the identity matrix, is the degree matrix, H (l) is the input of the lth layer, the initial input H (0) =X, θ is the learnable parameter in the network, σ(·) is the sigmoid activation function; the two-layer graph convolution formula is expressed as: in, is the normalized adjacency matrix, W0 and W1 are learnable parameters in the network, and f g (X, A) is the output result, which is passed to the bidirectional long short-term memory neural network.
5. The spectrum intelligent prediction method based on adaptive graph structure according to claim 1, characterized in that: The specific process of step 4 is as follows: The calculation formula of the bidirectional long short-term memory neural network is: Among them, x t and h t Respectively represent the input and output of the bidirectional long short-term memory network, f t 、i t , o t They represent the forget gate, input gate and output gate respectively. is a candidate memory unit, C t is the final memory unit, is the output of the forward LSTM neural network, is the output of the backward long short-term memory neural network, and is the weight matrix, b p is the bias term, p∈(i,f,o,c), ⊙ is the Hadamard product, tanh is the activation function, is a forward long short-term memory neural network, It is a backward long short-term memory neural network; it completes the time domain correlation extraction of spectrum data.
6. The spectrum intelligent prediction method based on adaptive graph structure according to claim 1, characterized in that: The specific process of step five is as follows: All learnable parameters in the graph convolutional neural network and the bidirectional long short-term memory neural network are randomly initialized, the Adam optimizer is selected as the network model optimizer, the mean absolute error (MAE) is selected as the loss function, and the maximum number of iterations and learning rate are customized for initialization; the training set data is randomly shuffled and input into the graph convolutional neural network and the bidirectional long short-term memory neural network in batches for training, and the training error between the predicted value of each batch and the true value of the training set is calculated and back-propagated, thereby optimizing all learnable parameters; The MAE calculation formula is: Where n is the number of samples, y i is the i-th true value, is the i-th prediction value; when the data of the training set is forward output and back-propagated, an iteration is completed. When the number of iterations reaches the maximum number of iterations, the training is completed, and the data of the test set is input into the trained graph convolutional neural network to obtain the final prediction result.
7. A spectrum intelligent prediction system based on adaptive graph structure, characterized in that: include: A preprocessing module, used in step 1, to construct spectrum occupancy data using queuing theory and divide the data into a training set and a test set; The adjacency matrix construction module is used in step 2 to perform correlation analysis on the training set data to obtain the correlation coefficient, thereby constructing an adjacency matrix based on correlation, and to construct an adaptive adjacency matrix using an adaptive graph learning method, and the two adjacency matrices are combined to obtain the final adjacency matrix; The spectrum data prediction module is used to extract the frequency domain correlation of the spectrum data from the final adjacency matrix using the graph convolutional neural network in step 3, and pass it to the bidirectional long short-term memory neural network; in step 4, the bidirectional long short-term memory neural network is used to extract the time domain correlation of the spectrum data to obtain the predicted spectrum data; finally, the mean absolute error between the predicted spectrum data and the training set data is calculated in step 5 to reversely train the graph convolutional neural network and the bidirectional long short-term memory neural network. After the training is completed, the test set data is input into the trained graph convolutional neural network to obtain the prediction result.
8. A spectrum intelligent prediction device based on an adaptive graph structure, characterized in that: include: Memory for storing computer programs; A processor is used to implement the spectrum intelligent prediction method based on the adaptive graph structure as described in claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is possible to implement spectrum intelligent prediction based on an adaptive graph structure based on the methods of claims 1 to 6.