Method and device for establishing wireless communication channel, storage medium and electronic device
By scanning the spectrum on the gateway device and determining the available channel list, the communication interference and resource conflict problems when Wi-Fi coexist with Bluetooth, ZigBee and other protocols in the 2.4GHz band are solved, and more efficient wireless communication performance is achieved.
Patent Information
- Application Number
- CN202411941738.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
AI Technical Summary
In the 2.4GHz frequency band, Wi-Fi coexist with wireless protocols such as Bluetooth and ZigBee, and there are problems of communication interference and resource conflicts, and the existing technology has not yet proposed an effective solution.
By performing spectrum scanning on the gateway device, a list of available channels is determined and the target device and the gateway device are instructed to establish a wireless communication channel based on channels with interference less than the threshold.
It effectively reduces signal interference, improves wireless communication performance, and solves the resource conflict problem when Wi-Fi coexist with protocols such as Bluetooth and ZigBee.
Smart Images

Figure CN119815369A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a method and device for establishing a wireless communication channel, a storage medium, and an electronic device. Background Art
[0002] Currently, the smart home IoT field mainly uses the 2.4GHz open frequency band, such as Wi-Fi, Bluetooth, ZigBee, etc. Different wireless technologies differ in power consumption, cost, coverage distance, etc., to meet different scene requirements. As smart home scene applications become more and more complex, more and more functions require the coordinated implementation of multiple protocols.
[0003] For example, a split voice control device consists of a base and a microphone. The microphone can be separated from the base and placed in different locations as the user's activity space changes. The microphone battery is powered by a low-power protocol. After collecting the user's voice commands, the voice is transmitted to the base through the protocol. After receiving the voice commands, the base connects to the cloud platform through the Wi-Fi protocol for voice recognition and processing. The connection diagram is as follows Figure 2 shown.
[0004] Since these different wireless protocols use the same frequency band, they will interfere with each other when running at the same time, reducing wireless communication performance and thus affecting automation functions. Figure 2 The microphone holder and base use the same 2.4GHz Wi-Fi frequency band and low-power transmission protocol. If they are not coordinated and controlled, they may interfere with each other and cause the failure of user command execution.
[0005] In related technologies, no effective solution has been proposed for the problems of communication interference and resource conflicts when Wi-Fi coexists with wireless protocols such as Bluetooth and ZigBee in the 2.4 GHz frequency band. Summary of the invention
[0006] The embodiments of the present application provide a method and device for establishing a wireless communication channel, a storage medium, and an electronic device to at least solve the problems of communication interference and resource conflict in the prior art when Wi-Fi coexists with wireless protocols such as Bluetooth and ZigBee in the 2.4 GHz frequency band.
[0007] According to an embodiment of the present application, a method for establishing a wireless communication channel is provided, which is applied to a gateway device, comprising: when it is determined that a first wireless communication channel is to be established between a target device and the gateway device, performing spectrum scanning on multiple first channels of a second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device; determining a current working channel of the gateway device, and determining a list of available channels from the multiple first channels based on the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold; and sending the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0008] In an exemplary embodiment, a list of available channels is determined from the multiple first channels based on the current working channel and the multiple spectrum scanning results, including: determining the signal strength, channel occupancy and interference sources of the multiple first channels based on the multiple spectrum scanning results; performing interference evaluation on the multiple first channels based on the signal strength, the channel occupancy and the interference sources through an interference minimization algorithm, and sorting the multiple first channels from small to large based on the obtained interference evaluation results, wherein the interference evaluation results are used to indicate the interference degree of the first channel to the current working channel; determining the second channel with a higher ranking based on the first threshold, and determining the list of available channels based on the second channel.
[0009] In an exemplary embodiment, after determining a list of available channels from the multiple first channels based on the current working channel and the multiple spectrum scanning results, the method further includes: performing wireless environment monitoring on the target device and the gateway device, wherein the wireless environment monitoring includes at least one of the following: monitoring the current working channel for changes, and monitoring the interference sources of the multiple first channels for changes; when it is determined that the wireless environment of the target device and the gateway device has changed, re-determining the list of available channels from the multiple first channels, and when it is determined that the second channel is updated, instructing the target device and the gateway device to re-establish the first wireless communication channel based on the updated second channel.
[0010] In an exemplary embodiment, after sending the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel, the method further includes: determining an initial time-sharing strategy based on the data size of the data to be transmitted and the transmission rate of the first wireless communication channel, wherein the initial time-sharing strategy includes: the transmission period of the data to be transmitted, and the transmission time of the first wireless communication channel within a single transmission period; sending the initial time-sharing strategy to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy.
[0011] In an exemplary embodiment, after the initial time-sharing strategy is sent to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy, the method further includes: real-time monitoring of the transmission rate of the first wireless communication channel; when it is detected that the transmission rate has decreased, fragmenting the data packets of the data to be transmitted, and continuing to transmit the fragmented data packets according to the initial time-sharing strategy, wherein the message length of the fragmented data packets is less than or equal to the product of the transmission rate at the current moment and the transmission time.
[0012] In an exemplary embodiment, after the initial time-sharing policy is sent to the target device to instruct the target device and the gateway device to transmit data according to the initial time-sharing policy, the method further includes: initiating a time slice reallocation request when a burst service is detected; in response to the time slice reallocation request, updating the initial time-sharing policy according to the service data corresponding to the burst service to obtain an updated time-sharing policy; and sending the updated time-sharing policy to the target device to instruct the target device and the gateway device to transmit the service data according to the updated time-sharing policy.
[0013] According to another embodiment of the embodiments of the present application, a device for establishing a wireless communication channel is also provided, including: a spectrum scanning module, which is used to perform spectrum scanning on multiple first channels of a second wireless communication channel of the gateway device when it is determined that a first wireless communication channel is to be established between a target device and a gateway device, to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device; a determination module, which is used to determine a current working channel of the gateway device, and determine a list of available channels from the multiple first channels based on the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold; an establishment module, which is used to send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for establishing a wireless communication channel when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for establishing a wireless communication channel through the computer program.
[0016] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0017] In an embodiment of the present application, when it is determined that the target device needs to establish a first wireless communication channel with the gateway device, a spectrum scan is performed on multiple first channels of the established second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency bands of the first wireless communication channel and the second wireless communication channel are the same, and the second wireless communication channel is the communication channel between the gateway device and the wireless routing device; the current working channel of the gateway device is determined, and a list of available channels is determined from the multiple first channels based on the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channels to the current working channel is less than a first threshold; finally, the list of available channels is sent to the target device, instructing the target device and the gateway device to establish the first wireless communication channel based on the second channel; adopting the above scheme, the present application does not rely on hardware connection, and uses software algorithms to dynamically adjust the channel selection of devices such as Bluetooth and ZigBee to ensure that the channels used by wifi are staggered to reduce signal interference; thereby solving the problem of communication interference and resource conflict when Wi-Fi coexists with wireless protocols such as Bluetooth and ZigBee in the 2.4GHz frequency band in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 is a hardware environment diagram of an optional method for establishing a wireless communication channel according to an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of wireless communication connection of an optional split-type voice control device according to an embodiment of the present application;
[0022] Figure 3 is an optional 3-wire PTA implementation block diagram according to an embodiment of the present application;
[0023] Figure 4 is a flowchart of an optional method for establishing a wireless communication channel according to an embodiment of the present application;
[0024] Figure 5 is an optional channel occupancy diagram according to an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of an optional time-sharing strategy according to an embodiment of the present application;
[0026] Figure 7 It is a structural block diagram of an optional device for establishing a wireless communication channel according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to one aspect of an embodiment of the present application, a method for establishing a wireless communication channel is provided. The method for establishing a wireless communication channel is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for establishing a wireless communication channel can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0030] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing equipment, a smart dishwasher, a smart projection equipment, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air equipment, a smart kitchen and bathroom equipment, a smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification equipment, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0031] The current coexistence strategy of different protocols is mainly based on the Packet Traffic Arbitration (PTA) mechanism of IEEE802.15.2. The main idea is to use a packet traffic arbitrator to decide whether Wifi or Bluetooth / ZigBee can use the radio frequency. There is a data line connection between the Wifi and Bluetooth / ZigBee chips to transmit arbitration requests and arbitration results. Depending on the number of connections, there are 2 lines, 3 lines, 4 lines, etc. Figure 3 As shown, Figure 3 This is a block diagram for the 3-wire PTA implementation. When a Bluetooth device needs to use the air interface, the BT_ACTIVITY signal is set to initiate arbitration. Based on the request, the PTA uses the WLAN_ACTIVITY signal to indicate whether the Bluetooth device can transmit after arbitration.
[0032] However, this solution requires connections between hardware chips with different protocols and has requirements for the communication chip hardware used. If the chip does not support it or there is no connection, it cannot be used, which places high requirements on the device hardware.
[0033] In this embodiment, a method for establishing a wireless communication channel is provided, which is applied to a gateway device. Figure 4 1 is a flow chart of an optional method for establishing a wireless communication channel according to an embodiment of the present application, the flow includes the following steps:
[0034] Step S402, when it is determined that the target device and the gateway device are to establish a first wireless communication channel, spectrum scanning is performed on multiple first channels of the second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with the wireless routing device;
[0035] It should be noted that the above-mentioned first wireless communication channel can be understood as a Bluetooth channel or a ZigBee channel, and the second wireless communication channel can be understood as a Wi-Fi channel. These channels mainly use the 2.4 GHz open frequency band.
[0036] It should be noted that Bluetooth and ZigBee protocols are generally used to build short-range and medium-range wireless communication networks, which are established between specific types of devices or systems to adapt to different usage scenario requirements.
[0037] The following are specific usage scenarios for the two protocols to establish connections between different objects:
[0038] 1. Bluetooth protocol:
[0039] The Bluetooth protocol is mainly established between the following objects:
[0040] 1) Connection between personal devices: between Bluetooth devices and personal electronic devices, such as mobile phones and wireless headphones, smart watches, fitness trackers, etc. Usage scenarios include audio transmission, health data monitoring, message notifications, etc.
[0041] 2) Automobiles and electronic devices: The connection between the Bluetooth system inside the car and personal devices such as mobile phones and tablets is used for hands-free calling, music playback, navigation information transmission, etc.
[0042] 3) Smart home devices: Bluetooth can be used to connect smart bulbs, smart locks, temperature / humidity sensors and other devices to mobile applications or home gateways to achieve remote control and status monitoring.
[0043] 4) Medical devices: Bluetooth is used in the medical field to connect blood glucose monitors, heart rate monitors, blood pressure monitors, etc. to smartphones or medical management systems for data collection and health status monitoring.
[0044] 2. ZigBee protocol:
[0045] The ZigBee protocol is mainly established between the following objects:
[0046] 1) Smart home network: between ZigBee devices and the central node or gateway of the home automation system, such as smart light bulbs, smart sockets, door and window sensors, smoke detectors, etc. Usage scenarios include automation control and security monitoring.
[0047] 2) Industrial Automation: In industrial environments, ZigBee is used to connect sensor networks, monitoring equipment, automation control units, etc. to achieve remote monitoring and control, reduce wiring costs, and improve production efficiency and safety.
[0048] 3) Agricultural Automation: ZigBee is also applicable to agricultural scenarios and is used to connect soil moisture sensors, temperature sensors, irrigation controllers and other equipment to achieve precision agriculture and resource management.
[0049] 4) Building Automation: Smart devices in buildings, such as lighting systems, thermostats, security equipment, etc., can be connected to the central control system through the ZigBee protocol to achieve energy management and security monitoring.
[0050] 5) Health and care equipment: ZigBee can be used to connect health monitoring equipment with the central health management platform, especially in remote patient monitoring systems, to achieve real-time transmission of vital signs data.
[0051] In these scenarios, the choice of Bluetooth and ZigBee protocols is usually based on the following factors:
[0052] 1. Power consumption requirement: ZigBee performs better in low power consumption and is suitable for long-term operation of battery-powered devices;
[0053] 2. Communication range: ZigBee usually supports longer communication distances than Bluetooth, suitable for covering the entire home or industrial facilities;
[0054] 3. Network topology: ZigBee supports mesh network topology, devices can communicate directly or through routing nodes, enhancing network stability and coverage;
[0055] 4. Data transmission requirements: ZigBee is a better choice for scenarios that require frequent data exchange but small amounts of data; while Bluetooth is more suitable for applications with large amounts of data transmission, such as audio streaming.
[0056] The wireless network established by Bluetooth and ZigBee protocols can greatly improve the communication efficiency between devices and the overall intelligence level of the system, and is an important part of building the Internet of Things (IoT) system. In an environment where multiple protocols coexist, such as a smart home system, by adopting the optimization method of this solution, it can ensure that Bluetooth and ZigBee can effectively coordinate on the 2.4GHz frequency band, reduce interference, and improve user experience and device operation efficiency.
[0057] Step S404, determining a current working channel of the gateway device, and determining an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of a second channel in the available channel list to the current working channel is less than a first threshold;
[0058] Step S406: Send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0059] In an embodiment of the present application, when it is determined that the target device needs to establish a first wireless communication channel with the gateway device, a spectrum scan is performed on multiple first channels of the established second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency bands of the first wireless communication channel and the second wireless communication channel are the same, and the second wireless communication channel is the communication channel between the gateway device and the wireless routing device; the current working channel of the gateway device is determined, and a list of available channels is determined from the multiple first channels based on the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channels to the current working channel is less than a first threshold; finally, the list of available channels is sent to the target device, instructing the target device and the gateway device to establish the first wireless communication channel based on the second channel; adopting the above scheme, the present application does not rely on hardware connection, and uses software algorithms to dynamically adjust the channel selection of devices such as Bluetooth and ZigBee to ensure that the channels used by wifi are staggered to reduce signal interference; thereby solving the problem of communication interference and resource conflict when Wi-Fi coexists with wireless protocols such as Bluetooth and ZigBee in the 2.4GHz frequency band in the related art.
[0060] Optionally, the above-mentioned step S404: determining a list of available channels from the multiple first channels according to the current working channel and the multiple spectrum scanning results can be achieved in the following manner, specifically including the following steps: determining the signal strength, channel occupancy and interference sources of the multiple first channels according to the multiple spectrum scanning results; performing interference degree evaluation on the multiple first channels according to the signal strength, the channel occupancy and the interference sources through an interference minimization algorithm, and sorting the multiple first channels from small to large according to the obtained interference degree evaluation results, wherein the interference degree evaluation results are used to indicate the interference degree of the first channel to the current working channel; determining the second channel with a higher ranking according to the first threshold, and determining the available channel list based on the second channel.
[0061] The signal strength, channel occupancy and interference sources of the first channels are determined based on the spectrum scanning results of the first channels; then, the interference degree of the first channels is evaluated and sorted using an interference minimization algorithm combined with these parameters; and the top-ranked second channels are screened out based on a preset first threshold to obtain the available channel list.
[0062] Based on the above steps, execute the above step S404: after determining a list of available channels in the multiple first channels according to the current working channel and the multiple spectrum scanning results, the method also includes: performing wireless environment monitoring on the target device and the gateway device, wherein the wireless environment monitoring includes at least one of the following: monitoring changes in the current working channel, monitoring changes in interference sources of the multiple first channels; when it is determined that the wireless environment of the target device and the gateway device has changed, re-determining the list of available channels in the multiple first channels, and when it is determined that the second channel is updated, instructing the target device and the gateway device to re-establish the first wireless communication channel based on the updated second channel.
[0063] During the data transmission process, the wireless environment is continuously monitored, including channel changes of the Wi-Fi network, the addition or departure of new devices, and changes in interference sources; once a change in the wireless environment is detected, the above method is repeated, the list of available channels is re-determined based on the updated wireless environment, and the first wireless communication channel is re-established to ensure that the selected channel is always the best.
[0064] In an optional embodiment, the following steps and considerations need to be followed to select the Wi-Fi working channel (i.e., the current working channel mentioned above):
[0065] 1. Spectrum scanning and analysis: First, use the spectrum analysis function of the Wi-Fi chip to poll and scan all information in the 2.4GHz frequency band, collect data such as the signal strength, channel occupancy, and interference source information (i.e. the interference sources mentioned above) of each channel; then identify which channels have obvious interference, such as other Wi-Fi devices, Bluetooth devices, microwave ovens, cordless phones, etc. The type and strength of the interference source have an important impact on the selection of available channels.
[0066] 2. Channel occupancy assessment: Get the working channel of the current Wi-Fi network (i.e. the current working channel mentioned above), which is the main source of interference to be avoided; in the 2.4GHz band, Wi-Fi has 13 channels (maybe more in some areas), of which channels 1, 6 and 11 are completely non-overlapping. The frequency intervals between these channels are large, and the mutual interference is small. These non-overlapping channels can be given priority.
[0067] 3. Interference minimization algorithm: The embodiment of the present application can develop an algorithm to evaluate the interference level of each channel and rank them. The algorithm can be based on parameters such as channel occupancy, signal strength, and frequency distance from the Wi-Fi working channel; select the channel with the least interference and meeting the Bluetooth / ZigBee protocol requirements from the evaluation results. Generally, select those channels that are far away from the Wi-Fi channel frequency and have low occupancy.
[0068] 4. Dynamic adjustment and monitoring: Repeat the above steps regularly or when increased interference or changes in the wireless environment are detected, and dynamically adjust the Bluetooth / ZigBee channel selection to cope with changes in the wireless environment and ensure that the selected channel is always optimal; ultimately, changes in the wireless environment include changes in the Wi-Fi network channel, the addition or departure of new devices, and changes in interference sources.
[0069] 5. Comply with standards and protocols: You need to ensure that the selected channel and communication parameters comply with the standards of wireless protocols such as Bluetooth and ZigBee, and do not cause compliance issues within the protocol. In addition, you also need to consider the communication compatibility of Bluetooth / ZigBee devices, and the selected channel should be supported by all devices.
[0070] Specifically, the priority of the interference minimization algorithm for channel selection may be arranged in the following order: non-overlapping channels, frequency point distance, channel occupancy, and interference signal strength.
[0071] Based on the evaluation of wifi channels and air interface occupancy, the channels of coexisting protocols such as Bluetooth / ZigBee are determined to minimize mutual impact. In the smart home scenario, the channels used by the user's home wifi are determined by the router. Based on the wifi channels used and air interface occupancy, the channels with the least interference are selected for coexisting protocols such as Bluetooth / ZigBee to achieve spectrum isolation as much as possible to reduce the impact, such as Figure 5 shown.
[0072] The main process includes:
[0073] 1. When establishing a connection using protocols such as Bluetooth / ZigBee, a gateway device that also supports Wi-Fi is preferred as the master to determine the channel to be used and notify the other party when a change is required;
[0074] 2. After the gateway device successfully connects to the Wi-Fi router, it obtains the currently used working channel;
[0075] 3. The Wi-Fi chip of the gateway device polls all Wi-Fi channels to perform spectrum scanning and obtain the spectrum occupancy of each channel;
[0076] 4. The gateway device combines the current Wi-Fi working channel and the spectrum occupancy of each channel, and selects the channel with low spectrum occupancy in the current frequency band, and selects the available channel list with the least interference for the Bluetooth / ZigBee protocol;
[0077] 5. After the channel is determined, the master transmits the selected channel list to the peer end, and both parties use the channels in the channel list to communicate;
[0078] 6. Repeat the above steps periodically and make real-time adjustments when the channel or interference situation changes.
[0079] Optionally, after sending the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel, the method further includes: determining an initial time-sharing strategy based on the data size of the data to be transmitted and the transmission rate of the first wireless communication channel, wherein the initial time-sharing strategy includes: the transmission period of the data to be transmitted, and the transmission time of the first wireless communication channel within a single transmission period; sending the initial time-sharing strategy to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy.
[0080] Furthermore, WiFi and Bluetooth / ZigBee use the air interface in a time-sharing manner, and dynamically adjust the sending strategy according to the WiFi rate and message conditions to maintain efficient air interface transmission, such as Figure 6 As shown, initially the Master (i.e. the gateway device mentioned above) clearly defines the initial time-sharing strategy for coordination: the gateway device that supports both Wifi and Bluetooth / ZigBee is preferably the master, evaluates the respective data transmission content and transmission rate, formulates the initial time-sharing strategy (including the transmission cycle and the Bluetooth / ZigBee transmission time within a single cycle), and informs the other party to coordinate.
[0081] Based on the above steps, after the initial time-sharing strategy is sent to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy, the method further includes: real-time monitoring of the transmission rate of the first wireless communication channel; when it is detected that the transmission rate is reduced, fragmenting the data message of the data to be transmitted, and continuing to transmit the fragmented data message according to the initial time-sharing strategy, wherein the message length of the fragmented data message is less than or equal to the product of the transmission rate at the current moment and the transmission time.
[0082] Dynamically monitor the WiFi transmission rate. If the WiFi transmission rate is reduced due to sudden air interface interference, in order to ensure that the WiFi transmission time does not exceed the allocated time, the WiFi message size can be dynamically adjusted to fragment the message to ensure the normal operation of the time-sharing strategy: fragment length (i.e. the above message length) <= WiFi transmission rate (i.e. the transmission rate at the current moment) * WiFi transmission time (i.e. the above transmission time).
[0083] Optionally, after sending the initial time-sharing policy to the target device to instruct the target device and the gateway device to transmit data according to the initial time-sharing policy, the method further includes: initiating a time slice reallocation request when a burst service is detected; responding to the time slice reallocation request, updating the initial time-sharing policy according to the service data corresponding to the burst service to obtain an updated time-sharing policy; and sending the updated time-sharing policy to the target device to instruct the target device and the gateway device to transmit the service data according to the updated time-sharing policy.
[0084] When there is a burst of business that needs to continuously occupy the corresponding protocol transmission, the module where the business party is located can initiate time slice allocation renegotiation (that is, the above-mentioned time slice reallocation request), re-interact the required transmission content and transmission time, and the master formulates an updated transmission strategy and coordinates them.
[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0086] In this embodiment, a device for establishing a wireless communication channel is also provided, and the device for establishing a wireless communication channel is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0087] Figure 7 is a structural block diagram of an optional device for establishing a wireless communication channel according to an embodiment of the present application; Figure 7 As shown, including:
[0088] The spectrum scanning module 72 is used to perform spectrum scanning on multiple first channels of the second wireless communication channel of the gateway device when it is determined that the target device and the gateway device are to establish a first wireless communication channel, and obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with the wireless routing device;
[0089] A determination module 74, configured to determine a current working channel of the gateway device, and determine an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold;
[0090] The establishing module 76 is configured to send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0091] Through the above-mentioned device, when it is determined that the target device needs to establish a first wireless communication channel with the gateway device, a plurality of first channels of the established second wireless communication channel of the gateway device are spectrum scanned to obtain a plurality of spectrum scanning results, wherein the communication frequency bands of the first wireless communication channel and the second wireless communication channel are the same, and the second wireless communication channel is the communication channel between the gateway device and the wireless routing device; the current working channel of the gateway device is determined, and a list of available channels is determined from the plurality of first channels according to the current working channel and the plurality of spectrum scanning results, wherein the interference degree of the second channel in the available channels to the current working channel is less than a first threshold; finally, the list of available channels is sent to the target device, instructing the target device and the gateway device to establish the first wireless communication channel based on the second channel; by adopting the above-mentioned scheme, the present application does not rely on hardware connection, and uses software algorithm to dynamically adjust the channel selection of devices such as Bluetooth and ZigBee to ensure that the channels used by wifi are staggered to reduce signal interference; thereby solving the problem of communication interference and resource conflict when Wi-Fi coexists with wireless protocols such as Bluetooth and ZigBee in the 2.4GHz frequency band in the related art.
[0092] Optionally, the above-mentioned determination module 74 is also used to determine the signal strength, channel occupancy and interference source of the multiple first channels according to the multiple spectrum scanning results; through an interference minimization algorithm, perform interference degree evaluation on the multiple first channels according to the signal strength, the channel occupancy and the interference source, and sort the multiple first channels from small to large according to the obtained interference degree evaluation results, wherein the interference degree evaluation results are used to indicate the interference degree of the first channel to the current working channel; determine the second channel with a higher ranking according to the first threshold, and determine the available channel list based on the second channel.
[0093] Optionally, the above-mentioned determination module 74 is also used to perform wireless environment monitoring on the target device and the gateway device, wherein the wireless environment monitoring includes at least one of the following: monitoring changes in the current working channel, and monitoring changes in interference sources of the multiple first channels; when it is determined that the wireless environment of the target device and the gateway device has changed, re-determining the list of available channels in the multiple first channels, and when it is determined that the second channel is updated, instructing the target device and the gateway device to re-establish the first wireless communication channel based on the updated second channel.
[0094] Optionally, the above-mentioned establishment module 76 is also used to determine an initial time-sharing strategy based on the data size of the data to be transmitted and the transmission rate of the first wireless communication channel, wherein the initial time-sharing strategy includes: the transmission period of the data to be transmitted, and the transmission time of the first wireless communication channel within a single transmission period; the initial time-sharing strategy is sent to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy.
[0095] Optionally, the above-mentioned establishment module 76 is also used to monitor the transmission rate of the first wireless communication channel in real time; when it is detected that the transmission rate has decreased, the data message of the data to be transmitted is fragmented, and the fragmented data message continues to be transmitted according to the initial time-sharing strategy, wherein the message length of the fragmented data message is less than or equal to the product of the transmission rate at the current moment and the transmission time.
[0096] Optionally, the above-mentioned establishment module 76 is also used to initiate a time slice reallocation request when a burst service is detected; in response to the time slice reallocation request, update the initial time-sharing strategy according to the business data corresponding to the burst service to obtain an updated time-sharing strategy; send the updated time-sharing strategy to the target device to instruct the target device and the gateway device to transmit the business data according to the updated time-sharing strategy.
[0097] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0098] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0099] S1, when it is determined that a first wireless communication channel is to be established between a target device and the gateway device, spectrum scanning is performed on multiple first channels of a second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device;
[0100] S2, determining a current working channel of the gateway device, and determining an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold;
[0101] S3: Send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0102] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0103] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0105] S1, when it is determined that a first wireless communication channel is to be established between a target device and the gateway device, spectrum scanning is performed on multiple first channels of a second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device;
[0106] S2, determining a current working channel of the gateway device, and determining an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold;
[0107] S3: Send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0108] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0109] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0110] Optionally, in this embodiment, the above computer program may be configured to implement the following steps when executed by a processor:
[0111] S1, when it is determined that a first wireless communication channel is to be established between a target device and the gateway device, spectrum scanning is performed on multiple first channels of a second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device;
[0112] S2, determining a current working channel of the gateway device, and determining an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold;
[0113] S3: Send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
[0114] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0115] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0116] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for establishing a wireless communication channel, characterized in that: Applicable to gateway devices, including: In the case of determining that a first wireless communication channel is to be established between the target device and the gateway device, spectrum scanning is performed on multiple first channels of a second wireless communication channel of the gateway device to obtain multiple spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with the wireless routing device; Determine a current working channel of the gateway device, and determine an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of the second channel in the available channel list to the current working channel is less than a first threshold; The available channel list is sent to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
2. The method for establishing a wireless communication channel according to claim 1, characterized in that: Determining an available channel list from the plurality of first channels according to the current working channel and the plurality of spectrum scanning results includes: Determine the signal strength, channel occupancy and interference sources of the plurality of first channels according to the plurality of spectrum scanning results; By using an interference minimization algorithm, performing interference evaluation on the multiple first channels according to the signal strength, the channel occupancy rate and the interference source, and sorting the multiple first channels from small to large according to the obtained interference evaluation result, wherein the interference evaluation result is used to indicate the interference degree of the first channel to the current working channel; The second channel with a higher ranking is determined according to the first threshold, and the available channel list is determined according to the second channel.
3. The method for establishing a wireless communication channel according to claim 2, characterized in that: After determining an available channel list from the plurality of first channels according to the current working channel and the plurality of spectrum scanning results, the method further includes: Performing wireless environment monitoring on the target device and the gateway device, wherein the wireless environment monitoring includes at least one of the following: performing change monitoring on the current working channel, and performing change monitoring on interference sources of the multiple first channels; When it is determined that the wireless environment of the target device and the gateway device has changed, the available channel list is re-determined from the multiple first channels, and when it is determined that the second channel is updated, the target device and the gateway device are instructed to re-establish the first wireless communication channel based on the updated second channel.
4. The method for establishing a wireless communication channel according to claim 1, characterized in that: After sending the available channel list to the target device to instruct the target device to establish the first wireless communication channel with the gateway device based on the second channel, the method further includes: Determine an initial time-sharing strategy according to the data size of the data to be transmitted and the transmission rate of the first wireless communication channel, wherein the initial time-sharing strategy includes: a transmission period of the data to be transmitted, and a transmission time of the first wireless communication channel within a single transmission period; The initial time-sharing strategy is sent to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy.
5. The method for establishing a wireless communication channel according to claim 4, characterized in that: After sending the initial time-sharing strategy to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy, the method further includes: Performing real-time monitoring on the transmission rate of the first wireless communication channel; When it is detected that the transmission rate is reduced, the data message of the data to be transmitted is fragmented, and the fragmented data message continues to be transmitted according to the initial time-sharing strategy, wherein the message length of the fragmented data message is less than or equal to the product of the transmission rate at the current moment and the transmission time.
6. The method for establishing a wireless communication channel according to claim 4, characterized in that: After sending the initial time-sharing strategy to the target device to instruct the target device and the gateway device to perform data transmission according to the initial time-sharing strategy, the method further includes: Initiate a time slice reallocation request when a burst service is detected; In response to the time slice reallocation request, the initial time-sharing strategy is updated according to the service data corresponding to the burst service to obtain an updated time-sharing strategy; The updated time-sharing strategy is sent to the target device to instruct the target device and the gateway device to transmit the service data according to the updated time-sharing strategy.
7. A device for establishing a wireless communication channel, characterized in that: include: a spectrum scanning module, configured to, when determining that a first wireless communication channel is to be established between a target device and a gateway device, perform spectrum scanning on a plurality of first channels of a second wireless communication channel of the gateway device to obtain a plurality of spectrum scanning results, wherein the communication frequency band of the first wireless communication channel is the same as that of the second wireless communication channel, and the gateway device has established the second wireless communication channel with a wireless routing device; a determination module, configured to determine a current working channel of the gateway device, and determine an available channel list from the multiple first channels according to the current working channel and the multiple spectrum scanning results, wherein the interference degree of a second channel in the available channel list to the current working channel is less than a first threshold; An establishing module is used to send the available channel list to the target device to instruct the target device and the gateway device to establish the first wireless communication channel based on the second channel.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Networking main control equipment, networking sub-equipment and wireless networking establishment method
CN122227441A