Abnormal electromagnetic spectrum intelligent early warning method
By constructing a neural network model through unsupervised learning of a time-gated network and a multi-head attention mechanism, the problems of difficulty in selecting feature parameters and collecting abnormal samples in traditional spectrum warning are solved, and accurate warning of signal interruption and signal frequency shift emission is achieved.
Patent Information
- Application Number
- CN202510667455.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-16
AI Technical Summary
It is difficult to select characteristic parameters in traditional abnormal spectrum warning, and the warning effect of supervised learning-based models is poor when it is difficult to collect abnormal samples.
An unsupervised learning method is adopted. Through a neural network model based on a temporal gating network and a multi-head attention mechanism, abnormal spectrum warning is performed only relying on normal spectrum data. The improved temporal convolutional network, gated recurrent unit and multi-head attention mechanism are used for training and prediction.
The performance of abnormal spectrum warning has been improved, and it can accurately warn of signal interruption transmission and signal frequency shift transmission anomalies, with stronger generalization ability and a wide range of applications.
Smart Images

Figure CN120653914A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of abnormal electromagnetic spectrum early warning in cognitive radio technology, and in particular to an abnormal electromagnetic spectrum intelligent early warning method based on a temporal gating network and a multi-head attention mechanism. Background Art
[0002] Electromagnetic spectrum anomaly warning is crucial for ensuring communication stability. It promptly detects potential sources of interference or abnormal signals, preventing damage to communication links and ensuring information continuity and reliability. Furthermore, the warning system can identify the impact of abnormal devices on other frequency bands, optimize spectrum resource allocation, and enhance the overall electromagnetic environment adaptability of cognitive radio technology. In complex adversarial environments, accurate spectrum warning provides critical support for decision-making and enhances situational awareness, thereby ensuring information superiority and mission success.
[0003] Existing research can be divided into two categories based on different technical routes: one is the traditional method based on signal characteristics, and the other is the intelligent method based on deep learning. For example, the logarithmic relationship between the distance from the signal source and the received power is used to calculate the difference between the estimated power and the actual power using a linear relationship (LIU S, CHEN Y, TRAPPEW, et al. ALDO: An anomaly detection framework for dynamic spectrum access networks [C]. IEEE INFOCOM 2009. IEEE, 2009: 675-683.). This model considers both frequency and time domain information and uses this information to identify potential anomalies. It also introduces an adaptive learning mechanism to cope with real-time changes in the radio environment. When processing high-dimensional spectrum measurement data, the Mahalanobis distance is used to analyze the historical patterns of the radio spectrum to reveal potential anomalies (YIN S, LI S, YIN J. Temporal-spectral data mining in anomaly detection for spectrum monitoring [C]. 2009 5th International Conference on Wireless Communications, Networking and Mobile Computing. IEEE, 2009: 1-5.). In a wireless environment, the statistical characteristics of the wireless channel between the transmitter and the receiver are unique, so this characteristic can be used as a radio fingerprint to identify anomalies (CHIN WL, TSENG CL, TSAI CS, et al. Channel-based detection of primary user emulation attacks in cognitive radios [C]. 2012 IEEE 75th Vehicular Technology Conference (VTC Spring). IEEE, 2012: 1-5.) transform the anomaly detection problem under malicious transmit power and illegal access into hypothesis testing. Then, a generalized multi-hypothesis criterion is designed. Based on this criterion, two types of test rules are designed using the Rao test and the generalized likelihood ratio test (ZHANG L, DING G, WU Q, et al. Spectrumsensing under spectrum misuse behaviors: A multi-hypothesis test perspective [J]).IEEE Transactions on Information Forensics and Security, 2017, 13(4): 993-1007.), anomaly detection and warning are achieved by analyzing the active use of the spectrum. First, the time-frequency diagram of the received signal and the generated spectrum image are analyzed. Then, a deep predictive coding network is used to train using images corresponding to the normal behavior of the system. Finally, whenever an anomaly occurs, the deviation between the actual behavior and the predicted behavior will trigger an anomaly (TANDIYAN, JAUHARA, MAROJEVIC V, et al. Deep predictive coding neural network for RF anomaly detection in wireless networks[C]. 2018IEEE International Conference on Communications Workshops(ICC Workshops). IEEE, 2018: 1-6.), considering that it is difficult to actually generate anomaly signals, an anomaly warning method based on a deep variational autoencoder is used. The model is trained using only normal state data, and the reconstruction error of the trained network is used to determine whether an abnormal state has occurred (KIM MS, YUNJ P, LEE S, et al. Unsupervised anomaly detection of lm guide using Variational autoencoder[C].201911th International Symposium on Advanced Topics in Electrical Engineering(ATEE).IEEE,2019:1-5.), generates a spectrogram through short-time Fourier transform, then combines the encoder with a generative adversarial network to reconstruct the spectrogram, and finally detects the presence of anomalies based on the reconstruction error and the discriminator loss (ZHOU X,XIONG J,ZHANG X,et al.A radio anomaly detection algorithm based on modified generative adversarial network[J].IEEE Wireless Communications Letters,2021,10(7):1552-1556.).
[0004] Through the above analysis, the problems and defects of the existing technology are as follows:
[0005] (1) In traditional abnormal spectrum warning, the characteristic parameters that can describe the signal must be determined first. However, in actual situations, it is difficult to select characteristic parameters, and a single feature is often difficult to achieve the desired effect.
[0006] (2) In practice, radio signals are in a normal working state most of the time, and the probability of anomalies is relatively small, which makes it difficult to collect abnormal samples. However, models based on supervised learning usually require a clear understanding of the distribution characteristics of signal samples under normal and abnormal conditions, resulting in poor early warning effects.
[0007] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention
[0008] Traditional abnormal spectrum warnings must first determine the characteristic parameters that can describe the signal. However, in actual situations, characteristic parameters are difficult to select, and a single feature often fails to achieve the desired effect. Secondly, supervised learning-based models usually require a clear understanding of the distribution characteristics of signal samples under normal and abnormal conditions. However, in reality, signals are in a normal state most of the time, and the probability of anomalies is relatively low, making the collection of abnormal samples difficult. Therefore, the present invention provides an intelligent warning method for abnormal electromagnetic spectrum. This method uses an unsupervised learning method and relies solely on normal spectrum data to establish a network model. Specifically, it improves the performance of abnormal spectrum warning by using an intelligent warning method for abnormal spectrum based on a temporal gating network and a multi-head attention mechanism.
[0009] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0010] According to a first aspect of the present invention, there is provided a method for intelligent early warning of abnormal electromagnetic spectrum, the method comprising:
[0011] Collecting spectrum data, converting the collected spectrum data into a time occupancy sequence, and dividing the time occupancy sequence into a training set and a test set;
[0012] A neural network model is constructed by connecting an improved temporal convolutional network, a gated recurrent unit, and a multi-head attention unit in series. The improved temporal convolutional network inputs raw data into multiple causal convolutional layers with different dilation factors by fusing causal convolutional layers with different dilation factors. These causal convolutional layers capture temporal features of different scales through their respective dilation factors.
[0013] The training set data is input into the neural network model for training. The improved temporal convolutional network extracts the local temporal features of the input sequence, the gated recurrent unit captures the global long-term dependencies of the sequence, and the multi-head attention learns the diverse dependencies at different positions in the sequence. Finally, the trained neural network model is saved.
[0014] Input the test set data into the trained neural network model to obtain the predicted data, calculate the deviation between the predicted data and the test set data, use extreme value theory to learn the distribution of the deviation, and set the threshold for abnormality judgment;
[0015] Make predictions for future moments, add abnormal signals at future moments, calculate the deviation between the predicted data and the abnormal data, compare the deviation with the threshold, and determine whether an abnormality occurs.
[0016] In some exemplary embodiments, the collecting spectrum data and converting the collected spectrum data into a time occupancy sequence includes:
[0017] Collect frequency band scan data within a historical period and generate channel state information using a threshold method;
[0018] A time occupancy sequence is calculated based on the channel state information.
[0019] In some exemplary embodiments, the improved temporal convolutional network includes:
[0020] Causal convolution, which pads the input sequence with zeros on the left so that the length of the output sequence does not change;
[0021] Dilated convolution, by introducing a dilation factor to skip some feature points, allows the convolution kernel to cover a larger range of data while retaining all the original information. The skipped features are not directly discarded, but are used in subsequent calculations;
[0022] The residual module transfers information by introducing cross-layer connections and adding the initial input and the output of the middle layer of the network;
[0023] The causal convolution and dilated convolution together constitute the dilated causal convolution, and the residual module contains the dilated causal convolution.
[0024] In some exemplary embodiments, the dilated convolution formula is:
[0025]
[0026] Among them, K is the size of the convolution kernel, d is the expansion factor, d = c i (i=0,1,…,n-1), c is the basic expansion factor, and n is the number of network layers.
[0027] In some exemplary embodiments, inputting the training set data into the neural network model for training specifically includes:
[0028] Randomly initialize all learnable parameters in the neural network, select the Adam optimizer as the network model optimizer, select the mean absolute error as the loss function, and customize the maximum number of initialization iterations and learning rate;
[0029] The training set data is randomly shuffled and input into the 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.
[0030] In some exemplary embodiments, using extreme value theory to learn the distribution of deviations and setting a threshold for abnormality determination specifically includes:
[0031] The super-threshold model is used to learn data deviations to set an abnormal threshold, and data exceeding the threshold is judged as abnormal data. The formula is as follows:
[0032]
[0033] Where P(·) is the probability function, th is the initial threshold for abnormality determination, γ and β are the shape parameter and scale parameter of the generalized Pareto distribution, err-th is the abnormal area exceeding the initial threshold th, and the maximum likelihood estimation is used to iteratively update the parameters γ and β to finally obtain the threshold th F , the calculation formula is as follows:
[0034]
[0035] in, and is the result of the update iteration of parameters γ and β, q is the expected probability value that satisfies err>th, N is the number of the entire sample, N th is the number of samples that satisfy the relationship err>th.
[0036] In some exemplary embodiments, comparing the deviation with a threshold to determine whether an abnormality occurs specifically includes:
[0037] If the deviation is greater than the threshold, it is considered an outlier, otherwise it is considered a normal value.
[0038] According to a second aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the abnormal electromagnetic spectrum intelligent early warning method described in the first aspect is implemented.
[0039] According to a third aspect of the present invention, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the abnormal electromagnetic spectrum intelligent early warning method described in the first aspect is implemented.
[0040] According to a fourth aspect of the present invention, there is provided an electronic device, comprising:
[0041] processor; and
[0042] a memory for storing executable instructions of the processor;
[0043] Wherein, the processor is configured to implement the abnormal electromagnetic spectrum intelligent early warning method described in the first aspect above by executing the executable instructions.
[0044] The intelligent warning method for abnormal electromagnetic spectrum provided by the embodiment of the present invention constructs the time occupancy of the spectrum and adopts a neural network model composed of an improved temporal convolutional network, a gated recurrent unit, and a multi-head attention mechanism to only learn the usage pattern of time occupancy under normal working conditions. It then uses extreme value theory to set the threshold for abnormal judgment and compares the deviation between the predicted value and the measured value of the time occupancy in the future period with the threshold to achieve spectrum abnormality warning. It has stronger generalization ability and a wider range of applications. The specific manifestations are as follows:
[0045] 1. The method of intelligent early warning of abnormal spectrum of the present invention adopts an unsupervised learning scheme, uses time occupancy to characterize the usage status of the spectrum, learns the law of time occupancy under normal working conditions through a neural network, and classifies data that does not conform to the law as abnormal.
[0046] 2. The neural network model of abnormal spectrum intelligent warning in the present invention not only uses the time series convolutional network, but also improves its network architecture and designs a time series convolutional network that integrates multiple dilation factors. At the same time, in order to further improve the accuracy of spectrum warning, it combines the gated recurrent unit and the multi-head attention mechanism to achieve accurate prediction of spectrum time occupancy.
[0047] 3. Compared with the existing technology, the abnormal spectrum intelligent early warning method based on the timing gated network and multi-head attention mechanism of the present invention can accurately warn of signal interruption emission anomalies and signal frequency shift emission anomalies, and has a wide range of applications.
[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present invention, and together with the description, serve to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and it is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0050] Figure 1 This is a flow chart of an abnormal spectrum intelligent early warning method based on a temporal gating network and a multi-head attention mechanism according to an embodiment of the present invention;
[0051] Figure 2 This is a comparison chart of predicted data and actual data under abnormal signal interruption and transmission;
[0052] Figure 3 It is a comparison chart of predicted data and abnormal data in the future time period under the abnormal signal interruption transmission;
[0053] Figure 4 This is a comparison chart of predicted data and actual data under abnormal signal frequency shift transmission;
[0054] Figure 5 It is a comparison chart of predicted data and abnormal data in the future time period under abnormal signal frequency shift transmission. DETAILED DESCRIPTION
[0055] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0056] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0057] In view of the shortcomings and deficiencies of the existing technology, this example embodiment provides an abnormal spectrum intelligent early warning method, specifically an abnormal spectrum intelligent early warning method based on a temporal gating network and a multi-head attention mechanism. Figure 1 As shown, the following steps may be specifically included:
[0058] S101, collect spectrum data, calculate its time occupancy sequence, and divide the sequence into a training set and a test set; the specific method is:
[0059] Collect frequency band scan data within a historical period and generate channel state information (CSI) using a threshold method, as shown below:
[0060]
[0061] Among them, "0" indicates that the channel is idle, "1" indicates that the channel is occupied, e indicates the measured level value in the historical time period, and E indicates the level judgment threshold in the historical time period.
[0062] The collected spectrum data is converted into a time occupancy sequence. Time Channel Occupancy (TCO) refers to the spectrum occupancy of a channel within a certain period of time. Specifically, if the total observation time of the channel is T obs , then its time occupancy can be calculated by its effective use time T u The percentage of the total observation time is obtained, that is:
[0063]
[0064] The historical spectrum occupancy status data is divided into K = L / M segments in equal proportion, where L is the total number of time slots in the historical spectrum data and M is the number of time slots contained in each time series. The time occupancy formula is used to calculate the proportion of time slots in state "1" in each time series, thereby obtaining the time occupancy sequence, which is then divided into a training set and a test set.
[0065] Time occupancy has certain periodic characteristics. Therefore, by studying its periodicity and usage patterns, we can infer the time occupancy of the channel in the future time period. If the spectrum is found to be abnormal, that is, the spectrum time occupancy at this moment is significantly different from the spectrum time occupancy in the past period of time, it can be considered that the spectrum is abnormal.
[0066] S102: Construct a neural network model based on an improved temporal convolutional network, a gated recurrent unit, and a multi-head attention network in series. The specific method is as follows:
[0067] This paper not only uses the Temporal Convolutional Network (TCN) for spectrum anomaly warning, but also improves its network architecture. A fused multi-dilated factor time convolution network (FMDFTCN) is designed. To further improve the accuracy of abnormal spectrum warning, a new abnormal spectrum warning model based on the temporal gating network and multi-head attention (MHA) mechanism is proposed, combining the gated recurrent unit (GRU) and multi-head attention (MHA) mechanism. The network model is composed as follows.
[0068] The Temporal Convolutional Network (TCN) was developed to address the high memory usage problem of traditional recurrent neural networks (RNNs) in long-term time series prediction due to feature accumulation. It has strict temporal constraints and ensures data causality. It primarily consists of three components: causal convolution, dilated convolution, and residual connections. Causal convolution and dilated convolution together form the dilated causal convolution, while the residual module includes the dilated causal convolution.
[0069] (1) Causal convolution, which is based on convolutional neural networks. In traditional convolution operations, each output value is based on the input values around it, including future time points. However, in causal convolution, the weights are only applied to the current and past input values and are independent of future time values. This ensures the directionality of the information flow and prevents future information from leaking into the current output. It is a strict time constraint model. Usually, appropriate values are added to the left side of the input sequence to keep the length of the output sequence unchanged. The common method is to fill in zeros. The causal convolution formula is:
[0070]
[0071] Where F=(f1,f2,…,f K ) filter, K is the size of the convolution kernel, X=(x1,x2,…,x T ) is the input sequence.
[0072] (2) Dilated convolution, whose core goal is to optimize the expansion of the receptive field. Before the dilated convolution was proposed, the expansion of the receptive field usually relied on pooling operations, but pooling would cause some information to be lost. Dilated convolution, on the other hand, introduces a dilation factor to skip some feature points, allowing the convolution kernel to cover a larger range of data while retaining all the original information. The skipped features will not be directly discarded, but will be used in subsequent calculations. Figure 3As shown in Figure 4, with the same number of network layers, dilated convolution can achieve a larger receptive field than traditional convolution while avoiding the loss of feature information. The dilated convolution formula is:
[0073]
[0074] Among them, K is the size of the convolution kernel, d is the expansion factor, d = c i (i=0,1,…,n-1), c is the basic expansion factor, generally 2, and n is the number of network layers.
[0075] (3) Residual module, which transmits information by introducing cross-layer connections and adding the initial input and the output of the middle layer of the network. As the depth of the network increases, this method can effectively alleviate the instability of the model, improve the training effect, and reduce the phenomenon of information loss.
[0076] The final output y of the residual module is the combination of the original input x and the output F(x) of the network layer, as shown below:
[0077] y=F(x)+x
[0078] This section mainly covers the dilated causal convolutional layer, weight normalization, activation function, and random dropout. The dilated causal convolutional layer has been explained, and the following describes the other network layers.
[0079] Weight normalization aims to optimize the connection weights between neural network layers to improve the stability of the model and effectively alleviate the effects of gradient vanishing and gradient exploding. If x represents the input feature, y represents the output, W is the weight, and b is the bias, then weight normalization can generally be expressed as:
[0080] y=Wx+b
[0081] Activation function, here we use the linear rectification function, which is widely used in various neural network models. Its calculation formula is as follows:
[0082] f(x)=max(0,x)
[0083] Dropout is a commonly used regularization method designed to reduce overfitting in deep neural networks. Furthermore, as the network structure deepens, it can also increase training time and model complexity. With dropout, neurons are temporarily ignored with a certain probability during training. This reduces the over-reliance of local features on global features, allowing the model to learn a more representative feature distribution, thereby improving generalization.
[0084] Typically, TCN models use dilated causal convolution as the first step to extract features from the input sequence. To improve network performance, different dilation coefficients are often set within the TCN. However, different dilation factors can produce different prediction results for different input data. While larger dilation factors can expand the receptive field of the TCN model, they can lead to overfitting as the number of layers increases, with some original information lost during propagation. Smaller dilation factors, while limiting the range of feature extraction, help preserve the original nature of the input data, making the model more stable. To address the limitations of single-dilation-factor causal convolution, a temporal convolutional network (TCN) with multiple dilation factors was designed. This model fuses causal convolutional layers with different dilation factors. The original data is fed into m causal convolutional layers with different dilation factors. These layers capture temporal features at different scales through their respective dilation factors. The outputs of each dilated causal convolutional layer are then fed into a fully connected layer for merging, and then fed into subsequent network layers. By introducing multiple causal convolutional layers with different dilation factors, it is possible to capture multi-scale features while effectively preventing overfitting and retaining the original feature information in the input data as much as possible.
[0085] The Gated Recurrent Unit (GRU) is an improvement on the long short-term memory neural network and is also a variant of the recurrent neural network. Its calculation formula is:
[0086]
[0087] Among them, x t and h t Represent the input and output of the gated recurrent unit, z t and r t represent the update gate and reset gate respectively, is the candidate hidden state at the current moment, h t is the final hidden state, and is the weight matrix, b p is the bias term, ⊙ is the Hadamard product, sigmod and tanh are activation functions.
[0088] The multi-head attention mechanism enables the neural network to autonomously filter and focus on key information when processing input data, while downplaying minor details, thereby effectively improving the model's execution efficiency and generalization ability. Its core lies in distributing attention to multiple heads, each focusing on different aspects of the input sequence and learning independently in its own subspace, thereby capturing more diverse and complex features. Its calculation formula is:
[0089]
[0090] Among them, X is the input matrix, Q is the query matrix, K is the key matrix, and V is the value matrix. is the matrix weight corresponding to the i-th head in the multi-head attention, d k is the dimension of the input vector.
[0091] On each head, the features are effectively fused by scaling the dot product attention operation as shown below:
[0092]
[0093] The output of each head is then concatenated and linearly transformed to generate an output vector with the same dimension as the original input vector, thus completing the entire attention calculation process, as shown below:
[0094] MultiHead(Q,K,V)=Concat(head1,head2,…,head h )W O
[0095] S103, inputting the training set data into the neural network model for training, and saving the trained neural network model; the specific process is:
[0096] All learnable parameters in the 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 initialization iterations and learning rate are customized. The training set data is randomly shuffled and input into the 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:
[0097]
[0098] Where n is the number of samples, y i is the i-th true value, is the i-th predicted 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 network model is saved.
[0099] S104: Input the test set data into the trained neural network model to obtain predicted data, calculate the deviation between the predicted data and the test set data, use extreme value theory to learn the distribution of the deviation, and set the threshold for abnormality determination; the specific process is as follows:
[0100] The data of the test set is predicted and fitted through the network model saved after training, the predicted data is compared with the real data, and then the deviation between the predicted data and the real data is calculated. The definition of deviation.
[0101]
[0102] Among them, y is the true value, The error sequence err = (e1, e2, ...) is obtained by calculating the error of each sample point, and then the abnormal threshold is set according to the extreme value theory.
[0103] Extreme value theory aims to describe and predict the probability of rare and extreme events. Extreme data often resides at the tail of a probability distribution. In the context of anomaly warning, outliers are the extreme values that extreme value theory aims to exploit. The superthreshold model is a common and important method in extreme value theory. It uses the generalized Pareto distribution to model the probability distribution of data points exceeding a preset threshold. Therefore, the superthreshold model can be used to learn data deviations to set an anomaly threshold and classify data exceeding this threshold as anomaly. The formula is as follows:
[0104]
[0105] Where P(·) is the probability function, th is the initial threshold for abnormality determination, γ and β are the shape parameter and scale parameter of the generalized Pareto distribution, err-th is the abnormal area exceeding the initial threshold th, and the maximum likelihood estimation is used to iteratively update the parameters γ and β to finally obtain the threshold th F , the calculation formula is as follows:
[0106]
[0107] in, and is the result of the update iteration of parameters γ and β, q is the expected probability value that satisfies err>th, N is the number of the entire sample, N th is the number of samples that satisfy the relationship err>th.
[0108] S105: predict the future time, add an abnormal signal at the future time, calculate the deviation between the predicted data and the abnormal data, compare the deviation with the threshold, and determine whether an abnormality occurs; the specific process is:
[0109] Finally, make a prediction for the future moment, add an abnormal signal to the future moment, calculate the deviation e between the predicted data and the abnormal data, and compare the deviation e with the threshold th generated by the super-threshold model. F Compare, if e>th F , it is considered an abnormal value, otherwise it is considered a normal value.
[0110] The technical effects of the present invention are described in detail below in conjunction with simulation experiments.
[0111] To evaluate the performance of the present invention, simulations were conducted using Python 3.9 and the PyTorch 1.12 simulation platform. Spectral data was collected and its time occupancy sequence was calculated. The training and test data sets were split in a 7:3 ratio. The MAE loss function was used, and the parameters were adjusted using the backpropagation algorithm. After multiple cycles, the optimal parameters were obtained. The Adam optimizer was used during training to ultimately obtain a trained network model.
[0112] The method proposed in this invention (an abnormal spectrum intelligent early warning method based on time-series gating network and multi-head attention mechanism) compares the predicted data with the real data under the abnormality of signal interruption transmission. Figure 2 As shown, by calculating the deviation between the two and learning the distribution of the deviation through extreme value theory, the threshold value for abnormal judgment can be obtained as th F =0.0172. By extracting the last twenty sample data of the test set, the time occupancy of the next two time points is predicted. At these two time points, the signal interruption and transmission anomaly are simulated, which leads to a significant decrease in the amount of effective signal data in the channel, thereby affecting the time occupancy of the next two sample points, making them appear smaller. For example, Figure 3 The mean of the error between the two future time points is calculated as e = 0.0307, since e > th F , so it is judged that an anomaly will occur in the next time period. This verifies the reliability of the constructed network model and proves its effectiveness in early warning of spectrum anomalies caused by signal interruption transmission.
[0113] The method proposed in this invention (an abnormal spectrum intelligent early warning method based on time-series gating network and multi-head attention mechanism) compares the predicted data with the real data under the abnormality of signal frequency shift transmission. Figure 4 As shown, by calculating the deviation between the two and learning the distribution of the deviation through extreme value theory, the threshold value for abnormal judgment can be obtained as th F =0.0235. By extracting the last twenty sample data of the test set, the time occupancy of the next two time points is predicted. At these two time points, the abnormal frequency shift transmission of the simulated signal is simulated, which leads to a significant increase in the amount of effective signal data in the channel, thereby affecting the time occupancy of the next two sample points, making it appear larger. For example, Figure 5 The mean of the error between the two future time points is calculated as e = 0.0307, since e > th F , so it is judged that an anomaly will occur in the next time period. This verifies the reliability of the constructed network model and proves its effectiveness in warning of spectrum anomalies caused by signal frequency shift transmission.
[0114] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the claims.
[0115] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings and that various modifications and variations can be made without departing from the scope thereof, which is limited only by the appended claims.
Claims
1. An intelligent early warning method for abnormal electromagnetic spectrum, characterized in that: The method comprises: Collecting spectrum data, converting the collected spectrum data into a time occupancy sequence, and dividing the time occupancy sequence into a training set and a test set; A neural network model is constructed by connecting an improved temporal convolutional network, a gated recurrent unit, and a multi-head attention unit in series. The improved temporal convolutional network inputs raw data into multiple causal convolutional layers with different dilation factors by fusing causal convolutional layers with different dilation factors. These causal convolutional layers capture temporal features of different scales through their respective dilation factors. The training set data is input into the neural network model for training. The improved temporal convolutional network extracts the local temporal features of the input sequence, the gated recurrent unit captures the global long-term dependencies of the sequence, and the multi-head attention learns the diverse dependencies at different positions in the sequence. Finally, the trained neural network model is saved. Input the test set data into the trained neural network model to obtain the predicted data, calculate the deviation between the predicted data and the test set data, use extreme value theory to learn the distribution of the deviation, and set the threshold for abnormality judgment; Make predictions for future moments, add abnormal signals at future moments, calculate the deviation between the predicted data and the abnormal data, compare the deviation with the threshold, and determine whether an abnormality occurs.
2. The method according to claim 1, characterized in that The collecting of spectrum data and converting the collected spectrum data into a time occupancy sequence includes: Collect frequency band scan data within a historical period and generate channel state information using a threshold method; A time occupancy sequence is calculated based on the channel state information.
3. The method according to claim 1, characterized in that The improved temporal convolutional network includes: Causal convolution, which pads the input sequence with zeros on the left so that the length of the output sequence does not change; Dilated convolution, by introducing a dilation factor to skip some feature points, allows the convolution kernel to cover a larger range of data while retaining all the original information. The skipped features are not directly discarded, but are used in subsequent calculations; The residual module transfers information by introducing cross-layer connections and adding the initial input and the output of the middle layer of the network; The causal convolution and dilated convolution together constitute the dilated causal convolution, and the residual module contains the dilated causal convolution.
4. The method according to claim 3, characterized in that The dilated convolution formula is: Among them, K is the size of the convolution kernel, d is the expansion factor, d = c i (i=0,1,…,n-1), c is the basic expansion factor, and n is the number of network layers.
5. The method according to claim 1, wherein The inputting of the training set data into the neural network model for training specifically includes: Randomly initialize all learnable parameters in the neural network, select the Adam optimizer as the network model optimizer, select the mean absolute error as the loss function, and customize the maximum number of initialization iterations and learning rate; The training set data is randomly shuffled and input into the 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.
6. The method according to claim 1, characterized in that The method of using extreme value theory to learn the distribution of deviations and set the threshold for abnormality determination specifically includes: The super-threshold model is used to learn data deviations to set an abnormal threshold, and data exceeding the threshold is judged as abnormal data. The formula is as follows: Where P(·) is the probability function, th is the initial threshold for abnormality determination, γ and β are the shape parameter and scale parameter of the generalized Pareto distribution, err-th is the abnormal area exceeding the initial threshold th, and the maximum likelihood estimation is used to iteratively update the parameters γ and β to finally obtain the threshold th F , the calculation formula is as follows: in, and is the result of the update iteration of parameters γ and β, q is the expected probability value that satisfies err>th, N is the number of the entire sample, N th is the number of samples that satisfy the relationship err>th.
7. The method according to claim 1, characterized in that Comparing the deviation with the threshold to determine whether an abnormality occurs specifically includes: If the deviation is greater than the threshold, it is considered an outlier, otherwise it is considered a normal value.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormal electromagnetic spectrum intelligent early warning method according to any one of claims 1 to 7 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormal electromagnetic spectrum intelligent early warning method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the abnormal electromagnetic spectrum intelligent early warning method according to any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Cited By
Urodynamics equipment state evaluation method and device based on hybrid neural network
CN121479431A