Method for switching wireless communication mode and electronic device

CN115882893BActive Publication Date: 2026-05-08HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2021-09-26
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

[0003]虽然这种WiFi模块和蓝牙模块共用同一根天线的方案能够节省电子设备内部的器件布局,同时节省硬件成本,但是TDD的工作模式下,WiFi模块和蓝牙模块会相互抢占天线,从而导致WiFi模块占用天线的工作时间大大缩短,这就会使采用WiFi模块方式接入核心网的电子设备与无线接入点(Access Point,AP)之间的交互实时性降低,同时影响WiFi的吞吐量,进而导致使用电子设备正在进行的音视频通话、在线学习课程的声音、画面出现卡顿,甚至掉话的问题,严重影响用户体验

Benefits of technology

[0027] Fifthly, this application provides a chip. The chip includes: one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuits communicate with each other through internal connection paths, and the processing circuits execute the method in the first aspect or any possible implementation of the first aspect to control the receiving pins to receive signals and to control the transmitting pins to transmit signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115882893B_ABST
    Figure CN115882893B_ABST
Patent Text Reader

Abstract

The application provides a switching method of wireless communication mode and an electronic device. When an operation acting on any application installed in a triggered application layer is listened to, the method judges the current triggered application, whether the audio module, the camera, the Bluetooth module and the WiFi module in the electronic device meet the condition of entering the Hybrid mode, and switches the Bluetooth module and the WiFi module from the TDD mode to the Hybrid mode when the condition is met, so that the electronic device with the same antenna shared by the Bluetooth module and the WiFi module can make the WiFi module work in the multiple-in multiple-out mode to realize high throughput, and work in the single-in single-out mode in a suitable environment, that is, the WiFi module continues to interact with the AP in the working time of the Bluetooth module to ensure real-time, thereby avoiding the sound and picture lag in the audio and video call as much as possible, and ensuring the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to a method and apparatus for switching wireless communication modes. Background Technology

[0002] Currently, to save on component layout constraints and hardware costs within electronic devices, it's common practice for Wireless Fidelity (WiFi) and Bluetooth (BT) modules to share the same antenna (specifically, a 2.4GHz antenna, hereinafter referred to as the 2.4G antenna). This means that of the two 2.4G antennas coupled to the wireless communication module in the electronic device, one is shared by both the WiFi and Bluetooth modules, while the other is used solely by the WiFi module. Furthermore, for electronic devices without a dedicated Bluetooth antenna, the default operating mode is Time Division Duplexing (TDD). This divides time into WiFi module operating time and Bluetooth module operating time. During WiFi module operating time, it uses both 2.4G antennas and transmits data using Multiple-In Multiple-Out (MIMO) technology; the Bluetooth module is not active during this time. Conversely, during Bluetooth module operating time, it uses the shared 2.4G antenna for data transmission, and the WiFi module is not active.

[0003] While this solution of sharing the same antenna between WiFi and Bluetooth modules can save on the internal component layout of electronic devices and reduce hardware costs, in TDD mode, the WiFi and Bluetooth modules will compete for the antenna. This significantly reduces the working time of the WiFi module occupying the antenna, which reduces the real-time interaction between electronic devices accessing the core network via WiFi and the wireless access point (AP). It also affects WiFi throughput, leading to stuttering or even dropped calls during ongoing audio and video calls and online learning courses, severely impacting the user experience. Summary of the Invention

[0004] To address the aforementioned technical issues, this application provides a method and electronic device for switching wireless communication modes. The aim is to enable an electronic device with a WiFi module and a Bluetooth module sharing the same antenna operating in the 2.4GHz wireless frequency band to decide whether to enter Hybrid mode based on the actual business scenario. This balances WiFi throughput with real-time interaction with the AP, minimizing the number and duration of audio / video stutters during calls and online learning courses, thus ensuring a superior user experience.

[0005] In a first aspect, this application provides a method for switching wireless communication modes. The method is applied to an electronic device, which includes a Bluetooth module, a WiFi module, a first antenna, and a second antenna. The Bluetooth module transmits and receives signals through the first antenna, and the WiFi module transmits and receives signals through the first antenna and / or the second antenna. The first and second antennas operate in the 2.4 GHz wireless frequency band. The method includes: when an operation is detected acting on an application installed in an application layer, determining whether the application triggered by the operation meets a first switching condition; when the first switching condition is met, acquiring occupancy information of the application on an audio module and a camera; when the occupancy information meets a second switching condition, determining whether the WiFi module uses the first and second antennas to connect to a wireless network; when the WiFi module uses the first and second antennas to connect to the wireless network, determining whether the bandwidth corresponding to the first and second antennas meets a third switching condition; when the third switching condition is met, determining the operating information of the Bluetooth module; when the operating information meets a fourth switching condition, determining the signal strength value of the WiFi module; and when the signal strength value is greater than a first threshold, switching the WiFi module and Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode. This allows electronic devices that share the same antenna for both Bluetooth and WiFi modules to enable the WiFi module to operate in MIMO mode for high throughput, and also to operate in SISO mode under suitable conditions. This allows the WiFi module to continue interacting with the AP during the Bluetooth module's operating time to ensure real-time performance, thereby minimizing audio and video stuttering during audio and video calls and ensuring a better user experience.

[0006] According to the first aspect, after switching the WiFi module and Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode, the method further includes: when the signal strength value is less than a first threshold, switching the WiFi module and Bluetooth module back from Hybrid mode to TDD mode. This allows for dynamic switching between the WiFi module and Bluetooth module in the default TDD mode and Hybrid mode based on actual business scenarios, thereby minimizing mutual interference between the WiFi module and Bluetooth module when sharing the same antenna, thus providing a better user experience.

[0007] According to the first aspect, or any implementation of the first aspect above, before switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode, the method further includes: determining whether the signal strength value is less than a second threshold value, where the second threshold value is less than a first threshold value; if the signal strength value is less than the second threshold value, then performing the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode. Setting a second threshold value less than the first threshold value as the threshold value for exiting Hybrid mode can effectively avoid the WiFi module and Bluetooth module frequently switching between TDD mode and Hybrid mode and consuming electronic device resources because the current signal strength value of the WiFi module is temporarily less than the first threshold value, but immediately exits Hybrid mode when it is between the first and second threshold values.

[0008] According to the first aspect, or any implementation of the first aspect above, before executing the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode if the signal strength value is less than the second threshold value, the method further includes: after a first duration, re-determining the signal strength value of the WiFi module; and when the re-determined signal strength value is less than the second threshold value, executing the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode. In this way, by only exiting Hybrid mode and switching back to TDD mode when the threshold is not met, the delay further avoids frequent switching between TDD mode and Hybrid mode between the WiFi module and Bluetooth module.

[0009] According to the first aspect, or any implementation thereof, after switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode, the method further includes: within a second duration, stopping the step of switching the WiFi module and Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode. In this way, by stopping the next wireless communication mode switching operation for a period of time after each wireless communication mode switching operation, the phenomenon of frequent switching between TDD and Hybrid modes by the WiFi module and Bluetooth module due to frequent signal hopping can be effectively avoided.

[0010] According to the first aspect, or any implementation of the first aspect above, switching the WiFi module and Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode includes: within a third time period, sending a command to switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode; and responding to the command to switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode. In this way, by setting only one command for wireless communication switching to be sent within each time period, the phenomenon of thread blocking caused by the short interval between two commands not being processed in time at the lower level can be avoided.

[0011] According to the first aspect, or any implementation of the first aspect above, the first switching condition is whether the application triggering the operation is a whitelisted application. Determining whether the application triggering the operation meets the first switching condition includes: obtaining the application's package name; searching the whitelisted application list for a matching whitelisted application package name; if a match is found, the application is determined to be a whitelisted application, thus meeting the first switching condition. This can directly filter out applications with low real-time and throughput requirements, thereby reducing the number of wireless communication method switching at the source.

[0012] According to the first aspect, or any implementation of the first aspect above, the second switching condition is that both the audio module and the camera are occupied, or the audio module is occupied but the camera module is not occupied. For example, since applications with high real-time and throughput requirements are typically educational, such as applications for online learning via audio and video conferencing, instant messaging applications capable of audio and video chat, and audio and video playback applications, and these applications usually occupy the audio module and camera, setting the occupancy status of the audio module and camera as the second switching condition allows for better determination of whether the current business scenario requires a switching operation of the wireless communication method, thereby potentially reducing invalid switching.

[0013] According to the first aspect, or any implementation of the first aspect above, the third switching condition is a bandwidth of 20 MHz. Determining whether the bandwidths corresponding to the first and second antennas meet the third switching condition includes: obtaining the bandwidths corresponding to the first and second antennas; determining whether the bandwidth is 20 MHz; if so, then determining that the third switching condition is met. For example, because the Bluetooth module experiences frequency hopping at 40 MHz bandwidth, meaning it cannot share the same antenna with the WiFi module, the implementation prerequisite of this application is met only at 20 MHz bandwidth. Therefore, by setting the third switching condition to a bandwidth of 20 MHz, scenarios unsuitable for mode switching are further filtered out.

[0014] According to the first aspect, or any implementation of the first aspect above, the fourth switching condition is whether the Bluetooth module is connected to a Bluetooth device, and the Bluetooth module's operating information includes connection status information; wherein, when it is determined that the Bluetooth module is connected to a Bluetooth device based on the connection status information, the fourth switching condition is satisfied. Since the Bluetooth module only involves preempting the antenna shared with the WiFi module when it is working, using whether the Bluetooth module is connected to a Bluetooth device as the fourth switching condition ensures that the wireless communication mode switching method provided in this application is executed only when the current Bluetooth connection status is determined and a Bluetooth device is found to be connected. This avoids switching the WiFi module from TDD mode to Hybrid mode when the Bluetooth module is not working, causing the WiFi module to change from MIMO operation to SISO, which would affect the real-time performance and throughput of the WiFi module.

[0015] Determining the signal strength value of the WiFi module according to the first aspect, or any implementation thereof, includes: acquiring the signal strength values ​​of the first antenna and the second antenna respectively; determining whether the signal strength value of the first antenna is greater than the signal strength value of the second antenna; if it is greater, then determining the signal strength value of the first antenna as the signal strength value of the WiFi module; otherwise, determining the signal strength value of the second antenna as the signal strength value of the WiFi module. For example, this application provides a specific method for determining the signal strength value of the WiFi module, which selects the antenna with the larger signal strength value, thereby enabling timely entry into Hybrid mode when the above four conditions are met in the current business scenario.

[0016] According to the first aspect, or any implementation thereof, in Hybrid mode, the WiFi module only occupies the second antenna; determining the signal strength value of the WiFi module includes: obtaining the signal strength value of the second antenna and determining the signal strength value of the second antenna as the signal strength value of the WiFi module. For example, this application provides another specific method for determining the signal strength value of the WiFi module, directly selecting the signal strength value of the antenna occupied by the WiFi module when switching to Hybrid mode as the signal strength value of the WiFi module, thereby making the switching of wireless communication methods more suitable for the current business scenario.

[0017] Secondly, this application provides an electronic device. The electronic device includes: a first antenna, a second antenna, a Bluetooth module, a WiFi module, a memory, one or more processors, and one or more computer programs. The first and second antennas operate in a 2.4 GHz wireless frequency band. The one or more computer programs are stored in the memory. The Bluetooth module transmits and receives signals through the first antenna, and the WiFi module transmits and receives signals through the first antenna and / or the second antenna. The one or more processors are respectively connected to the Bluetooth module, the WiFi module, and the memory. When the computer program is executed by one or more processors, the electronic device performs the following steps: upon detecting an operation acting on an application installed in the application layer, determining whether the application triggering the operation meets a first switching condition; if the first switching condition is met, acquiring the application's occupancy information for the audio module and camera; if the occupancy information meets a second switching condition, determining whether the WiFi module uses the first and second antennas to connect to the wireless network; if the WiFi module uses the first and second antennas to connect to the wireless network, determining whether the bandwidth corresponding to the first and second antennas meets a third switching condition; if the third switching condition is met, determining the Bluetooth module's operating information; if the operating information meets a fourth switching condition, determining the WiFi module's signal strength value; and if the signal strength value is greater than a first threshold, switching the WiFi module to the next operating position. The module and Bluetooth module switch from Time Division Duplex (TDD) mode to Hybrid mode.

[0018] According to the second aspect, when a computer program is executed by one or more processors, it causes the electronic device to perform the following steps: when the signal strength value is less than a first threshold value, switch the WiFi module and Bluetooth module from Hybrid mode back to TDD mode.

[0019] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: determining whether the signal strength value is less than a second threshold value, the second threshold value being less than a first threshold value; if the signal strength value is less than the second threshold value, then performing the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode.

[0020] According to the second aspect, or any implementation thereof, when the computer program is executed by one or more processors, the electronic device performs the following steps: after a first duration, re-determines the signal strength value of the WiFi module; when the re-determined signal strength value is less than a second threshold value, performs the step of switching the WiFi module and the Bluetooth module from Hybrid mode back to TDD mode.

[0021] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: within a second duration, stops performing the step of switching the WiFi module and Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode.

[0022] According to the second aspect, or any implementation thereof, when the computer program is executed by one or more processors, the electronic device performs the following steps: within a third duration, sending an instruction to switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode; in response to the instruction, switching the WiFi module and Bluetooth module from TDD mode to Hybrid mode.

[0023] According to the second aspect, or any implementation of the second aspect above, in Hybrid mode, the WiFi module only occupies the second antenna; when the computer program is executed by one or more processors, the electronic device performs the following steps: obtains the signal strength value of the second antenna, and determines the signal strength value of the second antenna as the signal strength value of the WiFi module.

[0024] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0025] Thirdly, this application provides a computer-readable storage medium for storing a computer program that, when run on an electronic device, causes the electronic device to execute instructions of the method in the first aspect or any possible implementation thereof.

[0026] Fourthly, this application provides a computer program including instructions for performing the method in the first aspect or any possible implementation thereof.

[0027] Fifthly, this application provides a chip. The chip includes: one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuits communicate with each other through internal connection paths, and the processing circuits execute the method in the first aspect or any possible implementation of the first aspect to control the receiving pins to receive signals and to control the transmitting pins to transmit signals. Attached Figure Description

[0028] Figure 1 This is an illustrative diagram of a scenario in which a mobile phone simultaneously connects to a Bluetooth device using a Bluetooth module and to a router using a WiFi module.

[0029] Figure 2 This is an exemplary schematic diagram showing a Bluetooth module and a WiFi module sharing the same antenna;

[0030] Figure 3 This is an example shown for... Figure 2 The diagram shows the structure of the WiFi module and Bluetooth module, which operate in time-division duplex mode.

[0031] Figure 4 This is an example shown for... Figure 2 The diagram shows the structure of the WiFi module and Bluetooth module operating in Hybrid mode.

[0032] Figure 5 This is an exemplary diagram showing the synchronous operation of the WiFi module and the Bluetooth module during the Bluetooth working time in Hybrid mode.

[0033] Figure 6 This is a schematic diagram of the hardware structure of an electronic device as an example.

[0034] Figure 7 This is a schematic diagram illustrating the software structure of an electronic device;

[0035] Figure 8 This is an illustrative diagram showing the factors that influence an electronic device to enter Hybrid mode;

[0036] Figure 9 This is a schematic diagram illustrating an exemplary embodiment of the wireless communication mode switching method provided in this application.

[0037] Figure 10 This is a timing diagram illustrating the interaction of internal modules of an electronic device when implementing the wireless communication mode switching method provided in the embodiments of this application.

[0038] Figure 11 This is an exemplary schematic diagram illustrating the interaction between the hardware and software structures of an electronic device when determining the impact of audio conditions on entering Hybrid mode.

[0039] Figure 12 This is an exemplary schematic diagram illustrating the interaction between the hardware and software structures of an electronic device when determining the impact of camera conditions on entering Hybrid mode.

[0040] Figure 13 This is an exemplary schematic diagram illustrating the interaction between the hardware and software structures of an electronic device when determining the impact of WiFi conditions on entering Hybrid mode.

[0041] Figure 14This is an exemplary schematic diagram illustrating the interaction between the hardware and software structures of an electronic device when determining the impact of Bluetooth status on entering Hybrid mode. Detailed Implementation

[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0044] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0045] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0046] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0047] Before describing the technical solutions of the embodiments of this application, the scenarios to which the wireless communication mode switching method provided in the embodiments of this application is applicable will be described first with reference to the accompanying drawings.

[0048] Specifically, the wireless communication mode switching method provided in this application embodiment is specifically for electronic devices without independent Bluetooth antennas. The WiFi module and Bluetooth module in the electronic device share the same antenna. That is, when the electronic device simultaneously enables Bluetooth and WiFi functions and establishes Bluetooth connections with Bluetooth devices and WiFi connections with other electronic devices, in the default TDD mode, the Bluetooth module needs to transmit and receive signals through the antenna shared with the WiFi module, such as the first antenna, during working hours, while the WiFi module does not work. Conversely, during working hours, the WiFi module will transmit and receive signals through the shared first antenna and the exclusive second antenna, while the Bluetooth module does not work.

[0049] See Figure 1 For example, after a first electronic device, such as a mobile phone, establishes a Bluetooth connection with a second electronic device, such as a Bluetooth headset or stylus, in the default TDD mode, the Bluetooth module in the mobile phone will send and receive signals with Bluetooth devices such as Bluetooth headsets and styluses through an antenna shared with the WiFi module, such as the first antenna.

[0050] See also Figure 1 For example, after a mobile phone establishes a WiFi connection with a third electronic device, such as a router, in the default TDD mode, the WiFi module in the mobile phone will send and receive signals with the router through the first antenna and the second antenna.

[0051] The wireless communication mode switching method provided in this application monitors whether the detection conditions for triggering entry into Hybrid mode are met, and determines whether the switch from the default TDD mode to Hybrid mode is met when the detection conditions for entering Hybrid mode are met. After the electronic device is switched from TDD mode to Hybrid mode, the WiFi module can use the first antenna of the Bluetooth module to send and receive signals, that is, occupy the second antenna to work during the operation.

[0052] The specific implementation process of the wireless communication mode switching method provided in this embodiment will be discussed below. Figures 8 to 14 To provide a detailed explanation, the following will first combine... Figures 2 to 5 This section explains the specific operating methods of WiFi and Bluetooth modules in TDD and Hybrid modes in electronic devices without independent Bluetooth antennas.

[0053] It should be noted that since Bluetooth modules typically operate in the 2.4GHz wireless band in practical applications, when implementing a shared antenna for both the WiFi and Bluetooth modules, the WiFi module also needs to operate in the 2.4GHz wireless band. For clarity, the following explanation will combine... Figure 2 The integrated circuit (IC) shown integrates a WiFi module and a Bluetooth (BT) module into one unit. Figure 2 The WiFi / BT IC shown is used as an example for explanation.

[0054] See Figure 2 Assume that the antenna connected to the antenna interface Ant0 is the first antenna, which operates in the 2.4GHz wireless frequency band, and the antenna connected to the antenna interface Ant1 is the second antenna, which also operates in the 2.4GHz wireless frequency band.

[0055] For example, in one instance, during the integration phase of the electronic device, the first antenna can be coupled to both the WiFi module and the Bluetooth module, while the second antenna can be coupled only to the WiFi module. Figure 2 As shown, during the working time of the Bluetooth module, the Bluetooth module transmits and receives signals through the first antenna, and during the working time of the WiFi module, the WiFi module transmits and receives signals through the first antenna and / or the second antenna.

[0056] For example, in another instance, during the integration phase of an electronic device, the first antenna may be configured to couple only to the WiFi module, and the second antenna may be configured to couple to both the WiFi module and the Bluetooth module.

[0057] For electronic devices without a separate Bluetooth antenna, the default mode is TDD wireless communication, which divides time into the working time of the WiFi module and the working time of the Bluetooth module.

[0058] See Figure 3 An exemplary diagram is provided showing how the WiFi module and Bluetooth module occupy the operating time of the first and second antennas.

[0059] like Figure 3 As shown, the duration for which the WiFi module occupies both the first and second antennas is set to T0, and the duration for which the Bluetooth module occupies the first antenna is set to T1. In TDD mode, if the current time is the WiFi module's operating time, the WiFi module exclusively uses both the first and second antennas, employing MIMO for data transmission (data sending and / or data receiving). During this time, the Bluetooth module is not active. Figure 3 During each T0 time period corresponding to the first antenna connected by Ant0 and the second antenna connected by Ant1, the Bluetooth module does not work.

[0060] Accordingly, in TDD mode, if the current time is the Bluetooth module's operating time, the Bluetooth module exclusively uses the first antenna for data transmission, and the WiFi module does not work at this time. Figure 3 During each T1 time period corresponding to the first antenna of the Ant0 connection, the WiFi module will not occupy the operation of either the first antenna or the second antenna.

[0061] As described above, for electronic devices where Bluetooth and WiFi modules share the same 2.4GHz (hereinafter referred to as 2.4G) antenna, in TDD mode, the WiFi and Bluetooth modules will compete for the antenna, resulting in a significant reduction in the working time of the WiFi module occupying the antenna. This reduces the real-time interaction between electronic devices accessing the core network via WiFi and the wireless access point (AP), and also affects the WiFi throughput. Consequently, it can cause stuttering or even dropped calls in ongoing audio and video calls or online learning courses, severely impacting the user experience.

[0062] For example, in one scenario, an electronic device's WiFi module connects to a wireless network via a first and second antenna, while its Bluetooth module connects to a Bluetooth headset. When a user uses a video calling application installed in the electronic device's application layer for a video call, the video call data requires the WiFi module, while the audio data received during the call needs to be listened to through the Bluetooth headset, requiring the Bluetooth module. In this situation, because the WiFi and Bluetooth modules compete for antenna resources, the ongoing video call often experiences video delays and stuttering, as well as audio issues such as choppy or silent audio.

[0063] For example, in another scenario, an electronic device's WiFi module connects to a wireless network via a first and second antenna, while its Bluetooth module connects to Bluetooth-type Human Interface Devices (HIDs) such as Bluetooth headsets, styluses / Bluetooth keyboards / Bluetooth mice. When a user uses an educational application installed in the electronic device's application layer for online learning via video conferencing, the video conferencing data requires the WiFi module, while the audio data received during the video conference needs to be listened to through the Bluetooth headset. Furthermore, the user will occasionally operate the stylus / Bluetooth keyboard / mouse, requiring the Bluetooth module to be used. In this situation, because the WiFi and Bluetooth modules compete for antenna resources, the ongoing video conference often experiences video delays and stuttering, as well as audio issues such as choppy sound, silence, or even dropped calls.

[0064] To address these issues, some chip manufacturers offer a Hybrid mode that allows WiFi and Bluetooth modules to operate in combination. Specifically, in Hybrid mode, the WiFi module's operation degenerates from MIMO to SISO mode, meaning it no longer simultaneously uses both the first and second antennas but only uses the second antenna.

[0065] Furthermore, in Hybrid mode, if the current time is the WiFi module's operating time, the Bluetooth module also cannot work. That is, even if the Bluetooth module exclusively uses the first antenna, it will not use the first antenna for data transmission outside of its operating time. However, the WiFi module can work during the Bluetooth module's operating time. Specifically, the WiFi module will use the second antenna to work during the time the Bluetooth module uses its first antenna. For example... Figure 4 As shown.

[0066] like Figure 4 As shown, assuming the WiFi module's working time is still T0 and the Bluetooth module's working time is still T1. For example, if the WiFi module is set to enter its working time at time t1, then from time t1 to time t1+T0, the WiFi module will exclusively occupy the second antenna connected to the Ant1 interface to work, for example, to send and / or receive data.

[0067] Accordingly, if the Bluetooth module is configured to enter its working time at time t2 (t2 > t1 + T0), then from time t2 to time t2 + T1, the Bluetooth module will occupy the first antenna connected to the Ant0 interface, for example, to transmit and / or terminate data, or even to occupy the first antenna without transmitting any data. Simultaneously, the WiFi module will occupy the second antenna connected to the Ant1 interface during the time period t2 + T0.

[0068] It should be noted that the WiFi module occupies the second antenna connected to the Ant1 interface during time slot t2 + T0 as follows: when the Bluetooth module occupies the first antenna connected to the Ant0 interface to transmit data, the WiFi module also performs data transmission operations; during other time slots when the Bluetooth module occupies the first antenna connected to the Ant0 interface, the WiFi module performs data reception operations.

[0069] See Figure 5 For example, suppose that for the working time T1 of a certain Bluetooth module, the T1_1 time slot and the T1_3 time slot are used for data transmission. Based on the working principle of the Hybrid mode mentioned above, the WiFi module will also transmit data in the T1_1 time slot and the T1_3 time slot during the working time of the Bluetooth module.

[0070] See also Figure 5 For example, suppose that for a certain Bluetooth module's working time T1, the T1_2 and T1_4 time slots are used to receive data or are not working at all, but the current time period still belongs to the Bluetooth module's working time. Based on the working principle of Hybrid mode mentioned above, the WiFi module will receive data in the T1_2 and T1_3 time slots during the Bluetooth module's working time T1.

[0071] In this way, the WiFi module can operate continuously, ensuring real-time interaction between the WiFi module and the AP. However, currently, the WiFi and Bluetooth modules cannot automatically switch between TDD and Hybrid modes. Manually switching between these two wireless communication modes by the user is cumbersome. Furthermore, after switching modes (e.g., from TDD to Hybrid), users often forget to switch back to TDD when the Bluetooth module is not needed, causing the WiFi module to operate continuously in SISO mode, severely impacting its throughput. Therefore, to address these issues, this application proposes a wireless communication mode switching scheme that allows electronic devices to automatically switch between TDD and Hybrid modes based on actual service scenarios. This balances WiFi throughput with real-time interaction with the AP, minimizing audio and video stuttering during calls and online learning courses, thus ensuring a better user experience.

[0072] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In practical application scenarios, regardless of whether it is in TDD mode or Hybrid mode, the working time of the WiFi module and Bluetooth module can be dynamically adjusted according to the actual business scenario. For example, in scenarios where the WiFi module is used frequently but the Bluetooth module is used less frequently, the working time of the WiFi module can be set to be greater than that of the Bluetooth module; conversely, the working time of the WiFi module can be set to be less than that of the Bluetooth module.

[0073] Furthermore, in some embodiments, the duration of each working session of the Bluetooth module may be the same or different.

[0074] Accordingly, the duration of each working session of the WiFi module can be the same or different.

[0075] Furthermore, in some embodiments, the time slots used for data transmission and reception during any given working time for both the Bluetooth module and the WiFi module, as well as the length of their inactive time slots, can be adjusted according to actual business needs.

[0076] This application does not provide a specific description of the working time of the WiFi module and the Bluetooth module, or the time slot for data transmission within each working time. In specific implementation, relevant technical documents can be consulted, and this application does not impose any restrictions on this.

[0077] To better understand the wireless communication mode switching method provided in the embodiments of this application, the following will first be combined with Figure 6 and Figure 7 The hardware and software structures of the electronic devices to which this method is applicable are described, and then combined with... Figures 8 to 14 The process of implementing the wireless communication mode switching method provided in the embodiments of this application in an electronic device based on this hardware and software structure will be described.

[0078] See Figure 6 This is a schematic diagram of the hardware structure of an electronic device 100 that implements the wireless communication mode switching method provided in the embodiments of this application, as an example.

[0079] like Figure 6 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 130, a wireless communication module 140, an audio module 130, a sensor module 160, a camera 170, a display screen 180, etc.

[0080] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0081] Mobile communication module 130 can provide solutions for wireless communication applications, including 2G / 3G / 4G / 5G, on electronic device 100. Mobile communication module 130 may include filters, switches, power amplifiers, low-noise amplifiers (LNAs), etc. Wireless communication module 140 can provide solutions for wireless communication applications, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies, on electronic device 100.

[0082] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 130, and antenna 2 is coupled to wireless communication module 140, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0083] For example, in some embodiments, electronic devices supporting MIMO mode typically include multiple antennas 1 coupled to the mobile communication module 130 and antennas 2 coupled to the wireless communication module 140. That is, in order to implement the wireless communication mode switching method provided in this application embodiment, the electronic device 100 includes two antennas 2 coupled to the wireless communication module 140, and both antennas 2 operate in the 2.4GHz wireless frequency band. In this application embodiment, these two antennas 2 are referred to as the first antenna and the second antenna, respectively, and the first antenna is coupled to the WiFi module and the Bluetooth module, respectively, while the second antenna is coupled only to the WiFi module.

[0084] It should be understood that the above description is merely an example provided for a better understanding of the technical solution of this embodiment, and is not intended as the only limitation of this embodiment. In practical applications, the first antenna may be coupled only to the WiFi module, and the second antenna may be coupled to both the WiFi module and the Bluetooth module.

[0085] See also Figure 6 For example, the audio module 150 of electronic device 100 may include a speaker 150A, a receiver 150B, a microphone 150C, a headphone jack 150D, etc.

[0086] For example, the electronic device 100 can implement audio functions, such as music playback, recording, and voice calls, through the speaker 150A, receiver 150B, microphone 150C, headphone jack 150D in the audio module 150, and application processor. For example, in this embodiment, when a user triggers an application capable of voice calls, the current status information of the hardware units included in the audio module 150 can be obtained to determine whether the user is using an application capable of voice calls.

[0087] Understandably, in practical applications, the audio module 150 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module 150 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 150 may be located in the processor 110, or some functional modules of the audio module 150 may be located in the processor 110.

[0088] Furthermore, regarding the sensor module 160 in the electronic device 100, in some embodiments it may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc., which will not be listed here, and this application does not impose any limitations on them.

[0089] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 130, wireless communication module 140, modem processor, and baseband processor.

[0090] Specifically, the display screen 180 is used to display images, videos, etc. The display screen 180 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 180, where N is a positive integer greater than 1.

[0091] For example, in the embodiments of this application, the display screen is used not only to display images, videos and other content, but also to cooperate with sensors, such as pressure sensors, so that the electronic device can determine the specific location of the application triggered by the user, and thus determine which application the user has triggered.

[0092] Camera 170 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0093] For example, in the application embodiment, the camera 170 is used to capture the image of the local user when a video call / conference is required in a business scenario, so that the electronic device can process it and transmit it to the other end device for display.

[0094] also, Figure 6 The external memory interface 120 shown can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0095] For example, in this embodiment of the application, the file of the whitelist of applications used to determine whether the application triggered by the user meets the first switching condition can be stored separately on an external storage card. In this way, if the user changes electronic devices, the external storage card containing the whitelist of applications can be directly removed and connected to the new electronic device, and the wireless communication mode switching method provided in this embodiment of the application can continue to be executed.

[0096] also, Figure 6 The diagram shows that internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 performs various functional applications and data processing of electronic device 100 by executing the instructions stored in internal memory 121.

[0097] Specifically, the relevant instructions for implementing the wireless communication mode switching method provided in this application embodiment are pre-stored in the internal memory 121. The processor 110 executes the instructions stored in the internal memory 121, thereby enabling the electronic device 100 to execute the wireless communication mode switching method provided in this application embodiment.

[0098] For example, in practical application scenarios, the electronic device 10 may also include a universal serial bus (USB) interface, a charging management module, a power management module, a battery, buttons, a motor, an indicator, and a subscriber identification module (SIM) card interface, etc., which will not be listed here, and this application does not limit it.

[0099] This concludes the introduction to the hardware structure of electronic device 100. It should be understood that... Figure 6 The electronic device 100 shown is merely an example. In a specific implementation, the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 6 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0100] Regarding the software architecture of electronic devices, this application embodiment still uses electronic device 100 as an example. The following, in conjunction with... Figure 7 The software structure of the electronic device 100 will be described. Before describing the software structure of the electronic device 100, the possible architectures for the software system of the electronic device 100 will be explained first.

[0101] Specifically, in practical applications, the software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.

[0102] Furthermore, it is understood that the software systems used by mainstream electronic devices currently include, but are not limited to, Windows, Android, and iOS systems. For ease of explanation, this application embodiment uses the layered architecture of the Android system as an example to illustrate the software structure of the electronic device 100.

[0103] Furthermore, in the subsequent description of the wireless communication mode switching method provided in the embodiments of this application, the electronic devices involved are all based on the Android system. However, in specific implementations, the wireless communication mode switching method provided in the embodiments of this application is also applicable to other systems.

[0104] See Figure 7 This is a schematic diagram of the software structure of an electronic device 100 that implements the wireless communication mode switching method provided in the embodiments of this application, as an example.

[0105] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. 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 libraries, and the kernel layer. Since the wireless communication mode switching method provided in this application embodiment mainly involves the application layer, the application framework layer, and the kernel layer, therefore... Figure 7 The Android runtime and system library layers are not shown.

[0106] The application layer can include a series of application packages. For example... Figure 7 As shown, in order to implement the wireless communication mode switching method provided in this application embodiment, the application installed at the application layer may include applications whose performance is affected by the WiFi module and Bluetooth module during use, for example... Figure 7 Meeting applications in [the context of the context].

[0107] For example, in a real-world application scenario, when the detection condition for entering Hybrid mode is the triggering of a whitelisted application installed in the application layer, the information of the whitelisted application can be pre-installed by technicians in the listening module of the application framework layer, stored locally on the electronic device, or set by the user.

[0108] Regarding user-defined settings, an example could be a settings application at the application layer that provides an entry point for users to set up a whitelist of applications, such as... Figure 7 The settings application.

[0109] For example, in practical application scenarios, the application package may also include camera, gallery, calendar, map, navigation, WLAN, Bluetooth, music, video, SMS, and various educational and instant messaging applications, which will not be listed here and this application does not limit them.

[0110] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0111] like Figure 7 As shown, in order to implement the wireless communication mode switching method provided in this application embodiment, the application framework layer may include a monitoring module, a mixed mode processing module, a Bluetooth framework, a WiFi framework, an audio framework, a camera framework, etc.

[0112] For example, in actual application scenarios, the application framework layer also includes a window manager for managing window programs, a view system for providing basic components for building applications, a resource manager for providing various resources for applications, a notification manager for displaying notification information in the status bar, etc., which will not be listed here, and this application does not limit them.

[0113] It should be noted that, regarding Figure 7 The monitoring module shown in the figure, when implementing the wireless communication mode switching method provided in the embodiments of this application, is specifically used to monitor the operation of the user triggering the application installed in the application layer, such as the operation of the conferencing application, and when the operation is detected acting on the application installed in the application layer, it determines whether the application triggered by the operation meets the first switching condition, such as determining whether the triggered application is a preset whitelist application, that is, whether the wireless communication mode needs to be switched.

[0114] In addition, regarding Figure 7The hybrid mode processing module shown in the figure is specifically used to implement the judgment logic of the wireless communication mode switching method when implementing the wireless communication mode switching method provided in the embodiments of this application, so as to determine whether the current service scenario meets the requirements of switching from TDD mode to Hybrid mode or switching from Hybrid mode back to TDD mode.

[0115] In addition, regarding Figure 7 The Bluetooth framework shown in the figure, when implementing the wireless communication mode switching method provided in the embodiments of this application, is specifically used to call the Bluetooth driver in the kernel layer so that the Bluetooth driver calls the Bluetooth module hardware and obtains the current working information of the Bluetooth module, such as connection status information, the Bluetooth audio transmission protocol followed during operation, and the time slots used for sending data during the working time.

[0116] In addition, regarding Figure 7 The WiFi framework shown in the figure, when implementing the wireless communication mode switching method provided in the embodiments of this application, is specifically used to call the WiFi driver in the kernel layer, so that the WiFi driver calls the WiFi module hardware, and then obtains the current working information of the WiFi module, such as whether it is using the first antenna and the second antenna to connect to the wireless network, the current bandwidth, signal strength value, etc.

[0117] In addition, regarding Figure 7 The audio framework shown in the figure, when implementing the wireless communication mode switching method provided in the embodiments of this application, is specifically used to call the audio driver in the kernel layer so that the audio module hardware is called, thereby obtaining the current occupancy information, or state information of the audio module.

[0118] In addition, regarding Figure 7 The camera frame shown in the figure is specifically used to call the camera driver in the kernel layer when implementing the wireless communication mode switching method provided in the embodiments of this application, so that the camera driver can call the camera hardware and obtain the current occupancy information, or status information of the camera.

[0119] The kernel layer is the layer between hardware and software. The kernel layer may include, for example, Bluetooth drivers, camera drivers, audio drivers, WiFi drivers, etc., and will not be listed here; this application does not impose any restrictions on this.

[0120] Understandably, in real-world applications, the Bluetooth driver at the kernel level is actually called by the Bluetooth framework in the application framework layer.

[0121] Correspondingly, the camera driver in the kernel layer is called by the camera framework in the application framework layer, the audio driver in the kernel layer is called by the audio framework in the application framework layer, and the WiFi driver in the kernel layer is called by the WiFi framework in the application framework layer.

[0122] Understandable Figure 7 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.

[0123] by Figure 5 The hardware structure shown and Figure 6 Taking the illustrated electronic device as an example, the process of implementing the wireless communication mode switching method provided in the embodiments of this application will be specifically described.

[0124] Specifically, the wireless communication mode switching method provided in this application mainly addresses how to switch an electronic device from the default TDD mode to Hybrid mode, and how to appropriately exit Hybrid mode and switch back to TDD mode. Since the electronic device defaults to TDD mode when Bluetooth is enabled, the wireless communication mode switching method provided in this application can be implemented by two main steps: monitoring whether the detection conditions for triggering entry into Hybrid mode are met, and determining whether to switch from TDD mode to Hybrid mode when the detection conditions for triggering entry into Hybrid mode are met.

[0125] See Figure 8 An exemplary flowchart illustrating a method for switching wireless communication modes provided in this application embodiment is provided, specifically including:

[0126] Step S101: Monitor whether the current conditions for triggering entry into Hybrid mode are met.

[0127] For example, in actual application scenarios, the detection conditions that trigger entry into Hybrid mode include, but are not limited to, any one or a combination of the following: detecting the triggering operation of an application installed at the application layer, detecting a change in the WiFi connection, detecting a change in the Bluetooth connection, detecting the entry of Bluetooth audio services, detecting a change in the underlying application, detecting a change in the camera status, etc.

[0128] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In actual application scenarios, detection conditions for triggering entry into Hybrid mode can be set according to business needs, and this application does not impose any restrictions on this.

[0129] If the detection conditions for triggering entry into Hybrid mode are met through the monitoring in step S101, then proceed to step S102; otherwise, monitoring continues during the operation of the electronic device.

[0130] In addition, it should be noted that, in conjunction with the appendix Figure 7 It can be seen that the operation in step S101 is specifically implemented by the listening mode of the application framework layer.

[0131] For example, in one instance, a listener can be started after the electronic device is powered on, and managed by the listening module.

[0132] Accordingly, when the listener detects a user's touch / click operation on any location on the display interface, it determines the specific location and pressure information of the user's touch / click based on sensors in the electronic device, such as pressure sensors, and then passes the acquired information to the listening module for processing, thereby determining whether the user's operation is directed at a specific application installed in the application layer.

[0133] Furthermore, when it is determined that the user's operation triggers the application installed in the application layer, the listening module determines that the detection conditions for triggering entry into Hybrid mode are met, that is, proceeds to step S102.

[0134] In addition, for details regarding the detection conditions that trigger entry into Hybrid mode, specifically the triggering operation of an application installed at the application layer, please see [link to relevant documentation]. Figure 9 The description of step S201 in the illustrated embodiment will not be repeated here.

[0135] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.

[0136] Step S102: Determine whether the conditions for switching from TDD mode to Hybrid mode are met.

[0137] For example, in practical application scenarios, the following aspects can be considered when determining whether a switch from TDD mode to Hybrid mode is met:

[0138] For example, first determine if the WiFi module and Bluetooth module are connected, whether the WiFi module is operating in the 2.4GHz wireless band, and whether the current bandwidth is 20Mbps. That is, first determine if both the Bluetooth and WiFi modules are currently operating. If only one module is working, since there is no competition for antenna bandwidth, there is no need to switch wireless communication modes. If both modules are working, then determine if they are both operating in the 2.4GHz wireless band and with a 20Mbps bandwidth. Therefore, interference only occurs when the WiFi module is also operating in the 2.4GHz wireless band and shares the same antenna with the Bluetooth module. However, when the WiFi module is operating in the 5GHz wireless band, it will not interfere with the Bluetooth module even if it shares the same antenna.

[0139] Furthermore, after meeting the above conditions, the usage of Bluetooth services, foreground applications, cameras, and audio modules can be further assessed to determine whether the conditions for switching to Hybrid mode are met, such as whether the foreground application is an educational application or an instant messaging application.

[0140] Furthermore, after the above conditions are met, it can be further determined whether the current signal strength of the WiFi module is greater than the set threshold value.

[0141] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In actual application scenarios, switching conditions from TDD mode to Hybrid mode can be set according to business needs, and this application does not impose any restrictions on this.

[0142] Furthermore, regarding the aforementioned criteria for determining whether a switch from TDD mode to Hybrid mode is satisfied, several aspects can be considered. Figure 9 The embodiments shown are described in detail in steps S202 to S209, and will not be repeated here.

[0143] If the judgment operation in step S102 determines that the switch from TDD mode to Hybrid mode is satisfied, then proceed to step S103; otherwise, continue to use TDD mode for communication, and proceed to step S104.

[0144] Step S103: Switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode.

[0145] Step S104: Remain in the default TDD mode.

[0146] In other words, the wireless communication mode switching method provided in this application provides a method that, by pre-setting detection conditions for triggering entry into Hybrid mode and switching conditions for switching from TDD mode to Hybrid mode according to service requirements, monitors whether the detection conditions for triggering entry into Hybrid mode are met during the operation of the electronic device. Furthermore, if the detection conditions for triggering entry into Hybrid mode are met, it determines whether the switching conditions for switching from TDD mode to Hybrid mode are met. This allows electronic devices with WiFi and Bluetooth modules sharing the same antenna operating in the 2.4GHz wireless frequency band to decide whether to enter Hybrid mode based on the actual service scenario. This balances WiFi throughput with real-time interaction with the AP, minimizing the number and duration of audio and video stutters during audio / video calls and online learning courses, thus ensuring a better user experience.

[0147] Furthermore, it should be noted that in business scenarios with high real-time requirements and high throughput, the wireless communication mode used by electronic devices may need to be constantly switched to better adapt to the current business scenario, achieving both real-time performance and throughput. To test an electronic device with Bluetooth and WiFi modules sharing the same 2.4GHz wireless band antenna in extreme business scenarios, an application was launched that simultaneously uses WiFi, Bluetooth, audio, and camera modules. The Bluetooth headset was specified to use the Advanced Audio Coding (AAC) Bluetooth audio transmission protocol, which has high requirements for sound quality and Bluetooth transmission rate. The results are shown in Table 1.

[0148] Table 1. Test table of factors affecting electronic devices entering Hybrid mode.

[0149]

[0150] The test results recorded in Table 1 show that the detection conditions for triggering entry into Hybrid mode include, but are not limited to, any one or a combination of the following: detecting the triggering operation of an application installed at the application layer, detecting a change in the WiFi connection, detecting a change in the Bluetooth connection, detecting the entry of Bluetooth audio services, detecting a change in the foreground application, detecting a change in the camera status, etc.; the switching conditions for determining whether the switch from TDD mode to Hybrid mode is met include, but are not limited to, any one or a combination of the following: first, determine whether the WiFi module and Bluetooth module are connected, whether the WiFi module is in the 2.4GHz wireless band, and whether the current bandwidth is 20M; then, determine the usage status of Bluetooth services, foreground applications, cameras, and audio modules to determine whether the conditions for switching to Hybrid mode are met, such as whether the foreground application is an educational application, an instant messaging application, etc.; finally, determine whether the current signal strength of the WiFi module is greater than the set threshold value.

[0151] Based on the above test results, and the given detection conditions for triggering entry into Hybrid mode and the criteria for determining whether the switching conditions from TDD mode to Hybrid mode are met, the following describes the detection conditions for triggering entry into Hybrid mode as: detecting the triggering operation of an application installed at the application layer, detecting changes in the WiFi connection, detecting changes in the Bluetooth connection, and detecting the entry of Bluetooth audio services. The switching conditions from TDD mode to Hybrid mode include the occupancy information of the audio module and camera, the connection status of the WiFi module, the working information of the Bluetooth module, and the signal strength value of the WiFi module, etc. In order to combine... Figure 9 The flowchart illustrating the method for switching wireless communication modes provided in the embodiments of this application is given in detail.

[0152] See Figure 9 The wireless communication mode switching method provided in this application embodiment specifically includes:

[0153] Step S201: When an operation is detected that acts on an application installed in the triggering application layer, determine whether the application triggered by the operation meets the first switching condition.

[0154] It should be noted that, according to the factors mentioned above that affect the entry of electronic devices into Hybrid mode, including application status, Bluetooth status, WiFi status, audio status, and camera status, this embodiment presets several switching conditions based on these conditions, specifically: first switching condition, second switching condition, third switching condition, and fourth switching kit.

[0155] The first switching condition is whether the application triggered by the operation is a whitelisted application; the second switching condition is that both the audio module and the camera are occupied, or the audio module is occupied but the camera module is not occupied; the third switching condition is that the width is 20M; and the fourth switching condition is whether the Bluetooth module is connected to a Bluetooth device.

[0156] It should be understood that in actual application scenarios, the factors that affect the electronic device from entering Hybrid mode can be considered individually or in combination. This application does not limit this. The combination of these factors in this embodiment is merely a specific implementation method and is an example listed to better understand the technical solution of this embodiment. It is not intended to be the only limitation of this embodiment.

[0157] Based on the first switching condition given above, when determining whether the application that triggered the operation meets the first switching condition, the listening module specifically needs to obtain the package name of the triggered application, and then search the pre-determined whitelist application list to see if there is a matching whitelist application package name.

[0158] Accordingly, if such an application exists, it is determined to be a whitelisted application, meaning the application triggering the operation meets the first switching condition. At this point, the monitoring module can notify the hybrid mode processing module, which is also located in the application framework layer. The hybrid mode processing module then performs subsequent judgment logic to determine whether the current business scenario is suitable for switching from the default TDD mode to the Hybrid mode, so that the WiFi module can change from MIMO mode to SISO mode and continue working, ensuring real-time interaction with the AP.

[0159] For example, in one instance, the whitelist in the whitelist application column can be for applications with high requirements for real-time performance, throughput, signal strength, etc., such as educational applications, instant messaging applications, office conferencing applications, etc., which will not be listed here, and this application does not impose any restrictions on them.

[0160] Understandably, in practical application scenarios, the classification of application types can be directly determined based on the application's package name. Therefore, when setting up a whitelist of applications in advance, the package names of whitelisted applications that meet the above requirements can be stored directly. In this way, when determining whether the triggered application meets the first switching condition, the package name can be matched directly, which is convenient, fast, and also ensures accuracy.

[0161] Furthermore, it should be noted that in practical applications, the whitelist of applications can be set up in various ways. For example, the monitoring module can directly generate the whitelist based on the description messages and attributes of the applications installed at the application layer and save it to a specified local storage path on the electronic device, or it can be stored on an external storage card. In this way, when the monitoring module determines whether the triggered application meets the first switching condition, it can directly access the whitelist of applications stored in the specified path.

[0162] For example, in another instance, the whitelist of applications can also be built into the listening module by the developers. That is, the developers categorize applications according to their types and then build the package name information of commonly used applications into the listening module.

[0163] Understandably, with this method of directly embedding the whitelist of applications into the monitoring module, the whitelist of applications embedded in the monitoring module can be modified through updates and iterations of the electronic device's software system.

[0164] For example, in another example, to make the wireless communication mode switching scheme of this embodiment more in line with user needs, a settings entry that allows users to set a whitelist of applications can also be provided, for example, in the settings application.

[0165] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.

[0166] Furthermore, it should be understood that the electronic devices mentioned in this embodiment may be, for example, tablet computers, mobile phones, PCs, smartwatches, smart speakers, etc., which will not be listed here, and this application does not impose any restrictions on them.

[0167] Therefore, after the monitoring module judges the triggered application according to the above method, if it determines that the triggered application meets the first switching condition, such as being a whitelisted application set in the preset whitelisted application list, then step S202 is executed; otherwise, the current wireless communication mode is maintained as the default TDD mode, i.e., step S211.

[0168] Step S202: Obtain the application's usage information for the audio module and camera.

[0169] Specifically, the occupancy information of the audio module and camera mentioned in the embodiment is used to describe whether the application currently triggered by the user is using the audio module and camera, and the specific usage situation, such as whether it is occupied for a long time or for a short time.

[0170] It's important to note that in real-world applications, even if the user's current action is detected as targeting a whitelisted application that meets the first switching condition, such as an instant messaging application, the user might only be chatting via text or sending a simple voice message. This means the user is temporarily using the microphone, speaker, receiver, or headphone jack in the audio module, rather than initiating a voice or video call and prolongedly using the audio module and camera. Therefore, to minimize false positives and avoid blindly switching communication modes, after confirming that the triggering application meets the first switching condition, it's necessary to further determine if it meets the second switching condition mentioned above. Hence, it's necessary to obtain information about the application's usage of the audio module and camera.

[0171] Step S203: Determine whether the occupancy information meets the second switching condition.

[0172] Specifically, if the obtained application usage information for the audio module and camera shows that the audio module and camera module are occupied simultaneously, and the continuous usage time of the application for the audio module and camera module is determined to be greater than a certain threshold, such as 2 minutes, based on the usage duration information of the corresponding audio module and camera module, then the second switching condition is determined to be met. For example, for instant messaging applications, when the above condition is met, the user may be currently using the application to make a video call, and video calls have high requirements for the real-time performance of WiFi.

[0173] Furthermore, if the obtained application occupancy information for the audio and camera modules shows that only the audio module is occupied and the camera module is not occupied, and the application's continuous occupancy time for the audio module is determined to be greater than a certain threshold, such as 2 minutes, based on the occupancy duration information for the audio module, then the second switching condition is determined to be met. For example, for instant messaging applications, when the above condition is met, the user may currently be using the application to make a voice call, and voice calls have high requirements for the real-time performance of WiFi.

[0174] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.

[0175] Therefore, after the hybrid mode processing module determines the application's occupancy of the audio module and camera according to the above method, if it determines that the second switching condition is met, it executes step S204; otherwise, it continues to maintain the current wireless communication mode as the default TDD mode, i.e., step S211.

[0176] Step S204: Determine whether the WiFi module is connected to the wireless network using the first antenna and the second antenna.

[0177] It should be understood that the reason for using the wireless communication mode switching method provided in this embodiment to switch the current wireless communication mode of the electronic device, such as switching from TDD mode to Hybrid mode, is to ensure that the WiFi module is always operational, i.e., that the WiFi module is connected to the wireless network. Therefore, it is necessary to determine whether the electronic device is currently connected to the wireless network, specifically by determining whether the WiFi module is connected to the wireless network using the first antenna and the second antenna.

[0178] Accordingly, if it is determined that the WiFi module is connected to the wireless network using the first antenna and the second antenna, then step S205 is executed; otherwise, the current wireless communication mode remains the default TDD mode, i.e., step S211.

[0179] Step S205: Determine whether the bandwidths corresponding to the first antenna and the second antenna meet the third switching condition.

[0180] For example, the third switching condition set in this embodiment can be 20M, thereby avoiding the problem of frequency hopping in the Bluetooth module and further filtering out scenarios that are not suitable for mode switching.

[0181] Therefore, the mixed-mode processing module determines whether the bandwidth corresponding to the first antenna and the second antenna is 20M according to the above method. If it is, it determines that the third switching condition is met and executes step S206. Otherwise, it continues to maintain the current wireless communication mode as the default TDD mode, i.e., step S211.

[0182] Step S206: Determine the working information of the Bluetooth module.

[0183] Specifically, assuming the WiFi module is in use, the system further determines whether the Bluetooth module is in use. If it is in use, it means that the Bluetooth module and the WiFi module will compete for the first antenna. If the Bluetooth module is not in use, the WiFi module can exclusively use the first and second antennas, meaning there is no need to switch wireless communication modes.

[0184] For example, in this embodiment, the Bluetooth module's working information that the mixed-mode processing module needs to determine first needs to include connection status information, that is, whether the Bluetooth module is currently connected to a Bluetooth device.

[0185] It should be noted that the Bluetooth devices mentioned in this embodiment include, but are not limited to, one or more of Bluetooth headsets, Bluetooth keyboards, Bluetooth mice, and styluses.

[0186] Accordingly, when the determined working information of the Bluetooth module is connection status information, the fourth switching condition can be, for example, whether the Bluetooth module is connected to a Bluetooth device, as mentioned above.

[0187] Furthermore, in practical applications, if the Bluetooth module determines the Bluetooth device currently connected based on the connection status information, it can further obtain the description message of the currently connected Bluetooth device, thereby determining the specific type of Bluetooth device currently connected, such as a Bluetooth headset, a Bluetooth keyboard, a Bluetooth mouse, or a stylus.

[0188] Furthermore, when it is determined that the Bluetooth module is connected to the Bluetooth headset, the determined working information can also include the Bluetooth audio transmission protocol corresponding to the Bluetooth headset, so that when determining whether the fourth switching condition is met, it can not only be based on whether a Bluetooth device is connected, but also on the connected Bluetooth device and the working protocol it follows.

[0189] Furthermore, in Hybrid mode, the WiFi module can send data in the time slots designated for data transmission during the Bluetooth module's operating time, and receive data in other time slots. Therefore, the acquired operating information also includes the time slots in which the Bluetooth module transmits data.

[0190] Therefore, if the mixed mode processing module determines that the Bluetooth module's operating information meets the fourth switching condition, then step S207 is executed; otherwise, the current wireless communication mode remains the default TDD mode, i.e., step S211.

[0191] Step S207: Determine whether the Bluetooth module's operating information meets the fourth switching condition.

[0192] Specifically, if the fourth switching condition only sets whether the Bluetooth module is connected to a Bluetooth device, then the judgment can be made directly based on the connection status information in the working information; if the fourth switching condition also sets other content, for example, in actual application scenarios, it can be set to determine whether the fourth switching condition is met only when the Bluetooth module is connected to a specified device.

[0193] For example, in one instance, when the connected Bluetooth device is a Bluetooth headset that requires high bandwidth and real-time performance, the fourth switching condition can also include whether the Bluetooth audio transmission protocol currently followed by the Bluetooth module meets advanced audio coding, such as AAC or LDAC-660. If it does, then the fourth switching condition is determined to be met.

[0194] Accordingly, for this fourth switching condition, the acquired working information also includes the Bluetooth audio transmission protocol information currently followed by the Bluetooth module.

[0195] Step S208: Determine the signal strength value of the WiFi module.

[0196] Specifically, as mentioned above, the factors that affect electronic devices entering Hybrid mode include not only bandwidth but also WiFi signal strength.

[0197] Therefore, after determining that the electronic device currently meets the above four switching conditions through the above judgment, it is also necessary to further determine whether the current signal strength value of the WiFi module meets the requirements for entering Hybrid mode.

[0198] Regarding the Received Signal Strength Indication (RSSI) mentioned in this embodiment, it is specifically used to indicate the received signal strength. This parameter is an optional part of the wireless transmission layer and is used to determine the link quality and whether to increase the broadcast transmission strength.

[0199] This embodiment provides two specific methods for determining the signal strength value of the WiFi module:

[0200] Method 1: Take the maximum value from the signal strength values ​​corresponding to the two antennas.

[0201] First, the signal strength values ​​RSSI_0 and RSSI_1 of the first and second antennas are obtained respectively. Then, it is determined whether RSSI_0 of the first antenna is greater than RSSI_1 of the second antenna. If it is greater, the signal strength value of the first antenna is determined as the signal strength value of the WiFi module; otherwise, the signal strength value of the second antenna is determined as the signal strength value of the WiFi module, i.e., MAX(RSSI_0, RSSI_1). In this way, by selecting the antenna with the larger signal strength value, the system can promptly enter Hybrid mode when the above four conditions are met in the current business scenario.

[0202] Method 2: Select the signal strength value corresponding to the antenna used by the WiFi module after entering Hybrid mode.

[0203] In this approach, if the WiFi module only uses the second antenna in Hybrid mode, the signal strength value of the WiFi module is determined by: obtaining the signal strength value of the second antenna and using that value as the signal strength value of the WiFi module.

[0204] For example, if in Hybrid mode, the WiFi module only uses the first antenna, that is, the WiFi module and the Bluetooth module share the second antenna, then the signal strength value of the WiFi module is determined by: obtaining the signal strength value of the first antenna and determining the signal strength value of the first antenna as the signal strength value of the WiFi module.

[0205] In this way, the signal strength value of the antenna occupied by the WiFi module when switching to Hybrid mode is directly selected as the signal strength value of the WiFi module, thus making the switching of wireless communication methods more in line with the current business scenario.

[0206] Step S209: Determine whether the signal strength value of the WiFi module is greater than the first threshold value.

[0207] Specifically, if the hybrid mode processing module determines that the signal strength value of the WiFi module is greater than the first threshold, i.e. the threshold value for entering the Hybrid mode, then step S210 is executed, which means that the WiFi module and Bluetooth module can be switched from the Time Division Duplex (TDD) mode to the Hybrid mode. Otherwise, the current wireless communication mode remains the default TDD mode, i.e., step S211.

[0208] It should be noted that in actual application scenarios, the signal strength value is a negative value, so the first threshold value will also be a negative value.

[0209] For example, the threshold values ​​(the first threshold value and the second threshold value mentioned below) are related to the antenna isolation.

[0210] Antenna isolation specifically refers to the ratio of the signal power transmitted by one antenna to the signal power received by another antenna. For example, it can be the ratio of the signal power transmitted by the first antenna to the signal power received by the second antenna, or vice versa.

[0211] For example, the higher the antenna isolation, the smaller the threshold value, that is, the larger the value after "-".

[0212] Furthermore, in practical applications, the threshold value is also related to the antenna performance, the device it is located in, and its layout within the device.

[0213] This application does not impose any restrictions on the specific value of the threshold; in practical applications, it can be determined according to actual business needs.

[0214] Step S210: Enter Hybrid mode.

[0215] Specifically, if the electronic device is currently in the default TDD mode, then step S210 involves switching the WiFi module and Bluetooth module from TDD mode to Hybrid mode.

[0216] Accordingly, if the electronic device is already in Hybrid mode, then step S210 specifically involves controlling the electronic device to remain in Hybrid mode, i.e., not switching to wireless communication mode.

[0217] Step S211: Enter TDD mode.

[0218] Specifically, if the electronic device is currently in Hybrid mode, then step S211 involves switching the WiFi module and Bluetooth module back from Hybrid mode to TDD mode. For example, if the WiFi signal strength value is less than the first threshold value, then the WiFi module and Bluetooth module will be switched back from Hybrid mode to TDD mode.

[0219] Accordingly, if the electronic device is already in TDD mode, then the operation of step S211 is to control the electronic device to continue in TDD mode, that is, not to switch the wireless communication mode.

[0220] It should be noted that the operation performed in step S211 specifically involves switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode. In actual application scenarios, the corresponding business scenario might be that the electronic device is already in Hybrid mode, and all four switching conditions mentioned above are met. However, the current signal strength value of the WiFi module is less than the first threshold value, but the electronic device might still not be suitable for switching back to TDD mode in the current business scenario. Therefore, to avoid immediately exiting Hybrid mode when the above situation occurs, causing the WiFi module and Bluetooth module to frequently switch between TDD mode and Hybrid mode, i.e., the ping-pong effect, this is necessary. The ping-pong effect refers to the back-and-forth switching between two different states. In the embodiments of this application, it refers to the wireless communication mode of the WiFi module and Bluetooth module switching back and forth between TDD mode and Hybrid mode. This frequent switching of wireless communication mode not only consumes the resources of the electronic device but also makes the current wireless communication mode unsuitable for the current business scenario, thereby affecting the user experience.

[0221] To address the ping-pong effect, an anti-ping-pong mechanism is introduced based on the above embodiments to reduce the frequent switching between TDD and Hybrid modes of the WiFi and Bluetooth modules, thereby reducing the resource consumption of electronic devices and enabling the wireless communication mode used by electronic devices during operation to be better suited to current business scenarios.

[0222] Anti-ping-pong mechanism one:

[0223] For example, in one instance, a second threshold value, which is less than the first threshold value, can be set as the threshold value for exiting Hybrid mode. Thus, before executing the step of switching the WiFi and Bluetooth modules from Hybrid mode back to TDD mode when the signal strength value is less than the first threshold, it is first determined whether the signal strength value is less than the second threshold value.

[0224] Accordingly, if the signal strength value is less than the second threshold, the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode is executed, i.e., step S211 is performed; otherwise, the electronic device remains in Hybrid mode. This effectively avoids the situation where the WiFi module's current signal strength value is temporarily less than the first threshold, but immediately exits Hybrid mode when it is between the first and second thresholds, causing the WiFi module and Bluetooth module to frequently switch between TDD and Hybrid modes, thus consuming electronic device resources.

[0225] Anti-ping-pong mechanism two:

[0226] For example, when the current signal strength value of the WiFi module is determined to be no greater than the first threshold and less than the second threshold, i.e., the conditions for continuing to stay in Hybrid mode are not met, a second anti-ping-pong mechanism can be introduced. That is, instead of immediately exiting Hybrid mode, the mechanism monitors whether the conditions for entering Hybrid mode are met again within a certain period of time. If the conditions are met, the module continues to stay in Hybrid mode; if the conditions are not met, the module exits Hybrid mode and switches back to TDD mode. Through this delayed processing, frequent switching between TDD mode and Hybrid mode between the WiFi module and the Bluetooth module is further avoided.

[0227] Specifically, regarding the use of the above-mentioned anti-ping-pong mechanism two, when it is determined that the current signal strength value of the WiFi module is not greater than the first threshold value and is less than the second threshold value, a timer or timer is started. After the time recorded by the timer or timer reaches the first duration, the signal strength value of the WiFi module is re-determined in any of the methods given in step S208, and then the re-determined strength value is compared with the second threshold value.

[0228] Accordingly, the step of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode is only executed when the re-determined signal strength value is less than the second threshold value; otherwise, the electronic device remains in Hybrid mode.

[0229] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. In practical applications, in addition to employing a delay mechanism when the signal strength value of the WiFi module is less than the first threshold, a delay mechanism can also be introduced in each other judgment environment. That is, when any environment fails to meet the corresponding switching conditions, a certain waiting time is set, and it is monitored whether the corresponding switching conditions are met again after the waiting time. If it is determined that the current business scenario is not suitable for Hybrid mode only when the conditions are not met, then it is necessary to exit Hybrid mode and switch back to TDD mode.

[0230] Anti-ping-pong mechanism three:

[0231] For example, after switching the WiFi and Bluetooth modules from Hybrid mode back to TDD mode, the electronic device can be configured to stop performing the next wireless communication mode switching operation for a period of time after each wireless communication mode switching operation. This effectively avoids the phenomenon of frequent switching between TDD and Hybrid modes caused by frequent signal jumps. For instance, after switching the WiFi and Bluetooth modules from Hybrid mode back to TDD mode, the electronic device can be configured to stop performing the step of switching the WiFi and Bluetooth modules from Time Division Duplex (TDD) mode to Hybrid mode for a second period of time.

[0232] Anti-Ping Pong Mechanism Four:

[0233] For example, in practical applications, it can be configured so that only one command for switching wireless communication is sent within each time period. This avoids the situation where the interval between two commands is too short, causing the underlying layer to be unable to process them in time and thus resulting in thread blocking. For instance, when executing step S210, which switches the WiFi module and Bluetooth module from TDD mode to Hybrid mode, it can be configured so that only one command is allowed to be sent within the third time period to switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode. This allows the electronic device to complete the operation of switching the WiFi module and Bluetooth module from TDD mode to Hybrid mode with only one command, avoiding the situation where the interval between two commands is too short, causing the underlying layer to be unable to process them in time and thus resulting in thread blocking.

[0234] For example, when performing step S211, which is to switch the WiFi module and Bluetooth module from Hybrid mode back to TDD mode, it can be set that only one instruction to switch the WiFi module and Bluetooth module from Hybrid mode back to TDD mode is allowed to be sent within the fourth time period. This allows the electronic device to complete the operation of switching the WiFi module and Bluetooth module from Hybrid mode back to TDD mode in response to only one instruction, avoiding the phenomenon that the low-level layer cannot process the two instructions in time due to the short interval between them, thus causing thread blocking.

[0235] It should be understood that the above-described anti-ping-pong mechanisms can be applied to any of the above-described embodiments of the method for switching wireless communication modes, and one or more of them can be used in actual application scenarios according to business needs, without any restrictions.

[0236] Furthermore, based on the wireless communication mode switching method provided in this embodiment, tests were conducted on the number of times stuttering occurred when multiple applications of the same electronic device, such as application 1 and application 2, entered Hybrid mode and did not enter Hybrid mode in the same business scenario. The test results are shown in Table 2.

[0237] Table 2 Test Record Table of Switching Methods Based on Wireless Communication Modes

[0238]

[0239]

[0240] Table 2 shows the number of stutters experienced by Application 1 and Application 2 when entering Hybrid mode and when not entering Hybrid mode. It can be seen that when the signal strength of the WiFi module is greater than the first threshold (-55dBm), stuttering will not occur regardless of whether it is in Hybrid mode or not. However, when the signal strength of the WiFi module is between the first threshold (-55dBm) and the second threshold (-65dBm), the number of stutters experienced by Application 1 and Application 2 after entering Hybrid mode is significantly less than that before entering Hybrid mode.

[0241] This embodiment has described the main steps for switching wireless communication modes in electronic devices. The following will combine... Figures 10 to 14 The specific interactions of the internal modules when an electronic device implements the wireless communication mode switching method provided in the embodiments of this application are described.

[0242] See Figure 10 Taking a conferencing application as an example, when implementing the wireless communication mode switching method provided in this application embodiment, the interaction operation of the internal modules of the electronic device specifically includes:

[0243] Step S301: The listening module detects an operation that is applied to the conference application installed in the triggering application layer.

[0244] In step S302, the monitoring module determines whether the meeting application is a whitelisted application based on the package name of the triggered meeting application and the package name recorded in the preset whitelist application list, that is, whether the meeting application meets the first switching condition.

[0245] In step S303, the monitoring module determines that the conference application meets the first switching condition and sends a notification message to the hybrid mode processing module, informing the hybrid processing module to perform other processing procedures for switching the wireless communication mode.

[0246] In step S304, the mixed-mode processing module determines the data information to be acquired based on the preset second switching condition, and then uses the corresponding interface to call the corresponding framework in the application framework layer so that the framework can call the corresponding driver in the kernel layer, and then the driver can obtain the data information of the corresponding hardware unit.

[0247] Specifically, as described in the above embodiments, the second switching condition applies to both the audio module and the camera.

[0248] Therefore, the hardware units involved in steps S304 to S309 are specifically an audio module and / or a camera.

[0249] Accordingly, the hardware unit corresponds to the audio frame and the camera frame, and the hardware unit corresponds to the audio driver and the camera driver.

[0250] Based on this, the implementation process of obtaining the audio module occupancy information of the conferencing application, when mapped to the software architecture of the electronic device, Figure 10 Steps S301 to S310 are as follows:

[0251] See Figure 11 For example, when a user triggers a meeting application installed in the application layer, the listening module in the application framework layer will listen to the user's triggering of the meeting application, that is, execute step S301.

[0252] Accordingly, the monitoring module will determine whether the meeting application is a whitelisted application based on the package name of the triggered meeting application and the package name recorded in the preset whitelist application list, that is, execute step S302.

[0253] Accordingly, when the monitoring module determines that the conference application meets the first switching condition, it will execute the aforementioned step S303.

[0254] Accordingly, after receiving a notification from the monitoring module that the conference application meets the first switching condition, the mixed mode processing module will call the audio framework, which is also located in the application framework layer, to execute step S304.

[0255] Accordingly, after receiving the call from the mixed-mode processing module, the audio framework will execute step S305, which is to call the audio driver in the kernel layer to trigger the audio driver to execute step S306, which is to call the audio module hardware and then obtain the current occupancy information of the audio module, such as the current usage status information of specific audio modules such as microphone, speaker, receiver, and headphone jack, as well as the continuous usage duration, i.e., step S307.

[0256] Accordingly, after obtaining the occupancy information transmitted by the audio module, the audio driver executes step S308, which transmits the occupancy information of the audio module to the audio frame.

[0257] Accordingly, after receiving the audio module occupancy information sent by the audio driver, the audio framework will continue to transmit the audio module occupancy information upward, that is, execute step S309, and transmit the audio module occupancy information to the mixing mode processing module, so that the mixing mode processing module can determine whether the audio module occupancy information meets the preset second switching condition, that is, execute step S310.

[0258] This enables the determination of whether an electronic device meets the second switching condition based on the occupancy information of the audio module by the conferencing application.

[0259] Understandably, in this application, if it is determined that the occupancy information of the audio module meets the second switching condition, it is further necessary to determine whether the occupancy information of the camera meets the second switching condition. Regarding the implementation process of obtaining the occupancy information of the camera in the conferencing application, corresponding to the software structure of the electronic device, the above steps S304 to S310 are as follows:

[0260] See Figure 12 For example, after receiving a notification from the listening module that the conference application meets the first switching condition, the mixed mode processing module will call the camera frame, which is also located in the application framework layer, to execute step S304.

[0261] Accordingly, after the camera frame receives the call from the mixed-mode processing module, it will execute step S305, which is to call the camera driver in the kernel layer to trigger the camera driver to execute step S306, which is to call the camera hardware to obtain the current occupancy information of the camera, such as the current usage status information of the camera and the continuous usage time, i.e., step S307.

[0262] Accordingly, after obtaining the occupancy information transmitted by the camera, the camera driver executes step S308, which transmits the occupancy information of the camera to the camera frame.

[0263] Accordingly, after receiving the camera occupancy information sent by the camera driver, the camera frame will continue to transmit the camera occupancy information upward, that is, execute step S309, and transmit the camera occupancy information to the mixed mode processing module, so that the mixed mode processing module can determine whether the camera occupancy information meets the preset second switching condition, that is, execute step S310.

[0264] This enables the determination of whether an electronic device meets the second switching condition based on the camera occupancy information of the conferencing application.

[0265] Furthermore, it should be noted that in practical application scenarios, Figure 10 The operations in steps S304 to S310 can be to simultaneously obtain the occupancy information of the audio module and the camera module. That is, the operations of obtaining the occupancy information of the audio module and determining whether the occupancy information of the audio module meets the second switching condition are performed synchronously with the operations of obtaining the occupancy information of the camera and determining whether the occupancy information of the camera meets the second switching condition.

[0266] For example, when the occupancy information of the audio module and the camera meets the second switching condition, the mixed-mode processing module needs to determine whether the WiFi module is connected to the wireless network using the first antenna and the second antenna. Therefore Figure 10 The hardware unit involved in steps S311 to S317 is specifically a WiFi module.

[0267] Accordingly, the framework corresponding to the hardware unit is the WiFi framework, and the driver corresponding to the hardware unit is the WiFi driver.

[0268] It should be noted that in practical applications, the mixed-mode processing module, through interaction with the WiFi framework, WiFi driver, and WiFi module, can not only determine whether the WiFi module is connected to the wireless network using the first and second antennas, but also determine the WiFi module's signal strength value and bandwidth.

[0269] Based on this, in the context of the software architecture of electronic devices, Figure 10 Steps S311 to S317 are as follows:

[0270] See Figure 13 For example, after the mixed mode processing module determines that the second switching condition is met, it will call the WiFi framework, which is also located in the application framework layer, to execute step S311.

[0271] Accordingly, after receiving the call from the mixed-mode processing module, the WiFi framework will execute step S312. Specifically, the WiFi framework calls the WiFi driver in the kernel layer to trigger the WiFi driver to execute step S313. Specifically, it calls the WiFi module hardware to obtain the connection information of whether the WiFi module is currently using the first antenna and the second antenna to connect to the wireless network, as well as the bandwidth and signal strength values ​​of the antennas used, i.e., step S314.

[0272] Accordingly, after obtaining the above information transmitted by the WiFi module, the WiFi driver executes step S315, that is, transmits the above information provided by the WiFi module to the WiFi framework.

[0273] Accordingly, after receiving the information provided by the WiFi module sent by the WiFi driver, the WiFi framework will continue to transmit the information provided by the WiFi module upwards, that is, execute step S316 to transmit the information provided by the WiFi module to the mixed mode processing module.

[0274] Accordingly, the mixed-mode processing module determines whether the WiFi module uses the first antenna and the second antenna to connect to the wireless network based on the information provided by the WiFi module received in step S316. When it is determined that the WiFi module uses the first antenna and the second antenna to connect to the wireless network, the mixed-mode processing module determines whether the bandwidth corresponding to the first antenna and the second antenna meets the third switching condition, that is, it executes step S317.

[0275] This enables the process of determining whether an electronic device meets the third switching condition.

[0276] In step S318, the mixed-mode processing module determines the data information to be acquired based on the preset fourth switching condition, and then uses the corresponding interface to call the corresponding framework in the application framework layer so that the framework can call the corresponding driver in the kernel layer, and then the driver can obtain the data information of the corresponding hardware unit.

[0277] Specifically, as can be seen from the description in the above embodiments, the fourth switching condition is for the Bluetooth module.

[0278] Therefore, the hardware unit involved in steps S318 to S324 is specifically a Bluetooth module.

[0279] Accordingly, the framework corresponding to the hardware unit is the Bluetooth framework, and the driver corresponding to the hardware unit is the Bluetooth driver.

[0280] Based on this, the process of determining the Bluetooth module's operating information and whether that information meets the fourth switching condition corresponds to the software architecture of the electronic device. Figure 10 Steps S318 to S324 are as follows:

[0281] See Figure 14 For example, after the mixed mode processing module determines that the third switching condition is met, it will call the Bluetooth framework, which is also located in the application framework layer, to execute step S318.

[0282] Accordingly, after receiving the call from the mixed-mode processing module, the Bluetooth framework will execute step S319, which is to call the Bluetooth driver in the kernel layer to trigger the Bluetooth driver to execute step S320, which is to call the Bluetooth module hardware and then obtain the current working information of the Bluetooth module, such as the connection status information of the Bluetooth module, the device information of the specific connected Bluetooth device, and the Bluetooth audio transmission protocol information followed by the Bluetooth module at present, i.e., step S321.

[0283] Accordingly, after obtaining the above information transmitted by the Bluetooth module, the Bluetooth driver executes step S322, that is, transmits the above information provided by the Bluetooth module to the Bluetooth framework.

[0284] Accordingly, after receiving the information provided by the Bluetooth module sent by the Bluetooth driver, the Bluetooth framework will continue to transmit the information provided by the Bluetooth module upwards, that is, execute step S323 to transmit the information provided by the Bluetooth module to the mixed mode processing module.

[0285] Accordingly, the mixed mode processing module determines whether the Bluetooth module meets the fourth switching condition based on the Bluetooth module's working information received in step S323, and then executes step S324.

[0286] Specifically, in practical application scenarios, the working information fed back by the Bluetooth module can be in the form of a file, and the mixed-mode processing module can call a pre-compiled interface to obtain data from it.

[0287] For example, you can call the interface to get the current Bluetooth connection status (in one example, it can be named IsBtConnected) to get the Bluetooth devices currently connected to the Bluetooth module.

[0288] For example, you can call the interface to get the Bluetooth audio transmission protocol currently being used by Bluetooth (in one example, it can be named: mIsBtInA2Dp) to get the Bluetooth audio transmission protocol being used by the connected Bluetooth headset.

[0289] For example, you can call the interface that retrieves the time slots used for sending data during Bluetooth's working time (in one example, it can be named: mIsBtIn6SLOT) to obtain the time slots used by the Bluetooth module to send data, so that when switching to Hybrid mode, the WiFi module can send data in the time slots used by the Bluetooth module to send data during Bluetooth's working time and receive data in other time slots.

[0290] This enables the process of determining whether an electronic device meets the fourth switching condition.

[0291] Furthermore, it should be understood that the specific interface names given in the above description are merely for ease of explanation and are not intended to be the sole limitation of this embodiment.

[0292] In step S325, after determining that the fourth switching condition is met, the mixed mode processing module determines the signal strength value of the WiFi module according to the signal strength value of each antenna in the information provided by the WiFi module obtained in steps S311 to S316 above, and determines the signal strength value of the WiFi module according to any of the methods given in the above embodiments for determining the signal strength value of the WiFi module, and then determines whether the signal strength value of the WiFi module is greater than the preset first threshold value.

[0293] Accordingly, when the signal strength value of the WiFi module is determined to be greater than the first threshold value, the pre-compiled interface for controlling the electronic device to enter Hybrid mode (which can be named: WifiBtHybridArbitration in one example) is called to switch the WiFi module and Bluetooth module from TDD mode to Hybrid mode.

[0294] Thus, the operation of automatically switching from TDD mode to Hybrid mode according to the business scenario is realized, which completes the wireless communication mode switching method provided in the embodiments of this application.

[0295] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.

[0296] Furthermore, it should be understood that in practical applications, the execution order of the several judgment steps for determining whether an electronic device has entered Hybrid mode can be adjusted according to business needs and is not limited to the method given in the embodiments of this application.

[0297] Therefore, by pre-setting the switching conditions for the Bluetooth and WiFi modules to switch from the default TDD mode to Hybrid mode, when an operation is detected that affects any application installed in the triggering application layer, the system determines whether the currently triggered application, as well as the audio module, camera, Bluetooth module, and WiFi module in the electronic device, meet the conditions for entering Hybrid mode. If the conditions are met, the Bluetooth and WiFi modules are switched from TDD mode to Hybrid mode. This allows electronic devices with Bluetooth and WiFi modules sharing the same antenna to enable the WiFi module to operate in MIMO mode for high throughput, and also to operate in SISO mode under suitable conditions. This allows the WiFi module to continue interacting with the AP during the Bluetooth module's working time to ensure real-time performance, thereby minimizing audio and video stuttering during audio and video calls and ensuring a better user experience.

[0298] Furthermore, it should be noted that the wireless communication mode switching methods performed by the electronic device provided in the above embodiments can also be performed by a chip system included in the electronic device, such as a quad-chip. This chip system may include a processor. The chip system may be coupled to a memory, enabling it to call a computer program stored in the memory during operation to implement the steps performed by the electronic device.

[0299] In addition, it should be noted that the processor in this chip system can be either an application processor or a non-application processor.

[0300] In addition, this application embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the above-mentioned related method steps to implement the wireless communication mode switching method applied to the electronic device in the above embodiment.

[0301] In addition, this application also provides a computer program product that, when run on a computer, causes the computer to perform the above-mentioned related steps to implement the wireless communication mode switching method applied to electronic devices in the above embodiments.

[0302] In addition, embodiments of this application also provide a chip (which may also be a component or module), the chip may include one or more processing circuits and one or more transceiver pins; wherein, the transceiver pins and the processing circuits communicate with each other through internal connection paths, the processing circuits execute the above-mentioned related method steps to implement the wireless communication mode switching method in the above embodiments, so as to control the receiving pin to receive signals and control the transmitting pin to transmit signals.

[0303] Based on the above description of the hardware structure of the electronic device, the electronic device includes, but is not limited to: a first antenna, a second antenna, a Bluetooth module, a WiFi module, a memory, one or more processors, and one or more computer programs.

[0304] The first and second antennas operate in the 2.4 GHz wireless frequency band. One or more computer programs are stored in 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. One or more processors are connected to the Bluetooth module, the WiFi module, and the memory, respectively.

[0305] For example, when a computer program is executed by one or more processors, it causes an electronic device or a chip system in an electronic device to perform the wireless communication mode switching method provided in any of the above method embodiments.

[0306] Since the steps performed by the electronic device when switching wireless communication modes are similar to the wireless communication mode switching method described in the above method embodiments, the specific details are not detailed in the above method embodiment section and will not be repeated here.

[0307] Furthermore, as can be seen from the above description, the electronic device, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the wireless communication mode switching method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0308] Furthermore, it should be understood that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of this application.

Claims

1. A method for switching wireless communication modes, characterized in that, The method is applied to an electronic device, the electronic device including a Bluetooth module, a WiFi module, a first antenna, and a second antenna. The Bluetooth module transmits and receives signals through the first antenna, and the WiFi module transmits and receives signals through the first antenna and / or the second antenna. The first antenna and the second antenna operate in the 2.4 GHz wireless frequency band. When an operation is detected that triggers an application installed in the application layer, it is determined whether the application triggered by the operation meets a first switching condition; wherein, the first switching condition is that the application triggered by the operation is a whitelisted application; When the first switching condition is met, obtain the application's usage information for the audio module and camera; When the occupancy information meets the second switching condition, it is determined whether the WiFi module uses the first antenna and the second antenna to connect to the wireless network; wherein, the second switching condition is that both the audio module and the camera are occupied, or the audio module is occupied and the camera module is not occupied; When the WiFi module connects to the wireless network using the first antenna and the second antenna, it is determined whether the bandwidth corresponding to the first antenna and the second antenna meets the third switching condition; wherein, the third switching condition is a bandwidth of 20M; When the third switching condition is met, the working information of the Bluetooth module is determined; When the working information meets the fourth switching condition, the signal strength value of the WiFi module is determined; wherein, the fourth switching condition is that the Bluetooth module is connected to a Bluetooth device; When the signal strength value is greater than the first threshold, the WiFi module and the Bluetooth module are switched from Time Division Duplex (TDD) mode to Hybrid mode.

2. The method according to claim 1, characterized in that, After switching the WiFi module and the Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode, the method further includes: When the signal strength value is less than the first threshold, the WiFi module and the Bluetooth module are switched from the Hybrid mode back to the TDD mode.

3. The method according to claim 2, characterized in that, Before switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode, the method further includes: Determine whether the signal strength value is less than a second threshold value, wherein the second threshold value is less than the first threshold value; If the signal strength value is less than the second threshold value, then the step of switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode is performed.

4. The method according to claim 3, characterized in that, Before 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 includes: After the first duration, the signal strength value of the WiFi module is re-determined; When the redefined signal strength value is less than the second threshold value, the step of switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode is performed.

5. The method according to claim 4, characterized in that, After switching the WiFi module and the Bluetooth module from the Hybrid mode back to the TDD mode, the method further includes: During the second duration, the step of switching the WiFi module and the Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode is stopped.

6. The method according to claim 1, characterized in that, The step of switching the WiFi module and the Bluetooth module from Time Division Duplex (TDD) mode to Hybrid mode includes: Within the third time period, a command is sent to switch the WiFi module and the Bluetooth module from the TDD mode to the Hybrid mode; In response to the instruction, the WiFi module and the Bluetooth module are switched from the TDD mode to the Hybrid mode.

7. The method according to any one of claims 1 to 6, characterized in that, Determining whether the application triggered by the operation meets the first switching condition includes: Obtain the package name of the application; Based on the package name, check if there is a matching whitelisted application package name in the whitelisted application list; If it exists, then the application is determined to be a whitelisted application, satisfying the first switching condition.

8. The method according to any one of claims 1 to 6, characterized in that, Determining whether the bandwidths corresponding to the first antenna and the second antenna meet the third switching condition includes: Obtain the bandwidths corresponding to the first antenna and the second antenna; Determine whether the bandwidth is 20M; If so, then the third switching condition is satisfied.

9. The method according to any one of claims 1 to 6, characterized in that, The Bluetooth module's operational information includes connection status information; Specifically, when it is determined that the Bluetooth module is connected to a Bluetooth device based on the connection status information, the fourth switching condition is satisfied.

10. The method according to any one of claims 1 to 6, characterized in that, Determining the signal strength value of the WiFi module includes: The signal strength values ​​of the first antenna and the second antenna are obtained respectively; Determine whether the signal strength value of the first antenna is greater than the signal strength value of the second antenna; If it is greater than the signal strength value, then the signal strength value of the first antenna is determined as the signal strength value of the WiFi module; Otherwise, the signal strength value of the second antenna is determined as the signal strength value of the WiFi module.

11. The method according to any one of claims 1 to 6, characterized in that, In the Hybrid mode, the WiFi module only occupies the second antenna. Determining the signal strength value of the WiFi module includes: Obtain the signal strength value of the second antenna and determine the signal strength value of the second antenna as the signal strength value of the WiFi module.

12. An electronic device, characterized in that, include: The system includes 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 the 2.4 GHz wireless band. 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, the one or more processors are respectively connected to the Bluetooth module, the WiFi module and the memory, and when the computer program is executed by the one or more processors, the electronic device performs the wireless communication mode switching method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The device includes a computer program, characterized in that, when the computer program is run on an electronic device, it causes the electronic device to perform a method for switching wireless communication modes as described in any one of claims 1 to 11.

14. A chip, characterized in that, include: 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 wireless communication mode switching method according to any one of claims 1 to 11 to control the receiving pins to receive signals and to control the transmitting pins to transmit signals.

Citation Information

Patent Citations

  • Methods and apparatus for enhanced coexistence algorithms in wireless systems

    CN102668681A

  • Data transmission method and device, electronic device, and storage medium

    CN109274407A