A multi-band spectrum prediction method and terminal of a power wireless network
By combining stacked encoders and long short-term memory networks with attention mechanisms, the problems of multi-dimensional feature extraction and dependency processing in power wireless network spectrum prediction are solved, achieving higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202410663398.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-05-27
AI Technical Summary
Existing power wireless network spectrum prediction methods have shortcomings in multi-dimensional feature extraction and parameter setting, resulting in poor prediction performance. In particular, recurrent neural networks have difficulty effectively handling the dependencies of spectrum data.
A stacked encoder is used to extract features layer by layer from the power spectral density data of the power wireless network. A long short-term memory network is combined for temporal feature learning, and an attention mechanism is introduced to dynamically adjust the weights, thereby improving the model's ability to capture key features.
It improves the reliability and accuracy of spectral prediction, enhances the model's ability to perceive important information in the sequence, and improves the stability and generalization ability of prediction.
Smart Images

Figure CN118473565B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power spectrum prediction, and particularly relates to a multi-band spectrum prediction method and terminal of a power wireless network. BACKGROUND
[0002] With the increase of power grid terminal devices and control business terminals, the demand for spectrum resources of the power wireless private network also increases. Therefore, it is particularly important for the power wireless private network to perform power multi-band spectrum prediction. Research based on power multi-band spectrum prediction can provide important support for spectrum resource allocation and utilization of the power wireless private network. By analyzing the evolution of the spectrum state and predicting the spectrum usage, the spectrum resources of the power wireless private network can be better planned and managed, and the spectrum utilization efficiency can be improved.
[0003] Most of the existing spectrum prediction methods can be summarized into two categories: model-driven and data-driven.
[0004] The model-driven method mainly extracts features in a single dimension such as time or space, which easily leads to the loss of feature information in other dimensions. Meanwhile, the parameters of the model are determined in advance, which greatly reduces the prediction performance in actual use.
[0005] The data-driven method includes traditional machine learning and deep learning methods, among which the neural network method is widely concerned because of its good prediction accuracy. For example, the recurrent neural network (RNN) is used to learn the time correlation. However, it is difficult to effectively handle the dependency of the spectrum data using the recurrent neural network. SUMMARY
[0006] The technical problem to be solved by the present application is to provide a multi-band spectrum prediction method and terminal of a power wireless network, which can improve the reliability and accuracy of spectrum prediction.
[0007] To solve the above technical problems, the technical scheme adopted by the present application is:
[0008] A multi-band spectrum prediction method of a power wireless network, comprising the steps of:
[0009] S1, collecting power spectrum density data of each frequency band of the power wireless network at different times in history, preprocessing the power spectrum density data, and establishing a power spectrum density matrix at different time steps;
[0010] S2, using at least two sequentially stacked encoders, encoding each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector, and inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder;
[0011] S3, performing time sequence feature learning on the feature matrix of different time steps through a long short-term memory network to obtain output results of different time steps of a network hidden layer;
[0012] S4, inputting the output results of different time steps into an attention mechanism for prediction to obtain a spectrum prediction result of a next time step.
[0013] To solve the above technical problems, another technical solution adopted by the present application is:
[0014] A multi-band spectrum prediction terminal of a power wireless network comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements each step of the multi-band spectrum prediction method of the power wireless network.
[0015] The present application has the beneficial effects that: the power spectrum density data of each frequency band of the power wireless network collected at different times in history is preprocessed, the features of the power spectrum density data are extracted layer by layer through a stacked encoder, and the abstract features of the data can be gradually understood; the long-term dependence relationship in the data is learned through a long short-term memory network, thereby improving the generalization ability and prediction effect of the prediction model; by introducing an attention mechanism, the model can dynamically adjust the weight according to the importance of the input data, more accurately capture the key feature information, dynamically focus on the most relevant part in the input sequence, improve the perception ability of the model to the important information in the sequence, and further improve the stability and reliability of the prediction. In this way, through the model of the stacked encoder-long short-term memory network-attention mechanism, the reliability and accuracy of the spectrum prediction can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A flowchart of a multi-band spectrum prediction method of a power wireless network according to an embodiment of the present application;
[0017] Figure 2 A schematic diagram of a multi-band spectrum prediction terminal of a power wireless network according to an embodiment of the present application;
[0018] Figure 3 A flowchart of a multi-band spectrum prediction method of a power wireless network according to an embodiment of the present application;
[0019] Figure 4 A framework diagram of a multi-band spectrum prediction method of a power wireless network according to an embodiment of the present application;
[0020] LABEL EXPLANATION:
[0021] 1. A multi-band spectrum prediction terminal of a power wireless network; 2. a memory; 3. a processor. DETAILED DESCRIPTION
[0022] To illustrate the technical content, the purposes and effects of the present application, the following will be described in conjunction with the embodiments and the accompanying drawings.
[0023] Please refer to Figure 1 The embodiment of the present application provides a multi-band spectrum prediction method of a power wireless network, comprising the steps of:
[0024] S1, collecting power spectrum density data of each frequency band of the power wireless network at different times in history, preprocessing the power spectrum density data, and establishing a power spectrum density matrix of different time steps;
[0025] S2, using at least two sequentially stacked encoders, encoding each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector, and inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder;
[0026] S3, learning the time sequence characteristics of the feature matrix of different time steps through a long short-term memory network to obtain the output results of the network hidden layer of different time steps;
[0027] S4, inputting the output results of different time steps into an attention mechanism for prediction to obtain the spectrum prediction results of the next time step.
[0028] From the above description, the beneficial effects of the present application are as follows: the power spectrum density data of each frequency band of the power wireless network collected at different times in history is preprocessed, the features of the power spectrum density data are extracted layer by layer through the stacked encoder, and the abstract features of the data can be gradually understood; the long-term dependence relationship in the data is learned through the long short-term memory network for the feature matrix output by the encoder, so as to improve the generalization ability and prediction effect of the prediction model; by introducing the attention mechanism, the model can dynamically adjust the weight according to the importance of the input data, more accurately capture the key feature information, dynamically focus on the most relevant part in the input sequence, improve the perception ability of the model to the important information in the sequence, and further improve the stability and reliability of the prediction. In this way, through the model of stacked encoder-long short-term memory network-attention mechanism, the reliability and accuracy of spectrum prediction can be effectively improved.
[0029] Further, step S2 comprises:
[0030] using an encoder to encode each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector:
[0031] m i =e(W1h i +a1)
[0032]
[0033] In the formula, m i This represents the encoded low-dimensional vector, e represents the encoding function of the encoder's encoding layer, W1 represents the weight value, and h... i Let represent the i-th vector in the power spectral density matrix, a1 represent the bias value, θ represent the weighting parameter, and L represent the loss function. This represents the partial derivative of the loss function L with respect to the weights W1;
[0034] The low-dimensional vectors calculated by each encoder layer are input into the next encoder layer, and the feature matrix is built based on the low-dimensional vectors calculated by the last encoder layer.
[0035] As described above, by extracting feature representations from input data layer by layer using stacked autoencoders, multi-scale features of spectral data can be effectively captured, thus reflecting the complex structure of the spectrum more comprehensively. This layer-by-layer extraction method enables the model to gradually understand the abstract features of the data, providing richer and more accurate information for subsequent predictions.
[0036] Furthermore, the outputs at different time steps are input into the attention mechanism for prediction, including:
[0037] The output calculation formula for the attention layer in the attention mechanism is as follows:
[0038]
[0039] γ = softmax(W) c F z +b c )
[0040] In the formula, F represents the output of the hidden layer of the network at different times t. t express The hidden unit, W t b t W c b c Both represent learnable parameters, a t F represents the attention probability. z Let γ represent the attention feature vector, and let γ represent the prediction result.
[0041] As can be known from the above description, by introducing the attention mechanism, the model can dynamically focus on the most relevant part of the input sequence, improving the model's ability to perceive important information in the sequence. This mechanism enables the model to dynamically adjust the weight according to the importance of the input data, more accurately capture key feature information, and thus improve the stability and reliability of the prediction.
[0042] Further, the obtaining the spectral prediction result of the next time step further comprises:
[0043] The loss parameter is determined by minimizing the difference between the prediction result and the actual power spectral density:
[0044]
[0045] In the formula, h i represents the actual power spectral density, and N represents the number of frequency bands.
[0046] As can be known from the above description, the known spectral data sequence is used as input and the corresponding target sequence (the spectral data of the next time step) is used as output. By minimizing the difference between the predicted sequence and the target sequence, the model parameters are adjusted to optimize the entire prediction model.
[0047] Further, the step S4 comprises:
[0048] The spectral prediction result is evaluated, and the output of part of the neurons in the long short-term memory network is randomly discarded according to the evaluation result.
[0049] As can be known from the above description, during the training process, the output of part of the neurons in the long short-term memory network is randomly discarded to reduce the over-reliance relationship in the neural network. These deleted neurons do not participate in the calculation of the output, so that the model can avoid excessive dependence on specific neurons, thereby improving the generalization ability and robustness of the model.
[0050] Please refer to Figure 2 Another embodiment of the present application provides a multi-band spectral prediction terminal of a power wireless network, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of the above-mentioned multi-band spectral prediction method of the power wireless network when executing the computer program.
[0051] The above-mentioned multi-band spectral prediction method and terminal of the power wireless network are suitable for improving the reliability and accuracy of spectral prediction, and the following will be described through specific embodiments:
[0052] Embodiment one
[0053] Please refer to Figure 1 , Figure 3and Figure 4 A multi-band spectrum prediction method of a power wireless network, comprising the steps of:
[0054] S1, collecting power spectrum density data of each frequency band of the power wireless network at different times in history, preprocessing the power spectrum density data, and establishing a power spectrum density matrix at different time steps.
[0055] Specifically, in the power wireless private network, the power spectrum density values of different spectrums can provide rich information about the signal spectrum characteristics. By analyzing and modeling these data, the future spectrum usage can be predicted. This is of great significance for effective spectrum resource management, spectrum allocation, interference monitoring, etc. Therefore, the power spectrum density value is selected as the spectrum prediction data.
[0056] The collected power spectrum density data is cleaned to remove duplicate data, error data and incomplete data, and the data is associated and formatted to ensure the accuracy of subsequent data processing.
[0057] S2, using at least two sequentially stacked encoders, encoding each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector, and inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder.
[0058] In this embodiment, by training the stacked auto-encoder, the features of the data are learned layer by layer, and the feature extraction of the power spectrum density data is realized.
[0059] The principle of the stacked auto-encoder is that each layer extracts features based on the input of the previous layer, and through layer-by-layer learning, more abstract features are obtained. Through the stacking of multiple AE (Auto-Encoder, auto-encoder), the extraction of low-dimensional features is realized. The input data is mapped to a low-dimensional encoding representation in the encoding stage; each AE is trained separately, and then the output layer of each trained AE is removed, the hidden layer of the previous AE is connected to the input of the next AE, and all AEs are stacked in this way. The collected power spectrum density data is input into the stacked auto-encoder to learn the feature representation of the data.
[0060] The formula of the auto-encoder is:
[0061] m i =e(W1h i +a1)
[0062]
[0063] In the formula, m irepresents the encoded low-dimensional vector; e represents an encoding function of the encoder encoding layer, and the encoding function is set as a sigmoid function; W1 represents a weight value; h i represents the i-th vector in the power spectral density matrix; a1 represents a bias value; θ represents a weight parameter, which is updated and optimized through a back propagation algorithm; L represents a loss function; represents the partial derivative of the loss function L with respect to the weight W1.
[0064] The feature matrix is established according to the low-dimensional vector calculated by the last layer of the encoder.
[0065] S3, performing time sequence feature learning on the feature matrix at different time steps through a long short-term memory network to obtain output results of a network hidden layer at different time steps.
[0066] It has been proved in the prior art that the prediction of time series using RNN is effective, but RNN is prone to problems of gradient disappearance and gradient explosion. Therefore, the LSTM model is considered, which introduces a memory unit and a nonlinear gating unit on the basis of RNN. The memory unit mainly transmits information over time, and the gating unit is nonlinear, which controls the memory cell information flowing into the confluence at each time point. In LSTM, each neuron contains three sigmoid layers and a tanh activation function module, which are simply connected and interact with each other. The forgetting gate can decide the information to be retained, mainly according to the input at the current time and the hidden state at the last time, to decide whether to retain or forget the cell state information at the last time. This decision is realized by outputting a value between 0 and 1, which represents the weight coefficient of the cell state at the last time. When the value is close to 1, it means that the cell state at the last time is completely retained; and when it is close to 0, it means that the cell state at the last time is almost completely ignored, which is equivalent to completely deleting this part of information.
[0067] The input gate controls the influence degree of the input information at the current time step on the state update at the current time step. When the input gate is close to 1, the influence of the input is large; when the input gate is close to 0, the influence of the input is small. The input gate also combines the forgetting gate and the cell state to decide the update of the cell state. The output gate controls the output value at the current time, which evaluates the combination of the current input and the memory state by using a sigmoid activation function to obtain a value between 0 and 1. At the same time, the current memory state is processed by using a tanh activation function and multiplied by the value of the output gate to obtain the current output of the LSTM. When the output gate is close to 1, the information of the cell state is fully output; when the output gate is close to 0, the information of the cell state is suppressed and not output to the hidden state. The specific gate function and the calculation of other values are as follows:
[0068]
[0069] k t =o t tanh(c t )
[0070] In the formula, denotes the power spectral density value of each frequency band at time t, which is obtained by updating the new low-dimensional vector m i through the stacked autoencoder, z t is the forget gate, r t is the input gate, is the cell hidden state, c t is the cell state, o t is the output gate, k t is the cell hidden layer output. W z , U z , b z , W r , U r , b r , W c , U c , b c , W o , U o , b o are all learnable parameters, sigma is a sigmoid function, tanh(·) is a hyperbolic tangent activation function, and * denotes Hadamard product.
[0071] S4, input the output results of different time steps into the attention mechanism for prediction to obtain the spectral prediction results of the next time step.
[0072] Specifically, the attention mechanism (Attention Mechanism) processes input data through weighted encoding, dynamically calculates weights to find key target data. This mechanism is similar to an autoencoder and includes two links of encoding and decoding. The attention module captures the relevance of the encoder and decoder hidden states, calculates the required attention weights, and then combines these weights with the encoder hidden states to pass them to the decoder for further processing. The introduction of the attention mechanism enables the neural network to dynamically adjust the weights according to the importance of the input data, more accurately capturing key feature information.
[0073] Although the LSTM network can capture long-term dependencies, it does not distinguish the importance of different parts. After introducing the attention mechanism, the network can dynamically adjust the attention degree of different parts of the input sequence, so as to capture important information more effectively and improve the performance of the model. The main idea is to find the weight related to the current prediction by solving the weight of the LSTM hidden layer output, so as to optimize the output result. The weight is mainly solved by the back propagation of the entire neural network. The input data of different time steps respectively passes through the LSTM structure to obtain the output of the hidden layer. For each time step, the mean value of different features is solved, so that each time step obtains a mean value. The weight obtained by the mean value of different time steps is solved, and the weight and the output of the LSTM hidden layer are multiplied to assign different weights to each time step. The output calculation formula of the attention layer is:
[0074]
[0075] γ=softmax(W c F z +b c )
[0076] In the formula, represents the output result of the network hidden layer at different time t; F t represents the hidden unit, which maps the result of linear transformation to a continuous value in the range of-1 to 1; W t , b t , W c , b c all represent learnable parameters, which can be updated and optimized by the back propagation algorithm; a t represents the attention probability; F z represents the attention feature vector, which represents the attention degree of the input sequence at different time steps; γ represents the prediction result.
[0077] The entire model is trained end-to-end, and the known frequency spectrum data sequence is used as the input and the corresponding target sequence (the frequency spectrum data of the next time step) as the output. By minimizing the difference between the predicted sequence and the target sequence, the model parameters are adjusted to optimize the entire prediction model:
[0078]
[0079] In this way, the model (SAE-Att-LSTM) stacked with the encoder-long short-term memory network-attention mechanism in the embodiment can effectively improve the reliability and accuracy of the spectrum prediction.
[0080] S5, evaluating the spectrum prediction result, and randomly discarding the output of part of the neurons according to the evaluation result.
[0081] Specifically, overfitting is usually caused by a model that is too complex or insufficient training data. When the model is too complex, it may learn the noise or details in the training data and regard it as a general rule, resulting in a decline in the generalization ability on new data. When the training data is insufficient, the model may not be able to fully learn the potential patterns and rules in the data, also causing overfitting.
[0082] In this embodiment, the Dropout technology is adopted, and after the activation function of each layer of the LSTM network, the Dropout can be applied. In this way, the output of part of the neurons can be randomly discarded to reduce the over-reliance relationship in the neural network and prevent overfitting. The deleted neurons do not participate in the calculation of the output, so the model can be prevented from relying too much on specific neurons, thereby improving the generalization ability and robustness of the model.
[0083] Embodiment two
[0084] Please refer to Figure 2 A multi-band spectrum prediction terminal 1 of a power wireless network, comprising a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 implements each step of the multi-band spectrum prediction method of the power wireless network according to the computer program.
[0085] In summary, the multi-band spectrum prediction method and terminal of the power wireless network provided by the present application use a stacked autoencoder to learn the feature representation of the input spectrum; use a long short-term memory (LSTM) network to process the long-term dependence relationship in the sequence data, which facilitates the consideration of information in a longer time range in the prediction task; introduce an attention mechanism to improve the attention degree to key historical information; after obtaining the trained attention LSTM network, the model is adjusted and optimized to predict the power multi-band spectrum. The power multi-band spectrum prediction method based on the stacked autoencoder and the attention mechanism long short-term memory network provided by the present application can better plan and optimize the wireless communication network by predicting the future spectrum state, and help the power system manager to make resource scheduling and decision-making. By comparing with other spectrum prediction methods, the power multi-band spectrum prediction method based on the stacked autoencoder and the attention mechanism long short-term memory network provides an effective solution, which can better plan and manage the spectrum resources of the power wireless private network.
[0086] The above merely illustrates the embodiments of the present application, and is not intended to limit the patent scope of the present application. Any equivalent transformation or direct or indirect application in the related technical field based on the content of the present application specification and drawings is also included in the patent protection scope of the present application.
Claims
1. A multi-band spectrum prediction method for a power wireless network, characterized in that, The method comprises the steps of: S1, collecting power spectrum density data of each frequency band of a power wireless network at different times in history, preprocessing the power spectrum density data, and establishing a power spectrum density matrix at different time steps; S2, using at least two sequentially stacked encoders to encode each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector, inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder; S3, performing time sequence feature learning on the feature matrix at different time steps through a long short-term memory network to obtain output results of the network hidden layer at different time steps; S4, inputting the output results at different time steps into an attention mechanism for prediction to obtain a spectrum prediction result at the next time step.
2. The multi-band spectrum prediction method of a wireless power network according to claim 1, wherein, Step S2 comprises: using an encoder to encode each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector; m i = e(W1h i +a1) In the formula, m i represents the encoded low-dimensional vector, e represents the encoding function of the encoder encoding layer, W1 represents the weight value, h i represents the i-th vector in the power spectrum density matrix, a1 represents the bias value, θ represents the weight parameter, L represents the loss function, represents the partial derivative of the loss function L with respect to the weight W1; inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder.
3. The multi-band spectrum prediction method for a wireless power network of claim 1, wherein, Inputting the output results at different time steps into an attention mechanism for prediction comprises: The output calculation formula of the attention layer in the attention mechanism is: y = softmax(W c F z + b c ) wherein represents the output results of the network hidden layer at different times t, F t represents the hidden unit of F t , b t , W c , b c all represent learnable parameters, a t represents the attention probability, F z represents the attention feature vector, and γ represents the prediction result.
4. The multi-band spectrum prediction method of a wireless power network according to claim 3, wherein, The spectrum prediction result at the next time step further comprises: determining a loss parameter by minimizing the difference between the prediction result and the actual power spectrum density; In the formula, h i represents the actual power spectral density, and N represents the number of frequency bands.
5. The method of claim 1, wherein, After step S4, comprising: evaluating the spectrum prediction result, and randomly discarding the output of part of the neurons in the long short-term memory network according to the evaluation result.
6. A multi-band spectrum prediction terminal for a power wireless network, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the following steps when executing the computer program: S1, collecting power spectrum density data of each frequency band of a power wireless network at different times in history, preprocessing the power spectrum density data, and establishing a power spectrum density matrix at different time steps; S2, using at least two sequentially stacked encoders to encode each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector, inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder; S3, performing time sequence feature learning on the feature matrix at different time steps through a long short-term memory network to obtain output results of the network hidden layer at different time steps; S4, inputting the output results at different time steps into an attention mechanism for prediction to obtain a spectrum prediction result at the next time step.
7. A multi-band spectrum prediction terminal for a wireless power network according to claim 6, characterized in that, Step S2 comprises: using an encoder to encode each vector in the power spectrum density matrix to obtain a corresponding low-dimensional vector; m i = e(W1h i +a1) In the formula, m i represents the encoded low-dimensional vector, e represents the encoding function of the encoder encoding layer, W1 represents the weight value, h i represents the i-th vector in the power spectrum density matrix, a1 represents the bias value, θ represents the weight parameter, L represents the loss function, represents the partial derivative of the loss function L with respect to the weight W1; inputting the low-dimensional vector calculated by each layer of encoder into the next layer of encoder, and establishing a feature matrix according to the low-dimensional vector calculated by the last layer of encoder.
8. A multi-band spectrum prediction terminal for a wireless power network according to claim 6, wherein, Inputting the output results at different time steps into an attention mechanism for prediction comprises: The output calculation formula of the attention layer in the attention mechanism is: y = softmax(W c F z +b c ) wherein denotes the output result of the network hidden layer at different times t, F t denotes the hidden unit of the network, W t , b t , W c , b c denotes a learnable parameter, a t denotes the attention probability, F z denotes the attention feature vector, γ denotes the prediction result.
9. A multi-band spectrum prediction terminal for a wireless power network according to claim 8, characterized in that, The spectrum prediction result at the next time step further comprises: determining a loss parameter by minimizing the difference between the prediction result and the actual power spectrum density; In the formula, h i represents the actual power spectral density, and N represents the number of frequency bands.
10. The multi-band spectrum prediction terminal of a wireless power network of claim 6, wherein, After step S4, comprising: The spectrum prediction result is evaluated, and outputs of part of neurons in the long short-term memory network are randomly discarded according to an evaluation result.
Citation Information
Patent Citations
Adaptive threshold channel occupation state prediction method based on LSTM neural network
CN110138475A
Fault prediction method for servo drive industrial equipment based on deep learning
CN116401613A