Method for identifying wireless signal category and channel by using spectrogram
Through the improved YOLO model, the two-stage wireless signal spectrum recognition is solved, and the multi-objective recognition problem in channel overlap of heterogeneous wireless devices is realized, efficient wireless signal recognition and channel information prediction are achieved, and suitable for complex signal scenarios.
Patent Information
- Application Number
- CN202310869038.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art is difficult to effectively identify multi-target wireless signals in the overlapping channels of heterogeneous wireless devices. Especially when the frequency bands are highly overlapped, traditional machine learning and deep learning methods cannot meet the needs of complex signal scenarios.
The improved YOLO model is used to identify the spectrum diagram of wireless signals, and the wireless signal categories and channel information are identified through the two-stage identification process. The first stage is to identify the original signal categories, and the second stage is to identify the more refined channel information for Lora signals, combining the signal. The confidence and bandwidth predict the signal center frequency to achieve multi-objective recognition.
The overlapping multi-object recognition of wireless signals is realized, which avoids artificial feature extraction, improves recognition performance and interpretability, and is easily deployed to WiFi devices without changing the wireless signal protocol.
Smart Images

Figure CN119312151A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of heterogeneous wireless networks, and in particular to a method for identifying wireless signal categories and channels by using a spectrum diagram. Background Art
[0002] The rapid development of the Internet of Things has stimulated the application of a large number of wireless devices. Wireless devices use heterogeneous wireless technologies, and each technology has its own suitable application scenarios due to its own advantages and disadvantages. In the crowded ISM (Industrial Scientific Medical) frequency band, heterogeneous wireless devices inevitably work in overlapping channels, resulting in serious cross-protocol coexistence problems. In order to increase the concurrency rate of wireless signals, one feasible method is to enable wireless nodes to have the ability to identify other signals and increase the number of concurrent signals in the wireless network by selecting appropriate channels.
[0003] Existing work can be divided into two categories.
[0004] The first method is to use some traditional machine learning algorithms for classification based on the received signal strength indication. Zisense (X. Zheng, Z. Cao, J. Wang, Y. He, and Y. Liu, "Zisense: Towards interference resilient duty cycling in wireless sensor networks", in Proceedings of the 12th ACM Conference on Embedded Network Sensor Systems, pp. 119-133, 2014) and Tiim (A. Hithnawi, H. Shafagh, and S. Duquennoy, "Tiim: Technology independent interference mitigation for low-power wireless networks", in Proceedings of the 14th International Conference on Information Processing in Sensor Networks, pp. 1-12, 2015) define several features by observing the signal energy indication of different signals and use some decision tree generation algorithms, such as C4.5, to generate a decision tree to detect the target signal. Smoggy-link (M. Jin, Y. He, X. Zheng, D. Fang, et al., "Smoggy-link: Fingerprinting interference for predictable wireless concurrency", in 2016 IEEE 24th International Conference on Network Protocols (ICNP), IEEE, pp. 1-10, 2016) uses the signal energy indication feature as a feature vector, and then uses the K-Means clustering algorithm to identify interference instances, and then performs the next link selection based on the interference instances to improve the network throughput.Sonic (F. Hermans, O. Rensfelt, T. Voigt, E. Ngai, et al., "Sonic: Classifying interference in 802.15.4 sensor networks", in Proceedings of the 12th international conference on Information processing in sensor networks, pp. 55-66, 2013) defines several features based on the RSSI sequence of damaged ZigBee data packets under different interference conditions and the symbol position of the decoding error in the packet, and uses the C4.5 algorithm to generate a decision tree for identifying the interference conditions that cause the data packet to be damaged and distinguishing the category of the interference signal. This type of traditional machine learning method mainly relies on manually extracted related features for machine learning, and these artificial features determine the upper limit of machine learning. When the task scenario is more complex, feature engineering will become extremely difficult.
[0005] The second method uses deep learning for signal recognition and classification. DLC (WM Lees, A. Wunderlich, PJ Jeavons, PDHale, and MR Souryal, "Deep learning classification of 3.5-ghzband spectrograms with applications to spectrum sensing", IEEE transactions on cognitive communications and networking, vol. 5, no. 2, pp. 224-236, 2019) uses convolutional neural networks and recurrent neural networks to perform a binary classification task, that is, to identify whether the input signal belongs to in-band radar or out-of-band radar. Experimental results show that CNN is more suitable for signal classification tasks than LSTM, with higher scores and lighter weight. In addition, DeepRadar (S.Sarkar, M.Buddhikot, A.Baset, and S.K.Kasera, "Deepradar: A deep-learning-based environmental sensing capability sensor detection for CBRs", in Proceedings of the 27th Annual International Conference on Mobile Computing and Networking, pp.56-68, 2021) combines computer vision technology to identify and detect the spectrogram of the signal. They use the YOLO (J.Redmon, S.Divvala, R.Girshick, and A.Farhadi, "You only look once: Unified, real-time object detection", in Proceedings of the IEEE conference on computer vision and pattern recognition, pp.779-788, 2016) model to detect radar signals and estimate the corresponding signal center frequency and bandwidth information, which is more interpretable. For deep learning methods, manual feature extraction is no longer required, and converting the signal recognition problem into a spectral image recognition problem has sufficient interpretability and can achieve good performance.Although the existing YOLO model and RCNN series models are relatively mature in the field of object detection, they still cannot meet the needs of some complex signal scenarios. For example, when the frequency bands of two signals are highly overlapped, the traditional target detection model cannot predict the two signals well, and this scenario is very common in signal recognition. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the purpose of this case is to propose a new method for identifying wireless signal types and channel information to achieve multi-target identification. This case is a solution to detect wireless communication signals in the environment through a target recognition network, so that wireless WiFi nodes have the ability to detect other wireless signals in the environment, and can be easily deployed to WiFi devices without changing the protocol of the wireless signal. In order to achieve this purpose, the technical solution of this case is as follows.
[0007] In the first aspect, the present invention proposes a method for identifying wireless signal categories and channels using a spectrum diagram, wherein the method identifies overlapping multiple targets of wireless signals, and the steps include:
[0008] In the first stage, the spectrum corresponding to the original wireless signal is identified using the trained first recognition model to obtain a first recognition result, thereby obtaining the category of the original wireless signal and its channel;
[0009] If it is determined from the first recognition result that a Lora signal exists, the second stage is entered, and the Lora spectrum slice corresponding to the same original wireless signal is identified using the trained second recognition model to obtain a second recognition result, and then combined with the first recognition result to obtain the channel information of the Lora signal; the recognition result is a second-order tensor containing all signal categories. In the second-order tensor, each recognition vector corresponds to the recognition information of a class of wireless signals, and each recognition vector also includes the signal existence confidence and signal bandwidth, which are used to determine the signal center frequency prediction value of the channel.
[0010] In one implementation of the above technical solution, the first recognition model and the second recognition model have the same structure, and are both improved based on the YOLO model, removing the original classification dimension of the YOLO model, and separately identifying different types of signals.
[0011] In one implementation of the above technical solution, the loss function used in training the first recognition model and the second recognition model is:
[0012]
[0013] Where: w >λ ob ≥λ x >λ nob, which are loss coefficients used to balance the weights of various losses; Indicates that the value is 1 when the grid corresponding to the i-th recognition vector has a target signal, otherwise it is 0. and The value is opposite; N m is the number of identification vectors in the output tensor;
[0014] x i is the true value of the proportion of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, is the predicted value of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, w i is the true value of the ratio of the target signal bandwidth of the i-th vector of the output tensor to the input spectrum bandwidth, is the predicted value of the target signal bandwidth of the i-th vector of the output tensor in the input spectrum bandwidth, c i is the true value of the confidence that the target signal exists in the i-th vector of the output tensor, is the confidence prediction value of the target signal of the i-th vector of the output tensor; by minimizing the loss function, the trained first recognition model or the second recognition model is obtained.
[0015] In one implementation of the above technical solution, obtaining a slice of the Lora spectrum image includes the following steps:
[0016] The original signal is cut into length according to the following formula:
[0017]
[0018] Where: L min is the minimum symbol length of the Lora signal, L p Indicates the packet length of the Lora data packet;
[0019] generating a second spectrogram using the intercepted signal data;
[0020] Taking the central frequency of the Lora signal in the first recognition result as the center, a spectrum with a bandwidth of 2.8 MHz is intercepted in the second spectrum as a Lora spectrum slice.
[0021] In one implementation of the above technical solution, the first recognition result and the second recognition result are fused to obtain a center frequency prediction value of the Lora signal, and the steps include:
[0022] According to the first recognition result, the center frequency prediction value of the Lora signal in the first stage is calculated:
[0023]
[0024] Where: f0 refers to the frequency lower limit of the sampling frequency band, S represents the sampling rate, N0 is the number of grids during image segmentation and recognition, and i is the grid index of the Lora signal in the first recognition result;
[0025] Predict the value based on the proportion of the center frequency of the Lora signal in the grid in the second recognition result Predicted value of the signal bandwidth as a percentage of the input spectrum bandwidth And the predicted value of the center frequency of the Lora signal in the first stage f c , calculate the channel information of the Lora signal in the second stage:
[0026]
[0027] Where: f l , f h They represent the low frequency and high frequency of the signal channel respectively, j is the grid index of the Lora signal in the second recognition result, and BW0 is the bandwidth of the Lora spectrum slice.
[0028] In one implementation of the above technical solution, if the Lora signal is not identified in the second recognition result, the Lora signal identified in the first recognition result shall prevail.
[0029] In one implementation of the above technical solution, the output tensor contains 7 identification vectors for identifying WiFi, 4 identification vectors for identifying Zigbee, and 16 identification vectors for identifying Bluetooth and Lora respectively.
[0030] In one implementation of the above technical solution, the step of obtaining the spectrum corresponding to the original wireless signal includes:
[0031] Obtain the original signal from the WiFi node, detect the start and end of the data packet by judging the energy jump, and obtain the data packet;
[0032] For the data packets, the corresponding video graph of the first stage is generated by intercepting them according to the spectrum dimension selection strategy.
[0033] On the second aspect, this case proposes a device for identifying wireless signal categories and channels using a spectrum diagram, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute any of the above methods.
[0034] On the third aspect, this case proposes a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any of the above methods.
[0035] The beneficial computational effects of this case are:
[0036] 1. Convert the signal recognition problem into a spectral image recognition problem, which is both sufficiently interpretable and can achieve good performance.
[0037] 2. Use the improved YOLO model to realize overlapping multi-target recognition of wireless signals, and no longer need manual feature extraction.
[0038] 3. The method proposed in this case can be easily deployed to WiFi devices without changing the protocol of the wireless signal, allowing wireless WiFi nodes to have the ability to detect other wireless signals in the environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 , one Generation of a spectrum diagram of a wireless signal in a specific implementation manner;
[0041] Figure 2 , one Power spectral density and spectrum diagram of four signal examples in a specific implementation manner;
[0042] Figure 3 , one A schematic diagram of a wireless signal spectrum recognition process in a specific implementation manner;
[0043] Figure 4 , one Schematic diagram of the structure of a Lora data packet in a specific implementation manner;
[0044] Figure 5 , one A schematic diagram of a model structure in a specific implementation manner;
[0045] Figure 6 , one Schematic diagram of the meaning of the model output tensor in a specific implementation method. DETAILED DESCRIPTION
[0046] With the rapid development of IoT technology, the number of heterogeneous wireless devices working in the same frequency band has increased dramatically, and spectrum resources are tight, leading to serious cross-technology interference problems. The purpose of this case is to use the method of using spectral graphs to identify wireless signal categories and channels in the 2.4GHz ISM band, where there may be four common wireless signal scenarios: WiFi, ZigBee, Bluetooth and Lora signals, to identify each type of wireless signal and its corresponding channel.
[0047] (I) Related knowledge
[0048] Figure 1 The invention discloses a method for generating a spectrum diagram of a Zigbee signal, the steps of which include: dividing a received signal into several segments, generating a power spectrum density of each segment of the signal by using FFT (Fast Fourier Transform), and then stacking the segments in chronological order to form a spectrum diagram.
[0049] Different signals working in the 2.4GHz ISM band have different standards and use different physical layer technologies. WiFi uses QAM (Quadrature Amplitude Modulation) and OFDM (Orthogonal Frequency Division Multiplexing) modulation, with 13 channels, a channel bandwidth of 20MHz, and a channel spacing of 5MHz. ZigBee uses DSSS (Direct Sequence Spread Spectrum) and OQPSK (Offset Quadrature Phase Shift Keying) modulation, with 16 channels, a channel bandwidth of 2MHz, a channel spacing of 5MHz, numbered 11 to 26. Bluetooth uses FHSS (Frequency Hopping Spread Spectrum) modulation, with 79 channels, a channel bandwidth of 1MHz, and a channel spacing of 1MHz. Lora uses CSS (Chirp Spread Spectrum) modulation, and there is no fixed channel standard. There are four commonly used channel bandwidths in the 2.4GHz band, namely 203KHz, 406KHz, 812KHz and 1625KHz. There are eight spreading factors, ranging from 5 to 12.
[0050] Figure 2Examples of power spectral density and spectrograms of four signals, WiFi, Zigbee, Bluetooth, and Lora, are shown. Different signals have different bandwidths, and each signal obviously has certain bandwidth characteristics. In addition, the center frequency of the Lora signal using CSS modulation changes linearly with time, so it also has a specific shape feature in the spectrogram.
[0051] (II) Overview of technical solution
[0052] Combining knowledge in the field of computer vision, a convolutional neural network is used to construct a recognition model to perform multi-target recognition of wireless signals, which includes two stages:
[0053] In the first stage, the spectrum corresponding to the original wireless signal is identified using the trained first recognition model to obtain a first recognition result, thereby obtaining the category of the original wireless signal and its channel information;
[0054] If it is determined from the first recognition result that a Lora signal exists, the second stage is entered.
[0055] In the second stage, the trained second recognition model is used to identify the Lora spectrum slice corresponding to the same original wireless signal to obtain the second recognition result; combined with the first recognition result, the channel information of the Lora signal is obtained. The task of the second stage is no longer to identify the signal category, but to identify more accurate channel information of the Lora signal.
[0056] The above-mentioned first recognition result and second recognition result are both second-order tensors containing all signal categories. In the tensor, each recognition vector corresponds to the recognition information of a class of wireless signals. Each recognition vector also includes signal existence confidence and signal bandwidth, which are used to determine the signal center frequency prediction value of the channel.
[0057] (IV) Detailed description of technical solution
[0058] The following is a clear and complete description of how to implement the technical solution of this case. Obviously, the described implementation method is only a part of the implementation method of this case, not all of the implementation methods. Based on the implementation method in this case, all other implementation methods obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] like Figure 3 As shown, the entire framework consists of four modules: original signal acquisition module, spectrum dimension selection module, recognition model, and channel information estimation.
[0060] (1) Obtaining the original signal module
[0061] The original signal sampled from a WiFi node on its channel is used to detect the start and end of the data packet by judging the energy jump and obtaining the data packet.
[0062] (2) Spectral dimension selection
[0063] In the first stage of signal segmentation, the first 12800 sampling points of the data packet are used to generate a spectrogram with a time-frequency resolution of 100×128. The downstream task of the first stage is to predict the signal type and its channel. The generated spectrogram is input into the trained first recognition model to obtain the prediction result of the first stage.
[0064] If there is a Lora signal in the prediction result of the first stage, the second stage recognition is started. Table 1 shows the symbol length of the Lora signal with different bandwidths and spreading factors at a sampling rate of 20 MHz.
[0065] Table 1
[0066]
[0067] Obviously, the length of the Lora symbol in some configurations is greater than the truncation length in the first stage, which means that the generated spectrum lacks the complete bandwidth information of Lora. Therefore, in the second stage of recognition, the spectrum dimension selection needs to be re-performed. Figure 4 The data packet structure of Lora is shown. The dotted line represents optional and the solid line represents mandatory. The symbol length L of Lora is known. s The calculation formula is:
[0068]
[0069] Where: sf represents the spreading factor, S represents the sampling rate, and BW represents the signal bandwidth.
[0070] According to the data packet structure of Lora, the number of symbols in a Lora data packet is more than 8.25. In order to make the interception length of the second stage larger than the single symbol length of Lora and to reduce the interception length as much as possible to improve the calculation efficiency, the interception length of the second stage is set to:
[0071]
[0072] Where: L min is the minimum symbol length of the Lora signal, L p Indicates the packet length of the Lora data packet. From Table 1, we can see that the minimum symbol length of the Lora signal with different bandwidths and spreading factors at a sampling rate of 20 MHz is 394.
[0073] The time-frequency resolution is generated by using the re-truncated signal data of length L2. The spectrum of the Lora signal predicted in the first stage is taken as the center frequency, and the spectrum with a bandwidth of BW0 = 2.8MHz is intercepted as the Lora spectrum slice, and the intercepted spectrum is input into the second recognition model again for the second stage recognition. The downstream task of the second stage is to predict more accurate Lora channel information and compensate for the recognition error of Lora by the first model in the first stage.
[0074] (3) Identification model
[0075] The first recognition model and the second recognition model have the same structure, both of which are improved YOLO models, that is, the original classification dimension of the YOLO model is removed, and a second-order tensor containing all signal categories is directly output. In the output tensor, each recognition vector corresponds to the recognition information of a type of wireless signal. Therefore, the corresponding wireless signal type is obtained from the index of the output recognition vector in the second-order tensor, and the channel information can be calculated by the recognition vector.
[0076] The core theory of the recognition model is to divide the image into several grids, each grid corresponds to an output, and is used to predict the target whose center point falls on the grid. For example, for a spectrogram with a vertical axis in the time domain and a horizontal axis in the frequency domain, the image is vertically divided into 16 grids (N0=16) in the frequency domain for recognition.
[0077] The existing YOLO model uses anchor boxes to achieve multi-target recognition. The principle is to let one grid output multiple prediction vectors, and different prediction vectors are responsible for predicting targets of different sizes. However, in the signal recognition scenario, the bandwidths of some wireless signals are similar, such as 1.625MHz Lora and 2MHz Zigbee, 812KHz Lora and 1MHz Bluetooth. This means that the existing YOLO model will not be able to recognize multi-signal scenarios with similar bandwidths and overlapping channels.
[0078] The possible positions of WiFi signals and Zigbee signals in a WiFi channel are fixed. By improving the YOLO model and removing the original classification dimension, each signal can be identified independently. Since there are up to 7 WiFi channels and 4 Zigbee channels in a WiFi channel, according to the recognition characteristics of the YOLO model, only these 11 (7+4=11) corresponding outputs in the 16 grids have the ability to predict WiFi or Zigbee, so the final output is a 3×N m A second-order tensor of N. m is the number of identification vectors in the output tensor. m =7+4+16+16=43.
[0079] The recognition model minimizes the following loss function through training data and Adam optimizer:
[0080]
[0081] Where: λ is the loss coefficient of each item, which is used to balance the weight of each loss. λ is recommended w >λ ob ≥λ x >λ nob , exemplarily, the values can be set to 8, 2, 1, and 0.5 respectively. The value is 1 when there is a target signal in the grid corresponding to the i-th recognition vector, otherwise it is 0. Zehe On the contrary. i is the true value of the proportion of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, is the predicted value of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, w i is the true value of the ratio of the target signal bandwidth of the i-th vector of the output tensor to the input spectrum bandwidth, is the predicted value of the target signal bandwidth of the i-th vector of the output tensor in the input spectrum bandwidth, c i is the true value of the confidence that the target signal exists in the i-th vector of the output tensor, The confidence prediction value of the target signal existence for the i-th vector of the output tensor.
[0082] A specific implementation structure of the recognition model is as follows Figure 5 As shown. Figure 5 In the recognition model, a spectrum is input through three sets of feature extraction units composed of convolution blocks and pooling blocks. The feature extraction unit extracts features from the spectrum of the wireless signal to obtain deep features. Then the deep features are flattened through the Flatten module and input into a fully connected neural network composed of three linear layers. Finally, the recognition vectors of various wireless signals are obtained. That is, the final output is a 3×43 second-order tensor, and the meaning of each item is as follows Figure 6 As shown in the figure, the identification vectors of WiFi and Zigbee account for 7 and 4 respectively, while Bluetooth and Lora account for 16 each. Each identification vector is represented as [x, w, c], where x represents the predicted value of the position of the center frequency of the target signal in the corresponding grid, w represents the predicted value of the bandwidth of the target signal in the input spectrum bandwidth, and c represents the predicted value of the confidence that the target signal exists in the corresponding grid. The type of the target signal can be known based on the index of the identification vector in the second-order tensor.
[0083] (4) Channel Information Estimation
[0084] The channel bandwidth of Zigbee, WiFi and Bluetooth is fixed, and the center frequency is in a discrete range. The exact channel of these three signals identified by the model can be determined based on the sampling frequency band of the sampler.
[0085] The predicted value of the center frequency identified in the first stage is:
[0086]
[0087] Where: f0 refers to the lower frequency limit of the sampling frequency band. is the recognition result of the first stage, where the subscript i represents the recognition result of the i-th grid in the image corresponding to the recognition vector, and N0 is equal to the number of grids recognized by image segmentation. According to the center frequency prediction value, the channel number of the signal can be determined.
[0088] When some unknown interference signals are introduced, the channel bandwidth information in the output can also serve as another basis for the existence of the signal, that is, the signal with excessive bandwidth deviation can be identified as an interference signal. However, bandwidth prediction is mainly for Lora signals with non-fixed bandwidth.
[0089] When the model recognizes the Lora signal, it generates the corresponding time-frequency graph slice as input according to the spectrum dimension selection strategy of the second stage, performs the second stage wireless signal recognition task, and obtains the second recognition result. The frequency band of the Lora signal can be obtained as follows:
[0090]
[0091] where f l , f h Respectively represent the low frequency and high frequency of the frequency band, f c is the predicted value of the Lora center frequency identified in the first stage, and N0 is equal to the number of grids identified by image segmentation. and Refers to the recognition result of the second stage, where the subscript j indicates the recognition result of the j-th grid in the image corresponding to the recognition vector.
[0092] The Lora bandwidth obtained in the second stage is:
[0093]
[0094] It is worth mentioning that it cannot be ruled out that the second stage will have a false negative when further identifying Lora, that is, the second stage does not identify the Lora signal. Given that the bandwidth of the input spectrum of the second stage is smaller than that of the first stage, and the above situation is likely to be caused by channel conflict between signals, the time-frequency diagram input of the first stage has more signal features than the time-frequency diagram slices of the second stage. At this time, the results of the first stage will be used as the specific information of Lora.
[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method of the present disclosure can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits, etc. However, for the present disclosure, software program implementation is a better implementation method in most cases.
[0096] In one embodiment, according to the above implementation method, a device for identifying wireless signal categories and channels using a spectrum diagram is designed and implemented, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute any of the above methods.
[0097] It should be noted that "one embodiment", "another embodiment", "embodiment", etc. mentioned in this specification refer to the specific features, structures or characteristics described in conjunction with the embodiment included in at least one embodiment generally described in this application. The same expression appearing in multiple places in the specification does not necessarily refer to the same embodiment. Furthermore, when a specific feature, structure or characteristic is described in conjunction with any embodiment, it is claimed that the realization of such feature, structure or characteristic in conjunction with other embodiments also falls within the scope of the present invention.
Claims
1. A method for identifying wireless signal categories and channels using a spectrum graph, characterized in that: The method recognizes overlapping multiple targets of wireless signals, and the steps include: In the first stage, the spectrum corresponding to the original wireless signal is identified using the trained first recognition model to obtain a first recognition result, thereby obtaining the category of the original wireless signal and its channel information; If the first recognition result shows that there is a Lora signal, the second stage is entered, and the Lora spectrum slice corresponding to the same original wireless signal is recognized by using the trained second recognition model to obtain a second recognition result, which is then combined with the first recognition result to obtain the channel information of the Lora signal. The recognition result is a second-order tensor containing all signal categories. In the second-order tensor, each recognition vector corresponds to the recognition information of a type of wireless signal. Each recognition vector also includes signal existence confidence and signal bandwidth, which are used to determine the signal center frequency prediction value of the channel.
2. The method according to claim 1, characterized in that The first recognition model and the second recognition model have the same structure. They are both improved based on the YOLO model, removing the original classification dimension of the YOLO model and separately identifying different types of signals.
3. The method according to claim 1, characterized in that The loss function used in training the first recognition model and the second recognition model is: Where: w >λ ob ≥λ x >λ nob , which are loss coefficients used to balance the weights of various losses; If the target signal exists in the grid corresponding to the i-th recognition vector, the value is 1, otherwise it is 0. and The value is opposite; N m is the number of identification vectors in the output tensor; x i is the true value of the proportion of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, is the predicted value of the target signal center frequency of the i-th vector of the output tensor in the corresponding grid, w i is the true value of the ratio of the target signal bandwidth of the i-th vector of the output tensor to the input spectrum bandwidth, is the predicted value of the target signal bandwidth of the i-th vector of the output tensor in the input spectrum bandwidth, c i is the true value of the confidence that the target signal exists in the i-th vector of the output tensor, is the confidence prediction value of the target signal existence of the i-th vector of the output tensor; By minimizing the loss function, a trained first recognition model or a second recognition model is obtained.
4. The method according to claim 1, characterized in that The steps of obtaining Lora spectrum slices are as follows: The original signal is cut into length according to the following formula: Where: L min is the minimum symbol length of the Lora signal, L p Indicates the packet length of the Lora data packet; generating a second spectrogram using the intercepted signal data; Taking the central frequency of the Lora signal in the first recognition result as the center, a spectrum with a bandwidth of 2.8 MHz is intercepted in the second spectrum as a Lora spectrum slice.
5. The method according to claim 1, characterized in that The first recognition result and the second recognition result are merged to obtain channel information of the Lora signal, the steps comprising: According to the first recognition result, the center frequency prediction value of the Lora signal in the first stage is calculated: Where: f0 refers to the frequency lower limit of the sampling frequency band, S represents the sampling rate, N0 is the number of grids during image segmentation and recognition, and i is the grid index of the Lora signal in the first recognition result; Predict the value based on the proportion of the center frequency of the Lora signal in the grid in the second recognition result Predicted value of the signal bandwidth as a percentage of the input spectrum bandwidth And the predicted value of the center frequency of the Lora signal in the first stage f c , calculate the channel information of the Lora signal in the second stage: Where: f l , f h They represent the low frequency and high frequency of the signal channel respectively, j is the grid index of the Lora signal in the second recognition result, and BW0 is the bandwidth of the Lora spectrum slice.
6. The method according to claim 1, characterized in that If the Lora signal is not identified in the second identification result, the Lora signal identified in the first identification result shall prevail.
7. The method according to claim 1, characterized in that In the output tensor, there are 7 identification vectors for identifying WiFi, 4 identification vectors for identifying Zigbee, and 16 identification vectors for identifying Bluetooth and Lora respectively.
8. The method according to claim 1, characterized in that The spectrum corresponding to the original wireless signal is obtained by: Obtain the original signal from the WiFi node, detect the start and end of the data packet by judging the energy jump, and obtain the data packet; For the data packet, the corresponding time-frequency diagram of the first stage is generated according to the spectrum dimension selection strategy.
9. A device for identifying wireless signal categories and channels using a spectrum diagram, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 8.