Communication control method, system and related device
By comparing the multi-frequency and multi-channel switching capabilities of Wi-Fi chips, we prioritize the maintenance of the device in the same frequency and the same channel state, solving the problem of excessive channel switching time caused by poor multi-frequency and multi-channel switching capabilities, and improving communication quality and user experience.
Patent Information
- Application Number
- CN202310960849.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
When using Wi-Fi chips with multiple antennas for communication, poor multi-frequency and multi-channel switching capabilities lead to excessive channel switching time, which may lead to failure in establishing communication services or poor user experience.
By comparing the multi-frequency multi-channel switching capabilities of the Wi-Fi chips of the first device and the second device, devices with weak multi-channel switching capabilities are preferred to maintain the same frequency and co-channel state in the same frequency and co-channel state, and frequent channel switching is avoided.
It effectively improves the communication quality of devices with weak multi-frequency and multi-channel switching capabilities, ensures stable connection with multiple devices, and improves user experience.
Smart Images

Figure CN119450797A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals and communication technologies, and in particular to communication control methods, systems and related devices. Background Art
[0002] With the continuous development of the field of wireless communication, a Wi-Fi chip can be connected to multiple antennas, so that electronic devices can use these multiple antennas at the same time to communicate wirelessly with different communication devices. For example, an electronic device can use one antenna to communicate with a router to perform Internet access services of the electronic device, and use another antenna to communicate with a computer to perform screen projection services of the electronic device.
[0003] However, when electronic devices use multiple antennas of the same Wi-Fi chip to communicate simultaneously, it is easy for different antennas to communicate through different channels. At this time, the Wi-Fi chip may need to time-switching these multiple antennas to achieve time-switching of channels and communicate with multiple devices at the same time. If the multi-frequency and multi-channel switching capabilities of the Wi-Fi chip are poor, it takes too much time to switch channels, and the time spent on one channel is too long, it may cause the communication service to fail to be established, or even if it is successfully established, it will result in a poor user experience. Summary of the invention
[0004] The present application provides a communication control method, system and related apparatus, which realizes controlling a device with weak multi-frequency and multi-channel switching capability to communicate with multiple devices in a same-frequency and same-channel state, thereby ensuring the communication quality of the device.
[0005] In a first aspect, an embodiment of the present application provides a communication control method, which is applied to a first device, and the method includes: the first device communicates with a third device on a first channel through a first Wi-Fi chip; when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device establishes a Wi-Fi connection with a second device based on the first channel, the second device is a device that communicates with a fourth device on a second channel through a second Wi-Fi chip, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; the first device communicates with the second device based on the Wi-Fi connection.
[0006] By implementing the communication control method provided in the first aspect, when the first device and the second device need to establish a Wi-Fi connection, the first device can determine the channel used by the first device and the second device to establish the Wi-Fi connection based on the channels used by the Wi-Fi connections that have been established by the first device and the second device respectively, and the multi-frequency and multi-channel switching capabilities of the Wi-Fi chips of the first device and the second device, and give priority to ensuring that devices with weaker multi-frequency and multi-channel switching capabilities are in the same frequency and channel state, so as to ensure the communication quality of the device as much as possible.
[0007] In combination with the first aspect, in some possible implementations, before the first device communicates with the second device based on the Wi-Fi connection, the method further includes: when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is stronger than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device establishes a Wi-Fi connection with the second device based on the second channel.
[0008] That is to say, the first device can compare the multi-frequency and multi-channel capabilities of the Wi-Fi chips of the first device and the second device, and select a channel used by one device from the first device and the second device as the channel used by the first device and the second device to establish a Wi-Fi connection, thereby giving priority to ensuring the Wi-Fi connection established between the device with weak multi-frequency and multi-channel switching capabilities and multiple devices.
[0009] In a second aspect, an embodiment of the present application further provides a communication control method, which is applied to a first device, the method comprising: the first device communicates with a third device through a first Wi-Fi chip; when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device disconnects the connection used to communicate with the third device and establishes a Wi-Fi connection with the second device, the second device is a device that communicates with a fourth device through a second Wi-Fi chip, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; the first device communicates with the second device based on the Wi-Fi connection.
[0010] By implementing the communication control method provided in the second aspect, when the first device and the second device need to establish a Wi-Fi connection, the first device can determine the Wi-Fi connection that needs to be disconnected in the first device and the second device based on the Wi-Fi connections that have been established by the first device and the second device respectively, and the multi-frequency and multi-channel switching capabilities of the Wi-Fi chips of the first device and the second device, so that a device with a weaker multi-frequency and multi-channel switching capability only maintains the Wi-Fi connection between the first device and the second device, avoiding the device with a weaker multi-frequency and multi-channel switching capability from switching back and forth between multiple channels, thereby giving priority to ensuring the successful establishment of the Wi-Fi connection between the first device and the second device and the communication quality between the first device and the second device.
[0011] In combination with the second aspect, in some possible implementations, the first device communicates with the third device via a 2.4 GHz frequency band.
[0012] That is to say, when the multi-frequency and multi-channel switching capability of the first device is weaker than that of the second device, and the Wi-Fi connection established by the first device uses the 2.4 GHz frequency band, the Wi-Fi connection using the 2.4 GHz frequency band established between the first device and the third device can be disconnected, so that the first device only exists in the Wi-Fi connection between the second devices.
[0013] This is because if a device with weak multi-frequency and multi-channel switching capabilities has established a Wi-Fi connection in the 2.4GHz band, when establishing a Wi-Fi connection again, the following two situations may occur:
[0014] 1) The Wi-Fi connection you establish again uses a channel in the 2.4GHz band
[0015] In this case, due to the large interference in the 2.4GHz frequency band, even if a device with weak multi-frequency and multi-channel switching capabilities can communicate with multiple devices in the same frequency and channel state, communication may fail due to channel interference.
[0016] 2) The Wi-Fi connection you establish again uses a channel in the 5GHz band
[0017] In this case, the device with weak multi-frequency and multi-channel switching capability needs to communicate with multiple devices in a different frequency and different channel state. Due to the weak multi-frequency and multi-channel switching capability of the device, there may be a large packet loss rate, resulting in the failure to establish a Wi-Fi connection between the first device and the second device, or even after the connection is successfully established, the connection may be disconnected due to poor communication quality.
[0018] Therefore, further consideration is given to whether the frequency band used by the Wi-Fi connection established by the device with weak multi-frequency and multi-channel switching capability is 2.4 GHz. For some special communication situations, the method of disconnecting the Wi-Fi connection established by the device and giving priority to the Wi-Fi connection that needs to be established between the first device and the second device can be adopted. In this way, various factors can be considered from multiple aspects to adopt the best solution as much as possible to ensure the communication quality of the device to the greatest extent.
[0019] In conjunction with the second aspect, in some possible implementations, the first device establishes a Wi-Fi connection with the second device, specifically including: the first device establishes a Wi-Fi connection with the second device based on a 5 GHz frequency band.
[0020] Since the 5GHz band has a wider signal bandwidth, less interference, and a stable network speed, it can better meet the communication requirements between the first device and the second device. For example, if there is a distributed service between the first device and the second device, the 5GHz band can better meet the high rate and low interference requirements of the distributed service.
[0021] In combination with the second aspect, in some possible implementations, after the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device transmitting network data through the second device.
[0022] Since the first device has disconnected the communication connection with the third device, if the first device has a network connection requirement, the first device can be connected to the network through the second device to meet the network connection requirement of the first device.
[0023] In combination with the second aspect, in some possible implementations, before the first device transmits network data through the second device, the method further includes: the first device displays first prompt information, and the first prompt information is used to prompt the user that the first device will connect to the network through the second device.
[0024] That is, before the first device transmits network data through the second device, the first device may display a prompt message to prompt the user that the first device is connected to the network through the second device.
[0025] In combination with the first aspect and the second aspect, in some possible implementations, before the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device receiving a multi-frequency and multi-channel switching capability of a second Wi-Fi chip sent by the second device.
[0026] That is, before the first device establishes a Wi-Fi connection with the second device, the first device can first obtain the multi-frequency and multi-channel switching capability of the Wi-Fi chip of the second device, and determine how to establish the Wi-Fi connection based on the multi-frequency and multi-channel switching capability of the Wi-Fi chips of the first device and the second device.
[0027] In combination with the first aspect and the second aspect, in some possible implementations, before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method further includes: the first device sends first broadcast information, and the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is information returned to the first device after the second device receives the first broadcast information; or, the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, specifically including: the first device receives the second broadcast information sent by the second device; and the second broadcast information carries the multi-frequency and multi-channel switching capability of the second Wi-Fi chip.
[0028] That is, the first device may obtain the multi-frequency and multi-channel switching capability of the second device when the second device replies to the broadcast, or the first device may also obtain the multi-frequency and multi-channel switching capability of the second device through the broadcast sent by the second device.
[0029] In combination with the first aspect and the second aspect, in some possible implementations, before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method also includes: the first device establishes a first connection with the second device; the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, specifically including: the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device through the first connection.
[0030] Exemplarily, the first connection may refer to a BLE connection, a USB connection, a classic Bluetooth connection, an NFC connection, a Zigbee connection, and the like.
[0031] That is, after establishing a first connection with the second device, the first device may also obtain the multi-frequency and multi-channel switching capability of the second device through the first connection.
[0032] In combination with the first aspect and the second aspect, in some possible implementations, before the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device receives connection information of the second device sent by the second device, where the connection information indicates a channel or frequency band used by the second device when communicating with other devices.
[0033] That is, the first device can obtain the Wi-Fi connection status of the second device before establishing a Wi-Fi connection with the second device. In this way, if the multi-frequency and multi-channel switching capability of the second device is weaker than that of the first device, the first device can determine the frequency band used for the Wi-Fi connection established between the first device and the second device according to the connection status of the second device, or determine whether to disconnect the Wi-Fi connection established by the second device.
[0034] In combination with the first aspect and the second aspect, in some possible implementations, the Wi-Fi connection includes any one of the following: a Wi-Fi communication connection using Apple's Wireless Direct AWDL technology, a Wi-Fi communication connection using Huawei's Multi-Link Direct HML protocol, and a Wi-Fi communication connection using a Wi-Fi peer-to-peer P2P protocol.
[0035] In a third aspect, an embodiment of the present application provides a communication control method, which is applied to a communication system including a first device and a second device, the method including: the first device communicates with a third device on a first channel through a first Wi-Fi chip; the second device communicates with a fourth device on a second channel through a second Wi-Fi chip; when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device and the second device establish a Wi-Fi connection based on the first channel, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; the first device and the second device communicate based on the Wi-Fi connection.
[0036] By implementing the communication control method provided in the third aspect, when the first device and the second device need to establish a Wi-Fi connection, the first device and the second device can negotiate the channel used by the first device and the second device to establish the Wi-Fi connection based on the channels used by the Wi-Fi connections that have been established by the first device and the second device respectively, and the multi-frequency and multi-channel switching capabilities of the Wi-Fi chips of the first device and the second device, and give priority to ensuring that devices with weaker multi-frequency and multi-channel switching capabilities are in the same frequency and channel state, so as to ensure the communication quality of the device as much as possible.
[0037] Before the first device communicates with the second device based on the Wi-Fi connection, the method also includes: when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is stronger than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device and the second device establish a Wi-Fi connection based on the first channel.
[0038] That is to say, the first device and the second device can compare the multi-frequency and multi-channel capabilities of the Wi-Fi chips of the first device and the second device, and select a channel used by one device from the first device and the second device as the channel used by the first device and the second device to establish a Wi-Fi connection, thereby giving priority to ensuring the Wi-Fi connection established between the device with weak multi-frequency and multi-channel switching capabilities and multiple devices.
[0039] In a fourth aspect, an embodiment of the present application provides a communication control method, characterized in that the method is applied to a communication system including a first device and a second device, and the method includes: the first device communicates with a third device through a first Wi-Fi chip; the second device communicates with a fourth device through a second Wi-Fi chip; when the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device disconnects the connection used for communication with the third device and establishes a Wi-Fi connection with the second device, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; the first device communicates with the second device based on the Wi-Fi connection.
[0040] By implementing the communication control method provided in the fourth aspect, when the first device and the second device need to establish a Wi-Fi connection, the first device and the second device can negotiate the Wi-Fi connection that needs to be disconnected in the first device and the second device based on the Wi-Fi connections that have been established by the first device and the second device respectively, and the multi-frequency and multi-channel switching capabilities of the Wi-Fi chips of the first device and the second device, so that the device with weaker multi-frequency and multi-channel switching capabilities only maintains the Wi-Fi connection between the first device and the second device, avoiding the device with weaker multi-frequency and multi-channel switching capabilities from switching back and forth between multiple channels, thereby giving priority to ensuring the successful establishment of the Wi-Fi connection between the first device and the second device and the communication quality between the first device and the second device.
[0041] In combination with the fourth aspect, in some possible implementations, the first device communicates with the third device via a 2.4 GHz frequency band.
[0042] Further considering whether the frequency band used by the Wi-Fi connection established by the device with weak multi-frequency and multi-channel switching capability is 2.4GHz, the method of disconnecting the Wi-Fi connection established by the device in some special communication situations can be adopted to give priority to the Wi-Fi connection that needs to be established between the first device and the second device. In this way, various factors can be considered from multiple aspects to adopt the best solution as much as possible to ensure the communication quality of the device to the greatest extent.
[0043] In conjunction with the fourth aspect, in some possible implementations, the first device establishes a Wi-Fi connection with the second device, specifically including:
[0044] The first device establishes a Wi-Fi connection with the second device based on the 5 GHz frequency band.
[0045] Since the 5GHz band has a wider signal bandwidth, less interference, and a stable network speed, it can better meet the communication requirements between the first device and the second device. For example, if there is a distributed service between the first device and the second device, the 5GHz band can better meet the high rate and low interference requirements of the distributed service.
[0046] In combination with the fourth aspect, in some possible implementations, after the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device transmitting network data through the second device.
[0047] Since the first device has disconnected the communication connection with the third device, if the first device has a network connection requirement, the first device can be connected to the network through the second device to meet the network connection requirement of the first device.
[0048] In combination with the fourth aspect, in some possible implementations, before the first device transmits network data through the second device, the method also includes: the first device displays first prompt information, and the first prompt information is used to prompt the user that the first device will connect to the network through the second device.
[0049] That is, before the first device transmits network data through the second device, the first device may display a prompt message to prompt the user that the first device is connected to the network through the second device.
[0050] In combination with the third aspect and the fourth aspect, in some possible implementations, before the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device receiving the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device.
[0051] That is, before the first device establishes a Wi-Fi connection with the second device, the first device can first obtain the multi-frequency and multi-channel switching capability of the Wi-Fi chip of the second device, and determine how to establish the Wi-Fi connection based on the multi-frequency and multi-channel switching capability of the Wi-Fi chips of the first device and the second device.
[0052] In combination with the third aspect and the fourth aspect, in some possible implementations, before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method further includes: the first device sends first broadcast information, and the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is information returned to the first device after the second device receives the first broadcast information; or, the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, specifically including: the first device receives the second broadcast information sent by the second device; and the second broadcast information carries the multi-frequency and multi-channel switching capability of the second Wi-Fi chip.
[0053] That is, the first device may obtain the multi-frequency and multi-channel switching capability of the second device when the second device replies to the broadcast, or the first device may also obtain the multi-frequency and multi-channel switching capability of the second device through the broadcast sent by the second device.
[0054] In combination with the third aspect and the fourth aspect, in some possible implementations, before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method also includes: the first device establishes a first connection with the second device; the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, specifically including: the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device through the first connection.
[0055] Exemplarily, the first connection may refer to a BLE connection, a USB connection, a classic Bluetooth connection, an NFC connection, a Zigbee connection, and the like.
[0056] That is, after establishing a first connection with the second device, the first device may also obtain the multi-frequency and multi-channel switching capability of the second device through the first connection.
[0057] In combination with the third aspect and the fourth aspect, in some possible implementations, before the first device establishes a Wi-Fi connection with the second device, the method further includes: the first device receives connection information of the second device sent by the second device, where the connection information indicates a channel or frequency band used by the second device when communicating with other devices.
[0058] That is, the first device can obtain the Wi-Fi connection status of the second device before establishing a Wi-Fi connection with the second device. In this way, if the multi-frequency and multi-channel switching capability of the second device is weaker than that of the first device, the first device can determine the frequency band used for the Wi-Fi connection established between the first device and the second device according to the connection status of the second device, or determine whether to disconnect the Wi-Fi connection established by the second device.
[0059] In combination with the third aspect and the fourth aspect, in some possible implementations, the Wi-Fi connection includes any one of the following: a Wi-Fi communication connection using Apple's Wireless Direct AWDL technology, a Wi-Fi communication connection using Huawei's Multi-Link Direct HML protocol, and a Wi-Fi communication connection using a Wi-Fi peer-to-peer P2P protocol.
[0060] In a fifth aspect, an embodiment of the present application provides an electronic device comprising a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method described in the first aspect or any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect.
[0061] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, cause the electronic device to execute a method as described in the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of a communication system 1000 provided in an embodiment of the present application;
[0063] Figure 2A schematic diagram of the structure of a Wi-Fi chip included in the electronic device 100 provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of the principle of channel switching provided in an embodiment of the present application;
[0065] Figure 4 A flow chart of a communication control method provided in an embodiment of the present application;
[0066] Figure 5 A flow chart of another communication control method provided in an embodiment of the present application;
[0067] Figure 6 A schematic diagram of the hardware structure of an electronic device 500 provided in an embodiment of the present application;
[0068] Figure 7 A schematic diagram of the structure of the Wi-Fi chip provided in the embodiment of the present application;
[0069] Figure 8 A software structure block diagram of the electronic device 500 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0071] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0072] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0073] In order to understand this solution more clearly, the following explains the relevant concepts involved in this application:
[0074] 1) Frequency band
[0075] Wireless communication refers to the communication method in which electromagnetic waves propagate through space to transmit information. Frequency band refers to the frequency range of a continuous electromagnetic wave. Generally speaking, wireless routers support two frequency bands: 2.4GHz and 5GHz.
[0076] Among them, the signal frequency of the 2.4GHz band is low, the attenuation is small when propagating in the air or obstacles, and the propagation distance is longer, but the signal bandwidth of 2.4GHz is narrow, the wireless environment is more crowded, and the interference is greater. The signal bandwidth of the 5GHz band is wider, the interference is less, the network speed is stable, and the 5GHz band can support higher wireless rates. However, the signal frequency of the 5GHz band is high, the attenuation is large when propagating in the air or obstacles, and the coverage distance is generally smaller than the signal of the 2.4GHz band.
[0077] 2) Channel
[0078] Channels are a further division based on frequency bands. Channels are the channels through which signals are transmitted in a communication system, and are composed of the transmission medium through which signals are transmitted from the transmitter to the receiver. According to the IEEE 802.11 protocol, the 2.4GHz Wi-Fi band is divided into 13 overlapping channels, namely: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, and the 5GHz Wi-Fi band is divided into 201 channels, such as: 36, 149, 153, 157, 161, 165, etc.
[0079] 3) Since Wi-Fi devices are allowed to operate in the 2.4 GHz and 5 GHz frequency bands, their concurrent modes can be divided into the following types according to the frequency bands they support:
[0080] Single band single concurrent (SBSC)
[0081] Dual band single concurrent (DBSC)
[0082] Dual band dual concurrent (DBDC)
[0083] Dual band adaptive concurrent (DBAC)
[0084] Among them, in SBSC mode, Wi-Fi devices can only work on a single frequency band, such as 2.4GHz or 5GHz, and the Wi-Fi chip in the Wi-Fi device contains a complete set of pathways: 1 baseband processing module + 1 RF front end.
[0085] In DBSC mode, the Wi-Fi chip in the Wi-Fi device contains 2 baseband processing modules + 1 RF front-end, which can choose to operate in the 2.4GHz frequency band or the 5GHz frequency band.
[0086] In DBDC mode, the Wi-Fi chip in the Wi-Fi device contains two complete channels: 2 baseband processing modules + 2 RF front-ends, and the Wi-Fi device can work on two frequency bands at the same time. At present, the two channels in DBDC mode can be implemented in the following two ways: one is to use two Wi-Fi chips to achieve dual-band dual-transmission, so that the Wi-Fi device can support two independent wireless networks at the same time and achieve concurrent execution, that is, simultaneous dual band (SDB); another is to use a single Wi-Fi chip to achieve dual-band dual-transmission, so that the Wi-Fi device can achieve real simultaneous dual band (RSDB).
[0087] In DBAC mode, the Wi-Fi chip in the Wi-Fi device integrates only one set of radio frequency, which has two sets of channels, one set of channels supports 2.4GHz and the other set of channels supports 5GHz. When in use, the Wi-Fi chip can dynamically switch back and forth between the 2.4GHz band and the 5GHz band to achieve the effect of time-division multiplexing communication in these two bands. For details about the channel switching principle of the Wi-Fi chip in DBAC mode, please refer to the subsequent Figure 2 and Figure 3 Related content.
[0088] 4) Wi-Fi connection
[0089] In the embodiment of the present application, the Wi-Fi connection may include a Wi-Fi access point (AP) connection and a Wi-Fi high-speed connection.
[0090] The electronic device can establish a Wi-Fi AP connection with a wireless access point, such as a router. In this case, the electronic device can connect to the wireless network created by the wireless access point, receive the wireless signal of the wireless access point, and access the Internet or other network resources.
[0091] Wi-Fi high-speed connection can include any of the following: Wi-Fi communication connection using Apple wireless direct link (AWDL) technology, Wi-Fi communication connection using Huawei magneto link (HML) protocol, and Wi-Fi communication connection using Wi-Fi peer to peer (P2P) protocol.
[0092] For data interaction between two terminal devices, Wi-Fi high-speed connection can directly connect terminal devices, with high communication rate, not relying on LAN, and data interaction does not need to occupy additional processors of other devices. One interaction only needs to compete for one air interface, with high communication efficiency, which can well meet the business needs of distributed applications between devices. In Wi-Fi AP connection, two terminal devices need to be connected to the same router to realize data interaction between devices, and one interaction needs to compete for two air interfaces, and data needs to pass through three-party devices, so data security cannot be guaranteed.
[0093] In an embodiment of the present application, the electronic device can establish a high-speed Wi-Fi connection with other devices, such as mobile phones, computers, tablets and other terminal devices, to achieve direct communication between two or more devices and execute distributed services of the devices, such as cross-device file sharing services, cross-device screen projection services, cross-device drag services, etc., without going through a router.
[0094] 5) Same frequency and channel
[0095] Same frequency and same channel means that when an electronic device uses two Wi-Fi connection channels to communicate with external devices respectively, the two frequency bands and channels used are the same. For example, a mobile phone communicates wirelessly with a router and a computer at the same time. The channel used by the mobile phone to communicate with the router is channel 149 under the 5GHz frequency band, and the channel used to communicate with the computer is also channel 149 under the 5GHz frequency band. At this time, the mobile phone is in a communication state of same frequency and same channel.
[0096] 6) Same frequency, different channels
[0097] Same frequency, different channels means that when an electronic device uses two Wi-Fi connection channels to communicate with external devices, the two frequency bands used are the same, but the channels used are different. For example, a mobile phone communicates wirelessly with a router and a computer at the same time. The channel used by the mobile phone to communicate with the router is channel 1 under the 2.4GHz frequency band, and the channel used to communicate with the computer is channel 6 under the 2.4GHz frequency band. At this time, the mobile phone is in a communication state of same frequency, different channels.
[0098] 7) Different frequencies and channels
[0099] Different frequencies and channels refer to the situation where an electronic device uses two different Wi-Fi channels to communicate with external devices. For example, a mobile phone communicates wirelessly with a router and a computer at the same time. The channel used by the mobile phone to communicate with the router is channel 1 in the 2.4GHz frequency band, and the channel used to communicate with the computer is channel 149 in the 5GHz frequency band. At this time, the mobile phone is in a communication state of different frequencies and channels.
[0100] Figure 1 A schematic diagram of a communication system 1000 provided in an embodiment of the present application.
[0101] like Figure 1 As shown, the communication system 1000 may include multiple electronic devices such as an electronic device 100, an electronic device 200, an electronic device 300 and an electronic device 400.
[0102] Among them, electronic device 100 and electronic device 200 may refer to mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, as well as cellular phones, personal digital assistants (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and / or smart city devices, etc., and electronic device 300 and electronic device 400 may refer to devices with routing functions, such as routers, three-layer switches, etc. Electronic devices 300 and electronic devices 400 can provide wireless signal sources for other devices to connect to and provide wireless networks for other devices.
[0103] exist Figure 1 In the communication system 1000 shown, the electronic device 100 may refer to a mobile phone, the electronic device 200 may refer to a tablet, and the electronic device 300 and the electronic device 400 may refer to routers. Among them, the electronic device 100 can establish a Wi-Fi AP connection with the electronic device 300. For example, the electronic device 100 can perform Internet access services by establishing a Wi-Fi AP connection with the electronic device 300, and the electronic device 200 can establish a Wi-Fi AP connection with the electronic device 400. For example, the electronic device 200 can perform Internet access services by connecting to the Wi-Fi AP established with the electronic device 400. In addition, the electronic device 100 can also establish a Wi-Fi high-speed connection with the electronic device 200. For example, the electronic device 100 and the electronic device 200 can realize distributed services such as cross-device file sharing and cross-device screen projection through the Wi-Fi high-speed connection.
[0104] It is understandable that in Figure 1 In the communication system 1000 shown, the electronic device 300 and the electronic device 400 may be the same device, that is, the electronic device 100 and the electronic device 200 may simultaneously establish a Wi-Fi connection with the same device having a routing function to perform Internet access services.
[0105] It should be noted that in other embodiments of the present application, the electronic device 300 and the electronic device 400 may also be mobile phones, tablet computers, computers, and other devices of the same type as the electronic device 100 and the electronic device 200. Taking the electronic device 100 as an example, the electronic device 100 can simultaneously establish a Wi-Fi high-speed connection with the electronic device 200 and the electronic device 300. Taking the electronic device 200 as an example, the electronic device 200 can simultaneously establish a Wi-Fi high-speed connection with the electronic device 100 and the electronic device 400. It should be understood that in addition to including the electronic device 100 and the electronic device 200, the communication system also includes a device with which the electronic device 100 establishes a Wi-Fi connection, and a device with which the electronic device 200 establishes a Wi-Fi connection, all belong to the communication system 1000 described in the embodiment of the present application, and the embodiment of the present application does not limit the number of devices included in the communication system 1000, the type of devices, and the Wi-Fi connection established between the devices.
[0106] And, in Figure 1 In the communication system 1000 shown, taking the electronic device 100 as an example, when the electronic device 100 has established a Wi-Fi connection with the electronic device 300, if the electronic device 100 then establishes a Wi-Fi connection with the electronic device 200, the electronic device 100 may be in a same-frequency and different-channel state or a different-frequency and different-channel state.
[0107] For example, if the channel used for wireless communication between electronic device 100 and electronic device 300 is channel 149 in the 5 GHz frequency band, when electronic device 100 establishes a Wi-Fi connection with electronic device 200, the channel used for wireless communication between electronic device 100 and electronic device 200 may be a channel in the 5 GHz frequency band, unless the channel is channel 149, otherwise electronic device 100 is in a same-frequency and different-channel state, or it may be a channel in the 2.4 GHz frequency band, in which case electronic device 100 is in a different-frequency and different-channel state.
[0108] Furthermore, if the electronic device 100 is in the same frequency and different channel state or the different frequency and different channel state, and implements channel switching through time-sharing scheduling, the electronic device 100 needs to switch back and forth between different channels when communicating with the electronic device 200 and the electronic device 300 at the same time.
[0109] In order to better understand the process of channel switching, Figure 2 and Figure 3 The principle of implementing channel switching by time-sharing scheduling when the electronic device 100 is in the same frequency but different channel state is introduced.
[0110] Figure 2 The schematic diagram of the structure of the Wi-Fi chip included in the electronic device 100 is exemplarily shown. Figure 3 A schematic diagram of the principle of channel switching provided in an embodiment of the present application.
[0111] like Figure 2 As shown, the Wi-Fi chip may include: a baseband processing module, a switch, and a radio frequency module. The baseband processing module is used to implement signal modulation and demodulation, signal processing, error correction, etc. The switch is used to implement signal switching, switching the signal to different paths of the radio frequency module. The radio frequency module may include radio frequency path 1 and radio frequency path 2, wherein the antenna connected to the radio frequency path 1 is antenna R1, and the antenna connected to the radio frequency path 2 is antenna R2.
[0112] When the electronic device 100 is simultaneously communicating wirelessly with multiple devices, the switch can be adjusted to connect RF path 1 or RF path 2 to the baseband processor, so that the electronic device 100 can schedule antenna R1 and antenna R2 in time-sharing manner, thereby switching channels in time-sharing manner to communicate with different devices.
[0113] For example, the electronic device 100 uses the 149th channel in the 5 GHz frequency band to communicate with the electronic device 200, and uses the 36th channel in the 5 GHz frequency band to communicate with the electronic device 300. Figure 3 In the T1 time period, the electronic device 100 can first Figure 2 The path shown is: baseband processor-switch-RF path 1-antenna R1, which realizes the use of 36 channels to send and receive signals for communication with the electronic device 300 through the antenna R1. After that, during the T2 period, the electronic device 100 needs to switch Figure 2 The switch shown in FIG. 1 allows the electronic device 100 to be switched on during the T3 period. Figure 2 The path shown is: baseband processor-switch-RF path 2-antenna R2, which realizes the use of channel 149 to send and receive signals for communication with the electronic device 200 through antenna R2. After that, in the T4 time period, the electronic device 100 needs to switch again. Figure 2 The switch shown in FIG. 1 allows the electronic device 100 to be switched on during the T5 period. Figure 2 The path shown: baseband processor-switch-RF path 1-antenna R1, implements the use of 36 channels to send and receive signals for communication with the electronic device 300 through the antenna R1, and so on.
[0114] It can be seen that during the process of the electronic device 100 switching channels, the electronic device 100 needs a certain switching waiting time, for example Figure 3 The channel switching can be completed only by using T2, T4, T6, etc. as shown.
[0115] In addition, it can be understood that the principle of implementing channel switching through time-sharing scheduling in the same frequency but different channel state of the electronic device 200 is similar to that of the electronic device 100. When the electronic device 200 switches channels, it also requires a certain waiting time to complete the channel switching.
[0116] However, during the waiting time, the electronic device (such as electronic device 100 or electronic device 200) cannot send or receive signals. If it is in a critical business process at this time, such as an interactive Address Resolution Protocol (ARP) request scenario, the ARP request cannot be processed, resulting in the recipient not receiving the ARP response, ultimately leading to the failure of business establishment.
[0117] That is to say, if an electronic device, such as electronic device 100 or electronic device 200, is in a same-frequency and different-channel state or a different-frequency and different-channel state, and implements channel switching through time-sharing scheduling, since channel switching requires a certain waiting time, the electronic device will not be able to use the channel to communicate with the other end for a large period of time, resulting in low channel time utilization, increased packet loss rate, and easy communication service jams, which reduces communication quality and poor user experience.
[0118] Furthermore, if the Wi-Fi chip in the electronic device is a low-end chip with poor channel switching capability, the switching waiting time and channel dwell time will be further increased. For example, for some chips with good multi-frequency and multi-channel switching capabilities, the switching waiting time may be 50ms, and for some chips with poor multi-frequency and multi-channel switching capabilities, the switching waiting time may be 320ms.
[0119] It can be seen that if the Wi-Fi chip equipped with a low-end chip in the communication system 1000 is in the same frequency and different channel state or the different frequency and different channel state, it may further aggravate the communication service jam and reduce the user experience.
[0120] Therefore, how to prevent devices equipped with low-end Wi-Fi chips from communicating in DBAC mode in a communication system is an urgent problem to be solved.
[0121] An embodiment of the present application provides a communication control method, which involves a first device and a second device. The first device includes a first Wi-Fi chip, which controls the first device and wirelessly communicates with a third device through a first channel. The second device includes a second Wi-Fi chip, which controls the second device and wirelessly communicates with a fourth device through a second channel. When it is determined that the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than that of the second Wi-Fi chip, the first device determines that the first channel is a channel used when the first device communicates with the second device, and the first device establishes a Wi-Fi connection with the second device.
[0122] Among them, the multi-frequency and multi-channel switching capability indicates the switching time and residence ratio efficiency when the Wi-Fi chip controls channel switching during communication. The stronger the multi-frequency and multi-channel switching capability, the less switching time the Wi-Fi chip uses to control channel switching during communication, and the higher the residence ratio efficiency. In this way, the device can switch channels faster, and the communication efficiency is higher when the device communicates with multiple devices at the same time.
[0123] That is to say, if the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than that of the second Wi-Fi chip, the communication control method provided in the embodiment of the present application can avoid the first device from being in a same-frequency and different-channel state when the first device establishes a Wi-Fi high-speed connection with the second device, and put the first device in a same-frequency and same-channel state. In this way, the first device does not need to switch channels during the process of communicating with the third device and the second device at the same time, thereby avoiding the disadvantage of the weak multi-frequency and multi-channel switching capability of the first Wi-Fi chip of the first device, thereby ensuring the communication effect of the Wi-Fi connection established between the first device and the second device as much as possible.
[0124] An embodiment of the present application also provides another communication control method, which involves a first device and a second device, wherein the first device includes a first Wi-Fi chip, the first Wi-Fi chip controls the first device to wirelessly communicate with a third device, and the second device includes a second Wi-Fi chip, the second Wi-Fi chip controls the second device to wirelessly communicate with a fourth device, and when it is determined that the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device disconnects the communication connection established with the third device and establishes a Wi-Fi connection with the second device.
[0125] That is to say, if the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than that of the second Wi-Fi chip, and the first Wi-Fi chip does not support the DBDC mode, the first Wi-Fi chip can only control the first device to communicate with the third device and the second device in the DBAC mode. The communication control method provided in the embodiment of the present application disconnects the Wi-Fi connection between the first device and the third device, thereby avoiding the first Wi-Fi chip with poor multi-frequency and multi-channel switching capability from switching back and forth between different signals, avoiding the disadvantage of the weak multi-frequency and multi-channel switching capability of the first Wi-Fi chip of the first device, and preferentially ensuring the successful establishment of the Wi-Fi connection between the first device and the second device.
[0126] Furthermore, the frequency band used when the first device communicates with the third device may refer to the 2.4GHz frequency band, that is, the first device will disconnect from the third device when the first device needs to establish a connection with the second device only when the frequency band used by the first device when communicating with other devices is the 2.4GHz frequency band and the multi-frequency and multi-channel switching capability of the Wi-Fi chip is weak. This is because if the first device and the second device use a channel in the 2.4GHz frequency band to communicate in order to avoid the first device switching between channels, it is further considered that if the first device uses the same channel in the 2.4GHz frequency band for wireless communication with the third device and the second device at the same time, the communication quality of the first device will be seriously affected due to the serious interference in the 2.4GHz frequency band. In this way, when the device is about to communicate with multiple devices, the communication quality of the device can be fully considered from multiple aspects, and appropriate trade-offs can be made for the connections established by the device to ensure the communication quality of the device.
[0127] Furthermore, the first device and the second device establish a Wi-Fi connection using the 5 GHz frequency band. This is because if the first device and the second device are to perform distributed services, the 5 GHz frequency band can better meet the communication rate and anti-interference requirements required for the distributed services compared to the 2.4 GHz frequency band.
[0128] Furthermore, if the first device has a networking requirement, the first device can transmit network data through the second device, for example, the first device can perform Internet access services through the second device. In this way, it can be ensured that the first device can still connect to the network and perform Internet access services even after disconnecting from the third device.
[0129] Figure 4 A flow chart of a communication control method provided in an embodiment of the present application is shown.
[0130] like Figure 4 As shown, the communication control method may include:
[0131] S101. The electronic device 100 communicates wirelessly with the electronic device 300 via a first channel.
[0132] The electronic device 100 establishes a Wi-Fi connection with the electronic device 300. Specifically, the electronic device 100 may include a first Wi-Fi chip, which may control the electronic device 100 to wirelessly communicate with the electronic device 300 through a first channel. For example, the first channel is channel 1 in the 2.4 GHz frequency band, or channel 36 in the 5 GHz frequency band, and so on.
[0133] For example, see Figure 1 , the electronic device 100 may refer to a mobile phone, the electronic device 300 may refer to a router, and the Wi-Fi connection may refer to a Wi-Fi AP connection.
[0134] S102. The electronic device 200 and the electronic device 400 perform wireless communication via the second channel.
[0135] The electronic device 200 establishes a Wi-Fi connection with the electronic device 400. Specifically, the electronic device 200 may include a second Wi-Fi chip, which may control the electronic device 200 to wirelessly communicate with the electronic device 400 through a second channel. For example, the second channel is channel 1 in the 2.4 GHz frequency band, or channel 36 in the 5 GHz frequency band, and so on.
[0136] For example, see Figure 1 , the electronic device 200 may refer to a tablet, the electronic device 400 may refer to a router, and the Wi-Fi connection may refer to a Wi-Fi AP connection.
[0137] It can be understood that step S101 and step S102 are not used to limit the execution order of step S101 and step S102.
[0138] S103. The electronic device 100 detects a first operation.
[0139] The first operation may include an operation of the user initiating the first service, or may include an operation initiated by the user to request to establish a wireless connection with other devices. For example, the first service may refer to a distributed service such as a screen projection service, a file sharing service, etc., and the embodiment of the present application does not limit the service. The operation may be a touch operation, a voice command, etc., and the embodiment of the present application does not limit the form of the operation.
[0140] S104 . The electronic device 100 sends a broadcast to the electronic device 200 .
[0141] The electronic device 100 may discover the electronic device 200 by broadcasting to the surroundings.
[0142] In some embodiments, when the electronic device 100 sends a broadcast to the outside, the broadcast it sends may carry capability information (e.g., multi-frequency and multi-channel switching capability) of the first Wi-Fi chip contained in the electronic device 100, and the capability information of the first Wi-Fi chip indicates the switching time and residence ratio efficiency of the first Wi-Fi chip when controlling channel switching during communication. In this way, after other devices obtain the broadcast sent by the electronic device 100, they can learn the capability of the Wi-Fi chip of the electronic device 100.
[0143] Furthermore, the broadcast sent by the electronic device 100 may also carry the connection information of the electronic device 100, and the connection information indicates the channel or frequency band used by the Wi-Fi connection established between the electronic device 100 and other devices. Exemplarily, the connection information indicates that the electronic device 100 and the electronic device 300 are wirelessly communicating through the first channel. In this way, after other devices obtain the broadcast sent by the electronic device 100, they can obtain the channel used by the wireless connection established between the electronic device 100 and other devices.
[0144] It is understandable that the broadcast sent by the electronic device 100 may also include other information, such as the device ID and address information of the electronic device 100, and the embodiment of the present application is not limited to this.
[0145] S105 . The electronic device 200 broadcasts back to the electronic device 100 .
[0146] After the electronic device 200 acquires the broadcast sent by the electronic device 100, the electronic device 200 may reply to the broadcast.
[0147] In some embodiments, when the electronic device 200 replies to the broadcast, the reply information may carry the capability information (e.g., multi-frequency and multi-channel switching capability) of the second Wi-Fi chip contained in the electronic device 200, and the capability information of the second Wi-Fi chip indicates the speed at which the second Wi-Fi chip controls channel switching during the communication process. In this way, after the electronic device 100 obtains the information replied by the electronic device 200, the capability of the Wi-Fi chip of the electronic device 100 can be obtained.
[0148] Furthermore, the information replied by the electronic device 200 may also carry the connection information of the electronic device 200, and the connection information indicates the channel used by the Wi-Fi connection established between the electronic device 200 and other devices. Exemplarily, the connection information indicates that the electronic device 200 and the electronic device 400 are wirelessly communicating through the second channel. In this way, after the electronic device 100 obtains the information replied by the electronic device 200, it can obtain the channel used by the wireless connection established between the electronic device 200 and other devices.
[0149] It is understandable that the information sent by the electronic device 200 when replying to the broadcast may also include other content, such as the device ID and address information of the electronic device 200, etc., and the embodiment of the present application does not limit this.
[0150] S106. The electronic device 100 displays a device list.
[0151] It is understandable that during the process of the electronic device 100 broadcasting outward, there may be one or more devices that obtain and reply to the broadcast sent by the electronic device 100. The device list can be used to indicate the one or more devices that reply to the broadcast. In this way, the user can view the one or more devices discovered by the electronic device 100 through the device list.
[0152] It is understandable that step S106 is an optional step, and the electronic device 100 may not display the device list.
[0153] The following steps S107 - S110 take the electronic device 100 selecting the electronic device 200 as an example to describe the process of the electronic device 100 establishing a Wi-Fi high-speed connection with the electronic device 200.
[0154] S107 . The electronic device 100 detects that the user selects the second operation of the electronic device 200 .
[0155] Specifically, the device list displayed by the electronic device 100 may include options of the electronic device 200, and the second operation may include an operation acting on the options of the electronic device 200 included in the device list.
[0156] It can be understood that step S107 is an optional step, and the electronic device 100 can automatically establish a connection with the electronic device 200 without the user's selection.
[0157] S108. The electronic device 100 establishes a first connection with the electronic device 200.
[0158] In response to the second operation, the electronic device 100 may establish a first connection with the electronic device 200 .
[0159] The first connection may be a Bluetooth low energy (BLE) connection, a universal serial bus (USB), a classic Bluetooth connection, a near field communication (NFC) connection, a Zigbee connection, etc. The embodiment of the present application does not limit the first connection.
[0160] In this way, after the electronic device 100 and the electronic device 200 establish the first connection, the electronic device 100 and the electronic device 200 can encrypt the connection channel to achieve secure communication between the electronic device 100 and the electronic device 200, and further exchange relevant information required to establish a Wi-Fi high-speed connection, such as a Wi-Fi password, a service set identifier (Service Set Identifier, SSID), etc., thereby completing the establishment of the Wi-Fi connection.
[0161] It can be understood that the above steps S103-S108 are a process in which the electronic device 100 detects the first operation, initiates a broadcast, and establishes a first connection with the electronic device 200. In other embodiments of the present application, the electronic device 200 may also detect the first operation, initiate a broadcast, and establish the first connection with the electronic device 100. The embodiment of the present application does not limit the device that initiates the electronic device 100 to establish a Wi-Fi high-speed connection with the electronic device 200.
[0162] S109. The electronic device 100 negotiates with the electronic device 200 on a channel to be used when establishing a Wi-Fi connection.
[0163] Specifically, the electronic device 100 and the electronic device 200 may negotiate to establish a channel used for the Wi-Fi high-speed connection based on the capability information and connection information of the Wi-Fi chips of both parties.
[0164] Among them, if the electronic device 100 and the electronic device 200 have exchanged the capability information and connection information of the Wi-Fi chips of both parties in the broadcast stage (i.e., steps S104 and S105) before establishing the first connection, then when the electronic device 100 and the electronic device 200 negotiate the channel, they can determine the device between the electronic device 100 and the electronic device 200 that needs to be in the same frequency and channel based on the information exchanged in the broadcast stage.
[0165] When it is determined that the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than that of the second Wi-Fi chip, the first channel can be determined as the channel used when the electronic device 100 establishes a Wi-Fi high-speed connection with the electronic device 200. In this way, the electronic device 100 can wirelessly communicate with the electronic device 300 through the first channel, and use the first channel to wirelessly communicate with the electronic device 200. In this way, the electronic device 100 can communicate with two devices at the same time without switching channels, avoiding the electronic device 100 with a weaker Wi-Fi chip capability from spending too much time on switching channels, and ensuring the communication quality of the electronic device 100 and the electronic device 200 as much as possible.
[0166] When it is determined that the multi-frequency and multi-channel switching capability of the second Wi-Fi chip is weaker than that of the first Wi-Fi chip, the second channel can be determined as the channel used when the electronic device 100 establishes a Wi-Fi connection with the electronic device 200. In this way, the electronic device 200 can wirelessly communicate with the electronic device 400 through the second channel, and use the second channel to wirelessly communicate with the electronic device 100. In this way, the electronic device 200 can communicate with two devices at the same time without switching channels, avoiding the electronic device 100 with a weaker Wi-Fi chip capability from spending too much time on switching channels, and ensuring the communication quality between the electronic device 100 and the electronic device 100 as much as possible.
[0167] It should be noted that the device that determines the channel used when the electronic device 100 and the electronic device 200 establish a Wi-Fi connection can be the electronic device 100 or the electronic device 200, and this embodiment of the present application does not limit this.
[0168] In some embodiments, if the electronic device 100 and the electronic device 200 do not exchange the capability information and connection information of the Wi-Fi chips of both parties during the broadcast phase before establishing the first connection, the electronic device 100 and the electronic device 200 may exchange the capability information and connection information of the Wi-Fi chips through the first connection after establishing the first connection and before negotiating the channel.
[0169] In this case, after the electronic device 100 and the electronic device 200 establish a first connection, the electronic device 100 can send the capability information of the first Wi-Fi chip and the connection information of the electronic device 100 to the electronic device 200 through the first connection. Similarly, the electronic device 200 can also send the capability information of the second Wi-Fi chip and the connection information of the electronic device 200 to the electronic device 100 through the first connection.
[0170] It is understandable that the electronic device 100 and the electronic device 200 can negotiate a device for decision-making. In this way, the decision-making device only needs to obtain the capability information and connection information of the Wi-Fi chips of both parties, and there is no need for the two parties to exchange the capability information and connection information. For example, if the electronic device 100 and the electronic device 200 negotiate that the electronic device 100 is the decision-making device, then the electronic device 200 does not need to obtain the chip capability and connection information of the electronic device 100. The electronic device 200 only needs to send the capability information of the second Wi-Fi chip and the connection information of the electronic device 200 to the electronic device 100, and the electronic device 100 determines the channel used by the two parties to establish a Wi-Fi connection based on the chip capabilities and connection conditions of both parties. In this way, the number of communications between the electronic device 100 and the electronic device 200 can be reduced, and the channel decision can be completed as soon as possible.
[0171] Exemplarily, the device for making the decision may be a device for initiating the service, a randomly selected device, or a relatively idle device among electronic device 100 and electronic device 200, etc. The embodiment of the present application does not limit the device for making the decision.
[0172] S110 . The electronic device 100 and the electronic device 200 establish a Wi-Fi connection based on the negotiated channel.
[0173] The WiFi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip. The Wi-Fi connection may refer to a Wi-Fi high-speed connection, which may include any one of the following: a Wi-Fi communication connection using AWDL technology, a Wi-Fi communication connection using HML protocol, or a Wi-Fi communication connection using Wi-Fi P2P protocol.
[0174] Taking Wi-Fi P2P connection as an example, electronic device 100 and electronic device 200 can establish a Wi-Fi P2P connection based on a negotiated channel. During the communication between electronic device 100 and electronic device 200, electronic device 100 and electronic device 100 can communicate through the negotiated channel.
[0175] It is understandable that before establishing a Wi-Fi connection, the electronic device 100 and the electronic device 200 negotiate other contents in addition to the channel. For example, taking the Wi-Fi P2P connection as an example, the electronic device 100 and the electronic device 200 need to negotiate the roles of both parties (including the group client (groupclint, GC) role and the group owner (groupowner, GO) role) before establishing the Wi-Fi P2P connection. For example, the electronic device 100 acts as the GO role, the electronic device 200 acts as the GC role, and so on. In addition, when the electronic device 100 and the electronic device 200 establish a Wi-Fi P2P connection, the connection can be established through the standard four-way handshake process of the Wi-Fi P2P connection.
[0176] It is understandable that the conventional interaction process performed by the electronic device 100 and the electronic device 200 to establish a Wi-Fi high-speed connection will not be specifically introduced in the embodiments of the present application.
[0177] From steps S101-S110, it can be seen that before establishing a Wi-Fi connection between devices, the capabilities of the device's Wi-Fi chip and the communication connection status of the device can be obtained first, and then the channel can be selected so that after the Wi-Fi connection is established between the devices, the device with a weak Wi-Fi chip can be in the same frequency and channel state. In this way, it can avoid the device that takes a long time to switch channels to switch channels continuously, and improve the communication efficiency between devices.
[0178] It is understandable that although the above steps S101-S110 can ensure that devices with weak Wi-Fi chip capabilities can be in the same frequency and channel state, there are still certain problems: if the electronic device 100 communicates with the electronic device 300 through a channel in the 2.4GHz frequency band, and communicates with the electronic device 200 through the same channel, due to the large interference in the 2.4GHz frequency band, although the electronic device 100 does not need to switch channels, there is a large interference problem in the communication between the electronic device 100 and the electronic devices 300 and 200, resulting in the communication quality of the electronic device 100 cannot be guaranteed.
[0179] Therefore, in the case where the electronic device 100 and the electronic device 300 communicate wirelessly via the 2.4 GHz frequency band, when the electronic device 100 needs to establish a Wi-Fi connection with the electronic device 200, it can first disconnect the Wi-Fi connection established with the electronic device 300, and then establish a Wi-Fi connection with the electronic device 200, so as to give priority to ensuring the communication between the electronic device 100 and the electronic device 200. For details, please refer to the following Figure 5 The content of another communication control method is shown.
[0180] in, Figure 5 A method flow chart of another communication control method provided in an embodiment of the present application.
[0181] like Figure 5 As shown, the communication control method may include:
[0182] S201. The electronic device 100 and the electronic device 300 perform wireless communication via a first frequency band.
[0183] The electronic device 100 establishes a Wi-Fi connection with the electronic device 300. Specifically, the electronic device 100 may include a first Wi-Fi chip, which may control the electronic device 100 and wirelessly communicate with the electronic device 300 through a first frequency band. For example, the first frequency band is a 2.4 GHz frequency band, or a 5 GHz frequency band, and so on. Further, the electronic device 100 and the electronic device 300 may wirelessly communicate through a first channel in the first frequency band. For example, if the first frequency band is a 2.4 GHz frequency band, the first channel may refer to channel 1, channel 2, and so on. If the first frequency band is a 5 GHz frequency band, the first channel may refer to channel 36, channel 149, and so on.
[0184] S202. The electronic device 200 and the electronic device 400 perform wireless communication via the second frequency band.
[0185] The electronic device 200 establishes a Wi-Fi connection with the electronic device 400. Specifically, the electronic device 200 may include a second Wi-Fi chip, which may control the electronic device 200 to wirelessly communicate with the electronic device 400 via a second frequency band. For example, the second frequency band is a 2.4 GHz frequency band, or a 5 GHz frequency band, and the like. Further, the electronic device 200 and the electronic device 400 may wirelessly communicate via a second channel in the second frequency band. For example, if the second frequency band is a 2.4 GHz frequency band, the second channel may refer to channel 1, channel 2, and the like; if the second frequency band is a 5 GHz frequency band, the second channel may refer to channel 36, channel 149, and the like.
[0186] S203. The electronic device 100 detects a first operation.
[0187] S204 . The electronic device 100 sends a broadcast to the electronic device 200 .
[0188] S205 . The electronic device 200 broadcasts back to the electronic device 100 .
[0189] S206. The electronic device 100 displays a device list.
[0190] S207 . The electronic device 100 detects that the user selects the second operation of the electronic device 200 .
[0191] S208. The electronic device 100 establishes a first connection with the electronic device 200.
[0192] It can be understood that the contents of steps S203-S206 are similar to the contents of the above-mentioned steps S103-S108, except that when electronic device 100 sends a broadcast to electronic device 200, in some embodiments, the connection information carried in the broadcast it sends can be used to instruct electronic device 100 and electronic device 300 to communicate wirelessly via the first frequency band, or, can also be used to instruct electronic device 100 and electronic device 300 to communicate wirelessly via the first channel in the first frequency band; similarly, when electronic device 200 replies to a broadcast to electronic device 100, in some embodiments, the connection information it replies with can be used to instruct electronic device 200 and electronic device 400 to communicate wirelessly via the second frequency band, or, can also be used to instruct electronic device 100 and electronic device 300 to communicate wirelessly via the second channel in the second frequency band.
[0193] S209. The electronic device 100 negotiates with the electronic device 200 about the communication connection that needs to be disconnected in the devices.
[0194] Specifically, electronic device 100 and electronic device 200 can negotiate the connection that needs to be disconnected among the connections that have been established between electronic device 100 and electronic device 200 based on the capability information, connection information and configuration information of the Wi-Fi chips of both parties, including the connection used by electronic device 100 and electronic device 300 for communication mentioned in step S201, and the connection used by electronic device 200 and electronic device 400 for communication mentioned in step S202.
[0195] Among them, if the electronic device 100 and the electronic device 200 have exchanged the capabilities, connection information and configuration information of the Wi-Fi chips of both parties in the broadcast stage (i.e., steps S204 and S205) before establishing the first connection, then when the electronic device 100 and the electronic device 200 negotiate the frequency band, they can determine the connection that needs to be disconnected in the established connection between the electronic device 100 and the electronic device 200 based on the information exchanged in the broadcast stage.
[0196] Exemplarily, the negotiation process may include comparing the multi-frequency and multi-channel switching capabilities of the Wi-Fi chip of the electronic device 100 and the electronic device 100, and finding the device with the weaker multi-frequency and multi-channel switching capability of the Wi-Fi chip of the two devices. If the multi-frequency and multi-channel switching capability of the Wi-Fi chip is weak, it means that the Wi-Fi chip can only use the DBAC mode to achieve simultaneous communication with multiple devices. Then, if the device communicates with multiple devices at the same time, it may need to switch back and forth between different channels, and because the multi-frequency and multi-channel switching capability of the Wi-Fi chip is weak, it takes more switching time when switching channels, and the channel residence time is longer.
[0197] Therefore, the communication connection that needs to be disconnected may refer to the connection used by the device with a weaker Wi-Fi chip capability to communicate with other devices.
[0198] In some embodiments, if the electronic device 100 and the electronic device 200 do not exchange capability information, connection information, and configuration information of the Wi-Fi chips of both parties during the broadcast phase before establishing the first connection, the electronic device 100 and the electronic device 200 may exchange capability information, connection information, and configuration information of the Wi-Fi chips through the first connection after establishing the first connection and before negotiating the frequency band.
[0199] In this case, after the electronic device 100 and the electronic device 200 establish a first connection, the electronic device 100 can send the capability information, connection information and configuration information of the first Wi-Fi chip to the electronic device 200 through the first connection. Similarly, the electronic device 200 can also send the capability information, connection information and configuration information of the second Wi-Fi chip to the electronic device 100 through the first connection.
[0200] It is understandable that the electronic device 100 and the electronic device 200 can negotiate a device for decision-making. In this way, the decision-making device only needs to obtain the capability information, connection information and configuration information of the Wi-Fi chips of both parties, and there is no need for the two parties to exchange the capability information, connection information and configuration information. For example, if the electronic device 100 and the electronic device 200 negotiate that the electronic device 100 is the device for decision-making, in this way, the electronic device 200 does not need to obtain the chip capability, connection information and configuration information of the electronic device 100. It only needs the electronic device 200 to send the capability information, connection information and configuration information of the second Wi-Fi chip to the electronic device 100, and the electronic device 100 determines the communication connection that needs to be disconnected based on the chip capabilities and connection information of both parties. In this way, the number of communications between the electronic device 100 and the electronic device 200 can be reduced, and the decision on the frequency band can be completed as soon as possible.
[0201] Exemplarily, the device for making the decision may be a device for initiating the service, a randomly selected device, or a relatively idle device among electronic device 100 and electronic device 200, etc. The embodiment of the present application does not limit the device for making the decision.
[0202] S210 . When the multi-frequency and multi-channel switching capability of the first Wi-Fi chip of the electronic device 100 is weaker than that of the second Wi-Fi chip of the electronic device 200 , the electronic device 100 disconnects the connection used for communication between the electronic device 100 and the electronic device 300 .
[0203] If the first WiFi chip and the second WiFi chip have multi-frequency and multi-channel switching capabilities, it means that when the first device or the second device communicates with multiple devices in different channels, the first WiFi chip or the second WiFi chip can be used to switch channels to achieve simultaneous communication with multiple devices. If the multi-frequency and multi-channel switching capability of the electronic device 100 is weaker than that of the electronic device 200, it means that compared with the electronic device 200, the electronic device 100 takes a longer time to switch channels, which may easily lead to poor communication quality of the electronic device 100.
[0204] Therefore, when the electronic device 100 meets the preset condition: that is, the multi-frequency and multi-channel switching capability of the Wi-Fi chip is lower than that of the other party, the electronic device 100 can disconnect the communication connection established between the electronic device 100 and the electronic device 300, and give priority to ensuring the successful establishment and use of the communication connection between the electronic device 100 and the electronic device 200. In this way, the electronic device 100 does not need to switch back and forth between different channels.
[0205] In addition, the device with a weak Wi-Fi chip capability can be further combined with the frequency band used for communication with other devices to decide whether to disconnect the connection used for the communication.
[0206] That is, the first frequency band may be combined to decide whether to disconnect the communication connection established between the electronic device 100 and the electronic device 300. In some embodiments, the electronic device 100 may disconnect the communication connection between the electronic device 100 and the electronic device 300 when both conditions are met: the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip of the electronic device 200 and the first frequency band is 2.4 GHz.
[0207] This is because if the electronic device 100 and the electronic device 300 use the 2.4 GHz frequency band for communication, even if the above Figure 4The method in the embodiment ensures that the electronic device 100 is in the same frequency and channel state when the electronic device 100 establishes a Wi-Fi connection with the electronic device 200. The electronic device 100 may also encounter interference problems due to the communication between the electronic device 200 and the electronic device 300 using the channel under the 2.4 GHz frequency band. Even worse, when the interference is serious, a large number of packets may be lost during transmission, resulting in disconnection. Or, even if the method is not adopted, Figure 4 By using the method in the embodiment, the electronic device 100 and the electronic device 200 establish a Wi-Fi connection in the 5 GHz frequency band. Although the electronic device 100 avoids the interference problem, it still needs to switch channels back and forth to achieve simultaneous communication with the electronic device 200 and the electronic device 300.
[0208] Therefore, when the electronic device 100 meets the preset conditions: that is, the capability of the Wi-Fi chip is lower than that of the other party, and the established wireless communication connection uses the 2.4GHz frequency band, the electronic device 100 can abandon the wireless communication connection established with the electronic device 300, and give priority to ensuring the establishment of the Wi-Fi connection between the electronic device 100 and the electronic device 200.
[0209] It can be understood that step S210 takes the electronic device 100 as an example and describes the process of the electronic device 100 disconnecting the wireless communication connection established with the electronic device 300 when the preset conditions are met. In other embodiments of the present application, if the electronic device 200 meets the preset conditions, the electronic device 200 can disconnect the wireless communication connection established with the electronic device 400.
[0210] S211. The electronic device 100 establishes a Wi-Fi connection with the electronic device 200.
[0211] The WiFi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip. The electronic device 100 establishes a Wi-Fi connection with the electronic device 200, so that the electronic device 100 and the electronic device 200 can communicate based on the Wi-Fi connection. The Wi-Fi connection may refer to a Wi-Fi high-speed connection.
[0212] Furthermore, if the electronic device 100 and the electronic device 200 need to perform distributed services such as cross-device file sharing and cross-device screen projection, the electronic device 100 and the electronic device 200 can establish a Wi-Fi connection in the 5GHz frequency band. This is because distributed services require higher communication rates and stronger anti-interference requirements, and the 2.4GHz frequency band cannot well meet the communication needs of the distributed services. In this way, after the electronic device 100 and the electronic device 200 establish a Wi-Fi connection, the electronic device 100 and the electronic device 200 can communicate through the channel in the 5GHz frequency band. For example, the channel can be channel 36, channel 149, and so on.
[0213] Further optionally, the electronic device 100 and the electronic device 200 may further negotiate a channel in the 5 GHz frequency band, and negotiate a channel used by the established Wi-Fi connection.
[0214] Exemplarily, when the electronic device 100 and the electronic device 200 negotiate to establish a Wi-Fi connection, the channel used can be determined in combination with the channel used by the communication connection established by the electronic device 200. For example, if the second frequency band is the 5 GHz frequency band, the negotiated channel can be the channel used by the communication connection established between the electronic device 200 and the electronic device 400. In this way, the electronic device 200 does not need to switch channels when communicating with the electronic device 100 and the electronic device 400 at the same time, which reduces the time spent by the electronic device 200 when switching channels and reduces the packet loss rate.
[0215] In addition, after the electronic device 100 disconnects the communication connection established with the electronic device 300, if the electronic device 100 has a networking demand, the electronic device 100 can be networked through the electronic device 200, that is, the network data of the electronic device 100 is transmitted through the electronic device 200. Specifically, the electronic device 100 can use the wireless network or cellular network of the electronic device 200 to be networked.
[0216] In some embodiments, before the electronic device 100 transmits network data through the electronic device 200 , the electronic device 100 may display a prompt message to prompt the user that the electronic device 100 will connect to the network through the electronic device 200 .
[0217] It is understandable that, for details about the contents not described in detail in steps S201-S211, reference may be made to the relevant contents in the aforementioned steps S101-S110, which will not be repeated here.
[0218] In the embodiment of the present application, the electronic device 100 may also be referred to as a first device, the electronic device 200 may also be referred to as a second device, the electronic device 300 may also be referred to as a third device, and the electronic device 400 may also be referred to as a fourth device.
[0219] From steps S201-S211, it can be seen that before establishing a Wi-Fi connection between devices, multiple factors such as the capability of the device's Wi-Fi chip and the device's communication connection status can be obtained first to comprehensively consider the frequency band used when establishing the Wi-Fi connection and whether it is necessary to disconnect the established connection of the device. In this way, it can avoid the device that takes a long time to switch channels constantly, and ensure the communication requirements for distributed services between devices.
[0220] Figure 6 A schematic diagram of the hardware structure of an electronic device 500 provided in an embodiment of the present application.
[0221] The electronic device 500 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.
[0222] The electronic device 500 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0223] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0224] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0225] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0226] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0227] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 500. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0228] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0229] The wireless communication function of the electronic device 500 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0230] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 500 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0231] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 500. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0232] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0233] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 500. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0234] In some embodiments, the antenna 1 of the electronic device 500 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 500 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0235] In some embodiments, the wireless communication module 160 may include a Wi-Fi chip, which may provide a WLAN solution applied to the electronic device 500, modulate the transmission data into a wireless signal for reception by related devices supporting Wi-Fi technology, or receive a wireless signal sent by a related device supporting Wi-Fi technology and demodulate the wireless signal into a digital signal.
[0236] Figure 7 A schematic diagram of the structure of the Wi-Fi chip provided in the embodiment of the present application is shown.
[0237] like Figure 7As shown, the electronic device 500 may include: a processing unit, a Wi-Fi chip, and antennas R1 and R2. The processing unit is used to control and manage the work of the Wi-Fi chip. The Wi-Fi chip can send and receive wireless signals through antennas R1 and R2 to enable the electronic device 100 to establish a Wi-Fi connection with other devices.
[0238] The electronic device 500 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0239] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microled, micro-oled, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0240] The electronic device 500 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0241] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0242] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 500 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0243] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 500 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0244] Video codecs are used to compress or decompress digital videos. The electronic device 500 may support one or more video codecs. Thus, the electronic device 500 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0245] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 500, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0246] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0247] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
[0248] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0249] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0250] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0251] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 500. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0252] The electronic device 500 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0253] In the embodiment of the present application, if the electronic device 500 is the above-mentioned electronic device 200:
[0254] The wireless communication module 160 can be used to establish a Wi-Fi connection with other devices (such as the electronic device 100 and the electronic device 400). In addition, the electronic device 500 can also send capability information of the Wi-Fi chip in the electronic device 500, as well as connection information, configuration information, etc. of the electronic device 500 to other devices through the wireless communication module 160, and obtain capability information, connection information, configuration information, etc. of the Wi-Fi chip sent by other devices.
[0255] The processor 110 may be used to determine the frequency band or channel used for the Wi-Fi high-speed connection to be established between the electronic device 500 and other devices, and to determine whether the Wi-Fi connection established between the electronic device 500 and other devices needs to be disconnected.
[0256] In the embodiment of the present application, if the electronic device 500 is the above-mentioned electronic device 100:
[0257] The wireless communication module 160 can be used to establish a Wi-Fi connection with other devices (such as the electronic device 200 and the electronic device 300). In addition, the electronic device 500 can also send capability information of the Wi-Fi chip in the electronic device 500, as well as connection information, configuration information, etc. of the electronic device 500 to other devices through the wireless communication module 160, and obtain capability information, connection information, configuration information, etc. of the Wi-Fi chip sent by other devices.
[0258] The processor 110 can be used to determine the frequency band or channel used by the Wi-Fi high-speed connection to be established between the electronic device 500 and other devices, and to determine whether it is necessary to disconnect the Wi-Fi connection established between the electronic device 500 and other devices. If it is determined that the Wi-Fi connection established between the electronic device 500 and other devices needs to be disconnected, the wireless communication module 160 is controlled to disconnect the Wi-Fi connection established with other devices. In addition, after determining the frequency band and channel, the processor 110 can control the wireless communication module 160 to establish a Wi-Fi high-speed connection of a specified frequency band or channel with other devices.
[0259] The display screen 194 can be used to provide prompt information when the electronic device 500 is connected to the Internet through other devices.
[0260] The electronic device may be a portable terminal device equipped with iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., and may also be a non-portable terminal device such as a laptop computer with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel. The software system of the electronic device 500 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 500.
[0261] Figure 8 It is a software structure block diagram of the electronic device 500 according to an embodiment of the present invention.
[0262] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0263] The application layer can include a series of application packages.
[0264] like Figure 8 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0265] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0266] like Figure 8 As shown, the application framework layer may include a negotiation decision module, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0267] The negotiation decision module can be used to decide the frequency band or channel used to establish a Wi-Fi connection with other devices based on the capabilities, communication connection information, and configuration information of the Wi-Fi chips of the electronic device 500 and other devices when the electronic device 500 has distributed services and needs to establish a high-speed Wi-Fi connection with other devices. Furthermore, it can decide whether to disconnect the local Wi-Fi connection established with other devices, etc.
[0268] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0269] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0270] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0271] The phone manager is used to provide communication functions of the electronic device 500, such as management of call status (including connecting, hanging up, etc.).
[0272] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0273] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0274] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0275] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0276] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0277] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0278] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0279] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0280] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0281] A 2D graphics engine is a drawing engine for 2D drawings.
[0282] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0283] The following is an illustrative description of the workflow of the software and hardware of the electronic device 500 in conjunction with capturing a photo scene.
[0284] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
[0285] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0286] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory, so that the electronic device executes the method executed by the electronic device 100 or the electronic device 200 in any of the above embodiments.
[0287] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method performed by the electronic device 100 or the electronic device 200 in any of the above embodiments.
[0288] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0289] The chip system may be composed of the chip, or may include the chip and other discrete devices.
[0290] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0291] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0292] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0293] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method executed by any one of the electronic devices 100 or 200 in any of the above embodiments.
[0294] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by any one of the electronic device 100 or the electronic device 200 in any of the above embodiments.
[0295] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (digitalsignal processor, DSP), an application specific integrated circuit (AP 800plication specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0296] In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device executes the method in each of the above method embodiments.
[0297] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0298] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0299] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0300] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0301] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims
1. A communication control method, characterized in that: The method is applied to a first device, and the method includes: The first device communicates with the third device on the first channel through the first Wi-Fi chip; When the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device establishes a Wi-Fi connection with a second device based on the first channel, the second device is a device that communicates with a fourth device on the second channel through the second Wi-Fi chip, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; The first device communicates with the second device based on the Wi-Fi connection.
2. A communication control method, characterized in that: The method is applied to a first device, and the method includes: The first device communicates with the third device via the first Wi-Fi chip; When the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device disconnects the connection used for communicating with the third device, and establishes a Wi-Fi connection with a second device, where the second device communicates with a fourth device through the second Wi-Fi chip, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; The first device communicates with the second device based on the Wi-Fi connection.
3. The method according to claim 2, characterized in that The first device communicates with the third device via a 2.4 GHz frequency band.
4. The method according to claim 2 or 3, characterized in that: The first device establishing a Wi-Fi connection with the second device specifically includes: The first device establishes a Wi-Fi connection with the second device based on the 5 GHz frequency band.
5. The method according to any one of claims 2 to 4, characterized in that: After the first device establishes a Wi-Fi connection with the second device, the method further includes: The first device transmits network data through the second device.
6. The method according to claim 5, characterized in that Before the first device transmits network data through the second device, the method further includes: The first device displays first prompt information, where the first prompt information is used to prompt a user that the first device will be connected to the Internet through the second device.
7. The method according to any one of claims 1 to 6, characterized in that: Before the first device establishes a Wi-Fi connection with the second device, the method further includes: The first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device.
8. The method according to claim 7, characterized in that Before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method further includes: The first device sends first broadcast information, and the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is information returned to the first device after the second device receives the first broadcast information; or, The first device receiving the multi-frequency multi-channel switching capability of the second Wi-Fi chip sent by the second device specifically includes: The first device receives second broadcast information sent by the second device; the second broadcast information carries the multi-frequency and multi-channel switching capability of the second Wi-Fi chip.
9. The method according to claim 7 or 8, characterized in that: Before the first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device, the method further includes: The first device establishes a first connection with the second device; The first device receiving the multi-frequency multi-channel switching capability of the second Wi-Fi chip sent by the second device specifically includes: The first device receives the multi-frequency and multi-channel switching capability of the second Wi-Fi chip sent by the second device through the first connection.
10. The method according to any one of claims 1 to 9, characterized in that: Before the first device establishes a Wi-Fi connection with the second device, the method further includes: The first device receives connection information of the second device sent by the second device, where the connection information indicates a channel or a frequency band used by the second device when communicating with other devices.
11. The method according to any one of claims 1 to 10, characterized in that: The Wi-Fi connection includes any one of the following: a Wi-Fi communication connection using Apple Wireless Direct AWDL technology, a Wi-Fi communication connection using Huawei Multi-Link Direct HML protocol, and a Wi-Fi communication connection using Wi-Fi peer-to-peer P2P protocol.
12. A communication control method, characterized in that: The method is applied to a communication system including a first device and a second device, and the method includes: The first device communicates with the third device on the first channel through the first Wi-Fi chip; The second device communicates with the fourth device on the second channel via the second Wi-Fi chip; When the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device and the second device establish a Wi-Fi connection based on the first channel, and the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; The first device communicates with the second device based on the Wi-Fi connection.
13. A communication control method, characterized in that: The method is applied to a communication system including a first device and a second device, and the method includes: The first device communicates with the third device via the first Wi-Fi chip; The second device communicates with a fourth device via a second Wi-Fi chip; When the multi-frequency and multi-channel switching capability of the first Wi-Fi chip is weaker than the multi-frequency and multi-channel switching capability of the second Wi-Fi chip, the first device disconnects the connection used for communicating with the third device, and establishes a Wi-Fi connection with the second device, where the Wi-Fi connection is established based on the first Wi-Fi chip and the second Wi-Fi chip; The first device communicates with the second device based on the Wi-Fi connection.
14. An electronic device, characterized in that: The electronic device comprises a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method as claimed in any one of claims 1 to 11.
15. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 11.