Search

CN-115882893-B - Wireless communication mode switching method and electronic equipment

CN115882893BCN 115882893 BCN115882893 BCN 115882893BCN-115882893-B

Abstract

The application provides a switching method of wireless communication modes and electronic equipment. When the operation of any application installed in the triggering application program layer is monitored, the current triggering application and whether the audio module, the camera, the Bluetooth module and the WiFi module in the electronic equipment meet the condition of entering the Hybrid mode are judged, and when the condition is met, the Bluetooth module and the WiFi module are switched to the Hybrid mode from the TDD mode, so that the electronic equipment with the Bluetooth module and the WiFi module sharing the same antenna can enable the WiFi module to work in a multi-input multi-output mode to realize high throughput, and can also work in a single-input single-output mode in a proper environment, namely the WiFi module can continuously interact with the AP within the working time of the Bluetooth module, so that instantaneity is guaranteed, sound and picture blocking in audio-video communication is avoided as much as possible, and user experience is guaranteed.

Inventors

  • ZHANG ZHONGLI
  • CHEN MINGHAO
  • LI ZHONGJIN
  • ZHANG YAN

Assignees

  • 荣耀终端有限公司

Dates

Publication Date
20260508
Application Date
20210926

Claims (14)

  1. 1. A method for switching wireless communication modes, which is applied to an electronic device, wherein the electronic device comprises a bluetooth module, a WiFi module, a first antenna and a second antenna, the bluetooth module sends and receives signals through the first antenna, the WiFi module sends and receives signals through the first antenna and/or the second antenna, and the first antenna and the second antenna work in a wireless frequency band of 2.4GHz, the method comprises: Determining whether an application triggered by an operation meets a first switching condition when an operation for triggering the application installed in an application program layer is monitored, wherein the first switching condition is that the application triggered by the operation is a white list application; Acquiring the occupation information of the application on the audio module and the camera when the first switching condition is met; When the occupation information meets a second switching condition, determining whether the WiFi module is connected to a wireless network by using the first antenna and the second antenna, wherein the second switching condition is that the audio module and the camera are occupied or the audio module is occupied and the camera module is unoccupied; When the WiFi module is connected to a wireless network by using the first antenna and the second antenna, determining whether bandwidths corresponding to the first antenna and the second antenna meet a third switching condition, wherein the third switching condition is that the bandwidth is 20M; when the third switching condition is met, determining working information of the Bluetooth module; determining a signal intensity value of the WiFi module when the working information meets a fourth switching condition, wherein the fourth switching condition is that the Bluetooth module is connected with Bluetooth equipment; and when the signal strength value is larger than a first threshold value, switching the WiFi module and the Bluetooth module from a Time Division Duplex (TDD) mode to a Hybrid mode.
  2. 2. The method of claim 1, wherein after the switching the WiFi module and the bluetooth module from time division duplex, TDD, mode to Hybrid mode, the method further comprises: And switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode when the signal strength value is smaller than the first threshold value.
  3. 3. The method of claim 2, wherein prior to said switching the WiFi module and the bluetooth module from the Hybrid mode back to the TDD mode, the method further comprises: Judging whether the signal strength value is smaller than a second threshold value or not, wherein the second threshold value is smaller than the first threshold value; and if the signal strength value is smaller than the second threshold value, executing the step of switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode.
  4. 4. The method of claim 3, wherein prior to performing the step of switching the WiFi module and the bluetooth module from the Hybrid mode back to the TDD mode if the signal strength value is less than the second threshold value, the method further comprises: After a first time length, re-determining a signal strength value of the WiFi module; and when the re-determined signal strength value is smaller than the second threshold value, executing the step of switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode.
  5. 5. The method of claim 4, wherein after said switching said WiFi module and said bluetooth module from said Hybrid mode back to said TDD mode, said method further comprises: And stopping the step of switching the WiFi module and the Bluetooth module from the time division duplex TDD mode to the Hybrid mode within a second time period.
  6. 6. The method of claim 1, wherein the switching the WiFi module and the bluetooth module from time division duplex, TDD, mode to Hybrid mode comprises: transmitting an instruction for switching the WiFi module and the Bluetooth module from the TDD mode to the Hybrid mode in a third duration; And responding to the instruction, and switching the WiFi module and the Bluetooth module from the TDD mode to the Hybrid mode.
  7. 7. The method according to any one of claims 1 to 6, wherein said determining whether said application triggered by said operation satisfies a first switching condition comprises: acquiring the package name of the application; Searching whether a matched white list application package name exists in the white list application list according to the package name; and if so, determining that the application is the white list application, and meeting the first switching condition.
  8. 8. The method according to any one of claim 1 to 6, wherein, The determining whether bandwidths corresponding to the first antenna and the second antenna meet a third switching condition includes: acquiring bandwidths corresponding to the first antenna and the second antenna; Judging whether the bandwidth is 20M; If yes, determining that the third switching condition is met.
  9. 9. The method according to any one of claims 1 to 6, wherein the operation information of the bluetooth module includes connection status information; And when the Bluetooth module is determined to be connected with the Bluetooth device according to the connection state information, determining that the fourth switching condition is met.
  10. 10. The method of any one of claims 1 to 6, wherein the determining the signal strength value of the WiFi module comprises: Respectively acquiring a signal intensity value of the first antenna and a signal intensity value of the second antenna; judging whether the signal intensity value of the first antenna is larger than the signal intensity value of the second antenna; If the signal intensity value of the first antenna is larger than the signal intensity value of the WiFi module, the signal intensity value of the first antenna is determined to be the signal intensity value of the WiFi module; otherwise, determining the signal intensity value of the second antenna as the signal intensity value of the WiFi module.
  11. 11. The method according to any one of claims 1 to 6, wherein in the Hybrid mode, the WiFi module only occupies a second antenna to operate; The determining the signal strength value of the WiFi module includes: and acquiring a signal intensity value of the second antenna, and determining the signal intensity value of the second antenna as the signal intensity value of the WiFi module.
  12. 12. An electronic device comprising a first antenna, a second antenna, a Bluetooth module, a WiFi module, a memory, one or more processors, and one or more computer programs, wherein the first antenna and the second antenna operate in a wireless frequency band of 2.4 GHz; wherein the one or more computer programs are stored on the memory, the bluetooth module transmits and receives signals through the first antenna, the WiFi module transmits and receives signals through the first antenna and/or the second antenna, and the one or more processors are respectively connected with the bluetooth module, the WiFi module and the memory, which when executed by the one or more processors, cause the electronic device to perform the switching method of the wireless communication mode according to any one of claims 1 to 11.
  13. 13. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the switching method of the wireless communication mode according to any one of claims 1 to 11.
  14. 14. A chip, characterized by comprising one or more processing circuits and one or more transceiver pins, wherein the transceiver pins and the processing circuits communicate with each other through an internal connection path, and the processing circuits execute the switching method of the wireless communication mode according to any one of claims 1 to 11 to control a receiving pin to receive signals and a transmitting pin to transmit signals.

Description

Wireless communication mode switching method and electronic equipment Technical Field The present application relates to the field of communications, and in particular, to a method and apparatus for switching wireless communication modes. Background Currently, in order to save device layout controls inside an electronic device and simultaneously save hardware cost, a wireless fidelity (WIRELESS FIDELITY, wiFi) module and a Bluetooth (BT) module commonly share a same antenna (specifically, an antenna in a 2.4GHz band, hereinafter referred to as a 2.4G antenna), that is, two 2.4G antennas coupled to a wireless communication module in the electronic device, where one 2.4G antenna is shared by the WiFi module and the Bluetooth module, and the other 2.4G antenna is used by the WiFi module alone. In addition, for the electronic device without the independent Bluetooth antenna, a wireless communication mode of time division duplex (Time Division Duplexing, TDD) is adopted by default, namely, the time is divided into working time of the WiFi module and working time of the Bluetooth module, the WiFi module occupies two 2.4G antennas in the working time of the WiFi module, the Bluetooth module does not work at the moment in a multiple-in multiple-out (MIMO) mode, and the Bluetooth module occupies the 2.4G antenna shared by the WiFi module to transmit data in the working time of the Bluetooth module, and the WiFi module does not work. Although the scheme that the WiFi module and the Bluetooth module share the same antenna can save the device layout in the electronic equipment and simultaneously save the hardware cost, in the TDD working mode, the WiFi module and the Bluetooth module can mutually occupy the antenna, so that the working time of the antenna occupied by the WiFi module is greatly shortened, the interaction instantaneity between the electronic equipment which adopts the WiFi module to Access a core network and a wireless Access Point (AP) is reduced, the throughput of WiFi is influenced simultaneously, and further, the problems of blocking, even dropping call, of the voice and the picture of the on-line learning course of the electronic equipment are caused, and the user experience is seriously influenced. Disclosure of Invention In order to solve the technical problems, the application provides a switching method of wireless communication modes and electronic equipment, aiming at enabling the electronic equipment of which a WiFi module and a Bluetooth module share an antenna which works at a wireless frequency band of 2.4GHz to determine whether to enter a Hybrid mode according to an actual service scene, thereby achieving the purposes of considering both the throughput of WiFi and the interaction instantaneity with an AP, reducing the number of times of voice and picture blocking and the duration of blocking during audio and video calls and online learning courses as much as possible, and guaranteeing the user experience. In a first aspect, the present application provides a method for switching wireless communication modes. The method is applied to electronic equipment, the electronic equipment comprises a Bluetooth module, a WiFi module, a first antenna and a second antenna, the Bluetooth module sends and receives signals through the first antenna, the WiFi module sends and receives signals through the first antenna and/or the second antenna, the first antenna and the second antenna work in a wireless frequency band of 2.4GHz, the method comprises the steps of determining whether an application triggered by operation meets a first switching condition when operation on the application installed in an application program layer is monitored, acquiring occupation information of the application on an audio module and a camera when the first switching condition is met, determining whether the WiFi module is connected to a wireless network by using the first antenna and the second antenna when the occupation information meets a second switching condition, determining whether bandwidths corresponding to the first antenna and the second antenna meet a third switching condition when the WiFi module is connected to the wireless network by using the first antenna and the second antenna, determining working information of the Bluetooth module when the third switching condition is met, determining a signal strength value of the WiFi module when the working information meets a fourth switching condition, and switching a Hybrid mode of the WiFi module from TDD mode to the Hybrid mode when the signal strength value is larger than the first switching condition. Like this, make bluetooth module and wiFi module share the electronic equipment of same antenna can make the wiFi module adopt MIMO mode work to realize high throughput, can adopt SISO mode work under suitable environment again, let wiFi module continue to interact with the AP in bluetooth module's operating time promptly to guarantee real-time, thereby avoided t