Anti-interference method based on Wi-Fi wireless communication technology
Technical Field
The invention belongs to the technical fields of the Internet of things and wireless communication, and particularly relates to an anti-interference method based on Wi-Fi wireless communication technology.
Background
Wi-Fi technology is a short-range, high-speed and high-stability wireless communication technology, and has been developed to date to derive various wireless communication protocols, wherein a communication frequency band comprises a 2.4GHZ frequency band and a 5GHZ frequency band, the Wi-Fi communication technology comprises two basic communication devices, namely a wireless hotspot (AP), and the other is called a station, the station basically serves as a terminal, the AP point can serve as a gateway or a network bridge, generally one Wi-Fi network comprises one wireless hotspot and a plurality of wireless stations, and the wireless hotspot and the router are integrated together along with the development of the Wi-Fi technology, and meanwhile, the Wi-Fi technology also comprises the function of the gateway. In the field of Internet of things, wi-Fi technology is widely used for information transmission of all terminal equipment, and has good stability and economy.
In some high-density internet of things terminal scenes, communication among a large number of Wi-Fi devices faces two main problems, namely the problem of channel resource allocation, and because each channel bandwidth is large in the Wi-Fi communication process and the number of channels is limited, the channel resource allocation is an important research direction of Wi-Fi communication stability in the dense terminal scenes, and secondly, the problems of network transmission rate and network throughput directly affect function implementation in the internet of things.
There are many factors affecting the data transmission rate, such as data coding mode, modulation mode, bandwidth size, etc., and the use of BPSK, QPSK, 16QAM, and 64QAM coding modes and OFDM modulation modes all affect the data transmission rate, which is an important affecting factor of the throughput of the wireless sensor network.
According to the document description, in the scene of the Internet of things with continuous interference, wi-Fi transmission has different transmission characteristics under different signal to noise ratios, and an optimal transmission rate exists, and by using the transmission rate, the network can have a larger throughput and more stable information transmission.
Aiming at the problem of channel resource allocation in a single-hot spot scene under a plurality of terminal scenes and the problem of influence of a plurality of influence factors on Wi-Fi communication throughput, a channel back-off strategy and an anti-interference strategy with variable transmission rate are designed to avoid the influence of interference. These factors are most important in the case of transmission failure caused by internal crosstalk during site data transmission. In order to solve the problem, the current common rate adjustment algorithms include an automatic rate rollback algorithm, a collision sensing rate adaptive algorithm, a robust rate adaptive algorithm and the like, and in addition, the present common rate adjustment algorithms include adaptive control of an RTS/CTS access mechanism and the like, wherein the algorithms mainly count the situation of data transmission in the running process of a network, and then adjust the transmission rate of the network according to the success rate, packet loss rate, time delay and other information of the data transmission.
Disclosure of Invention
Aiming at the situation, in order to overcome the defects of the prior art, the invention provides an anti-interference method based on Wi-Fi wireless communication technology, channels are allocated by a reasonable method, the interference generated in the device is avoided, and the stability of the device is effectively improved; by setting different transmission rates, the interference generated by other signal sources in the same frequency band is effectively reduced, the information transmission rate of the device is effectively improved, the stability of Wi-Fi communication in a complex environment is improved, the interference generated by other channels in the same frequency band or other Wi-Fi devices is reduced, and the network has better anti-interference characteristics and larger throughput.
In order to achieve the above purpose, the present invention provides the following technical solutions: an anti-interference method based on Wi-Fi wireless communication technology comprises channel selection and data transmission rate adjustment; firstly, a channel back-off strategy is used for selecting a better wireless communication channel when a hot spot and a station communicate; secondly, a variable rate anti-interference strategy is adopted, and the throughput performance of the network under different interferences is evaluated according to basic experiments; and the network throughput under different transmission rates is calculated to obtain the network throughput under different rates, and the designed variable rate anti-interference strategy is applied to the scenes.
Preferably, the channel back-off strategy and the variable rate anti-interference strategy mainly comprise the following steps:
firstly, calculating the optimal transmission rate of a network under different signal to noise ratios, and storing the optimal transmission rate into a station so that the station can select the optimal information transmission rate under different signal to noise ratio environments;
step two, after the station finishes initialization, selecting a channel and communicating with a hot spot, when the channel is occupied, selecting a channel back-off strategy, replacing other channels, and otherwise, continuing to perform wireless communication;
thirdly, a hash algorithm is mainly adopted in the channel back-off strategy and is used for distributing channel resources in a single-hot-spot environment;
step four, when the station is connected with the hot spot and performs data transmission, firstly sensing the signal-to-noise ratio in an application scene, repeatedly sensing every time a period of time T to ensure that the information transmission rate can be better controlled, setting the data transmission rate of the station according to the stored optimal transmission rates under different signal-to-noise ratios, and starting the information transmission process;
and fifthly, in a period of signal-to-noise ratio in the sensing scene, maintaining a preset transmission rate for data transmission.
Preferably, channel de-laminationThe avoidance strategy is mainly that channels used by stations in all Wi-Fi networks maintain the same consistency hash annular space ([ 0, 2) through reasonable setting 32 -1]) The complex communication process in the synchronous distribution result is effectively avoided, and meanwhile, the channel resource distribution of different devices is provided with weights, so that important stations in the network are ensured to obtain better network communication quality.
Preferably, the channel back-off strategy searches according to a certain direction and allocates channels with corresponding weights for Wi-Fi equipment; the channel back-off strategy strictly adheres to the principle of avoiding collision, and the adjacent Wi-Fi stations strictly maintain the safe channel center frequency point distance; both co-channel occupancy and critical frequency usage of adjacent channels are considered allocation conflicts.
Preferably, after the initialization is completed, the station in the second step selects a channel and tries to communicate with a hot spot, when the channel is interfered or occupied by other Wi-Fi devices, the channel 3 is used by the Wi-Fi device 1 and the Wi-Fi device 2 at the same time, the station operates a channel back-off strategy, and exchanges other channels according to the clockwise direction, that is, the Wi-Fi device 2 exchanges, and starts to try from the channel 4 until the channel with or without interference or less interference is used; if no interference or occupation exists, the wireless communication is continued by continuing to work on the channel.
Preferably, after the time T passes in the fifth step, the signal-to-noise ratio in the scene is repeatedly sensed, the wireless transmission rate is reset according to the signal-to-noise ratio data and the data stored in the station, and the Wi-Fi communication keeps the preset transmission rate for data transmission in the time of two signal-to-noise ratio data acquisition.
The invention distributes channels by a reasonable method, avoids the interference generated in the device and effectively improves the stability of the device; by setting different transmission rates, the interference generated by other signal sources in the same frequency band is effectively reduced, the information transmission rate of the device is effectively improved, the stability of Wi-Fi communication in a complex environment is improved, the interference generated by other channels in the same frequency band or other Wi-Fi devices is reduced, and the network has better anti-interference characteristics and larger throughput.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention.
In the drawings:
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic view of an annular space in the present invention;
FIG. 3 is a schematic diagram of channel allocation in accordance with the present invention;
fig. 4 is a schematic diagram of the channel interference situation in the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An anti-interference method based on Wi-Fi wireless communication technology, a device with a Wi-Fi module starts working from power on, and the working flow is shown in figure 1, wherein five steps are performed in a four-five cycle mode.
Step one: firstly, calculating the optimal transmission rate of the network under different signal to noise ratios, and storing the optimal transmission rate into site equipment so as to enable the site to select the optimal information transmission rate under different signal to noise ratio environments.
Step two: after the station completes initialization, selecting a channel and attempting to communicate with a hot spot, when the channel is interfered or occupied by other Wi-Fi devices, as shown in fig. 4, channel 3 is simultaneously used by Wi-Fi device 1 and Wi-Fi device 2, the station operates a channel back-off strategy, and other channels are replaced according to the clockwise direction, namely Wi-Fi device 2 can be replaced, and the channel 4 starts to try until the channel with interference or less interference is available. If no interference or occupation exists, the wireless communication is continued by continuing to work on the channel.
Thirdly, a hash algorithm is mainly adopted in the channel back-off strategy and is used for distributing channel resources in a single-hot-spot environment;
step four: after the station is connected with the hot spot and starts to transmit data, firstly sensing the signal-to-noise ratio in the application scene, then setting the data transmission rate of the station according to the stored optimal transmission rates under different signal-to-noise ratios, and starting the information transmission process to ensure that the wireless information transmission has better stability.
Step five: after the time T, repeatedly sensing the signal-to-noise ratio in the scene, resetting the wireless transmission rate according to the signal-to-noise ratio data and the data stored in the station, and carrying out data transmission by Wi-Fi communication while keeping the preset transmission rate in the time of acquiring the signal-to-noise ratio data twice.
Through the process, wi-Fi wireless communication can be carried out at a variable rate, and the influence on wireless communication caused by interference is effectively reduced in the communication process.
The channel back-off strategy is mainly that channels used by stations in all Wi-Fi networks maintain the same consistency hash annular space ([ 0, 2) through reasonable setting 32 -1]) As shown in fig. 2, the complex communication process in the synchronous allocation result is effectively avoided, meanwhile, weights are set for channel resource allocation of different devices, important stations in the network are guaranteed to obtain better network communication quality, a channel back-off strategy searches according to a certain direction, and channels with corresponding weights are allocated to Wi-Fi devices. The channel back-off strategy strictly adheres to the principle of avoiding collision, and the adjacent Wi-Fi stations strictly maintain the safe channel center frequency point distance. Both co-channel occupancy and critical frequency usage of adjacent channels are considered allocation conflicts. Fig. 3 is an example of channel switch allocation.
The invention mainly comprises two aspects, wherein the first aspect is an anti-interference method aiming at other technologies of the same communication frequency band, and the second aspect is an anti-interference method aiming at other Wi-Fi devices in a scene. Due to the wide applicability and flexibility of Wi-Fi communication technology, more and more Internet of things facilities start to be applicable to the technology as a wireless communication means, and due to the fact that the technology is used in a large range, wi-Fi equipment is easy to be interfered in a dense deployment scene, so that the Wi-Fi anti-interference technology is utilized, stability in the Wi-Fi communication process is guaranteed, and the Wi-Fi communication system has a large beneficial effect and a high practical value.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.