Wireless frequency hopping control method, device, chip and wireless device based on packet error rate
By analyzing the packet error rate and packet quantity of wireless channels, marking the channel quality, and determining the backup channel through search, the problem of low communication quality of wireless frequency hopping channel sequences is solved, and a higher quality and dynamically balanced channel sequence is achieved.
Patent Information
- Application Number
- CN202311312625.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-10-10
AI Technical Summary
In the face of high channel interference and packet error rates, the existing wireless frequency hopping control method leads to a gradual reduction in channel prior information and a lower overall communication quality of the wireless frequency hopping channel sequence.
By counting the total number of packets and the number of error packets for each channel, the initial channel sequence is determined, and the channel is marked as a good or bad channel according to the packet error rate and the total number of packets. Then, centering on the channel with the lowest packet error rate, the backup channel is searched and marked to finally determine the wireless frequency hopping channel sequence.
The overall communication quality of the wireless frequency hopping channel sequence is improved, the number of wireless frequency hopping channels is dynamically equalized, and the number of wireless frequency hopping channels is continuously updated to adapt to changes in the communication environment.
Smart Images

Figure CN117375664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communications, and in particular to a wireless frequency hopping control method, device, chip and wireless equipment based on packet error rate. Background Art
[0002] In wireless IoT systems, there is usually interference within the communication frequency band, such as interference between devices in the same network system working in the same frequency band, and interference between networks in different network systems but working in the same frequency band, especially the 2.4G public frequency band. For example, when the signals transmitted by the two are the same or overlap in the time domain and frequency domain, they will interfere with each other; in addition, when the two do not overlap in the frequency domain but overlap in the time domain, there will also be certain interference (because the communication frequency used by the signal will leak power outward).
[0003] In order to solve the above problems, before the transmitter transmits a signal to the receiver, it is necessary to decide which channels to use, that is, to determine the frequency hopping channel sequence. The common frequency hopping method is based on the in-band full-band frequency hopping method. The channels (frequencies) selected for communication are all available channels (frequencies). Before the transmitter transmits a signal, it will randomly disrupt the selection order of all available channels, and completely use randomness to avoid interference signals in the communication frequency band. However, this method is likely to increase the unreliability and unpredictability of the communication period. For example, in this method, when a channel fails to transmit a data packet, there is still a certain probability that the channel will be used again when the data packet is retransmitted. Generally speaking, the time interval between the retransmitted data packets is less than the change interval of the interference signal. Therefore, when the data packet is retransmitted, it may still be interfered by the interference signal and cause the retransmission to fail.
[0004] Currently, there is also such existing technology: the transmitter performs packet error rate (PER) statistics on all available channels in the band during the network operation time and selects the corresponding channel for communication. For channels with a packet error rate greater than a certain threshold, they are excluded from the frequency hopping channel sequence, and for channels with a packet error rate less than a certain threshold, they are added to the frequency hopping channel sequence.
[0005] However, the control method of the frequency hopping channel in the prior art still faces the problem that the channel prior information is gradually reduced and the overall communication quality of the wireless frequency hopping channel sequence is low. Summary of the invention
[0006] Based on the above situation, the main purpose of the present invention is to provide a wireless frequency hopping control method, apparatus, chip and wireless device based on packet error rate to improve the overall communication quality of the wireless frequency hopping channel sequence.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0008] A wireless frequency hopping control method based on packet error rate comprises the following steps:
[0009] Count the total number of packets and the number of error packets for each channel;
[0010] The channel with a total number of packets of 0 is marked as the first bad channel. For the channels with a total number of packets that is not 0, the initial channel sequence is obtained by arranging them in order of packet error rate from small to large; wherein the packet error rate of each channel is equal to the ratio of the number of error packets of the channel to the total number of packets;
[0011] Selecting the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if a packet error rate of a certain channel is between a first packet error rate threshold and a second packet error rate threshold and the total number of data packets is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, marking the channel as a second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold;
[0012] Taking the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step length, searching for channels marked as bad channels and with a total number of data packets of 0 in the current search, marking the searched channel as a spare channel, and then continuing the search until the number of channels marked as spare channels is equal to the number of second bad channels;
[0013] A wireless frequency hopping channel sequence is determined from a channel set consisting of channels other than the second bad channel in the remaining channel sequence and the spare channels.
[0014] Preferably, in the initial channel sequence, if there are multiple channels with the same packet error rate, then for each target channel in the multiple channels with the same packet error rate: with the channel number of the target channel as the center and the unit channel interval as the search step, search for the channel closest to the target channel and with a total number of data packets of 0 as a possible interfering channel, and calculate the absolute value of the difference between the channel number of the target channel and the channel number of the corresponding possible interfering channel as the channel distance; among the multiple channels with the same packet error rate, arrange the target channels in descending order according to the channel distance of each target channel; if there are multiple target channels with the same channel distance, arrange the multiple target channels with the same channel distance in descending order according to the total number of data packets; if there are multiple target channels with the same total number of data packets, arrange the multiple target channels with the same total number of data packets in descending order according to the channel number.
[0015] Preferably, in the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, the current probe channel subset is selected from the probe channel set and added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the channel sequence number difference between adjacent probe channels in each probe channel subset is greater than the channel range threshold; several groups of sub-channel sets are set, and M channels are allocated to each group of sub-channel sets, and the channels in each group of the sub-channel sets are arranged so that the absolute value of the channel sequence number difference between adjacent channels is greater than the channel interval threshold; wherein the channels in each sub-channel set come from the channel set, and each channel in the channel set is allocated to at least one sub-channel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; and the several groups of sub-channel sets after arrangement are used as the wireless frequency hopping channel sequence.
[0016] Preferably, in the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, the current probe channel subset is selected from the probe channel set and added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is according to the arrangement order, and the absolute value of the channel sequence number difference between adjacent probe channels in each probe channel subset is greater than the channel range threshold; the channels in the channel set are rearranged so that the absolute value of the channel sequence number difference between adjacent channels is greater than the channel interval threshold; and the rearranged channel set is used as the wireless frequency hopping channel sequence.
[0017] Preferably, several groups of subchannel sets are set, and M channels are allocated to each group of subchannel sets, and the channels in each group of the subchannel sets are arranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; and the several groups of subchannel sets after arrangement are used as the wireless frequency hopping channel sequence.
[0018] Preferably, in the channel set, channels in the channel set are rearranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than a channel spacing threshold; and the rearranged channel set is used as the wireless frequency hopping channel sequence.
[0019] Preferably, if the number of channels in the channel set is less than the product of the number of sub-channel sets and M, the channel with the smallest packet error rate in the channel set, or the channels ranked in the front several positions in ascending order of packet error rate, are allocated to multiple sub-channel sets.
[0020] The present invention also provides a wireless frequency hopping control device based on packet error rate, comprising: a statistical unit, used to count the total number of data packets and the number of erroneous data packets of each channel; a marking arrangement unit, used to mark the channel with a total number of data packets of 0 as the first bad channel, and for the channels with a total number of data packets not being 0, arrange them in order of packet error rate from small to large to obtain an initial channel sequence; wherein the packet error rate of each channel is equal to the ratio of the number of erroneous data packets of the channel to the total number of data packets; a marking unit, used to select the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if the packet error rate of a certain channel is between the first packet error rate threshold and the second packet error rate threshold and the total number of data packets is If the packet error rate is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, the channel is marked as a second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold; a searching unit is used to search for channels marked as bad channels and with a total number of data packets of 0 covered by the current search, with the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step, and mark the searched channel as a spare channel, and then continue searching until the number of channels marked as spare channels is equal to the number of second bad channels; a determining unit is used to determine a wireless frequency hopping channel sequence from a channel set consisting of channels other than the second bad channel in the remaining channel sequence and the spare channels.
[0021] Preferably, in the initial channel sequence, if there are multiple channels with the same packet error rate, then for each target channel in the multiple channels with the same packet error rate: with the channel number of the target channel as the center and the unit channel interval as the search step, search for the channel closest to the target channel and with a total number of data packets of 0 as a possible interfering channel, and calculate the absolute value of the difference between the channel number of the target channel and the channel number of the corresponding possible interfering channel as the channel distance; among the multiple channels with the same packet error rate, arrange the target channels in descending order according to the channel distance of each target channel; if there are multiple target channels with the same channel distance, arrange the multiple target channels with the same channel distance in descending order according to the total number of data packets; if there are multiple target channels with the same total number of data packets, arrange the multiple target channels with the same total number of data packets in descending order according to the channel number.
[0022] Preferably, in the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, the current probe channel subset is selected from the probe channel set and added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the channel sequence number difference between adjacent probe channels in each probe channel subset is greater than the channel range threshold; several groups of sub-channel sets are set, and M channels are allocated to each group of sub-channel sets, and the channels in each group of the sub-channel sets are arranged so that the absolute value of the channel sequence number difference between adjacent channels is greater than the channel interval threshold; wherein the channels in each sub-channel set come from the channel set, and each channel in the channel set is allocated to at least one sub-channel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; and the several groups of sub-channel sets after arrangement are used as the wireless frequency hopping channel sequence.
[0023] Preferably, in the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, the current probe channel subset is selected from the probe channel set and added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is according to the arrangement order, and the absolute value of the channel sequence number difference between adjacent probe channels in each probe channel subset is greater than the channel range threshold; the channels in the channel set are rearranged so that the absolute value of the channel sequence number difference between adjacent channels is greater than the channel interval threshold; and the rearranged channel set is used as the wireless frequency hopping channel sequence.
[0024] Preferably, several groups of subchannel sets are set, and M channels are allocated to each group of subchannel sets, and the channels in each group of the subchannel sets are arranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; and the several groups of subchannel sets after arrangement are used as the wireless frequency hopping channel sequence.
[0025] Preferably, in the channel set, channels in the channel set are rearranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than a channel spacing threshold; and the rearranged channel set is used as the wireless frequency hopping channel sequence.
[0026] Preferably, if the number of channels in the channel set is less than the product of the number of sub-channel sets and M, the channel with the smallest packet error rate in the channel set, or the channels ranked in the front several positions in ascending order of packet error rate, are allocated to multiple sub-channel sets.
[0027] The present invention also provides a chip for executing any of the wireless frequency hopping control methods based on packet error rate, or including any of the wireless frequency hopping control devices based on packet error rate.
[0028] The present invention also provides a storage medium for storing a computer program, wherein the computer program is executed by a processor as any of the wireless frequency hopping control methods based on packet error rate.
[0029] The present invention also provides a wireless device, comprising the chip or the storage medium.
[0030] In this embodiment, by determining the total number of data packets and the packet error rate, the remaining channel sequence consisting of channels with relatively good communication quality is preliminarily determined according to the packet error rate and the total number of data packets. For the channels in the remaining channel sequence, the channels with relatively poor communication quality are further determined according to the first packet error rate threshold, the second packet error rate threshold and the data packet threshold, and are marked as second bad channels. On this basis, by searching for channels marked as bad channels and having a total number of data packets of 0 around the center of the channel with the best communication quality, they are re-marked as spare channels, and the number of channels marked as spare channels is made equal to the number of second bad channels. Finally, a wireless frequency hopping channel sequence is determined from the channels in the remaining channel sequence except the second bad channel and the channel set consisting of the spare channels. Since the spare channel is closer to the center of the channel with the best communication quality, the communication quality of the spare channel is more likely to be better than the second bad channel. In this way, while ensuring that the overall communication quality of the wireless frequency hopping channel sequence is better, the number of wireless frequency hopping channels is dynamically balanced and is in a continuous update.
[0031] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
[0033] Figure 1 A wireless frequency hopping communication system according to a preferred embodiment of the present invention;
[0034] Figure 2 The present invention provides a wireless frequency hopping control method based on packet error rate according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail. In order to avoid confusing the essence of the present invention, known methods, processes, procedures, and components are not described in detail.
[0036] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0037] Unless the context clearly requires otherwise, throughout the specification and claims, the words "include", "comprising" and similar words should be interpreted in an inclusive sense rather than an exclusive or exhaustive sense; that is, in the sense of "including but not limited to".
[0038] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0039] Figure 1 A wireless frequency hopping communication system according to an embodiment of the present invention includes a first wireless communication device and a second wireless communication device. The first wireless communication device and the second wireless communication device can perform wireless frequency hopping communication. The first wireless communication device can be used as both a transmitting end and a receiving end, and the second wireless communication device can also be used as a receiving end.
[0040] Figure 2 A wireless frequency hopping control method based on packet error rate according to an embodiment of the present invention can be applied to a receiving end. The method includes the following steps.
[0041] S100, counting the total number of data packets and the number of erroneous data packets in each channel. For a certain wireless frequency hopping communication system, the number of all frequency hopping channels and the channel sequence numbers are determined. Therefore, after a period of communication, the total number of data packets and the number of erroneous data packets in each frequency hopping channel can be counted. For example, the receiving end counts the total number of data packets and the number of erroneous data packets in each channel among all channels.
[0042] S110, mark the channel with a total number of data packets of 0 as the first bad channel, and for the channels with a total number of data packets that is not 0, arrange them in order of packet error rate (i.e., PER) from small to large to obtain an initial channel sequence; wherein, the packet error rate of each channel is equal to the ratio of the number of erroneous data packets of the channel to the total number of data packets. It is not difficult to understand that after a period of communication, some channels are still not used, so the total number of data packets of these unused channels is 0, and the corresponding number of erroneous data packets is of course also 0. As long as the channel has been used, its total number of data packets is not 0. Based on this, mark the channel with a total number of data packets of 0 as the first bad channel, and for the channels with a total number of data packets that is not 0, calculate its packet error rate, and then arrange them in order of packet error rate (i.e., PER) from small to large to obtain an initial channel sequence, and the elements in the initial channel sequence can be channel sequence numbers, and the initial channel sequence can be put into an ordered array arry, for example.
[0043] S120, select the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if the packet error rate of a certain channel is between the first packet error rate threshold and the second packet error rate threshold and the total number of data packets is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, then mark the channel as the second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold, for example, the two are 0.1 and 0.3 respectively. Specifically, in this step S120, the first N channels are selected from the initial channel sequence as the remaining channel sequence, and the remaining channels of the initial channel sequence are marked as the third bad channels, and then each channel in the remaining channel sequence is analyzed. When the packet error rate of a certain channel is between the first packet error rate threshold and the second packet error rate threshold (i.e., TH per1 <PER n <TH per2 ) and the total number of packets is greater than the packet threshold (ie TOTAL n >TH pkgs ), the channel is marked as the second bad channel; when the packet error rate is greater than the second packet error rate threshold (ie, TH per2 <PER n ), and the channel is also marked as the second bad channel. It can be understood that the first bad channel, the second bad channel and the third bad channel are all bad channels referred to in the present invention, the first bad channel is generated in step S110, and the second bad channel and the third bad channel are generated in this step S120.
[0044] S130, taking the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step length, search for the channels covered by the current search that are marked as bad channels and have a total number of data packets of 0, and mark the searched channel (also known as release) as a spare channel, and then continue searching until the number of channels marked as spare channels equals the number of the second bad channels. Specifically, the channel with the smallest packet error rate in the remaining channel sequence is the first channel, assuming that the first channel is 20 and the unit channel interval is 1; during the search process, taking the channel number 20 of channel 20 as the center and the unit channel interval 1 as the search step length, in the first round of search, the channels covered by the search are channel 20+1, i.e., 21, and channel 20-1, i.e., 19. In actual search, the channel with a larger channel number can be searched first. For example, in this example, channel 21 can be searched first and then channel 19; if channel 21 is marked as a bad channel and has a total number of data packets of 0, then the searched channel 21 is marked as a bad channel. It is marked as a spare channel, and then the search for channel 19 continues. If channel 19 is marked as a bad channel and the total number of data packets is 0, the searched channel 19 is marked as a spare channel. In the second round of search, the search covers channels 20+2, i.e., 22, and channel 20-2, i.e., 18. If channel 22 is marked as a bad channel and the total number of data packets is 0, the searched channel 22 is marked as a spare channel. If the number of channels marked as spare channels is equal to the number of the second bad channels at this time, the search is stopped. Otherwise, the search is continued until the number of channels marked as spare channels is equal to the number of the second bad channels.
[0045] S140, determining a wireless frequency hopping channel sequence from the channel set consisting of the channels in the remaining channel sequence except the second bad channel and the spare channel, that is, determining the channels in the channel set as the wireless frequency hopping channel sequence for use in wireless frequency hopping communication. For example, the receiving end sends the wireless frequency hopping sequence to the transmitting end, and then the two can communicate according to the wireless frequency hopping sequence.
[0046] In this embodiment, by determining the total number of data packets and the packet error rate, the remaining channel sequence consisting of channels with relatively good communication quality is preliminarily determined according to the packet error rate and the total number of data packets. For the channels in the remaining channel sequence, the channels with relatively poor communication quality are further determined according to the first packet error rate threshold, the second packet error rate threshold and the data packet threshold, and are marked as second bad channels. On this basis, by searching for channels marked as bad channels and having a total number of data packets of 0 around the center of the channel with the best communication quality, they are re-marked as spare channels, and the number of channels marked as spare channels is made equal to the number of second bad channels. Finally, a wireless frequency hopping channel sequence is determined from the channels in the remaining channel sequence except the second bad channel and the channel set consisting of the spare channels. Since the spare channel is closer to the center of the channel with the best communication quality, the communication quality of the spare channel is more likely to be better than the second bad channel. In this way, while ensuring that the overall communication quality of the wireless frequency hopping channel sequence is better, the number of wireless frequency hopping channels is dynamically balanced and is in a continuous update.
[0047] In step S110 of some embodiments, if there are multiple channels with the same packet error rate in the initial channel sequence, then for each channel (which can be called a target channel) in the multiple channels with the same packet error rate: with the channel sequence number of the target channel as the center and the unit channel interval as the search step, search for the channel closest to the target channel and with a total number of data packets of 0 as a possible interfering channel, wherein the distance is the absolute value of the difference between the channel sequence number of the possible interfering channel and the channel sequence number of the target channel, and calculate the absolute value of the difference between the channel sequence number of the target channel and the channel sequence number of the corresponding possible interfering channel as the channel distance; among the multiple channels with the same packet error rate, arrange the target channels in descending order according to the channel distance of each target channel; if there are multiple target channels with the same channel distance, arrange the multiple target channels with the same channel distance in descending order according to the total number of data packets; if there are multiple target channels with the same total number of data packets, arrange the multiple target channels with the same total number of data packets in descending order according to the channel sequence number. Specifically, assuming that the target channels are channels 6 and 10, and the unit channel interval is 1; for target channel 6, search for the channel closest to the target channel 6 and with a total number of data packets of 0 as a possible interference channel, for example, the possible interference channel finally searched is channel 5, and the absolute value of the difference between the channel number of the target channel 6 and the channel number of the corresponding possible interference channel 5 |6-5| is calculated to obtain the corresponding channel distance 1; for target channel 10, search for the channel closest to the target channel 10 and with a total number of data packets of 0 as a possible interference channel, for example, the possible interference channel finally searched is channel 13, and the absolute value of the difference between the channel number of the target channel 10 and the channel number of the corresponding possible interference channel 13 |10-13| is calculated to obtain the corresponding channel distance 3; then, among the multiple channels 6 and 10 with the same packet error rate, the target channels are arranged in descending order according to the channel distance of each target channel, that is, the final order state of the initial channel sequence is: channel 10 is arranged in front of channel 6. Through the above steps of this embodiment, the channels that are farther away from the possible interference channels are arranged in front, that is, the channels in front are less likely to be interfered by the adjacent channels, so the channel number sorting of the initial channel sequence can more accurately reflect the communication quality. After arranging the multiple target channels with the same packet error rate according to the channel distance, if there are multiple target channels with the same channel distance, these multiple target channels with the same channel distance are further arranged in order from large to small according to the total number of data packets; after arranging the multiple target channels with the same channel distance in order from large to small according to the total number of data packets, if there are multiple target channels with the same total number of data packets, these multiple target channels with the same total number of data packets are further arranged in order from small to large according to the channel number.
[0048] In order to reduce the accumulation of adjacent channels in the channel set in a wideband signal interference (for example, a sudden WIFI signal) or a large block of channel deep fading (for example, a multipath channel situation in an outdoor scene), in step S140 of some embodiments, after the channel set is determined, the channels in the channel set are rearranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel spacing threshold; the rearranged channel set is used as the wireless frequency hopping channel sequence. Specifically, for example, if the channel spacing threshold is 3, the rearranged channel set is: 1, 4, 7, 10, 2, 6, 11, 15, 20, 25, 30, 35, so the rearranged channel set is the wireless frequency hopping channel sequence. In this implementation, the above-mentioned channel dispersion can reduce wideband signal interference or a large block of channel deep fading.
[0049] In order to reduce the accumulation of channels in the channel set in a broadband signal interference (for example, a sudden WIFI signal) or a large area of deep channel fading (for example, a multipath channel situation in an outdoor scene), in step S140 of some embodiments, several groups of sub-channel sets are set, and M channels are allocated to each group of sub-channel sets, and the channels in each group of the sub-channel sets are arranged so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each sub-channel set come from the channel set, and each channel in the channel set is allocated to at least one sub-channel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; the several groups of sub-channel sets after arrangement are used as the wireless frequency hopping channel sequence. Specifically, for example, M is 3, and the channel set is divided into four groups of subchannel sets: subchannel set 1 (1, 4, 7), subchannel set 2 (10, 2, 6), subchannel set 3 (11, 15, 20) and subchannel set 4 (25, 30, 35). The arranged subchannel sets 1 to 4 are used as the wireless frequency hopping channel sequence. In the process of the transmitter repeatedly sending the data packet M times, the transmitter can send the data packet through different channels, so as to improve the probability of successful transmission. In some embodiments, if the number of channels in the channel set is less than the product of the number of subchannel sets and M, the channel with the smallest packet error rate in the channel set or the channels ranked in the front several positions from small to large in terms of packet error rate are allocated to multiple subchannel sets. For example, the channel with the smallest packet error rate in the channel set is allocated to each subchannel set, and the number of channels in each group of subchannel sets is exactly M. If the number of channels in each group of subchannel sets is still less than M, the channel with the second smallest packet error rate in the channel set can continue to be allocated to multiple subchannel sets, and so on. In this embodiment, the above-mentioned channel dispersion can reduce broadband signal interference or deep fading of a large channel; combined with the M channels of each sub-channel set, the probability of successful retransmission can be increased in the case of retransmitting data packets.
[0050] When channels in the channel set are piled up, in order to better reduce the accumulation of channels in the channel set in a broadband signal interference (for example, a sudden WIFI signal) or a large block of channel deep fading (for example, a multipath channel situation in an outdoor scene), in step S140 of some embodiments, if the difference between the maximum channel sequence number and the minimum channel sequence number in the channel set is less than the channel range threshold, the current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence (for example, including probe channel subsets CH1, CH2, CH3, CH4, CH5 arranged in sequence), the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; the channels in the channel set are rearranged so that the absolute value of the difference in channel sequence numbers between adjacent channels is greater than the channel interval threshold; and the rearranged channel set is used as the wireless frequency hopping channel sequence. It is not difficult to understand that the absolute value of the difference in channel numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold. After the probe channel subset is added to the channel set, the difference between the maximum channel number and the minimum channel number in the new channel set will become larger, greater than the channel range threshold. By reasonably rearranging the channels in the channel set, the rearranged channel set can better reduce broadband signal interference or a large block of deep channel fading. For example, when the wireless frequency hopping channel sequence is updated and determined in a certain time, the probe channel subset used is CH1, then when the wireless frequency hopping channel sequence is updated and determined in the next time, the next probe channel subset CH2 is used, and so on. In this way, the preset probe channels can be added to the channel set as evenly as possible to reduce broadband signal interference or a large block of deep channel fading, rather than randomly adding channels to the channel set, because this random method is difficult to reduce broadband signal interference or a large block of deep channel fading.
[0051] When channels in the channel set are piled up, in order to better reduce the accumulation of channels in the channel set in a broadband signal interference or a large block of channel deep fading, in step S140 of some embodiments, if the difference between the maximum channel sequence number and the minimum channel sequence number in the channel set is less than the channel range threshold, the current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; a plurality of groups of subchannel sets are set, and M channels are allocated to each group of subchannel sets, and the channels in each group of the subchannel sets are arranged so that the absolute value of the difference in channel sequence numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; and the plurality of groups of subchannel sets after arrangement are used as the wireless frequency hopping channel sequence. Compared with the above-mentioned embodiments, this embodiment combines the addition of a trial channel subset, the division and dispersion of several subchannel sets, and thus combines the advantages of the above-mentioned embodiments, so the effect of reducing broadband signal interference or deep fading of a large block of channels is optimal. As for more specific implementation steps of this embodiment, reference may be made to the above-mentioned related embodiments, and no further description will be given in this embodiment.
[0052] The present invention also provides a wireless frequency hopping control device based on packet error rate, comprising:
[0053] A statistics unit, used to count the total number of data packets and the number of error data packets in each channel;
[0054] a marking arrangement unit, used to mark a channel whose total number of data packets is 0 as a first bad channel, and arrange the channels whose total number of data packets is not 0 in order of packet error rate from small to large to obtain an initial channel sequence; wherein the packet error rate of each channel is equal to the ratio of the number of erroneous data packets of the channel to the total number of data packets;
[0055] a marking unit, configured to select the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if a packet error rate of a certain channel is between a first packet error rate threshold and a second packet error rate threshold and the total number of data packets is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, then mark the channel as a second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold;
[0056] A search unit, configured to search for channels marked as bad channels and having a total number of data packets of 0 in the current search, with the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step, and mark the searched channel as a spare channel, and then continue searching until the number of channels marked as spare channels is equal to the number of second bad channels;
[0057] The determining unit is used to determine a wireless frequency hopping channel sequence from a channel set consisting of channels other than the second bad channel in the remaining channel sequence and the spare channel.
[0058] In addition, the present invention also provides a storage medium, such as a chip, an optical disk, etc., for storing a computer program, and the computer program is executed by a processor as any of the wireless frequency hopping control methods based on packet error rate.
[0059] The present invention also provides a chip for executing any of the wireless frequency hopping control methods based on packet error rate, or including any of the wireless frequency hopping control devices based on packet error rate.
[0060] The present invention also provides a wireless device, including the chip or the storage medium. The wireless device may be any wireless mobile terminal, such as a mobile phone, a tablet computer, etc.
[0061] It will be appreciated by those skilled in the art that, under the premise of no conflict, the above-mentioned preferred solutions can be freely combined and superimposed. Among them, the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings, for example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. The numbering of each step in this article is only for the convenience of description and reference, and is not used to limit the order of execution. The specific execution order is determined by the technology itself, and those skilled in the art can determine various allowable and reasonable orders based on the technology itself.
[0062] Those skilled in the art will appreciate that, without conflict, the above-mentioned preferred solutions can be freely combined and superimposed.
[0063] It should be understood that the above-mentioned embodiments are merely illustrative and not restrictive. Without departing from the basic principles of the present invention, various obvious or equivalent modifications or substitutions that can be made by those skilled in the art to the above-mentioned details will all be included in the scope of the claims of the present invention.
Claims
1. A wireless frequency hopping control method based on packet error rate, characterized in that: The steps include: S100, counting the total number of data packets and the number of error data packets in each channel; S110, marking a channel with a total number of data packets of 0 as a first bad channel, and arranging the channels with a total number of data packets not 0 in order of packet error rate from small to large to obtain an initial channel sequence; wherein the packet error rate of each channel is equal to the ratio of the number of erroneous data packets of the channel to the total number of data packets; S120, selecting the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if a packet error rate of a certain channel is between a first packet error rate threshold and a second packet error rate threshold and the total number of data packets is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, marking the channel as a second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold; S130, taking the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step, searching for channels marked as bad channels and having a total number of data packets of 0 in the current search, and marking the searched channels as spare channels, and then continuing the search until the number of channels marked as spare channels is equal to the number of second bad channels; S140: Determine a wireless frequency hopping channel sequence from a channel set consisting of channels other than the second bad channel in the remaining channel sequence and the spare channels.
2. The wireless frequency hopping control method according to claim 1, characterized in that: In step S110, In the initial channel sequence, if there are multiple channels with the same packet error rate, for each target channel in the multiple channels with the same packet error rate: Taking the channel number of the target channel as the center and the unit channel interval as the search step, search for the channel closest to the target channel and with a total number of data packets of 0 as the possible interference channel, and calculate the absolute value of the difference between the channel number of the target channel and the channel number of the corresponding possible interference channel as the channel distance; Among the multiple channels with the same packet error rate, the target channels are arranged in descending order according to the channel distance of each target channel; if there are multiple target channels with the same channel distance, the multiple target channels with the same channel distance are arranged in descending order according to the total number of data packets; if there are multiple target channels with the same total number of data packets, the multiple target channels with the same total number of data packets are arranged in descending order according to the channel sequence number.
3. The wireless frequency hopping control method according to claim 1, characterized in that: In step S140, In the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, a current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; Set a number of subchannel sets, and allocate M channels to each subchannel set, and arrange the channels in each subchannel set so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; The plurality of arranged sub-channel sets are used as the wireless frequency hopping channel sequence.
4. The wireless frequency hopping control method according to claim 1, characterized in that: In step S140, In the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, a current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; Rearranging the channels in the channel set so that an absolute value of a difference in channel numbers between adjacent channels is greater than a channel interval threshold; The rearranged channel set is used as the wireless frequency hopping channel sequence.
5. The wireless frequency hopping control method according to claim 1, characterized in that: In step S140, Set a number of subchannel sets, and allocate M channels to each subchannel set, and arrange the channels in each subchannel set so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; The plurality of arranged sub-channel sets are used as the wireless frequency hopping channel sequence.
6. The wireless frequency hopping control method according to claim 1, characterized in that: In step S140, In the channel set, rearrange the channels in the channel set so that an absolute value of a difference in channel numbers between adjacent channels is greater than a channel interval threshold; The rearranged channel set is used as the wireless frequency hopping channel sequence.
7. The wireless frequency hopping control method according to claim 3 or 5, characterized in that: If the number of channels in the channel set is less than the product of the number of sub-channel sets and M, the channel with the smallest packet error rate in the channel set or the channels ranked in the front in ascending order of packet error rate are allocated to multiple sub-channel sets.
8. A wireless frequency hopping control device based on packet error rate, characterized in that: include: A statistics unit, used to count the total number of data packets and the number of error data packets in each channel; a marking arrangement unit, used to mark a channel whose total number of data packets is 0 as a first bad channel, and arrange the channels whose total number of data packets is not 0 in order of packet error rate from small to large to obtain an initial channel sequence; wherein the packet error rate of each channel is equal to the ratio of the number of erroneous data packets of the channel to the total number of data packets; a marking unit, configured to select the first N channels of the initial channel sequence as the remaining channel sequence, and for the remaining channel sequence, if a packet error rate of a certain channel is between a first packet error rate threshold and a second packet error rate threshold and the total number of data packets is greater than the data packet threshold, or the packet error rate is greater than the second packet error rate threshold, then mark the channel as a second bad channel; wherein the first packet error rate threshold is less than the second packet error rate threshold; A search unit, configured to search for channels marked as bad channels and having a total number of data packets of 0 in the current search, with the channel number of the channel with the smallest packet error rate in the remaining channel sequence as the center and the unit channel interval as the search step, and mark the searched channel as a spare channel, and then continue searching until the number of channels marked as spare channels is equal to the number of second bad channels; The determining unit is used to determine a wireless frequency hopping channel sequence from a channel set consisting of channels other than the second bad channel in the remaining channel sequence and the spare channel.
9. The wireless frequency hopping control device according to claim 8, characterized in that: The marking arrangement unit is further used for: In the initial channel sequence, if there are multiple channels with the same packet error rate, for each target channel in the multiple channels with the same packet error rate: Taking the channel number of the target channel as the center and the unit channel interval as the search step, search for the channel closest to the target channel and with a total number of data packets of 0 as the possible interference channel, and calculate the absolute value of the difference between the channel number of the target channel and the channel number of the corresponding possible interference channel as the channel distance; Among the multiple channels with the same packet error rate, the target channels are arranged in descending order according to the channel distance of each target channel; if there are multiple target channels with the same channel distance, the multiple target channels with the same channel distance are arranged in descending order according to the total number of data packets; if there are multiple target channels with the same total number of data packets, the multiple target channels with the same total number of data packets are arranged in descending order according to the channel sequence number.
10. The wireless frequency hopping control device according to claim 8, characterized in that: The determining unit is further configured to: In the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, a current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; Set a number of subchannel sets, and allocate M channels to each subchannel set, and arrange the channels in each subchannel set so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; The plurality of arranged sub-channel sets are used as the wireless frequency hopping channel sequence.
11. The wireless frequency hopping control device according to claim 8, characterized in that: The determining unit is further configured to: In the channel set, if the difference between the maximum channel sequence number and the minimum channel sequence number is less than the channel range threshold, a current probe channel subset is selected from the probe channel set to be added to the channel set; wherein the probe channel set includes a plurality of probe channel subsets arranged in sequence, the order in which the probe channel subsets are selected is in accordance with the arrangement order, and the absolute value of the difference in channel sequence numbers between adjacent probe channels in each probe channel subset is greater than the channel range threshold; Rearranging the channels in the channel set so that an absolute value of a difference in channel numbers between adjacent channels is greater than a channel interval threshold; The rearranged channel set is used as the wireless frequency hopping channel sequence.
12. The wireless frequency hopping control device according to claim 8, characterized in that: The determining unit is further configured to: Set a number of subchannel sets, and allocate M channels to each subchannel set, and arrange the channels in each subchannel set so that the absolute value of the difference in channel numbers between adjacent channels is greater than the channel interval threshold; wherein the channels in each subchannel set come from the channel set, and each channel in the channel set is allocated to at least one subchannel set, and M is the maximum number of consecutive transmissions of the same data packet by the transmitter within a specified time; The plurality of arranged sub-channel sets are used as the wireless frequency hopping channel sequence.
13. The wireless frequency hopping control device according to claim 8, characterized in that: The determining unit is further configured to: In the channel set, rearrange the channels in the channel set so that an absolute value of a difference in channel numbers between adjacent channels is greater than a channel interval threshold; The rearranged channel set is used as the wireless frequency hopping channel sequence.
14. The wireless frequency hopping control device according to claim 10 or 12, characterized in that: If the number of channels in the channel set is less than the product of the number of sub-channel sets and M, the channel with the smallest packet error rate in the channel set or the channels ranked in the front in ascending order of packet error rate are allocated to multiple sub-channel sets.
15. A chip, characterized in that: Used to execute the wireless frequency hopping control method based on packet error rate as described in any one of claims 1 to 7, or includes the wireless frequency hopping control device based on packet error rate as described in any one of claims 8 to 14.
16. A storage medium for storing a computer program, characterized in that: The computer program is executed by the processor as the wireless frequency hopping control method based on packet error rate according to any one of claims 1 to 7.
17. A wireless device, characterized in that: Comprising the chip as claimed in claim 15 or the storage medium as claimed in claim 16.
Citation Information
Patent Citations
Wall-mounted sound equipment capable of being suspended
CN115134691A
Punching-free installation type intelligent sound box
CN210518709U