Lightweight long-term spectrum prediction method based on multi-scale mixed structure

By introducing a lightweight method of multi-scale hybrid structures into the spectrum prediction model, the problems of reduced accuracy and high computing resource consumption in long-term spectrum prediction are solved, and efficient and accurate long-term spectrum prediction effect is achieved.

CN119814197APending Publication Date: 2025-04-11UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411966782.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing spectrum prediction model has reduced accuracy during long-term prediction, and the computing resources are consumed, making it difficult to achieve efficient and accurate long-term spectrum prediction.

Method used

A lightweight long-term spectrum prediction method based on a multi-scale hybrid structure is adopted, including a trend decomposition module, a multi-scale encoding module and a hybrid decoding module. Through phased processing and multi-scale feature extraction, the computing resource consumption is reduced and the prediction accuracy is improved.

Benefits of technology

It significantly improves prediction accuracy, reduces computing resource consumption, enhances the generalization ability and scope of application of the model, and can efficiently and accurately perform long-term spectrum prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814197A_ABST
    Figure CN119814197A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight long-term spectrum prediction method based on a multi-scale mixed structure, and relates to the technical field of electromagnetic spectrum prediction. The method comprises the following steps: acquiring spectrum time sequence data, preprocessing, and dividing into a training set and a test set; a spectrum prediction model is constructed, the spectrum prediction model is composed of a trend decomposition module, a multi-scale coding module and a hybrid decoding module, the macroscopic trend and short-term fluctuation characteristics of spectrum data are captured through trend decomposition, multi-scale feature representation is generated through multi-scale coding, and a prediction value is generated through hybrid decoding fusion; expanding the model to spatial data, constructing a spatial spectrum data set, preprocessing, and inputting into the model for prediction. The long-term spectrum use condition can be accurately and efficiently predicted, the prediction precision is improved, the computing resource consumption is reduced, the generalization ability is high, and important support is provided for spectrum management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electromagnetic spectrum prediction, and in particular to a lightweight long-term spectrum prediction method based on a multi-scale hybrid structure. Background Art

[0002] As the core resource of wireless communication systems, efficient use of spectrum is crucial to the overall performance of the network. In the field of cognitive radio, spectrum prediction is a key technology to improve spectrum utilization. It helps the network to rationally plan user access plans by estimating the future spectrum usage of cognitive wireless networks, optimize network resource allocation, increase network capacity, and reduce the latency and energy consumption of spectrum perception.

[0003] In previous studies, although traditional time series modeling methods (such as Markov model, ARIMA, etc.) and machine learning methods (such as SVM, SVR, etc.) have been used in spectrum prediction, they are unable to capture the high-dimensional and nonlinear features of spectrum data in complex electromagnetic environments, and their generalization ability is weak and their performance is limited. Deep learning technology has been widely used in spectrum prediction due to its advantages in processing nonlinear features of high-dimensional data. However, most current deep learning models focus on short-term predictions of spectrum usage in the next few time slots, and there is relatively little research on long-term predictions (predicting the usage of spectrum for dozens of time slots in the future).

[0004] As the prediction time increases, the error of the deep learning model accumulates, resulting in a decrease in prediction accuracy. At the same time, existing deep learning models usually require a lot of computing resources and storage space when processing long-span prediction tasks, and the computing resource consumption and inference time increase significantly. The increase in the number of model parameters also leads to increased storage overhead and memory consumption. Therefore, in high-precision long-term spectrum prediction, balancing computing resource consumption and prediction accuracy is an urgent problem to be solved. Summary of the invention

[0005] The purpose of the present invention is to provide a lightweight long-term spectrum prediction method based on a multi-scale hybrid structure to solve the problems of decreased accuracy and high consumption of computing resources in existing spectrum prediction models during long-term prediction, and to achieve efficient and accurate long-term spectrum prediction.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a lightweight long-term spectrum prediction method based on a multi-scale hybrid structure, the method comprising:

[0007] Step 1: Obtain the spectrum time series data used for prediction. Assume that the length of the spectrum power spectral density (PSD) time series collected by the monitoring point is N, that is, the data set contains spectrum observations of N time steps, expressed as X = [X1, X2, ..., X t ,…,XN ]; the observed value at each time step t Represents the power spectral density in F frequency bands; in the entire model, the input data is the spectral power density in the form of a time series, expressed as Where F is the number of frequency bands;

[0008] Step 2: After preprocessing the spectrum time series to obtain the original spectrum time series data set, first construct the spectrum prediction model input from the L time steps as the time window to form the spectrum prediction model input sequence [X t-L+1 ,X t-L+2 ,…,X t ], where L is the input window length, satisfying L≤N; then the spectrum data of the divided time window is divided into training set and test set in a ratio of 8:2 for model training and performance evaluation; in order to improve the training effect, the minimum-maximum normalization method is used to preprocess the data and normalize the data values ​​to the range of [0,1]. In the evaluation stage, the prediction results will be rescaled back to the actual value for accurate comparison with the real spectrum data;

[0009] Step 3: Construct a spectrum prediction model based on a multi-scale hybrid structure. The model consists of the following three modules: trend decomposition module, multi-scale encoding module and hybrid decoding module. The overall process is as follows: Figure 1 In the whole model, the input data is the spectral power density (PSD) in the form of time series, expressed as

[0010] First, the trend decomposition module decomposes the input sequence and splits the original data into a long-term trend term T and a residual seasonal term S, which capture the macro trend and short-term volatility characteristics in the spectrum data respectively;

[0011] Secondly, the multi-scale encoding module extracts the k periodic components with the highest weights for the trend term T and the seasonal term S according to the fast Fourier transform (FFT) of the original data and reorganizes them separately, and encodes the features by using the MLP structure of multiple linear layers-RELU activation layers-linear layers to generate a multi-scale feature representation E T and E S ;

[0012] Finally, the hybrid decoding module uses the MLP structure of linear layer-RELU activation layer-linear layer to fuse and decode the encoded features and generate prediction values; the proposed model can perform lightweight optimization of long-term spectrum prediction through the staged processing of trend decomposition, multi-scale encoding and hybrid decoding. The synergy of each module ensures the efficiency and accuracy of the model in long-term prediction tasks while reducing the consumption of computing resources.

[0013] Step 4: Extend the model to spatial data and use the inverse distance weighted (IDW) method to construct an X×Y grid spatial spectrum dataset; the interpolation formula for the spectrum measurement value of each grid point (x, y) at time t and frequency band f is:

[0014]

[0015] Among them, P (x,y,f,t) represents the fourth-order tensor after interpolation, R (k,f,t) represents the signal strength of the kth sensor at frequency band f and time t, in dBm; K represents the total number of sensors, w k is the distance weight of the kth sensor, defined as:

[0016]

[0017] d k is the Euclidean distance between the grid point and the kth sensor, β is the path loss exponent, which is a parameter used by the inverse distance weighted (IDW) method to construct a spatial spectrum dataset, and its value range is usually 2 to 6. In the formula, β is used to determine the distance weight of the kth sensor, which is used as d k The value of β will affect the distance weight, and then affect the interpolation result of the grid point spectrum measurement value; through the above interpolation processing, the constructed spatial spectrum data is expressed as a fourth-order tensor Where X and Y are the grid dimensions, F is the number of frequency bands, and T is the time step;

[0018] In order to transform the fourth-order tensor P (x,y,f,t) To make predictions in the input model, its dimensions need to be preprocessed and reshaped; first, the two grid dimensions X and Y are merged into a single dimension L = X × Y, and the data representation becomes Where l is the grid index; then, L and the frequency band dimension F are combined into the extended feature dimension E = L × F, and the final data representation is Where e is the extended feature index; in the model architecture, the expanded input data P (e,t) Directly introduce the multi-scale hybrid model for prediction; using the model structure in step 3, first decompose the time series into trend terms T through the trend decomposition module (e,t) and seasonal term S (e,t) , and then perform multi-scale encoding and decoding on the two items respectively, and finally generate the prediction result

[0019] Furthermore, the specific process of the trend decomposition module in step 3 is as follows:

[0020] Calculate the trend component and seasonal component of the input spectrum data sequence; convert the preprocessed spectrum data sequence X = [X t-L+1 ,Xt-L+2 ,…,X t ], each time step Represents the power spectral density of F frequency bands; decomposed into trend term T and residual seasonal term S;

[0021] The trend component T is calculated for each time step i of the input sequence X using the moving average method. i , the formula is:

[0022]

[0023] Where w represents the moving average window size, which controls the degree of trend smoothing; larger w values ​​will produce smoother trends, but may ignore local changes; smaller w values ​​are more sensitive to local fluctuations; calculate the trend component T i After that, the remaining seasonal component S i Defined as:

[0024] S i =X i -T i ,i=t-L+1,…,t

[0025] Among them, S i It represents short-term seasonal fluctuations, including the fast-changing parts of the input sequence X that cannot be captured by smoothing trends; the resulting trend term T = [T t-L+1 ,…,T t ] and the seasonal term S = [S t-L+1 ,…,S t ] are respectively used as the input of the subsequent multi-scale encoding module; the trend term T focuses on the long-term macro-change characteristics, while the seasonal term S retains the fine-grained short-term characteristics of the input sequence; through this decomposition method, the model can handle long-term trends and short-term fluctuations separately, thereby improving the modeling ability of complex spectral sequences.

[0026] Furthermore, the specific process of the multi-scale encoding module in step 3 is as follows:

[0027] First, before model training, the input sequence X is subjected to a fast Fourier transform (FFT) to extract the k most significant periodic components with the highest weight in the spectrum. The size of each periodic component is represented by {M1,M2,…,M k}; then the trend term T and the seasonal term S are reorganized in the following form according to the feature tensors corresponding to each periodic component:

[0028] T j =Reshape(T,M j ),S j =Reshape(S,M j ),j=1,…,k

[0029] Reshape(.) means to transform the input trend term T and seasonal term S into the periodic component M. j The size of the reorganization is T j and S j (j=1,…,k) operation, which can capture its periodic characteristics more clearly;

[0030] In the feature extraction stage, each periodic component T j and S j It is input into an independent multi-layer perceptron (MLP) to extract its potential multi-scale features through two layers of linear mapping and nonlinear activation function:

[0031] h T,j =ReLU(W T,1,j ·T j +b T,1,j ),h S,j =ReLU(W S,1,j ·T j +b S,1,j )

[0032] E T,j =W T,2,j ·h T,j +b T,2,j ,E S,j =W S,2,j ·h S,j +b S,2,j

[0033] Among them, h T,j represents the intermediate feature of the jth periodic component corresponding to the trend term T, where the subscript T represents the trend term and the subscript j represents the jth periodic component (j=1,…,k) among the k most significant periodic components extracted from the spectrum. Similarly, h S,j It represents the intermediate characteristics of the seasonal term S corresponding to the jth period component. The subscript S represents the seasonal term, and E T,j It represents the encoding feature obtained by processing the j-th period component of the trend term T by two layers of multi-layer perceptron (MLP), E S,j It represents the encoding feature obtained after the j-th periodic component of the seasonal term S is processed by two layers of multi-layer perceptron (MLP).

[0034] W T,1,j It is the weight matrix used by the first layer of linear transformation when processing the feature tensor of the j-th periodic component of the trend term T. It is used to perform linear transformation on the input data. The subscript T represents the trend term, the subscript 1 represents the first layer of the multi-layer perceptron (MLP) processing the trend term, and the subscript j represents the j-th periodic component. Similarly, W T,2,j Represents the intermediate feature h of the j-th period component corresponding to the processing trend term TT,j The weight matrix used by the second layer linear transformation when W S,1,j It represents the weight matrix used by the first layer linear transformation when processing the feature tensor of the seasonal term S corresponding to the jth periodic component, W S,2,j Represents the intermediate feature h of the j-th period component of the seasonal term S S,j The weight matrix used by the second layer linear transformation when .

[0035] b T,1,j It is the bias term corresponding to the first-layer linear transformation when processing the feature tensor of the j-th period component of the trend term T. T,2,j It is the intermediate feature h of the j-th period component in the processing trend term T T,j When , the bias term corresponding to the second layer linear transformation. b S,1,j It is the bias term corresponding to the first-layer linear transformation when processing the feature tensor of the j-th periodic component of the seasonal term S. S,2,j It is the intermediate feature h of the jth periodic component corresponding to the seasonal term S. S,j , the bias term corresponding to the second layer linear transformation.

[0036] ReLU is an activation function, which introduces nonlinear characteristics through the activation function, thereby enhancing the modeling ability of complex time dependencies; after completing feature extraction, the encoding result E of each period component T,j and E S,j The multi-dimensional encoding results are further reorganized to ensure that the local information of the time series is not lost during the final fusion; the reorganization process maps the multi-dimensional encoding results back to the original time axis:

[0037]

[0038] in, It represents the result of remapping the features obtained by multi-layer perceptron (MLP) encoding the j-th periodic component of the trend term T through the ReshapeBack(·) operation. It is based on the M j Information, remap the multi-dimensional encoding results back to the original time axis, so that all periodic features maintain temporal consistency. The purpose is not to lose the local information of the time series during subsequent fusion, so as to better preserve the multi-scale feature information of the trend item under the periodic component. Similarly, It represents the result of remapping the features obtained by multi-layer perceptron (MLP) encoding of the seasonal term S corresponding to the j-th periodic component through the ReshapeBack(·) operation. The ReshapeBack(·) operation is based on the M jInformation is obtained by remapping each periodic feature to the corresponding time step, so that all periodic features maintain temporal consistency; after the reorganization is completed, the features of all periodic components are fused by weighted summation to generate a multi-scale representation of the trend E T and multi-scale representation of seasons E S :

[0039]

[0040] The final E T and E S The main features of trend and seasonal components at different time scales are retained, providing sufficient information support for the decoding module.

[0041] Furthermore, the specific process of the hybrid decoding module in step 3 is as follows:

[0042] The multi-scale coded features are decoded into predicted values ​​for future time steps. The hybrid decoding technique decodes the trend and seasonal characteristics separately and then fuses them to generate an accurate prediction of the future spectrum state. The decoding process first decodes the multi-scale coded features E T and E S Perform linear mapping and nonlinear activation to extract potential information and generate preliminary decoding output:

[0043] h T =ReLU(W T ·E T +b T ),h S =ReLU(W S ·E S +b S )

[0044]

[0045] Among them, W T ,W S ,W′ T ,W′ S is the weight matrix of the decoding stage, b T ,b S ,b′ T ,b′ S is the bias term, the subscript T represents the trend term, the subscript S represents the season term, and the superscript ′ represents the weight matrix and bias term used to distinguish different stages of the decoding process in the current decoding module; trend prediction and seasonal forecasts Respectively represent the prediction results of trend and detail change characteristics in future time steps; in order to integrate the decoding output of trend and seasonal characteristics, the module uses addition to generate the final prediction value

[0046]

[0047] The hybrid decoding technology effectively retains the integrity of multi-scale encoded information by decoding and fusing trend and seasonal characteristics separately, while enhancing the model's adaptability to different time scale characteristics through weight adjustment. This design not only improves the accuracy of the prediction results, but also enhances the robustness of the model in long-term spectrum prediction tasks.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] 1. The prediction accuracy is significantly improved. The model proposed in this paper uses trend decomposition technology to accurately decompose the spectrum data sequence into trend terms and seasonal terms, respectively capturing the long-term macro trend and short-term volatility characteristics, thereby more effectively processing complex spectrum sequences. At the same time, the multi-scale encoding and decoding architecture can fully extract and integrate the features of different time scales, showing excellent performance in long-term spectrum prediction.

[0050] 2. The computing resource consumption is greatly reduced. The lightweight model structure built based on the multi-layer perceptron (MLP) has great advantages in computing resource consumption compared to traditional complex models. In the prediction process, the number of parameters and model size required by the model of the present invention are significantly reduced, while the inference time and memory usage are also at a low level, which can effectively adapt to resource-constrained device environments and solve the problem of excessive computing resource consumption in long-term prediction tasks in the prior art;

[0051] 3. With strong generalization ability and wide application range, the model of the present invention not only performs well in spectrum prediction in the time dimension, but also successfully extends to the field of spatial electromagnetic spectrum data prediction. Through the rationally designed spatial spectrum data set construction method and data preprocessing process, the influence of spatial factors on the dynamic characteristics of the electromagnetic spectrum can be effectively processed.

[0052] In summary, the present invention can more accurately and efficiently predict future long-term spectrum usage and provide important support for spectrum management. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a model diagram of the present invention.

[0054] Figure 2 Comparison of prediction results on the CY2 dataset of the present invention.

[0055] Figure 3 This is a comparison of the prediction results on the CY5 dataset of the present invention.

[0056] Figure 4 Comparison of prediction results on the spatial data set of the present invention. Specific embodiments

[0057] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:

[0058] Step 1: Obtain spectrum data from the Electrosense open API platform. The frequency band of the data is 790-860MHz. The data is collected from two sensors (CY2 and CY5) in the Zurich city area of ​​Switzerland. The collection time is from March 1, 2022 to March 31, 2022, and the collection interval is once every 10 minutes. The obtained dataset contains spectrum observations of N time steps, expressed as X = [X1, X2, …, X N ]. The observed value at each time step t represents the power spectral density in F frequency bands. In the whole model, the input data is the spectral power density (PSD) in the form of time series, expressed as Where N is the number of time steps, specifically 4320, and F is the number of frequency bands, specifically 71.

[0059] Step 2: After obtaining the original data set, first construct the model input from a time window with L time steps to form an input sequence [X t-L+1 ,X t-L+2 ,…,X t ], where L is the input window length, and the specific size of L is 144. Then the acquired spectrum data is divided into training set and test set in a ratio of 8:2, and the minimum-maximum normalization method is used to preprocess the data to normalize the data values ​​to the range of [0,1].

[0060] Step 3: Construct a spectrum prediction model based on a multi-scale hybrid structure. The model consists of the following three modules: trend decomposition module, multi-scale encoding module and hybrid decoding module. The overall process is as follows Figure 1 In the whole model, the input data is the spectral power density (PSD) in the form of time series, expressed as Where N is the number of time steps and F is the number of frequency bands. The processing flow of the model can be divided into three stages. First, the trend decomposition module decomposes the input sequence and breaks down the original data into long-term trend terms T and residual seasonal terms S, thereby capturing the macro trend and short-term volatility characteristics in the spectrum data respectively. Secondly, the multi-scale encoding module extracts the k periodic components with the highest weights from the fast Fourier transform (FFT) of the original data for the trend term and the seasonal term and reorganizes them separately, and encodes the features by using the MLP structure of multiple linear layers-RELU activation layers-linear layers to generate a multi-scale feature representation E. T and E S Finally, the hybrid decoding module uses the MLP structure of linear layer-RELU activation layer-linear layer to fuse and decode the encoded features to generate a predicted value. The proposed model can perform lightweight optimization for long-term spectrum prediction through the phased processing of trend decomposition, multi-scale encoding and hybrid decoding. The synergy of each module ensures the efficiency and accuracy of the model in long-term prediction tasks while reducing the consumption of computing resources.

[0061] Step 3.1: The specific process of the trend decomposition module is as follows:

[0062] Calculate the trend component and seasonal component of the input spectrum data sequence. t-L+1 ,X t-L+2 ,…,X t ], each time step represents the power spectral density of F frequency bands) is decomposed into a trend component T and a residual (seasonal) component S.

[0063] First, the trend component T is calculated for each time step i of the input sequence X using the moving average method. i , the formula is:

[0064]

[0065] Where w is the moving average window size, which controls the degree of trend smoothing. Larger w values ​​produce smoother trends but may ignore local changes, while smaller w values ​​are more sensitive to local fluctuations. After calculating the trend component T, the remaining seasonal component S is defined as:

[0066] S i =X i -T i ,i=t-L+1,…,t

[0067] Among them, S i Represents short-term seasonal fluctuations, including the fast-changing part of the input sequence X that cannot be captured by smoothing trend. The decomposed T = [T t-L+1 ,…,T t ] and S = [S t-L+1 ,…,S t ] are used as the input of the subsequent multi-scale encoding module. The trend term T focuses on the long-term macro-variation characteristics, while the seasonal term S retains the fine-grained short-term characteristics of the input sequence. Through this decomposition method, the model can handle long-term trends and short-term fluctuations separately, thereby improving the modeling ability of complex spectral sequences.

[0068] Step 3.2: The specific process of the multi-scale encoding module is as follows:

[0069] First, before model training, the input sequence X is subjected to a fast Fourier transform (FFT) to extract the k most significant periodic components with the highest weight in the spectrum. The period size is represented by {M1,M2,…,M k Then, the trend component T and the seasonal component S are reorganized according to the feature tensors corresponding to each periodic component in the following form:

[0070] T j =Reshape(T,M j ),S j =Reshape(S,M j ),j=1,…,k

[0071] This operation divides the time series into periods M j The distribution of is divided into specific patterns to capture its periodic characteristics more clearly. In the feature extraction stage, each periodic component T j and S j It is input into an independent multi-layer perceptron (MLP) to extract its potential multi-scale features through two layers of linear mapping and nonlinear activation function:

[0072] h T,j =ReLU(W T,1,j ·T j +b T,1,j ),h S,j =ReLU(W S,1,j ·T j +b S,1,j )

[0073] E T,j =W T,2,j ·h T,j +b T,2,j ,E S,j =W S,2,j ·h S,j +b S,2,j

[0074] Among them, W T,1,j ,W T,2,j and W S,1,j ,W S,2,j represents the weight matrix of the multilayer perceptron, b T,1,j ,b T,2,j and b S,1,j ,b S,2,j is the corresponding bias term. The ReLU activation function introduces nonlinear characteristics, thereby enhancing the modeling ability of complex time dependencies. After feature extraction, the encoding result E of each period component is T,j and E S,jIt needs to be further reorganized to ensure that the local information of the time series is not lost during the final fusion. The reorganization process maps the multidimensional encoding results back to the original time axis:

[0075]

[0076] The ReshapeBack(·) operation is based on the M j Information is collected and each periodic feature is remapped to the corresponding time step, so that all periodic features maintain temporal consistency. After the reorganization is completed, the features of all periodic components are fused by weighted summation to generate a multi-scale representation of trends and seasons:

[0077]

[0078] The final E T and E S The main features of trend and seasonal components at different time scales are retained, providing sufficient information support for the decoding module.

[0079] Step 3.3: The specific process of the hybrid decoding module is:

[0080] Decode the multi-scale coded features into the predicted values ​​for the future time step. The hybrid decoding technique decodes the trend and seasonal characteristics separately and then fuses them to generate an accurate prediction of the future spectrum state. The decoding process first decodes the multi-scale coded features E T and E S Perform linear mapping and nonlinear activation to extract potential information and generate preliminary decoding output:

[0081] h T =ReLU(W T ·E T +b T ),h S =ReLU(W S ·E S +b S )

[0082]

[0083] Among them, W T ,W S ,W′ T ,W′ S is the weight matrix of the decoding stage, b T ,b S ,b′ T ,b′ S is the bias term. Trend prediction and seasonal forecasts They represent the prediction results of trend and detail change characteristics in future time steps respectively. In order to integrate the decoded output of trend and seasonal characteristics, the module generates the final prediction value by adding:

[0084]

[0085] Step 4: Generate a model with training data, initialize model parameters, and perform 200 rounds of model training. Set the Adam optimizer, learning rate to 0.0001, batch size to 64, and use mean absolute error (MAE) as the loss function to measure the average absolute deviation between the predicted value and the true value. The calculation formula is:

[0086]

[0087] Where n is the number of samples, x i is the true value, is the predicted value.

[0088] Step 5: Model evaluation, using mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), coefficient of determination (R 2 ) and other indicators to evaluate the prediction accuracy of the model, and compare the model's operating efficiency indicators such as inference time, memory usage, number of parameters, and model size. Comparative experiments were conducted with benchmark models such as LSTM, ConvLSTM, DCG, Seq2Seq, and A-BiLSTM. The experimental results are as follows Figure 2 and Figure 3 As shown in the figure, on the CY2 dataset, the proposed model is compared with other spectrum prediction models (such as LSTM, ConvLSTM, DCG, A-BiLSTM and Seqtoseq) in the range of predicting the future from 120 minutes to 720 minutes. 2 The four indicators of POSIX and MAPE all performed better. At the same time, they were all ahead of all the benchmark models on the CY5 dataset. As shown in Table 1, when predicting for 120 minutes, the number of parameters of the model of the present invention was only 6432, the model size was 0.04MB, and the inference time and memory usage were lower than all the benchmark models; when predicting for 720 minutes, the number of parameters was 84912, and the model size was 0.34MB, which had obvious advantages in computing resource consumption compared with traditional models.

[0089] Step 6: Extend the model to spatial data. Based on the two sensor datasets in step 1, a spatial spectrum dataset of 5×5 grid is constructed using the inverse distance weighted (IDW) method, covering about 4km. 2 The interpolation formula for the spectrum measurement value of each grid point (x, y) at time t and frequency band f is:

[0090]

[0091] Among them, R (k,f,t) represents the signal strength of the kth sensor at frequency band f and time t, in dBm; w k is the distance weight, defined as:

[0092]

[0093] d k is the Euclidean distance between the grid point and the kth sensor, and β is the path loss index (usually ranging from 2 to 6). Through the above interpolation processing, the constructed spatial spectrum data can be expressed as a fourth-order tensor Where X and Y are grid dimensions, which are 5 and 5 respectively, F is the number of frequency bands, which is 71, and T is the time step, which is 4320. The spatial spectrum data is preprocessed and reshaped, and the two grid dimensions of X and Y are merged into a single dimension L = X × Y. The data representation becomes Where l is the grid index. Then, L and the frequency band dimension F are combined into the extended feature dimension E = L × F, and the final data representation is Where e is the extended feature index. After obtaining the final data representation, we first construct the model input from a time window with l time steps to form an input sequence [X t-l+1 ,X t-l+2 ,…,X t ], where l is the input window length, and the specific size of l is 144. Then the acquired spectrum data is divided into training set and test set in a ratio of 8:2, and the minimum-maximum normalization method is used to preprocess the data to normalize the data values ​​to the range of [0,1].

[0094] After training the model in step 4 using spatial spectrum data, the model is compared with the Seqtoseq, LSTM, A-BiLSTM, and NN-ResNet benchmark models, as shown in Figure 2. Figure 4 As shown in the figure, when predicting from 120 minutes to 720 minutes, the proposed model is superior to the four benchmark models in MAE, RMSE, R 2 It performs better in terms of indicators such as and MAPE.

[0095] Table 1 is a comparison of the efficiency parameters of each model when the present invention predicts 120 minutes and 720 minutes.

[0096]

Claims

1. A lightweight long-term spectrum prediction method based on a multi-scale hybrid structure, the method comprising: Step 1: Obtain the spectrum time series data used for prediction. Assume that the length of the spectrum power spectrum density time series collected by the monitoring point is N, that is, the data set contains spectrum observations of N time steps, expressed as X = [X1, X2, ..., X t ,…,X N ]; the observed value at each time step t Represents the power spectral density in F frequency bands; in the entire model, the input data is the spectral power density in the form of a time series, expressed as Where F is the number of frequency bands; Step 2: After preprocessing the spectrum time series to obtain the original spectrum time series data set, first construct the spectrum prediction model input from the L time steps as the time window to form the spectrum prediction model input sequence [X t-L+1 ,X t-L+2 ,…,X t ], where L is the input window length, satisfying L≤N; then the spectrum data of the divided time window is divided into training set and test set in proportion for model training and performance evaluation; in order to improve the training effect, the minimum-maximum normalization method is used to preprocess the data and normalize the data values ​​to the range of [0,1]. In the evaluation stage, the prediction results will be rescaled back to the actual value for accurate comparison with the real spectrum data; Step 3: Construct a spectrum prediction model based on a multi-scale hybrid structure. The model consists of the following three modules: trend decomposition module, multi-scale encoding module and hybrid decoding module. In the whole model, the input data is the spectrum power density in the form of time series, expressed as First, the trend decomposition module decomposes the input sequence and splits the original data into a long-term trend term T and a residual seasonal term S, which capture the macro trend and short-term volatility characteristics in the spectrum data respectively; Secondly, the multi-scale encoding module extracts the k periodic components with the highest weights for the trend term T and the seasonal term S according to the fast Fourier transform of the original data and reorganizes them separately, and encodes the features by using the MLP structure of multiple linear layers-RELU activation layers-linear layers to generate a multi-scale feature representation E. T and E S ; Finally, the hybrid decoding module uses the MLP structure of linear layer-RELU activation layer-linear layer to fuse and decode the encoded features to generate prediction values; Step 4: Extend the model to spatial data and use the inverse distance weighted method to construct an X×Y grid spatial spectrum dataset; the interpolation formula for the spectrum measurement value of each grid point (x, y) at time t and frequency band f is: Among them, P (x,y,f,t) represents the fourth-order tensor after interpolation, R (k,f,t) represents the signal strength of the kth sensor at frequency band f and time t, in dBm; K represents the total number of sensors, w k is the distance weight of the kth sensor, defined as: d k is the Euclidean distance between the grid point and the kth sensor, β is the path loss exponent, which is the parameter used when the inverse distance weighted method constructs the spatial spectrum data set. β is used to determine the distance weight of the kth sensor, which is used as d k The value of β will affect the distance weight, and then affect the interpolation result of the grid point spectrum measurement value; through the above interpolation processing, the constructed spatial spectrum data is expressed as a fourth-order tensor Where X and Y are the grid dimensions, F is the number of frequency bands, and T is the time step; In order to transform the fourth-order tensor P (x,y,f,t) To make predictions in the input model, its dimensions need to be preprocessed and reshaped; first, the two grid dimensions X and Y are merged into a single dimension L = X × Y, and the data representation becomes Where l is the grid index; then, L and the frequency band dimension F are combined into the extended feature dimension E = L × F, and the final data representation is Where e is the extended feature index; in the model architecture, the expanded input data P (e,t) Directly introduce the multi-scale hybrid model for prediction; using the model structure in step 3, first decompose the time series into trend terms T through the trend decomposition module (e,t) and seasonal term S (e,t) , and then perform multi-scale encoding and decoding on the two items respectively, and finally generate the prediction result 2. A lightweight long-term spectrum prediction method based on a multi-scale hybrid structure as claimed in claim 1, characterized in that: The specific process of the trend decomposition module in step 3 is as follows: Calculate the trend component and seasonal component of the input spectrum data sequence; convert the preprocessed spectrum data sequence X = [X t-L+1 ,X t-L+2 ,…,X t ], each time step represents the power spectral density of F frequency bands; Decomposed into trend term T and residual seasonal term S; The trend component T is calculated for each time step i of the input sequence X using the moving average method. i , the formula is: Where w represents the moving average window size, which controls the degree of smoothing trend; the trend component T is calculated i After that, the remaining seasonal component S i Defined as: S i =X i -T i ,i=t-L+1,…,t Among them, S i It represents short-term seasonal fluctuations, including the fast-changing parts of the input sequence X that cannot be captured by smoothing trends; the resulting trend term T = [T t-L+1 ,…,T t ] and the seasonal term S = [S t-L+1 ,…,S t ] are respectively used as the input of the subsequent multi-scale encoding module.

3. The lightweight long-term spectrum prediction method based on a multi-scale hybrid structure according to claim 1, characterized in that: The specific process of the multi-scale encoding module in step 3 is as follows: First, before model training, the input sequence X is subjected to a fast Fourier transform to extract the k most significant periodic components with the highest weight in the spectrum. The size of each periodic component is represented by {M1,M2,…,M k }; then the trend term T and the seasonal term S are reorganized in the following form according to the feature tensors corresponding to each periodic component: T j =Reshape(T,M j ),S j =Reshape(S,M j ),j=1,…,k Reshape(.) means to transform the input trend term T and seasonal term S into the periodic component M. j The size of the reorganization is T j and S j (j=1,…,k) operations; In the feature extraction stage, each periodic component T j and S j It is input into an independent multi-layer perceptron, and its potential multi-scale features are extracted through two layers of linear mapping and nonlinear activation function: h T,j =ReLU(W T,1,j ·T j +b T,1,j ),h S,j =ReLU(W S,1,j ·T j +b S,1,j ) E T,j =W T,2,j ·h T,j +b T,2,j ,E S,j =W S,2,j ·h S,j +b S,2,j Among them, h T,j represents the intermediate feature of the jth periodic component corresponding to the trend term T, where the subscript T represents the trend term and the subscript j represents the jth periodic component (j=1,…,k) among the k most significant periodic components extracted from the spectrum. Similarly, h S,j It represents the intermediate characteristics of the seasonal term S corresponding to the jth period component. The subscript S represents the seasonal term, and E T,j It represents the encoding feature obtained by processing the j-th period component of the trend term T by two layers of multi-layer perceptron (MLP), E S,j It represents the encoding feature obtained after the j-th periodic component of the seasonal term S is processed by two layers of multi-layer perceptron (MLP). W T,1,j It is the weight matrix used by the first layer of linear transformation when processing the feature tensor of the j-th periodic component of the trend term T. It is used to perform linear transformation on the input data. The subscript T represents the trend term, the subscript 1 represents the first layer of the multi-layer perceptron (MLP) processing the trend term, and the subscript j represents the j-th periodic component. Similarly, W T,2,j Represents the intermediate feature h of the j-th period component corresponding to the processing trend term T T,j The weight matrix used by the second layer linear transformation when W S,1,j It represents the weight matrix used by the first layer linear transformation when processing the feature tensor of the seasonal term S corresponding to the jth periodic component, W S,2,j Represents the intermediate feature h of the j-th period component of the seasonal term S S,j The weight matrix used by the second layer linear transformation when . b T,1,j It is the bias term corresponding to the first-layer linear transformation when processing the feature tensor of the j-th period component of the trend term T. T,2,j It is the intermediate feature h of the j-th period component in the processing trend term T T,j When , the bias term corresponding to the second layer linear transformation. b S,1,j It is the bias term corresponding to the first-layer linear transformation when processing the feature tensor of the j-th periodic component of the seasonal term S. S,2,j It is the intermediate feature h of the jth periodic component corresponding to the seasonal term S. S,j , the bias term corresponding to the second layer linear transformation. ReLU is the activation function. After feature extraction, the encoding result of each period component is E T,j and E S,j The multi-dimensional encoding results are further reorganized to ensure that the local information of the time series is not lost during the final fusion; the reorganization process maps the multi-dimensional encoding results back to the original time axis: in, It represents the result of remapping the features obtained by multi-layer perceptron (MLP) encoding the j-th periodic component of the trend term T through the ReshapeBack(·) operation. It is based on the M j Information, remap the multi-dimensional encoding results back to the original time axis, so that all periodic features maintain temporal consistency. The purpose is not to lose the local information of the time series during subsequent fusion, so as to better preserve the multi-scale feature information of the trend item under the periodic component. Similarly, It represents the result of remapping the features obtained by multi-layer perceptron (MLP) encoding of the seasonal term S corresponding to the j-th periodic component through the ReshapeBack(·) operation. The ReshapeBack(·) operation is based on the M j Information is obtained by remapping each periodic feature to the corresponding time step, so that all periodic features maintain temporal consistency; after the reorganization is completed, the features of all periodic components are fused by weighted summation to generate a multi-scale representation of the trend E T and multi-scale representation of seasons E S : The final E T and E S The main features of trend and seasonal components at different time scales are retained, providing sufficient information support for the decoding module.

4. The lightweight long-term spectrum prediction method based on a multi-scale hybrid structure according to claim 1, characterized in that: The specific process of the hybrid decoding module in step 3 is as follows: The decoding process first encodes the multi-scale features E T and E S Perform linear mapping and nonlinear activation to extract potential information and generate preliminary decoding output: h T =ReLU(W T ·HAVE BEEN T +b T ),h S =ReLU(W S ·HAVE BEEN S +b S ) Among them, W T ,W S ,W′ T ,W′ S is the weight matrix of the decoding stage, b T ,b S ,b′ T ,b′ S is the bias term, the subscript T represents the trend term, the subscript S represents the season term, and the superscript ′ represents the weight matrix and bias term used to distinguish different stages of the decoding process in the current decoding module; trend prediction and seasonal forecasts Respectively represent the prediction results of trend and detail change characteristics in future time steps; in order to integrate the decoding output of trend and seasonal characteristics, the module uses addition to generate the final prediction value 5. The lightweight long-term spectrum prediction method based on a multi-scale hybrid structure according to claim 1, characterized in that: In step 2, the spectrum data is divided into a training set and a test set in a ratio of 8:

2.

6. The lightweight long-term spectrum prediction method based on a multi-scale hybrid structure according to claim 1, characterized in that: In step 4, the value of β ranges from 2 to 6.

Citation Information

Cited By

  • Single-variable ultra-short-term wind power prediction method based on two-stage trend decomposition

    CN120414533A

  • Multi-scale wireless channel propagation loss prediction method based on finite element method

    CN120785448A