CNN-Transform-based multi-dimensional spectrogram prediction method
Through the multi-dimensional spectrum diagram prediction method based on CNN-Transformer, the problems of inefficiency and scarcity in traditional spectrum resource allocation methods are solved, and more efficient spectrum utilization and communication quality assurance are achieved.
Patent Information
- Application Number
- CN202510246366.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-24
AI Technical Summary
The traditional wireless communication spectrum resource allocation method has problems such as inefficiency and scarcity of spectrum, which is difficult to meet the dynamically changing user needs.
The multidimensional spectrum graph prediction method based on CNN-Transformer is adopted, and the time-space-frequency-related features of the spectrum data are deeply mined through the self-attention mechanism and the multi-scale convolution forward feedback module, and these semantic features are used for accurate prediction.
It improves spectrum utilization, optimizes management, ensures communication quality, and solves the problems of spectrum scarcity and inadequate utilization.
Smart Images

Figure CN120201478A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communications, and in particular relates to a multi-dimensional spectrum graph prediction method based on CNN-Transformer. Background Art
[0002] The rapid development of communication technology has greatly promoted the rapid growth of the number of radio users. This trend has led to an increasingly tight allocation of wireless spectrum resources. Especially in the context of the rapid popularization of mobile communications and Internet of Things (IoT) devices, spectrum scarcity has become a major problem. Radio spectrum is essential for wireless communications and is expensive. Traditionally, the allocation of wireless spectrum resources adopts a static allocation mode, that is, the right to use each frequency band is allocated to a specific licensee for a long time (possibly ranging from a few months to several years) and is used exclusively within a wide geographical range. Although this allocation method can meet the needs when there are fewer communication systems in the early days, its limitations have become increasingly obvious with the surge in wireless services. A large amount of spectrum has been occupied for a long time, while it has not been fully utilized in certain time periods or areas, resulting in inefficient resource allocation. At the same time, new spectrum demands are difficult to meet, which makes the spectrum scarcity problem increasingly serious. Therefore, how to balance the needs of existing users and emerging technologies under limited spectrum resources and improve spectrum utilization has become a core issue that needs to be urgently solved in the field of wireless communications. In order to address these challenges, spectrum prediction technology has emerged to promote the fair and efficient allocation and use of spectrum resources.
[0003] Spectrum prediction involves predicting future spectrum distribution and characteristics based on the analysis of historical measured spectrum data. Since the spectrum graph contains more time-space-frequency information, accurate spectrum graph prediction can improve spectrum utilization, optimize management, alleviate network congestion, ensure communication quality, and solve the problem of spectrum scarcity and underutilization.
[0004] The complexity of spectrum usage patterns has escalated due to the dynamic wireless signal propagation environment, frequent changes in user activities, and different user needs across spatial, temporal, and frequency dimensions. These heterogeneous patterns pose significant challenges to accurate spectrum usage prediction. As a result, traditional machine learning prediction techniques such as moving average autoregression, traditional deep learning such as convolutional networks and recurrent networks often have difficulty in providing reliable predictions, and there are no algorithms for predicting multi-dimensional spectrograms. To address these challenges, there is an urgent need to develop an efficient and high-performance spectrum prediction method. Summary of the invention
[0005] Objective of the Invention: The present invention provides a multi-dimensional spectrogram prediction method based on CNN-Transformer, which deeply mines the time-space-frequency correlation features of spectral data by using the self-attention mechanism, gives different weight factors based on the different scale features of multi-dimensional spectrogram data, and further fuses different scale features in the multi-scale convolution forward feedback module, so as to capture more feature information beneficial to prediction, eliminate irrelevant or adverse feature information, and use these semantic features to accurately predict the future spectral situation.
[0006] Technical Solution: A multi-dimensional spectrogram prediction method based on CNN-Transformer described in the present invention is specifically implemented as follows:
[0007] Generate a multi-dimensional spectral situation map through software simulation, construct a spectral data set; and preprocess the data;
[0008] Construct and train a multi-dimensional spectrogram prediction network based on CNN-Transformer, including an encoder and a decoder; the encoder includes multiple encoder layers, each encoder layer includes a multi-convolution head attention module and a multi-scale convolution forward feedback module, and a normalization layer follows each module; the decoder includes multiple decoder layers, each decoder layer includes a masked multi-convolution head attention module, a multi-convolution head attention module and a multi-scale convolution forward feedback module, and a normalization layer follows each module;
[0009] Use the trained multi-dimensional spectrogram prediction network to perform multi-dimensional spectrogram prediction.
[0010] Furthermore, the implementation process of the nth encoder layer of the encoder is:
[0011]
[0012] The above formula is further generalized as:
[0013]
[0014] Among them, represents the output of the n th th encoder layer; when n = 1, is P after position embedding en , represents the feature information extracted after the i-th R-LN(·) module in the nth encoder layer, where R-LN(·) represents residual connection and layer normalization; in addition, Mul-ConvAtt(·) and Conv-FFM(·) represent the multi-convolution head attention module and the multi-scale convolution forward feedback module respectively.
[0015] Furthermore, the implementation process of the e-th decoder layer of the decoder is:
[0016]
[0017] The above formula is further generalized as:
[0018]
[0019] where, when e = 1, is P after position embedding en , represents the feature extracted after the i-th R-LN(·) module in the e-th decoder layer; the final predicted value is
[0020] Furthermore, both the multi-convolution head attention module and the masked multi-convolution head attention module include multiple single-convolution head attention units;
[0021] The input of the module includes query Q, key K, and value V, where the feature dimensions of Q and K are d k , and the feature dimension of V is d v ;
[0022] The multi-convolution head attention module is:
[0023] Mul-ConvAtt(P) = Concat(head(P)1,…,head(P) h )
[0024]
[0025] where, Softmax(·) represents the Softmax normalization function; F CNN (·) represents a stacked 1×1 convolution module, d model represents the input dimension of the model, Concat(·) represents concatenating tensors together; the and are both 3×3 convolutions.
[0026] Furthermore, the implementation process of the multi-scale convolution forward feedback module is:
[0027]
[0028] where, ⊙ represents element-wise multiplication, represents the non-linear activation of GELU, is a 3×3 convolution, is a 5×5 convolution, and is a 1×1 point convolution.
[0029] Further, the loss function used for training the multi-dimensional spectrogram prediction network based on CNN-Transformer is:
[0030]
[0031] where and P T+Δt are the predicted value and the true value at the (T + Δt)-th time slot, respectively.
[0032] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] The present invention adopts an encoder-decoder architecture. The constructed multi-scale convolutional forward feedback module is stacked by multiple different convolutions. This design allows feature extraction at different scales, promotes feature fusion by allocating weights based on their respective contributions, and decodes future spectral situations using this feature information; the multi-convolution head attention module can extract local information of the spectrogram; the present invention combines CNN and Transformer to make up for the shortcoming of the small receptive field of CNN, which can help wireless users obtain future multi-dimensional spectral situation changes in advance, improve spectral utilization rate, optimize management, ensure communication quality, and solve the problems of spectral scarcity and underutilization. Description of the Drawings
[0034] Figure 1 is a schematic structural diagram of the multi-dimensional spectrogram prediction network based on CNN-Transformer constructed by the present invention;
[0035] Figure 2 is a comparison diagram of the present invention and the existing multi-dimensional spectrogram prediction method;
[0036] Figure 3 is a schematic diagram of the comparison of RMSE between the multi-dimensional spectrogram prediction method based on CNN-Transformer and the existing method under different input lengths;
[0037] Figure 4 is a schematic diagram of the visual comparison between the multi-frequency point multi-step spectrum prediction method based on CNN-Transformer and the existing method under different input lengths. Detailed Embodiments
[0038] The following further describes the present invention in detail with reference to the drawings.
[0039] The present invention provides a multi-dimensional spectrogram prediction method based on CNN-Transformer, including the following steps:
[0040] Step 1: Generate a multi-dimensional spectrum situation map through software simulation, construct a spectrum data set; preprocess the data, and divide the processed data into a training set and a test set according to a certain ratio.
[0041] Step 2: Construct and train a multi-dimensional spectrum map prediction network based on CNN-Transformer. Input the training set into the CNN-Transformer model. By redesigning the multi-convolution head attention module and the multi-scale convolution forward feedback module, it can focus on the local features of the key regions of the spectrum map and fuse multi-scale features.
[0042] As Figure 1 shown, CNN-Transformer is composed of an encoder and a decoder; among them, the encoder includes multiple encoder layers, each encoder layer includes a multi-convolution head attention module and a multi-scale convolution forward feedback module, and each module is followed by a normalization layer. The decoder includes multiple decoder layers, each decoder layer includes a masked multi-convolution head attention module, a multi-convolution head attention module and a multi-scale convolution forward feedback module, and each module is followed by a normalization layer.
[0043] The implementation process of the nth encoder layer of the encoder is:
[0044]
[0045] The above formula can be further generalized as:
[0046]
[0047] Among them, represents the output of the n th th encoder layer; when n = 1, is P after position embedding en ; represents the feature information extracted after the i-th R-LN(·) module in the nth encoder layer. R-LN(·) represents residual connection and layer normalization; Mul-ConvAtt(·) and Conv-FFM(·) represent the multi-convolution head attention module and the multi-scale convolution forward feedback module respectively.
[0048] The implementation process of the e-th decoder layer of the decoder is:
[0049]
[0050] The above formula can be further generalized as:
[0051]
[0052] Among them, when e = 1, P after positional embedding en ; represents the feature extracted after the i-th R-LN(·) module in the e-th decoder layer; the final predicted value is The mask is only applied to the first multi-convolution head attention layer; using the predicted value, the future available spectrum resources can be determined subsequently.
[0053] Both the multi-convolution head attention module and the masked multi-convolution head attention module include multiple single-convolution head attention units. The inputs of the module include query Q, key K, and value V, where the feature dimensions of Q and K are d k , and the feature dimension of V is d v .
[0054] The multi-convolution head attention module is:
[0055] Mul-ConvAtt(P) = Concat(head(P)1,…,head(P) h )
[0056]
[0057] where Softmax(·) represents the Softmax normalization function; where is a 3×3 convolution operation; d model represents the input dimension of the model; Concat(·) represents concatenating tensors together; F CNN (·) represents the stacked 1×1 convolution module.
[0058] The implementation process of the multi-scale convolution forward feedback module is:
[0059]
[0060] where ⊙ represents element-wise multiplication; represents the non-linear activation of GELU; is a 3×3 convolution, is a 5×5 convolution, while is a 1×1 point convolution.
[0061] The loss function used for training the CNN-Transformer-based multi-dimensional spectrogram prediction network is:
[0062]
[0063] where and P T+Δt are the predicted value and the true value at the (T + Δt)-th time slot respectively.
[0064] As Figure 2 shown, the accuracy of predicting future spectrograms by the present invention is higher than that of the other three methods. Specifically, the prediction accuracy of the present invention is increased by 12.43% compared with ConvLSTM, by 23.36% compared with sequence-to-sequence ConvLSTM, and by 24.64% compared with Transformer.
[0065] Figure 3 Consider the influence of prediction length on the prediction performance of the four methods. Compared with convLSTM, the change of RMSE of the present invention is the smallest as the input length increases, indicating that the present invention is robust to the input length. Taking the prediction time of 40 min as an example, the RMSE of the present invention is reduced by 11.59% compared with Transformer, by 21.74% compared with ConvLSTM, and by 30.43% compared with sequence-to-sequence ConvLSTM.
[0066] In Figure 4 consider the influence of prediction length on the prediction performance of the four methods. Compared with DCG, the prediction result of the present invention is closest to the real image as the prediction time length increases.
[0067] The above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention. Any other corresponding changes and variations made according to the technical concept of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A multi-dimensional spectrogram prediction method based on CNN-Transformer, characterized in that: The implementation process is as follows: Generate multi-dimensional spectrum situation diagram through software simulation, build spectrum data set, and pre-process the data; Construct and train a multi-dimensional spectrogram prediction network based on CNN-Transformer, including an encoder and a decoder; the encoder includes a plurality of encoder layers, each of which includes a multi-convolutional head attention module and a multi-scale convolutional forward feedback module, and each module is followed by a normalization layer; the decoder includes a plurality of decoder layers, each of which includes a masked multi-convolutional head attention module, a multi-convolutional head attention module and a multi-scale convolutional forward feedback module, and each module is followed by a normalization layer; The trained multi-dimensional spectrogram prediction network is used to perform multi-dimensional spectrogram prediction.
2. The multi-frequency point multi-step spectrum prediction method based on Transformer according to claim 1, characterized in that: The nth encoder layer implementation process of the encoder is: The above formula can be further summarized as: in, Indicates n th The output of the encoder layer; when n = 1, is P after position embedding en , denotes the feature information extracted after the i-th R-LN(·) module in the n-th encoder layer. R-LN(·) represents residual connection and layer normalization; in addition, Mul-ConvAtt(·) and Conv-FFM(·) represent the multi-convolutional head attention module and the multi-scale convolutional feedforward module, respectively.
3. The multidimensional spectrogram prediction method based on CNN-Transformer according to claim 1, characterized in that: The implementation process of the e-th decoder layer of the decoder is: The above formula can be further summarized as: Among them, when e=1, is the position embedded P en , represents the features extracted after the i-th R-LN(·) module in the e-th decoder layer; the final prediction value is 4. The multidimensional spectrogram prediction method based on CNN-Transformer according to claim 1, characterized in that: The multi-convolutional head attention module and the masked multi-convolutional head attention module each include multiple single convolutional head attention units; The input of the module includes query Q, key K and value V, where the feature dimension of Q and K is d k , the characteristic dimension of V is d v ; The multi-convolutional head attention module is: Mul-ConvAtt(P)=Concat(head(P)1,…,head(P) h ) Among them, Softmax(·) represents the Softmax normalization function; F CNN (·) represents the stacked 1×1 convolutional modules, d model Represents the input dimension of the model, and Concat(·) represents concatenating tensors together.
5. The multi-dimensional spectrogram prediction method based on CNN-Transformer according to claim 1, characterized in that: The implementation process of the multi-scale convolutional feedforward module is as follows: Among them, ⊙ represents element-wise multiplication, represents the nonlinear activation of GELU, is a 3×3 convolution, is a 5×5 convolution, and It is a 1×1 point convolution.
6. The multi-dimensional spectrogram prediction method based on CNN-Transformer according to claim 1, characterized in that: The loss function used to train the CNN-Transformer based multidimensional spectrogram prediction network is: in, and P T+Δt They are the predicted value and true value at the T+Δt time slot respectively.
7. The multi-dimensional spectrogram prediction method based on CNN-Transformer according to claim 5, characterized in that: Said and All are 3×3 convolutions.