Communication method and electronic equipment

By using different antennas in electronic devices for WIFI and Bluetooth communication, and comparing real-time communication indicators with preset thresholds, the problem of WIFI and Bluetooth communication interference in time-sharing mode is solved, and communication quality and system flexibility are improved.

CN118540409APending Publication Date: 2024-08-23HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310972705.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In electronic devices, when using time-sharing mode for Bluetooth communication and WIFI communication, it will cause interference between WIFI communication and Bluetooth communication, affecting the communication quality. Especially in real-time communication scenarios such as video calls, sound or picture lag may occur. problem.

Method used

By configuring the first antenna and the second antenna in the electronic device, and comparing the real-time communication indicators with the preset thresholds, it is determined whether to use different antennas for WIFI and Bluetooth communications to reduce interference and improve transmission performance. Specific methods include using the first antenna for WIFI communication and the second antenna for Bluetooth communication when preset conditions are met, or conversely, ensuring communication quality.

Benefits of technology

It effectively reduces the interference between WIFI communication and Bluetooth communication, improves the flexibility and communication quality of the system, and avoids the problems of data transmission delay and low real-time performance caused by time-sharing mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540409A
    Figure CN118540409A
Patent Text Reader

Abstract

The embodiment of the invention is applied to the field of communication, and provides a communication method and electronic equipment. In a scene where the working frequency bands of WIFI communication and Bluetooth communication coincide, the electronic equipment can obtain a first communication index threshold after determining that the electronic equipment meets a first preset condition, and then compares a latest communication index obtained in real time with the first communication index threshold to determine whether the latest communication index meets a second preset condition or not. Under the condition that the latest communication index meets the second preset condition, the electronic equipment can adopt the first antenna to perform WIFI communication and adopt the second antenna to perform Bluetooth communication, so that interference between the WIFI communication and the Bluetooth communication can be reduced, better transmission performance can be kept, the flexibility of the system is improved, and the communication efficiency is improved. And the communication quality of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202310158291.6, and the original application date is February 23, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of communications, and in particular to a communication method and electronic equipment. Background Art

[0003] With the continuous development of communication technology, electronic devices generally support both Bluetooth communication mode and wireless fidelity (WIFI) communication mode.

[0004] When an electronic device uses Bluetooth communication and WIFI communication to communicate at the same time, it can use a time-sharing mode to perform Bluetooth communication and WIFI communication. The time-sharing mode indicates that the electronic device reuses antennas and performs Bluetooth communication and WIFI communication in time, resulting in the electronic device being unable to communicate based on WIFI communication or Bluetooth communication during part of the time, affecting the communication quality. For example, when an electronic device is making a video call based on WIFI communication, the electronic device is simultaneously connected to a Bluetooth headset. The electronic device receives and emits video data via the WIFI communication mode, and sends audio data to the Bluetooth headset via the Bluetooth communication mode, and receives audio data collected by the Bluetooth headset. However, since the electronic device uses a time-sharing mode to perform Bluetooth communication and WIFI communication, the electronic device is unable to receive and emit video data in real time during part of the time, resulting in the problem of sound or picture freeze, affecting the user experience. Summary of the invention

[0005] The embodiments of the present application provide a communication method and an electronic device, which are used to reduce interference between WIFI communication and Bluetooth communication and maintain good transmission performance, which not only improves the flexibility of the system but also improves the communication quality of the electronic device.

[0006] In a first aspect, a communication method is provided, which is applied to an electronic device, wherein the electronic device is configured with a first antenna and a second antenna, and the first antenna and the second antenna are different, and the method includes:

[0007] When the electronic device performs wireless fidelity WIFI communication, if the electronic device meets the first preset condition, the electronic device needs to obtain the first communication indicator threshold; wherein, when the electronic device meets the second preset condition, the first antenna is used for Bluetooth communication and WIFI communication;

[0008] The electronic device compares the first communication indicator threshold with the latest communication indicator to determine whether the latest communication indicator meets the second preset condition, wherein the first communication indicator threshold includes a first WIFI received signal strength threshold, and the latest communication indicator includes a WIFI received signal strength;

[0009] When determining that the latest communication indicator meets the second preset condition, the electronic device uses the first antenna for WIFI communication and the second antenna for Bluetooth communication; wherein the second preset condition includes that the WIFI received signal strength is greater than the first WIFI received signal strength threshold.

[0010] In this application, when the working frequency bands of the WIFI module and the Bluetooth module in the electronic device overlap (for example, the working frequency bands of the WIFI module and the Bluetooth module are both 2.4Ghz), the electronic device can determine the first communication indicator threshold after determining that the electronic device meets the first preset condition, and then compare the current communication indicator obtained in real time with the first communication indicator threshold to determine whether the electronic device meets the second preset condition, that is, whether the communication quality of the electronic device is poor when Bluetooth communication and WIFI communication are performed simultaneously. If the electronic device meets the second preset condition, whether different antennas need to be used for WIFI communication and Bluetooth communication.

[0011] In this way, the interference between WIFI communication and Bluetooth communication can be reduced and good transmission performance can be maintained, which not only improves the flexibility of the system but also improves the communication quality of the electronic device.

[0012] Exemplarily, the first preset condition may include that the electronic device starts to perform Bluetooth communication, or, in the process of the electronic device performing Bluetooth communication and WIFI communication in a time-sharing mode, the communication quality value of the target communication mode of the electronic device is lower than the preset quality value. The target communication mode includes WIFI communication mode / Bluetooth communication mode.

[0013] Exemplarily, the above communication quality values ​​may include rate, received signal strength, transmit power, bit error rate, signal-to-noise ratio, etc.

[0014] In the present application, since the first preset condition is used to determine whether the electronic device needs to use different antennas for Bluetooth communication and WIFI communication, and the first preset condition includes different scenarios in which the electronic device starts to perform Bluetooth communication, or, in the process of the electronic device using a time-sharing mode for Bluetooth communication and WIFI communication, the communication quality value of the target communication mode of the electronic device is lower than the preset quality value, therefore, by determining whether the electronic device meets the first preset condition, the working mode of Bluetooth communication and WIFI communication can be adjusted in time, thereby improving the communication quality of the electronic device.

[0015] In one example, the first communication indicator threshold is related to WIFI gain, which refers to the degree of improvement in WIFI rate when an electronic device switches from a time-sharing mode for Bluetooth communication and WIFI communication to a parallel mode for Bluetooth communication and WIFI communication.

[0016] In another example, the first communication indicator threshold is related to the transmission performance and / or working bandwidth of the router.

[0017] In the present application, the first communication indicator threshold is determined based on the WIFI revenue, the transmission performance of the router and / or the working bandwidth. In this way, the accuracy of determining the first communication indicator threshold can be improved, and it can be accurately determined whether the electronic device can use different antennas for Bluetooth communication and WIFI communication.

[0018] Exemplarily, the above-mentioned latest communication indicators may also include at least one of Bluetooth transmission power, Bluetooth received signal strength, Bluetooth signal-to-noise ratio, Bluetooth bit error rate, WIFI transmission power, WIFI signal-to-noise ratio and WIFI bit error rate.

[0019] Correspondingly, the first communication indicator threshold may also include at least one of a first Bluetooth transmission power threshold, a first Bluetooth received signal strength threshold, a first Bluetooth signal-to-noise ratio threshold, a first Bluetooth bit error rate threshold, a first WIFI transmission power threshold, a first WIFI signal-to-noise ratio threshold, and a first WIFI bit error rate threshold. The first communication indicator threshold corresponds to the latest communication indicator one-to-one.

[0020] Exemplarily, the above-mentioned second preset condition may also include at least one of the Bluetooth transmission power greater than the first Bluetooth transmission power threshold, the Bluetooth received signal strength greater than the first Bluetooth received signal strength threshold, the Bluetooth signal-to-noise ratio less than the first Bluetooth signal-to-noise ratio threshold, the Bluetooth bit error rate less than the first Bluetooth bit error rate threshold, the WIFI transmission power greater than the first WIFI transmission power threshold, the WIFI signal-to-noise ratio less than the first WIFI signal-to-noise ratio threshold, and the WIFI bit error rate less than the first WIFI bit error rate threshold.

[0021] In the present application, whether an electronic device can enter an independent transmission state is determined from multiple angles, including Bluetooth transmission power, Bluetooth receiving signal strength, Bluetooth signal-to-noise ratio, Bluetooth bit error rate, WIFI transmission power, WIFI signal-to-noise ratio, and WIFI bit error rate. In this way, the accuracy of the electronic device entering the independent transmission state can be improved, and the situation where the electronic device mistakenly enters the independent transmission state due to an incorrect judgment of a certain communication indicator can be reduced, thereby improving the communication quality of the electronic device.

[0022] In a possible implementation manner, the electronic device may obtain the first communication indicator threshold value through a Bluetooth coding format or directly.

[0023] In one example, the electronic device may obtain a first communication indicator threshold value based on a Bluetooth coding format. Exemplarily, the electronic device may obtain a first Bluetooth coding format; the electronic device determines a first communication indicator threshold value corresponding to the first Bluetooth coding format from a first configuration table, wherein the first configuration table includes the first Bluetooth coding format and a first communication indicator threshold value corresponding to the first Bluetooth coding format.

[0024] In the present application, after obtaining the first Bluetooth coding format, the electronic device can directly obtain the first communication indicator threshold from a pre-stored first configuration table. This not only improves the accuracy of determining the first communication indicator threshold, but also saves configuration time, thereby improving the working efficiency of the electronic device.

[0025] In another example, the electronic device can also directly obtain the first communication indicator threshold. That is, the electronic device does not need to use information such as the first Bluetooth coding format to find the corresponding first communication indicator threshold, but can directly obtain the first communication indicator threshold from a preset location. In other words, the first communication indicator thresholds corresponding to different Bluetooth coding formats can be the same.

[0026] In the present application, by directly acquiring the first communication indicator threshold, the efficiency of determining the first communication indicator threshold can be improved, thereby improving the efficiency of the electronic device using the first communication indicator threshold to determine whether the electronic device meets the second preset condition, that is, improving the efficiency of whether the electronic device needs to enter the parallel mode.

[0027] In a possible implementation, if the electronic device meets the first preset condition, the process of the electronic device acquiring the first communication indicator threshold may include:

[0028] When the electronic device meets the first preset condition, the electronic device determines a first communication parameter of the electronic device, wherein the first communication parameter includes at least one of a first Bluetooth encoding format, identification information of a first router, and a first isolation degree;

[0029] The electronic device determines whether there is a working mode identifier corresponding to the first communication parameter in the first configuration table;

[0030] When the electronic device determines that there is an operating mode identifier corresponding to the first communication parameter in the first configuration table, the electronic device determines the operating mode corresponding to the operating mode identifier corresponding to the first communication parameter as the first operating mode;

[0031] When determining that the first working mode is the parallel mode, the electronic device determines a first communication indicator threshold corresponding to the first Bluetooth coding format.

[0032] In the present application, the electronic device first determines whether there is a working mode identifier corresponding to the first communication parameter in the first configuration table based on the first communication parameter, and when it is determined that there is a working mode identifier corresponding to the first communication parameter in the first configuration table, the working mode identifier corresponding to the first communication parameter is determined as the first working mode, and after determining that the first working mode is the parallel mode, the first communication indicator threshold corresponding to the first Bluetooth encoding format is determined. In this way, the situation where antenna resources are wasted by judging electronic devices that communicate in time-sharing mode can be reduced, thereby reducing unnecessary waste of resources.

[0033] In a possible implementation, when the electronic device determines that there is no working mode identifier corresponding to the first communication parameter in the first configuration table, it determines the WIFI rates of the electronic device in different working modes respectively, and determines the working mode corresponding to the WIFI rate with the highest WIFI rate as the first working mode.

[0034] In the present application, after the electronic device determines that the working mode identifier corresponding to the first communication parameter does not exist in the first configuration table, it is necessary to determine the first working mode according to the WIFI rate of the electronic device in different working modes. In this way, it can be ensured that when the electronic device encounters a Bluetooth coding format or router that has not appeared before, it can autonomously learn to determine the first working mode, which provides a basis for subsequently determining that the electronic device enters an independent transmission state.

[0035] Exemplarily, the process of respectively determining the WIFI rates of the electronic device in different working modes and determining the working mode corresponding to the WIFI rate with the highest WIFI rate as the first working mode may include:

[0036] The electronic device determines a first WIFI rate of the electronic device in a time-sharing mode;

[0037] When the electronic device determines that the first WIFI rate is less than the preset rate, the electronic device determines a second WIFI rate of the electronic device in the parallel mode;

[0038] When determining that the second WIFI rate is greater than the first WIFI rate, the electronic device determines that the first working mode is the parallel mode.

[0039] In the present application, the electronic device preferentially determines the first WIFI rate of the electronic device in the time-sharing mode. If the first WIFI rate is less than the preset rate, it means that the transmission rate of the electronic device in the time-sharing mode is low. Therefore, it is necessary to determine the second WIFI rate of the electronic device in the parallel mode. If the second WIFI rate is greater than the first WIFI rate, it means that the WIFI rate of the electronic device in the time-sharing mode is higher than the WIFI rate of the electronic device in the parallel mode, that is, the electronic device has a WIFI benefit. Therefore, it can be determined that the first working mode is the parallel mode, thereby improving the accuracy of determining the first working mode.

[0040] In a possible implementation, the electronic device determines that the first operating mode is the time-sharing mode when determining that the first WIFI rate is greater than or equal to a preset rate.

[0041] In the present application, if the first WIFI rate is greater than or equal to the preset rate, it means that the transmission rate of the electronic device in the time-sharing mode is relatively high, and there is no need to switch to the parallel mode for Bluetooth communication and WIFI communication. Therefore, it can be determined that the first working mode is the time-sharing mode. In this way, the accuracy of determining the first working mode can be improved while saving antenna resources.

[0042] In a possible implementation, respectively determining the WIFI rates of the electronic device in different operating modes, and determining the operating mode corresponding to a WIFI rate with the highest WIFI rate as the first operating mode, includes:

[0043] The electronic device determines a first WIFI rate of the electronic device in a time-sharing mode;

[0044] When the electronic device determines that the first WIFI rate is less than the preset rate, the electronic device determines a second WIFI rate of the electronic device in the parallel mode;

[0045] When determining that the second WIFI rate is greater than the preset rate, the electronic device determines that the first working mode is the parallel mode.

[0046] In the present application, the electronic device preferentially determines the first WIFI rate of the electronic device in the time-sharing mode. If the first WIFI rate is less than the preset rate, it means that the transmission rate of the electronic device in the time-sharing mode is low. Therefore, it is necessary to determine the second WIFI rate of the electronic device in the parallel mode. If the second WIFI rate is greater than the preset rate, it means that the transmission rate of the electronic device in the parallel mode is high and meets the preset conditions. Therefore, it can be determined that the first working mode is the parallel mode. In this way, only the working mode corresponding to the WIFI rate greater than the preset rate can be used as the first working mode, reducing the waste of resources due to the low degree of WIFI rate increase, thereby reducing unnecessary waste of resources.

[0047] In a possible implementation, when the electronic device determines that the second WIFI rate is less than or equal to the preset rate, the electronic device determines the operating mode corresponding to the highest WIFI rate between the first WIFI rate and the second WIFI rate as the first operating mode.

[0048] In the present application, if the second WIFI rate is less than or equal to the preset rate, it means that both the first WIFI rate and the second WIFI rate cannot meet the preset conditions. Therefore, it is necessary to determine the highest WIFI rate from the first WIFI rate and the second WIFI rate, and determine the working mode corresponding to the WIFI rate as the first working mode. In this way, the accuracy of determining the first working mode can be improved.

[0049] Exemplarily, the above-mentioned parallel mode includes a first parallel mode and a second parallel mode. The first parallel mode is that the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, and the working bandwidth of the WIFI communication is a first working bandwidth. The second parallel mode is that the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, and the working bandwidth of the WIFI communication is a second working bandwidth, and the first working bandwidth is different from the second working bandwidth.

[0050] Wherein, when the electronic device determines that the first WIFI rate is less than the preset rate, determining the second WIFI rate of the electronic device in the parallel mode includes:

[0051] When determining that the first WIFI rate is less than the preset rate, the electronic device determines a third WIFI rate of the electronic device in the first parallel mode and a fourth WIFI rate of the electronic device in the second parallel mode;

[0052] The electronic device determines the highest WIFI rate between the third WIFI rate and the fourth WIFI rate as the second WIFI rate.

[0053] In the present application, if the first WIFI rate is lower than the preset rate, it is necessary to select the highest WIFI rate from the first parallel mode and the second parallel mode as the second WIFI rate, so that the accuracy of determining the first working mode can be improved.

[0054] In a possible implementation, the first working bandwidth is 20 Mhz, and the second working bandwidth is 40 Mhz.

[0055] In a possible implementation, the communication method further includes:

[0056] After the electronic device uses the first antenna for WIFI communication and the second antenna for Bluetooth communication, that is, after the electronic device enters an independent transmission state, the electronic device determines a second communication indicator threshold, and the second communication indicator threshold includes a second WIFI received signal strength threshold;

[0057] Comparing the latest communication indicator with the second communication indicator threshold to determine whether the electronic device meets the third preset condition;

[0058] When the latest communication indicator meets the third preset condition, the electronic device uses the first antenna to perform Bluetooth communication and WIFI communication; wherein the third preset condition includes that the WIFI received signal strength is less than the second WIFI received signal strength threshold.

[0059] In the present application, after the electronic device uses different antennas for WIFI communication and Bluetooth communication, it is still necessary to determine the second communication indicator threshold, and compare the current communication indicator obtained in real time with the first communication indicator threshold to determine whether the electronic device uses the first antenna for Bluetooth communication and WIFI communication. In this way, antenna resources can be saved while ensuring the WIFI rate.

[0060] Exemplarily, the above-mentioned second communication indicator threshold also includes at least one of a second Bluetooth transmit power threshold, a second Bluetooth received signal strength threshold, a second Bluetooth signal-to-noise ratio threshold, a second Bluetooth bit error rate threshold, a second WIFI transmit power threshold, a second WIFI signal-to-noise ratio threshold and a second WIFI bit error rate threshold.

[0061] Correspondingly, the above-mentioned third preset condition also includes: at least one of the Bluetooth transmission power is less than the second Bluetooth transmission power threshold, the Bluetooth received signal strength is less than the second Bluetooth received signal strength threshold, the Bluetooth bit error rate is greater than the second Bluetooth bit error rate threshold, the WIFI transmission power is less than the second WIFI transmission power threshold, the WIFI signal-to-noise ratio is greater than the second WIFI signal-to-noise ratio threshold, the WIFI bit error rate is greater than the second WIFI bit error rate threshold, and the Bluetooth signal-to-noise ratio is greater than the second Bluetooth signal-to-noise ratio threshold.

[0062] In a possible implementation, the communication method further includes:

[0063] The electronic device determines the WIFI benefit when the time-sharing mode is switched to the parallel mode based on the WIFI rates corresponding to the different working modes during the process of determining the first working mode;

[0064] The communication index corresponding to when the WIFI benefit is greater than the preset benefit is used as the first communication index threshold.

[0065] In a possible implementation, the communication method further includes:

[0066] After determining the first working mode, the electronic device uses the communication index corresponding to the WIFI rate in the first working mode as the second communication index threshold when the WIFI rate in the first working mode is lower than the preset WIFI rate.

[0067] The preset WIFI rate may be the first WIFI rate of the electronic device in the time-sharing mode.

[0068] In the present application, the electronic device can determine the first communication indicator threshold and the second communication indicator threshold according to the WIFI rate corresponding to different working modes. In this way, it can be ensured that when the electronic device encounters communication parameters not included in the configuration table, it can also determine the relevant information through autonomous learning. After the learning is completed, it is added to the corresponding configuration table to facilitate quick finding of relevant information from the configuration table, saving learning costs.

[0069] In a possible implementation, the electronic device may upload the latest communication parameters, the first working mode, the first communication indicator threshold, and the second communication indicator threshold to the server, wherein the latest communication parameters include at least one of the latest Bluetooth encoding format, the latest router identification information, and the isolation degree.

[0070] In the application, after the electronic device updates the configuration table, it can upload the updated configuration table to the server. In this way, other electronic devices can obtain the updated configuration table from the server, so that other electronic devices can quickly find the corresponding working mode, the first communication indicator threshold and the second communication indicator threshold from the updated configuration table, and other electronic devices are no longer required to determine whether the electronic device meets the second preset condition, which effectively simplifies the processing process and improves the processing efficiency of the electronic device.

[0071] In the application, the electronic device can upload the updated first configuration table to the server periodically or in real time, wherein the resource overhead caused by uploading the first configuration table after each update can be avoided by periodically uploading the first configuration table.

[0072] In a second aspect, the present application provides an electronic device, comprising a display screen, a memory, a Bluetooth module, a WIFI module and one or more processors; the display screen, the memory, the Bluetooth module, the WIFI module and the processor are coupled; the Bluetooth module is used for Bluetooth communication, the WIFI module is used for WIFI communication, the display screen is used to display an image generated by the processor, the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.

[0073] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0074] In a fourth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0075] In a fifth aspect, a chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method as described above.

[0076] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0078] Figure 2 A structural block diagram of a communication system provided in an embodiment of the present application;

[0079] Figure 3 A schematic diagram of a Bluetooth communication and WIFI communication scenario provided in an embodiment of the present application Figure 1 ;

[0080] Figure 4 A schematic diagram of a Bluetooth communication and WIFI communication scenario provided in an embodiment of the present application Figure 2 ;

[0081] Figure 5 A schematic diagram of a Bluetooth communication and WIFI communication scenario provided in an embodiment of the present application Figure 3 ;

[0082] Figure 6 A schematic diagram of a shared antenna provided in an embodiment of the present application Figure 1 ;

[0083] Figure 7 A schematic diagram of a shared antenna provided in an embodiment of the present application Figure 2 ;

[0084] Figure 8 A schematic diagram of an independent antenna provided in an embodiment of the present application;

[0085] Fig. 9 A schematic flow chart of a communication method provided in an embodiment of the present application Figure 1 ;

[0086] Fig.10 A schematic flow chart of a communication method provided in an embodiment of the present application Figure 2 ;

[0087] Fig.11 A schematic flow chart of a communication method provided in an embodiment of the present application Figure 3 . DETAILED DESCRIPTION

[0088] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0089] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0090] The technical solution of the embodiment of the present application is applied to various electronic devices that can support WIFI communication mode and Bluetooth communication mode. For example, the electronic device can be a mobile phone, a smart watch, a smart bracelet, a tablet computer, a desktop computer, a laptop computer, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device.

[0091] Figure 1 is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiment of the present application, such as Figure 1As shown, the electronic device 100 may include a processor 110, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a button 190, a motor 191, an indicator 192, cameras 1-N 193, a display screen 194, and subscriber identification module (SIM) card interfaces 1-N 195, etc. Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0092] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0093] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0094] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0095] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0096] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, etc.

[0097] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0098] 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 a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0099] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0100] In the application embodiment, the mobile communication module may also be referred to as a cellular module, and the two may be described interchangeably.

[0101] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker, a receiver, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0102] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (WIFI) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. In some embodiments, at least some functional modules of the wireless communication module 160 can be set in the processor 110.

[0103] The wireless communication module 160 may include a Bluetooth module and a WIFI module. The Bluetooth module is used to implement the Bluetooth communication mode, that is, the electronic device 100 can communicate using the Bluetooth communication mode. The WIFI module is used to implement the WIFI communication mode, that is, the electronic device 100 can communicate using the WIFI communication mode.

[0104] In some embodiments, the Bluetooth module and the WIFI module may work in time-sharing mode using the same antenna, or the Bluetooth module and the WIFI module may work in parallel using different antennas.

[0105] Exemplarily, the operating frequency bands of the Bluetooth module and the WIFI module can be different, or they can overlap, such as being the same. That is to say, the operating frequency bands of the electronic device 100 when performing Bluetooth communication and WIFI communication can be different, or they can overlap. For example, the working modules of the Bluetooth module and the WIFI module are both 2.4GHZ. Exemplarily, the operating bandwidth of the WIFI communication is 40Mhz, 20Mhz or other values, and this application is not limited to it. The operating bandwidth here refers to the frequency band bandwidth, that is, the transmission frequency width of the router to which the electronic device 100 is connected to implement the WIFI communication.

[0106] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0107] In some embodiments, the Bluetooth module of the wireless communication module 160 may share an antenna with the WIFI module to implement Bluetooth communication and WIFI communication through time-division multiplexing.

[0108] In some embodiments, the Bluetooth module in the wireless communication module 160 and the mobile communication module 150 share a common antenna to enable Bluetooth communication and WIFI communication to be performed simultaneously.

[0109] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0110] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device 100 through the power management module 141 .

[0111] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

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

[0113] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0114] The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture static images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0115] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0116] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, speakers, receivers, microphones, headphone interfaces, and application processors.

[0117] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.

[0118] The speaker, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker.

[0119] The receiver, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver close to the human ear.

[0120] A microphone, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0121] The headphone jack is used to connect a wired headphone, and the headphone jack may be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0122] The external memory interface 120 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 .

[0123] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0124] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0125] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0126] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0127] Figure 2 is a structural block diagram of the communication system of the embodiment of the present application. Figure 2 As shown, the communication system may include an electronic device 100, a router 200 and a Bluetooth device 300. The electronic device 100 may access the WIFI signal of the router 200, and the electronic device 100 may be connected to the Bluetooth device 300 via a Bluetooth communication method. The electronic device 100 may communicate using both the Bluetooth communication method and the WIFI communication method. For example, while the electronic device 100 is surfing the Internet using the WIFI communication method based on the router 200, it may communicate (such as data transmission) with the Bluetooth device 300 based on the Bluetooth communication method. For another example, while the electronic device 100 is communicating with the Bluetooth device 300 based on the Bluetooth communication method, it may be surfing the Internet using the WIFI communication method based on the router 200.

[0128] Among them, the Bluetooth device 300 can be any device that can achieve Bluetooth connection, for example, the Bluetooth device 300 can be a mobile phone, a smart watch, a smart bracelet, a tablet computer, a desktop computer, a laptop computer, a Bluetooth handle, a Bluetooth headset or a Bluetooth speaker, a Bluetooth desk lamp, Bluetooth augmented reality (AR) glasses and other devices.

[0129] In an example, the electronic device 100 is a mobile phone, and the Bluetooth device 300 is a Bluetooth headset. After the mobile phone is connected to the Bluetooth headset via Bluetooth communication, the following information can be displayed: Figure 3 The logo 1 shown. The mobile phone uses WIFI communication mode to make a video call with the other party. For example, the mobile phone can send audio and video data on the mobile phone side to the other party through WIFI communication mode, and receive audio and video data on the other party side sent by the other party. And the Bluetooth headset connected to the mobile phone can play the sound data on the other party side and collect the sound data on the mobile phone side. Here, the mobile phone uses Bluetooth communication mode and WIFI communication mode at the same time.

[0130] In another example, the electronic device 100 is a mobile phone, and the Bluetooth device 300 is a Bluetooth controller. After the mobile phone is connected to the Bluetooth controller via Bluetooth communication, it can control the virtual character in the game screen to perform corresponding instructions. In this game scene, the control data of the Bluetooth controller needs to be transmitted to the mobile phone via Bluetooth communication, and the mobile phone needs WIFI communication to obtain and display the game screen data.

[0131] In another example, the electronic device 100 is a mobile phone F and the Bluetooth device 300 is a mobile phone G. Mobile phone F can establish a Bluetooth connection with any device with Bluetooth enabled. Mobile phone F uses Douyin via WIFI communication. TM During the application process, mobile phone F needs to transfer files to mobile phone G (such as ALB20) based on Bluetooth communication. Mobile phone F can be paired with mobile phone G first. Figure 4 As shown in FIG. 1 , after pairing is completed, mobile phone F can send a file transfer request to mobile phone G, and a pop-up window of “Bluetooth Sharing: Incoming Files” can be displayed on mobile phone G. In response to the user triggering the accept control in the pop-up window, mobile phone G can receive the file (such as the file) transmitted by mobile phone F based on the Bluetooth communication mode. Figure 5 shown).

[0132] When the electronic device 100 communicates using the WIFI communication mode and the Bluetooth communication mode, the electronic device can use a time-sharing mode to perform Bluetooth communication and WIFI communication, that is, the Bluetooth module and the WIFI module in the electronic device can work in a time-sharing manner by multiplexing one antenna, such as multiplexing one antenna by time-sharing through a switch in the electronic device. Specifically, Figure 6 As shown, when the switch in the electronic device is connected to the Bluetooth module, the antenna sends and receives Bluetooth signals, the Bluetooth module works, that is, it is in a working state, and the electronic device can perform Bluetooth communication; when the switch is connected to the WIFI module, the antenna sends and receives WIFI signals, the WIFI module works, that is, it is in a working state, and the electronic device can perform WIFI communication. It can be seen that in the process of multiplexing an antenna, the WIFI module or Bluetooth module in the electronic device 100 cannot work continuously, but work in time-sharing. Figure 7 As shown, the WIFI module can work (such as transmitting data 11 and transmitting data 12) in the WIFI time period (or described as the first time period), and the Bluetooth module does not work in the WIFI time period. After the WIFI time period ends and enters the Bluetooth time period, the Bluetooth module can work (such as transmitting data 21 and transmitting data 22), and the WIFI module may not work. It can be seen that the WIFI module and the Bluetooth module work in time sharing, that is, they work alternately. In other words, the Bluetooth module or the WIFI module only transmits data in their respective working time periods, and does not transmit data at other times. That is, in the same time period, the electronic device 100 can only transmit Bluetooth data (or describe Bluetooth communication) or transmit WIFI data (or describe Bluetooth communication), and the Bluetooth module and the WIFI module alternately occupy time domain resources, that is, alternately occupy antenna resources.

[0133] However, in the process of WIFI communication and Bluetooth communication in the electronic device using the time-sharing mode, the WIFI module and the Bluetooth module in the electronic device need to seize the antenna resources, and cannot work continuously, that is, cannot transmit data continuously, resulting in a large data transmission delay and low real-time performance. However, the data transmission in some scenes has high real-time requirements, that is, the quality requirements for the WIFI communication mode / Bluetooth communication mode are relatively high. If the time-sharing mode is used for WIFI communication and Bluetooth communication, the quality of the WIFI communication mode / Bluetooth communication mode is low and cannot meet the user's needs. Exemplary, in the scene of the above-mentioned video call, the mobile phone receives and emits video data through the WIFI communication mode, and sends audio data to the Bluetooth headset through the Bluetooth communication mode, and receives the audio data collected by the Bluetooth headset. However, since the mobile phone adopts the time-sharing mode for Bluetooth communication and WIFI communication, the electronic device cannot receive and emit video data in real time during part of the time, thereby causing the problem of sound or picture jamming. For another example, in the above-mentioned game scene, the mobile phone cannot use the antenna for WIFI communication during part of the time, so that during this part of the time, the mobile phone cannot obtain the game screen data in real time, thereby causing the game screen to jam.

[0134] In some embodiments, in order to avoid the low real-time performance of data transmission due to the time-division multiplexing of the WIFI module and the Bluetooth module, that is, to ensure the quality of WIFI communication and / or Bluetooth communication, the electronic device may include a first antenna (or called a WIFI antenna) and a second antenna. The Bluetooth module in the electronic device uses the second antenna for communication, and the WIFI module uses the WIFI antenna for communication, and the Bluetooth module uses an antenna independent of the WIFI antenna for Bluetooth communication. In this way, the electronic device can use different antennas for Bluetooth communication and WIFI communication in parallel. Figure 8 As shown, the WIFI module uses antenna 1a (i.e., the first antenna mentioned above) for WIFI communication, and the Bluetooth module uses antenna 1b (i.e., the second antenna mentioned above) for Bluetooth communication. The Bluetooth module and the WIFI module do not need to work in time-sharing mode, and different antennas can be used to work simultaneously. The time domain resources that the WIFI module and the Bluetooth module can each occupy are greatly increased, that is, the time length that can continuously transmit data is greatly increased, which is conducive to solving the problem of resource preemption. However, in some cases, electronic devices do not need to use different antennas to perform Bluetooth communication and WIFI communication in parallel, resulting in a waste of resources.

[0135] It can be understood that when the space of the electronic device is large enough, the electronic device may include an independent second antenna set for the Bluetooth module. The antenna may be an antenna exclusively used by the Bluetooth module and used for Bluetooth communication.

[0136] Alternatively, the second antenna may be a cellular antenna in an electronic device. When the number of cellular antennas of the cellular module in the electronic device is large, the Bluetooth module in the electronic device may reuse a cellular antenna to perform Bluetooth communication, so that the Bluetooth module and the WIFI module in the electronic device may work in parallel without adding antennas, that is, the electronic device may perform Bluetooth communication and WIFI communication in parallel. This design not only saves costs, but also does not require additional space in the electronic device, does not require the size of the electronic device to be changed, and does not affect the appearance design and product stability of the electronic device.

[0137] It should be understood that the Bluetooth module generally works in the 2.4Ghz frequency band. In the case where the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, if the working frequency band of the WIFI module is also 2.4Ghz, it will overlap with the working frequency band of the Bluetooth module for the most part. Therefore, when the WIFI module works in the 2.4Ghz working frequency band, if the isolation between the antenna used by the WIFI module and the antenna used by the Bluetooth module is not large enough, the mutual transmission function of the WIFI module and the Bluetooth module will affect the performance of each other, and the WIFI communication and the Bluetooth communication will affect each other.

[0138] It can be understood that when the Bluetooth module performs Bluetooth communication (such as transmitting data), it is necessary to encode the data based on the Bluetooth encoding method. Among them, the encoding rates corresponding to different Bluetooth encoding methods may be different. Exemplarily, as shown in Table 1, the encoding rate (or bit rate) of advanced audio coding (AAC) can be 128-392kbps, and the encoding rate of LDAC can be 330-990kbps.

[0139] Table 1

[0140]

[0141] Exemplarily, it can be seen from Table 1 above that Bluetooth encoding methods may include sub-band coding (SBC), AAC, aptX, aptX-HD, aptX-adaptive, LDAC, LHDC, LC3, LC3Plus, etc. Among them, SBC is suitable for low-rate audio scenarios, such as voice calls and other scenarios. AAC and LDAC are both suitable for high-rate audio scenarios, such as music, games, video calls and other scenarios. Of course, the Bluetooth encoding method shown in Table 1 above is only an example, and the Bluetooth module can also use other Bluetooth encoding methods to encode data, which is not limited by this application.

[0142] Among them, the sampling rate (also called sampling speed or sampling frequency) indicates the number of samples extracted from the continuous signal (analog signal) and composed into a discrete signal (digital signal) per unit time. The bit rate indicates the rate at which the signal is processed or transmitted through the system, that is, the amount of data processed or transmitted per unit time. It can be understood that the higher the bit rate, the clearer the sound quality. Total Harmonic Distortion + Noise (THD + N) is a major performance indicator of an audio power amplifier and a condition for the rated output power of an audio power amplifier. It is used to reflect the degree of distortion after the sound is amplified. The signal-to-noise ratio refers to the ratio of the strength of the received useful signal to the strength of the received interference signal (noise and interference).

[0143] It should be noted that the greater the Bluetooth coding rate (equivalent to the bit rate in Table 1 above), the greater the Bluetooth transmission power, the longer the Bluetooth transmission time, and therefore, the more serious the impact of Bluetooth on WiFi. Similarly, the greater the WIFI coding rate, the greater the WIFI transmission power, the longer the WIFI transmission time, and therefore, the more serious the impact of WIFI on Bluetooth.

[0144] Therefore, in order to reduce the waste of resources and ensure the communication quality, when the electronic device in the present application is performing WIFI communication, if the electronic device has the need to use different antennas for WIFI communication and Bluetooth communication, it indicates that when the electronic device is performing WIFI communication and Bluetooth communication, the communication quality of WIFI communication and / Bluetooth communication may be low. Therefore, in order to improve the communication quality and avoid the waste of resources, the electronic device can determine whether the current communication index (i.e., the latest communication index) of the electronic device meets the second preset condition, that is, determine whether the electronic device needs to enter an independent transmission state, in other words, determine whether the communication quality of the WIFI communication and / Bluetooth communication of the electronic device is low. If the current communication index of the electronic device meets the second preset condition, it indicates that the communication quality of the WIFI communication and / Bluetooth communication of the electronic device is low, and the electronic device can adopt a parallel mode, use different antennas for Bluetooth communication and WIFI communication, that is, the electronic device can enter an independent transmission state, thereby ensuring the communication quality. If the current communication index of the electronic device does not meet the second preset condition, it indicates that the communication quality of the electronic device is high, and the electronic device can continue to adopt a branch mode, using one antenna for Bluetooth communication and WIFI communication, thereby avoiding unnecessary parallel mode and reducing the waste of resources.

[0145] It should be noted that 2.4Ghz wireless technology is a short-distance wireless transmission technology. Among them, 2.4GHz refers to a working frequency band. Working in the 2.4GHz frequency band can obtain a larger range of use and stronger anti-interference ability. It should be noted that 2.4GHz does not actually correspond to a specific value, but to a range. For example, the frequency range of the 2.4Ghz working frequency band is 2.4Ghz~2.48Ghz. The working frequency bands of Bluetooth modules and WIFI modules can both include the 2.4Ghz frequency band.

[0146] For ease of description, the following continues to take the operating frequency band of the WIFI module and the Bluetooth module in the electronic device as 2.4Ghz, and the operating bandwidth of the WIFI module includes 40Mhz and / or 20Mhz as an example to provide a detailed description of the embodiments of the present application.

[0147] Fig. 9 1 is a flow chart of a communication method provided in an embodiment of the present application. The execution subject of the communication method may be an electronic device, and exemplarily, may be a processor or chip in the electronic device. For the convenience of description, the communication method is described in detail by taking the electronic device as an example.

[0148] S801: When the electronic device performs WIFI communication, the electronic device determines whether the electronic device meets a first preset condition.

[0149] It can be understood that when the electronic device meets the first preset condition, the electronic device uses the first antenna for Bluetooth communication and WIFI communication. Among them, the first preset condition indicates that the electronic device needs to use (i.e. should use) an exclusive antenna for Bluetooth communication, that is, the electronic device needs to enter the Bluetooth independent transmission state. The Bluetooth independent transmission state indicates that the electronic device can use a parallel mode for Bluetooth communication and WIFI communication, that is, the antenna used by the electronic device for Bluetooth communication and WIFI communication may not be the same. In other words, the antenna used by the Bluetooth module in the electronic device is different from the antenna used by the WIFI module in the electronic device.

[0150] Exemplarily, the above-mentioned first preset condition indicates that the quality of WIFI communication and / or Bluetooth communication of the electronic device is low. The first preset condition may include that the electronic device starts to perform Bluetooth communication, or, in the process of the electronic device using a time-sharing mode to perform Bluetooth communication and WIFI communication, the communication quality value of the target communication mode of the electronic device is lower than the preset quality value. Among them, the target communication mode includes a WIFI communication mode and / or a Bluetooth communication mode. Among them, starting Bluetooth communication in this application means that Bluetooth enters a scanning state, a pairing state, or other states that require the Bluetooth module to use an antenna for Bluetooth communication (such as the electronic device successfully connects to other devices) from an off state.

[0151] In one example, the first preset condition may include that the electronic device starts to perform Bluetooth communication. When the electronic device performs WIFI communication but does not perform Bluetooth communication, when the electronic device starts to perform Bluetooth communication, in order to ensure the communication quality and avoid mutual interference between Bluetooth communication and WIFI communication, the electronic device may have a need to enter a Bluetooth independent transmission state, that is, the electronic device meets the first preset condition. If the electronic device does not start Bluetooth communication, the electronic device does not meet the first preset condition.

[0152] In another example, the first preset condition includes that during the process of the electronic device using the time-sharing mode for Bluetooth communication and WIFI communication, the communication quality value of the target communication mode is lower than the preset quality value. During the process of the electronic device using the time-sharing mode for WIFI communication and Bluetooth communication, if the communication quality value of the WIFI communication mode and / or the Bluetooth communication mode is higher than or equal to the preset quality value, it indicates that the electronic device in the time-sharing mode has good transmission performance, the electronic device can continue to use the time-sharing mode for Bluetooth communication and WIFI communication, the electronic device does not need to use the parallel mode for Bluetooth communication and WIFI communication, that is, there is no need to enter an independent transmission state, and the electronic device does not meet the first preset condition. If the communication quality value of the WIFI communication mode or the Bluetooth communication mode is less than the preset quality value, the electronic device has a need to enter an independent transmission state, the electronic device has a need to use the parallel mode for Bluetooth communication and WIFI communication, and the electronic device meets the first preset condition.

[0153] In some embodiments, the above-mentioned communication quality value may include a rate, and correspondingly, the above-mentioned preset quality value may include a preset rate. For example, the above-mentioned target communication mode includes a WIFI communication mode. In the process of the electronic device using the time-sharing mode for WIFI communication and Bluetooth communication, if the WIFI rate of the electronic device is higher than or equal to the preset rate, it indicates that the WIFI communication quality of the electronic device in the time-sharing mode is good and the transmission performance is good. Therefore, the electronic device can determine that the electronic device does not need to enter the Bluetooth independent transmission state, and the electronic device does not meet the first preset condition, so there is no need to use an additional antenna for communication, which can reduce unnecessary waste of resources. If the WIFI rate of the electronic device is lower than the preset rate, it indicates that the WIFI communication quality of the electronic device in the time-sharing mode is poor and the transmission performance is poor. Therefore, in order to try to obtain better WIFI transmission performance, the electronic device determines that it has the need to enter the Bluetooth independent transmission state, and the electronic device meets the first preset condition.

[0154] It should be understood that the above rate is only an example parameter of the communication quality value, and the electronic device may also use other parameters to represent the communication quality value, such as other parameters may include received signal strength indicator (RSSI), transmission power, bit error rate, signal-to-noise ratio, etc. That is to say, the electronic device may determine that the communication quality value of the target communication mode is lower than the preset quality value and the communication quality of the target communication mode may be poor when the electronic device meets the following conditions. The conditions include: the rate of the target communication mode is greater than or equal to the preset rate, the received signal strength of the target communication mode is greater than the preset received signal strength, the transmission power of the target communication mode is greater than or equal to the preset transmission power, the bit error rate of the target communication mode is less than or equal to the preset bit error rate, and the signal-to-noise ratio of the target communication mode is greater than or equal to the preset signal-to-noise ratio. One or more of the conditions.

[0155] The transmission power is the signal strength transmitted by the electronic device to the base station. That is, when the electronic device is far away from the router, the WiFi transmission power is higher; or when the Bluetooth device is far away from the electronic device, the Bluetooth transmission power is also higher. The symbol error rate (SER) is an indicator to measure the accuracy of data transmission within a specified time.

[0156] It should be noted that the initial working modes of WIFI communication and Bluetooth communication are both time-sharing modes. In this working mode, the electronic device reuses the antenna to perform WIFI communication and Bluetooth communication in time-sharing mode. Among them, the working bandwidth of WIFI communication in the time-sharing mode can be 40Mhz or 20Mhz, which is not specifically limited.

[0157] In an embodiment of the present application, when the above-mentioned electronic device does not meet the first preset condition, it is determined that the electronic device does not need to enter an independent transmission state, and the electronic device executes S802; when the above-mentioned electronic device meets the first preset condition, it is determined that the electronic device needs to determine whether to enter an independent transmission state, and the electronic device can execute S803.

[0158] S802. The electronic device performs Bluetooth communication and WIFI communication in a time-sharing mode.

[0159] Specifically, if the electronic device does not meet the first preset condition, it is determined that the electronic device adopts a time-sharing mode to perform Bluetooth communication and WIFI communication.

[0160] S803: The electronic device determines a first Bluetooth coding format.

[0161] Among them, the first Bluetooth coding format represents the coding format corresponding to the Bluetooth communication method used by the electronic device, that is, the coding format used for Bluetooth communication. It can be understood that after the electronic device determines that the communication state of the electronic device meets the first preset condition, it can determine that the electronic device has a need to perform Bluetooth communication by means of an exclusive antenna. Therefore, the electronic device can use the first Bluetooth coding format to determine whether the electronic device needs to continue Bluetooth communication by means of an exclusive antenna, that is, whether to enter an independent transmission state.

[0162] It should be understood that, in the case of determining that the electronic device meets the first preset condition, if the electronic device does not use the Bluetooth coding format, the electronic device can periodically or in real time detect whether the electronic device uses the Bluetooth coding format until it detects that the electronic device uses the Bluetooth coding format to encode the data, and then stops detecting. The detected Bluetooth coding format can be the first Bluetooth coding format. For example, the electronic device can use the Bluetooth coding format to encode the data when transmitting business data to other devices. Therefore, in the case of determining that the electronic device meets the first preset condition, if the electronic device is currently in a scanning state and has not yet transmitted business data to other devices, the electronic device cannot obtain the Bluetooth coding format, so the electronic device can continue to detect. When the electronic device starts to use the Bluetooth coding format to transmit business data to other devices, the Bluetooth coding format can be the first Bluetooth coding format. It can be seen that the first Bluetooth coding format in the present application can be the Bluetooth coding format that is most recently determined by the electronic device when the electronic device meets the first preset condition.

[0163] In some possible implementations, the first Bluetooth encoding format may include a first Bluetooth encoding method, such as SBC, AAC, APTX, LDAC, LHDC, etc.

[0164] In some other possible implementations, the first Bluetooth encoding format may include a first Bluetooth encoding mode and a coding rate corresponding to the first Bluetooth encoding mode, such as LDAC 990kbps. Of course, the first Bluetooth encoding format may also include other formats, which are not limited in this application.

[0165] It can be understood that, since different Bluetooth coding methods may correspond to different coding rates, some Bluetooth coding methods (such as SBC) may correspond to a single value, some Bluetooth coding methods may correspond to a range of coding rates, and some Bluetooth coding methods (such as LDAC) may correspond to a larger range of coding rates, while some Bluetooth coding methods (such as AAC) may correspond to a smaller range of coding rates. Therefore, for Bluetooth coding methods with a larger coding rate range, the first Bluetooth coding format may include the first Bluetooth coding method and the coding rate corresponding to the first Bluetooth coding method; for Bluetooth coding methods with a smaller coding rate range and Bluetooth coding methods with a single value of coding rate, the first Bluetooth coding format may only include the first Bluetooth coding method.

[0166] S804: The electronic device determines a first communication indicator threshold corresponding to the first Bluetooth coding format.

[0167] Specifically, after the electronic device determines the first Bluetooth coding format (i.e., the latest Bluetooth coding format), the first communication indicator threshold corresponding to the first Bluetooth coding format can be determined from the second configuration table. The first communication indicator threshold is a threshold for entering an independent transmission state. The second configuration table may include at least one Bluetooth coding format and the communication indicator threshold corresponding to each Bluetooth coding format in the at least one Bluetooth coding format.

[0168] It should be noted that the first communication indicator threshold is pre-set based on the benefit of WIFI. The benefit refers to the degree of improvement in WIFI speed when the electronic device switches from the time-sharing mode for Bluetooth communication and WIFI communication to the parallel mode for Bluetooth communication and WIFI communication (or simply stated, the working mode of the electronic device switches from the time-sharing mode to the parallel mode). The higher the WIFI benefit, the better the improvement effect of WIFI speed.

[0169] In some embodiments, the communication indicator includes a WIFI received signal strength, and the communication indicator threshold includes a WIFI received signal strength threshold.

[0170] In other embodiments, of course, the above-mentioned WIFI received signal strength is only an example, and the communication index may not include the WIFI received signal strength, and its communication index may include at least one of WIFI transmission power, WIFI bit error rate, Bluetooth transmission power, Bluetooth received signal strength, Bluetooth bit error rate, and WIFI signal-to-noise ratio. In other words, the communication index may not include the WIFI received signal strength, and it may include at least one of WIFI received signal strength, WIFI transmission power, WIFI bit error rate, WIFI signal-to-noise ratio, Bluetooth transmission power, Bluetooth received signal strength, Bluetooth bit error rate, and Bluetooth signal-to-noise ratio. Correspondingly, the communication index threshold may also include at least one of the WIFI received signal strength threshold, WIFI transmission power threshold, WIFI bit error rate threshold, WIFI signal-to-noise ratio threshold, Bluetooth transmission power threshold, Bluetooth received signal strength threshold, Bluetooth bit error rate threshold, and Bluetooth signal-to-noise ratio threshold. Among them, the communication index threshold corresponds to the communication index one by one.

[0171] Exemplarily, the stronger the WIFI received signal strength, the higher the WIFI rate, and the higher the WIFI benefit. The WIFI received signal strength can affect the WIFI benefit. As shown in Table 2, the electronic device uses Bluetooth communication to play the music of the electronic device through a Bluetooth headset, and connects to router A to realize the WIFI communication mode. When the WIFI received signal strength is greater than -45dB, the WIFI rate is the largest and the WIFI benefit is the best. When the WIFI received signal strength is between -70 and -72dB, the WIFI rate is the smallest and the WIFI benefit is the worst. Compared with the Bluetooth coding format of ACC, the Bluetooth coding format is LDAC, and the coding rate is 330kbps and 990kbps, the WIFI benefit is the best. Therefore, the communication indicator threshold corresponding to the Bluetooth coding format LDAC is higher than the communication indicator threshold corresponding to the Bluetooth coding format AAC.

[0172] In some embodiments, the Bluetooth encoding format is LDAC, and the WIFI reception signal strength threshold under the encoding rate of 990kbps can be set to -60dB, and the WIFI reception signal strength threshold under the Bluetooth encoding format is AAC can be set to -70dB.

[0173] In some embodiments, the working bandwidth corresponding to the router A in the test scenario shown in Table 2 is 20 MHz, the working bandwidth corresponding to the WIFI communication mode of the electronic device is 20 MHz, and the distance between the electronic device and the router A is 20 cm.

[0174] Table 2

[0175]

[0176] In some embodiments, it can be seen from Table 1 above that there is a corresponding coding rate for the Bluetooth coding format. The higher the coding rate corresponding to the Bluetooth coding format, the higher the Bluetooth transmission power, the more Bluetooth transmission time, and correspondingly, the less WIFI transmission time in the electronic device, that is, in the time-sharing mode, the greater the impact of Bluetooth communication on the quality of WIFI communication. For example, when the Bluetooth coding format corresponding to the Bluetooth communication mode of the electronic device is LDAC, and the coding rate corresponding to the LDAC is 330kbps, the WIFI communication quality of the electronic device is higher than the WIFI communication quality when the coding rate corresponding to the LDAC is 990kbps.

[0177] Specifically, the WIFI rate when the coding rate is 330kbps is significantly different from the WIFI rate when the coding rate is 990kbps. Therefore, when the electronic device meets the first preset condition, it can use the first Bluetooth coding format and the first coding rate corresponding to the first Bluetooth coding format to determine whether the electronic device enters an independent transmission state. Among them, the first coding rate represents the coding rate of the electronic device when using the first Bluetooth coding format. Correspondingly, the electronic device can use the relevant configuration table to find the first communication indicator threshold corresponding to the first Bluetooth coding format and the first coding rate. The relevant configuration table may include at least one Bluetooth coding format, at least one coding rate corresponding to each Bluetooth coding format, and a first communication indicator threshold corresponding to a coding rate corresponding to the Bluetooth coding format and the Bluetooth coding format. Here, the coding rate in at least one coding rate corresponding to the Bluetooth coding format in the configuration table can be a specific value or a range.

[0178] It should be noted that, due to limited space and other reasons, the distance between antennas in electronic devices is relatively close, and the isolation between antennas is relatively small. Therefore, when the electronic device is performing Bluetooth communication, the signal transmitted through Bluetooth will affect the receiving signal of other devices, that is, the greater the Bluetooth transmission power of the transmitting end, although it will not affect the transmitting end, the greater the impact on the receiving end, and the lower the WIFI rate of the receiving end (such as the electronic device). As shown in Table 3, when the Bluetooth transmission power is PL8, the WIFI rate corresponding to the downlink of the electronic device is the largest; when the Bluetooth transmission power is PL10, the WIFI rate corresponding to the downlink is the smallest. Afterwards, the electronic device can determine that the benefit when the Bluetooth transmission power is PL8 is higher than the benefit when the Bluetooth transmission power is PL10. In some embodiments, in the test scenario shown in Table 3, the electronic device is connected to a Bluetooth headset with an encoding format of AAC through a Bluetooth communication method, and the music of the electronic device is played through the Bluetooth headset. The working bandwidth corresponding to the WIFI communication method of the electronic device is 20MHz. The distance between the electronic device and the router is 20cm. The electronic device uses parallel mode to perform Bluetooth communication and WIFI communication respectively.

[0179] Table 3

[0180]

[0181] Among them, downlink (DL) refers to the physical channel of the signal from the base station to the mobile station, that is, the downlink indicates that the electronic device receives data sent by other devices based on the Bluetooth communication method. Uplink (UL) refers to the physical channel of the signal from the mobile station to the base station, that is, the uplink indicates that other devices send data to the electronic device based on the Bluetooth communication method.

[0182] In some embodiments, the electronic device can search for the first communication indicator threshold corresponding to the latest communication parameters from a configuration table (such as the second configuration table described above), that is, the first communication indicator threshold corresponding to the current communication parameters. Exemplarily, the latest communication parameters may include the latest Bluetooth encoding format, the identifier of the latest router, the latest encoding rate (or referred to as the first encoding rate), and the latest isolation (or referred to as the first isolation), and the working bandwidth of the latest router. Of course, the first communication indicator threshold can also be a fixed value or value range directly. When the first preset condition is met, the electronic device can directly obtain the first communication indicator threshold without using the latest communication parameters to determine it.

[0183] S805, the electronic device compares the first communication indicator threshold with the latest communication indicator to determine whether the latest communication indicator meets the second preset condition.

[0184] Exemplarily, the electronic device determines whether the latest communication indicator meets the second preset condition. If the latest communication indicator meets the second preset condition, the electronic device can determine to enter the independent transmission state, and the electronic device can execute S806; if the latest communication indicator does not meet the second preset condition, the electronic device can execute S807.

[0185] In some embodiments, the second preset condition may include that the WIFI received signal strength is greater than the first WIFI received signal strength threshold.

[0186] In other embodiments, of course, the second preset condition including that the WIFI received signal strength is greater than the first WIFI received signal strength threshold is only an example, and the second preset condition may also not include that the WIFI received signal strength is greater than the first WIFI received signal strength threshold. That is to say, the second preset condition may include at least one of the WIFI received signal strength being greater than the first WIFI received signal strength threshold, the Bluetooth transmission power being greater than the first Bluetooth transmission power threshold, the Bluetooth received signal strength being greater than the first Bluetooth received signal strength threshold, the Bluetooth bit error rate being less than the first Bluetooth bit error rate threshold, the WIFI transmission power being greater than the first WIFI transmission power threshold, the WIFI signal-to-noise ratio being less than the first WIFI signal-to-noise ratio threshold, the WIFI bit error rate being less than the first WIFI bit error rate threshold, and the Bluetooth signal-to-noise ratio being less than the first Bluetooth signal-to-noise ratio threshold.

[0187] In one example, the current communication indicator (i.e., the latest communication indicator) includes the current (i.e., the latest) WIFI received signal strength, the above-mentioned first communication indicator threshold includes the first WIFI received signal strength threshold, and the second preset condition may include that the WIFI received signal strength is greater than the first WIFI received signal strength threshold. The electronic device can determine whether the latest WIFI received signal strength is greater than the first WIFI received signal strength threshold. If the latest WIFI received signal strength is greater than the first WIFI received signal strength threshold, it indicates that after the electronic device switches from the time-sharing mode to the parallel mode, the WIFI benefit of the electronic device is greater, then it is determined that the electronic device meets the second preset condition and can enter the independent transmission state; if the latest WIFI received signal strength is less than or equal to the first WIFI received signal strength threshold, it is determined that the electronic device does not meet the second preset condition and may not enter the independent transmission state.

[0188] For example, taking the first WIFI reception signal strength threshold of -60dB as an example, if the current WIFI reception signal strength is -55dB, it means that the current WIFI reception signal strength is greater than the WIFI reception signal strength threshold, so the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the current WIFI reception signal strength is -63dB, it means that the WIFI reception signal strength is less than the WIFI reception signal strength threshold, so the electronic device does not meet the second preset condition and can not enter the independent transmission state for Bluetooth communication.

[0189] In another example, the current communication indicator includes the latest Bluetooth transmission power, the first communication indicator threshold includes the first Bluetooth transmission power threshold, and the second preset condition may include that the Bluetooth transmission power is greater than the first Bluetooth transmission power threshold. The electronic device determines whether the latest Bluetooth transmission power is greater than the first Bluetooth transmission power threshold. If the latest Bluetooth transmission power is greater than the first Bluetooth transmission power threshold, it is determined that the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the latest Bluetooth transmission power is less than or equal to the first Bluetooth transmission power threshold, it is determined that the electronic device does not meet the second preset condition and may not enter the independent transmission state for Bluetooth communication.

[0190] In another example, the current communication indicator includes the latest Bluetooth received signal strength, the first communication indicator threshold includes the first Bluetooth received signal strength threshold, and the second preset condition may include that the Bluetooth received signal strength is greater than the first Bluetooth received signal strength threshold. The electronic device determines whether the latest Bluetooth received signal strength is greater than the first Bluetooth received signal strength threshold. If the latest Bluetooth received signal strength is greater than the first Bluetooth received signal strength threshold, it is determined that the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the latest Bluetooth received signal strength is less than or equal to the first Bluetooth received signal strength threshold, it is determined that the electronic device does not meet the second preset condition, and therefore, it may not enter the independent transmission state for Bluetooth communication.

[0191] In another example, the current communication indicator includes the latest Bluetooth bit error rate, the first communication indicator threshold includes the first Bluetooth bit error rate threshold, and the second preset condition may include that the Bluetooth bit error rate is less than the first Bluetooth bit error rate threshold. The electronic device determines whether the latest Bluetooth bit error rate is less than the first Bluetooth bit error rate threshold. If the latest Bluetooth bit error rate is less than the first Bluetooth bit error rate threshold, it means that the Bluetooth communication is seriously interfered by the WIFI communication, that is, the data transmission quality of the Bluetooth module is poor. Therefore, it is determined that the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the latest Bluetooth bit error power is greater than or equal to the first Bluetooth bit error rate threshold, it is determined that the electronic device does not meet the second preset condition and can not enter the independent transmission state for Bluetooth communication.

[0192] In another example, the current communication indicator includes the latest WIFI transmission power, and the first communication indicator threshold includes the first WIFI transmission power threshold. The above-mentioned second preset condition may include that the WIFI transmission power is greater than the first WIFI transmission power threshold. The electronic device determines whether the latest WIFI transmission power is greater than the first WIFI transmission power threshold. If the latest WIFI transmission power is greater than the first WIFI transmission power threshold, it is determined that the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the latest WIFI transmission power is less than or equal to the first WIFI transmission power threshold, it is determined that the electronic device does not meet the second preset condition and may not enter the independent transmission state for Bluetooth communication.

[0193] In another example, the current communication indicator includes the latest WIFI bit error rate, and the first communication indicator threshold includes the first WIFI bit error rate threshold. The above-mentioned second preset condition may include that the WIFI bit error rate is less than the first WIFI bit error rate threshold. The electronic device determines whether the latest WIFI bit error rate is less than the first WIFI bit error rate threshold. If the latest WIFI bit error rate is less than the first WIFI bit error rate threshold, it means that the WIFI communication is seriously interfered by the Bluetooth communication, that is, the data transmission quality of the WIFI module is poor. Therefore, it is determined that the electronic device meets the second preset condition and can enter the independent transmission state for Bluetooth communication; if the latest WIFI bit error power is greater than or equal to the first WIFI bit error rate threshold, it is determined that the electronic device does not meet the second preset condition and may not enter the independent transmission state for Bluetooth communication.

[0194] In another example, the current communication indicator includes the latest WIFI signal-to-noise ratio, and the first communication indicator threshold includes the first WIFI signal-to-noise ratio threshold. The above-mentioned second preset condition may include that the WIFI signal-to-noise ratio is less than the first WIFI signal-to-noise ratio threshold. The electronic device determines whether the latest WIFI signal-to-noise ratio is less than the first WIFI signal-to-noise ratio threshold. If the latest WIFI signal-to-noise ratio is less than the first WIFI signal-to-noise ratio threshold, it means that the WIFI signal is more affected by interference signals (such as noise), that is, the WIIF communication quality is poor. Therefore, the electronic device can determine that the electronic device meets the second preset condition and enters an independent transmission state for Bluetooth communication; if the latest WIFI signal-to-noise ratio is greater than or equal to the first WIFI signal-to-noise ratio threshold, it is determined that the electronic device does not meet the second preset condition and may not enter an independent transmission state for Bluetooth communication.

[0195] In another example, the current communication indicator includes the latest Bluetooth signal-to-noise ratio, and the first communication indicator threshold includes the first Bluetooth signal-to-noise ratio threshold. The above-mentioned second preset condition may include that the Bluetooth signal-to-noise ratio is less than the first Bluetooth signal-to-noise ratio threshold. The electronic device determines whether the latest Bluetooth signal-to-noise ratio is less than the first Bluetooth signal-to-noise ratio threshold. If the latest Bluetooth signal-to-noise ratio is less than the first Bluetooth signal-to-noise ratio threshold, it means that the Bluetooth communication quality is poor. The electronic device can determine that the electronic device meets the second preset condition and enters an independent transmission state for Bluetooth communication; if the latest Bluetooth signal-to-noise ratio is greater than or equal to the first Bluetooth signal-to-noise ratio threshold, it is determined that the electronic device does not meet the second preset condition and may not enter an independent transmission state for Bluetooth communication.

[0196] The above describes the process of how the electronic device determines whether the electronic device meets the second preset condition when the current communication indicator includes an indicator and the second preset condition includes a condition. Of course, in some embodiments, the current communication indicator may also include multiple indicators, and accordingly, the second preset condition may also include multiple conditions, that is, the second preset condition may include the condition corresponding to each indicator in the multiple indicators. In this case, for each indicator in the current communication indicator, the electronic device determines whether the electronic device meets the condition corresponding to the indicator. If the electronic device meets the condition corresponding to each indicator, the electronic device can determine that the electronic device meets the second preset condition. If the electronic device does not meet the condition corresponding to at least one indicator, the electronic device can determine that the electronic device does not meet the second preset condition.

[0197] For example, the current communication indicator may include the current WIFI received signal strength and the current WIFI transmit power. The second preset condition may include the two conditions that the WIFI received signal strength is greater than the first WIFI received signal strength threshold, and the WIFI transmit power is greater than the first WIFI transmit power threshold. If the latest WIFI received signal strength of the electronic device is greater than the first WIFI received signal strength threshold, and the latest WIFI transmit power is greater than the first WIFI transmit power threshold, it can be determined that the electronic device meets the second preset condition.

[0198] Alternatively, if the electronic device meets the condition corresponding to at least one indicator, the electronic device can determine that the electronic device meets the second preset condition. If the electronic device does not meet the conditions corresponding to all indicators, the electronic device can determine that the electronic device does not meet the second preset condition.

[0199] S806. The electronic device enters an independent transmission state.

[0200] Specifically, when the electronic device determines that the electronic device meets the second preset condition, it means that the electronic device can use the first antenna for WIFI communication and the second antenna for Bluetooth communication, that is, the electronic device can enter an independent transmission state.

[0201] S807. The electronic device performs Bluetooth communication and WIFI communication in a time-sharing mode.

[0202] Specifically, when the electronic device does not meet the second preset condition, it indicates that the quality of Bluetooth communication / WIFI communication is good. Therefore, in order to reduce the waste of resources, there is no need to use different antennas for Bluetooth communication and WIFI communication. Therefore, the electronic device can adopt a time-sharing mode for Bluetooth communication and WIFI communication.

[0203] In some embodiments, due to the difference in performance of different models of routers, different models of routers can directly affect the WIFI rate of the electronic device connected to the router. Exemplarily, as shown in Table 4 below, in a scenario where Bluetooth is turned on but not scanned (WIFI occupies the antenna exclusively), the electronic device performs WIFI communication and does not perform Bluetooth communication, and WIFI communication occupies the antenna exclusively. This scenario can be compared to a scenario where different antennas are used to perform WIFI communication and Bluetooth communication in parallel. Therefore, the transmission performance of the electronic device when using different antennas to perform WIFI communication and Bluetooth communication in parallel can be compared to the transmission performance in this scenario. And the WIFI rate when the electronic device uses a time-sharing mode to perform WIFI communication and Bluetooth communication can be known from Table 4.

[0204] Table 4

[0205]

[0206]

[0207] It should be understood that the TCP shown in Table 4 above refers to the transmission control protocol. UDP refers to the user datagram protocol. The UL above refers to the uplink, and the DL above refers to the downlink.

[0208] The data shown in Table 4 above are obtained by testing when the distance between the electronic device and the router is close (such as 20cm). It can be seen from Table 4 above that in different scenarios, the model and working bandwidth of the router will affect the WIFI rate. Specifically, under the same scenario and the same router, the WIFI rate corresponding to the 40MHz working bandwidth is higher than the WIFI rate corresponding to the 20MHz working bandwidth, indicating that since the 40MHz working bandwidth is suitable for short-distance transmission, the WIFI rate corresponding to the 40MHz working bandwidth is higher. Under the same scenario and the same working bandwidth, the WIFI rate corresponding to router A and the WIFI rate corresponding to router B are respectively higher than the WIFI rate corresponding to router C. The WIFI rate corresponding to router A and the WIFI rate corresponding to router B are respectively higher than the WIFI rate corresponding to router D. Since the retransmission strategies under different models of routers are different, the WIFI rates corresponding to different routers are also different. Under the same working bandwidth of the same router, the WIFI rate corresponding to the Bluetooth on but not scanning scenario is higher than the WIFI rate corresponding to the AAC scenario. The WIFI rate corresponding to the AAC scenario and the WIFI rate corresponding to the Bluetooth on but not scanning scenario are higher than the WIFI rate corresponding to the LDAC scenario. Since the encoding rate of LDAC is higher than the encoding rate of AAC, and the Bluetooth on but not scanning scenario is a scenario without Bluetooth encoding, the higher the encoding rate, the lower the WIFI rate. Here, the AAC scenario and the LDAC scenario refer to the encoding of data based on the AAC encoding format and the LDAC encoding format when the electronic device performs Bluetooth communication.

[0209] In some embodiments, based on the test process corresponding to Table 2 above, relevant personnel conducted the test process of router B, router C and router D, and obtained the data shown in Table 5. Table 5 includes the WIFI rate of the electronic device after turning off Bluetooth under different routers and different WIFI receiving signal strengths, as well as the WIFI rate in time-sharing mode and parallel mode under different Bluetooth encoding formats and the corresponding benefits.

[0210] Table 5

[0211]

[0212]

[0213] It should be noted that, as can be seen from Table 5 above, the WIFI speeds of different routers are also different. Overall, the WIFI speed of router A is higher, while the WIFI speed of router B is lower. Therefore, based on the above analysis, different models of routers will affect the WIFI speed.

[0214] In a possible implementation, the first communication indicator threshold value may also be pre-set according to the router and / or the working bandwidth. For example, taking the first communication indicator threshold value as the first WIFI received signal strength threshold value as an example, if the transmission performance of the router is better, the first WIFI received signal strength threshold value may be higher; if the transmission performance of the router is worse, the first WIFI received signal strength threshold value may be lower. If the working bandwidth is higher, the first WIFI received signal strength threshold value may be higher; if the working bandwidth is lower, the set first WIFI received signal strength threshold value may be lower. In this way, the accuracy of determining the first communication indicator threshold value may be improved.

[0215] As shown in Table 5 above, for example, under router A, when the Bluetooth encoding format is AAC, the working mode is time-sharing mode, and the working bandwidth of WIFI communication is the WIFI rate at 40Mhz (i.e., 248, 283, 242, 294) higher than the parallel mode, and the working bandwidth of WIFI communication is the WIFI rate at 20Mhz (i.e., 138, 148, 201, 190). At this time, when the electronic device is in time-sharing mode and the working bandwidth of WIFI communication is 40Mhz, the WIFI transmission performance of the electronic device is better.

[0216] It is understandable that electronic devices can be connected to routers of different models for WIFI communication. Since the performance of routers of different models is different, the router can directly affect the working mode of the electronic device for WIFI communication and Bluetooth communication.

[0217] For example, under router A, when the Bluetooth service corresponds to LDAC, the rates of WIFI communication and Bluetooth communication in the time-sharing mode are low. In other words, the WIFI rate in the parallel mode is high.

[0218] For another example, under router C, no matter which Bluetooth encoding format the Bluetooth service corresponds to, the speed of time-sharing WIFI communication and Bluetooth communication is poor. In other words, the WIFI speed in the parallel mode is high.

[0219] In this application, different types of routers will affect the working modes of the WIFI module and the Bluetooth module. In some scenarios, the working modes of electronic devices under different routers will be different, and accordingly, the first preset indicator thresholds corresponding to different types of routers may be different. For example, the transmission performance of the electronic device is good when performing WIFI communication and Bluetooth communication in time-sharing under router A, but the transmission performance of WIFI communication and Bluetooth communication in parallel under router B is good. In other scenarios, when the router is the same, the working modes of the electronic device with good transmission performance under different Bluetooth services will also be different. For example, for the same router, the transmission performance of the electronic device is good when performing WIFI communication and Bluetooth communication in time-sharing under router A, but the transmission performance of WIFI communication and Bluetooth communication in parallel under router B is good.

[0220] Exemplarily, the working module may include a time-sharing mode and a parallel mode, and the parallel mode may include a first parallel mode and a second parallel mode.

[0221] Time-sharing mode: a time-sharing mode for Bluetooth communication and WIFI communication. The working bandwidth of WIFI communication is not limited. For example, the working bandwidth of WIFI communication can be 40Mhz or 20Mhz. In this working mode, the electronic device reuses the antenna to perform WIFI communication and Bluetooth communication in time-sharing, or the electronic device can also use different antennas to perform WIFI communication and Bluetooth communication in time-sharing.

[0222] First parallel mode: a parallel mode of WIFI communication and Bluetooth communication, and the working bandwidth of WIFI communication is the first working bandwidth. In this working mode, the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel. Exemplarily, the first working bandwidth is 20Mhz.

[0223] Second parallel mode: parallel mode of WIFI communication and Bluetooth communication, and the working bandwidth of WIFI communication is the second working bandwidth. In this working mode, the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel. Exemplarily, the second working bandwidth is 40Mhz.

[0224] In the above parallel mode, generally, the working bandwidth of Bluetooth communication includes the bandwidth in the working frequency band except the working bandwidth of WIFI communication (20Mhz or 40Mhz). However, in special cases, the working bandwidth of Bluetooth communication may also include a small amount of working bandwidth of WIFI communication.

[0225] It should be noted that the working bandwidth of WIFI communication in the above three working modes represents the maximum working bandwidth that can be used for WIFI communication. When the electronic device performs WIFI communication, the working bandwidth actually used is not necessarily the maximum working bandwidth that can be used for WIFI communication. The specific situation is related to the configuration of the router. If the bandwidth supported by the router includes the maximum working bandwidth that can be used for WIFI communication, then the working bandwidth actually used by the electronic device for WIFI communication can be the maximum working bandwidth; if the bandwidth supported by the router is less than the maximum working bandwidth, then the working bandwidth actually used by the electronic device for WIFI communication is less than the maximum working bandwidth. For example, the electronic device determines that the working bandwidth of WIFI communication is 40Mhz, but the router only supports a working bandwidth of 20Mhz, then the working bandwidth actually used by the electronic device for WIFI communication is 20Mhz. For another example, if the electronic device determines that the maximum working bandwidth of WIFI communication is 40Mhz, and the router also supports a working bandwidth of 40Mhz, then the working bandwidth actually used by the electronic device for WIFI communication can be 40Mhz.

[0226] It should be understood that although the above-mentioned embodiments of the present application are proposed with a working frequency band of 2.4Ghz and a working bandwidth of 40Mhz or 20Mhz, they should not be construed as limiting the embodiments of the present application. For example, the working frequency bands of WIFI communication and Bluetooth communication are not necessarily limited to 2.4Ghz. As long as the working frequency bands of the two overlap, it can be determined whether it is necessary to enter an independent transmission state; for another example, the working bandwidth of WIFI communication is not necessarily limited to 40Mhz or 20Mhz, but can also be other values. For example, 30Mhz, 50Mhz.

[0227] In the communication method provided by the embodiment of the present application, when the working frequency bands of the WIFI module and the Bluetooth module in the electronic device overlap (for example, the working frequency bands of the WIFI module and the Bluetooth module are both 2.4Ghz), the electronic device can obtain the first communication index threshold after determining that the electronic device meets the first preset condition, and then compare the current communication index obtained in real time with the first communication index threshold to determine whether the electronic device can use different antennas for WIFI communication and Bluetooth communication, so that the interference between WIFI communication and Bluetooth communication can be reduced and good transmission performance can be maintained, which not only improves the flexibility of the system, but also improves the stability of the system. And it can also reduce the waste of resources.

[0228] In some embodiments, after determining that the electronic device meets the first preset condition, the electronic device can use the relevant configuration table to determine whether the hardware resources of the electronic device can meet the requirements of the parallel mode. If so, the electronic device can determine whether it is necessary to enter the independent transmission state by using the first communication indicator threshold. Fig.10 S901-S905 in the figure introduces the process of the electronic device directly determining the first working mode using the configuration table.

[0229] S901: The electronic device determines a first communication parameter of the electronic device, where the first communication parameter includes at least one of a first Bluetooth encoding format, identification information of a first router, and a first isolation level.

[0230] Among them, the first communication parameter represents the latest communication parameter of the electronic device. The first router (or current router, latest router) represents the router used by the electronic device for WIFI communication. That is, the WIFI signal provided by the first router to which the electronic device is connected. The first isolation (or current isolation) represents the isolation between antennas. The isolation between antennas represents the ratio between the signal power transmitted by a certain antenna and the signal strength power received at another antenna, that is, the isolation between antennas represents the output attenuation degree of the transmitted signal of a certain antenna to another antenna. The larger the ratio, the smaller the isolation, the better. In this embodiment, the isolation between antennas is the isolation between the above-mentioned first antenna and the above-mentioned second antenna.

[0231] Exemplarily, the identification information of the first router may be the model number, name, etc. of the first router. The first Bluetooth encoding format may be referred to as the current Bluetooth encoding format or the latest Bluetooth encoding format.

[0232] S902: The electronic device determines whether there is a working mode identifier corresponding to the first communication parameter in the first configuration table.

[0233] Exemplarily, if the working mode identifier corresponding to the first communication parameter exists in the first configuration table, the electronic device may execute S903; if the working mode identifier corresponding to the first communication parameter does not exist in the first configuration table, the electronic device may execute S904.

[0234] S903: The electronic device determines the working mode identifier corresponding to the first communication parameter from the first configuration table to obtain the first working mode.

[0235] Among them, the first working mode is the working mode corresponding to the working mode identifier corresponding to the first communication parameter. The first configuration table (or described as a whitelist) includes communication parameters and the corresponding working mode identifier, and the communication parameters may include at least one of the following information: Bluetooth encoding format, identification information of the router, and isolation range. Among them, the working mode may include parallel mode and branch mode. In some embodiments, the parallel mode may include a first parallel mode and a second parallel mode. For example, the communication parameters may include Bluetooth encoding format and identification information of the router. The first configuration table includes at least one Bluetooth encoding format, identification information of at least one router, and a working mode identifier corresponding to a Bluetooth encoding format and an identification of a router. For another example, the first communication parameter may include Bluetooth encoding format, identification information of a router, and isolation range. The first configuration table includes at least one Bluetooth encoding format, identification information of at least one router, at least one isolation, and a working mode identifier corresponding to a Bluetooth encoding format, identification information of a router, and an isolation range.

[0236] The following will take the above-mentioned working mode including the branch mode and the parallel mode, the parallel mode including the first parallel mode and the second parallel mode, and the communication parameters may include the Bluetooth encoding format, the router identification, and the isolation range as an example to introduce the process of the electronic device determining the first working mode.

[0237] The electronic device obtains the first communication parameter including the first Bluetooth encoding format (ie, AAC), the identification information of the first router (ie, A), and the isolation degree a, which is less than a 2 , combined with the first configuration table shown in Table 6, the electronic device can determine that the first working mode is the time-sharing mode. In a possible implementation, the working bandwidth corresponding to the time-sharing mode can also be determined by the first configuration table, such as 40Mhz shown in Table 6.

[0238] Table 6

[0239]

[0240] The following describes in detail the relationship between the isolation between antennas determined in Table 6 and a1 (ie, the first isolation threshold) and a2 (ie, the second isolation threshold).

[0241] It should be understood that the first isolation threshold is related to the 40Mhz working bandwidth of WIFI communication. Among them, the isolation between antennas is fixed and can be directly obtained.

[0242] In one example, if the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, it indicates that the isolation between the first antenna and the second antenna is large enough to meet the requirements of the second parallel mode, that is, the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, and the working bandwidth of WIFI communication is 40Mhz, and the interference between the transmissions of the two communications is reduced, that is, the interference level is within an acceptable range. Therefore, the electronic device can continue to use the first communication indicator threshold to determine whether it is necessary for the electronic device to use the parallel mode to perform Bluetooth communication and WIFI communication.

[0243] In another example, if the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, it indicates that the isolation between the first antenna and the second antenna is still not large enough to meet the requirements of the second parallel mode. In short, the electronic device cannot support the parallel mode, so the electronic device can determine that the working mode is the time-sharing mode, and there is no need to use the first communication indicator threshold to determine whether the electronic device adopts the parallel mode.

[0244] In another example, the electronic device may determine whether the isolation between the first antenna and the second antenna is greater than a second isolation threshold, wherein the second isolation threshold is less than the first isolation threshold, and the second isolation threshold is related to the 20 MHz working bandwidth of WIFI communication.

[0245] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the second isolation threshold, it indicates that the isolation between the first antenna and the second antenna is large, and can meet the requirements of the first parallel mode, that is, meet the requirements of using different antennas for parallel WIFI communication and Bluetooth communication, and the working bandwidth of WIFI communication is 20Mhz. In this way, the transmission interference between the two communications is not large, or in other words, the interference is within an acceptable range.

[0246] It can be understood that when the isolation between antennas is small, there will be greater interference in the transmission process, which will reduce the working bandwidth of WIFI communication and effectively reduce interference.

[0247] In another example, if the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the second isolation threshold, it indicates that the isolation between the first antenna and the second antenna is very small and cannot meet the requirement of using different antennas for parallel WIFI communication and Bluetooth communication, and the working bandwidth of WIFI communication is 20Mhz.

[0248] In some embodiments, the second antenna may be determined by the following implementation methods.

[0249] In some implementations, the second antenna is a cellular antenna. Since cellular communication and Bluetooth communication share an antenna, and the electronic device includes multiple cellular antennas, the electronic device can determine the second antenna from the multiple cellular antennas based on the idleness of the cellular communication and the isolation between each of the multiple cellular antennas and the first antenna. The implementation process of determining the second antenna from the multiple cellular antennas can refer to the following two possible examples.

[0250] In an example, when cellular communication is not busy, the electronic device may determine an antenna with the greatest isolation from the first antenna among the multiple cellular antennas as the second antenna.

[0251] In another example, when cellular communication is not busy, if N antennas among the multiple cellular antennas meet the isolation requirement, that is, the N antennas meet the requirement that the isolation to the second antenna is greater than a preset value, then the electronic device may also use the N antennas among the multiple cellular antennas that meet the isolation requirement as the second antenna, where N is greater than 1. For example, when N=2, the electronic device has two cellular antennas whose isolation with the first antenna meets the isolation requirement, and then both of the two cellular antennas may be used as the second antenna.

[0252] In other embodiments, the second antenna is an antenna exclusively for Bluetooth (referred to as Bluetooth antenna). If there is only one Bluetooth antenna in the electronic device, then the second antenna is this antenna. If the electronic device includes multiple Bluetooth antennas, then the electronic device can determine the second antenna from the multiple Bluetooth antennas based on the isolation between each Bluetooth antenna in the multiple Bluetooth antennas and the first antenna. The implementation process of determining the second antenna from the multiple Bluetooth antennas can refer to the following two possible examples.

[0253] In one example, the electronic device may determine the one of the multiple Bluetooth antennas that has the greatest isolation from the first antenna as the second antenna. In another example, the electronic device may determine N antennas that meet the isolation requirements of the multiple Bluetooth antennas as the second antenna.

[0254] It should be understood that the above-mentioned method of determining the second antenna is only for illustrative purposes, and any method capable of determining the second antenna is feasible, and the present application embodiment does not impose any limitation thereto.

[0255] It should be noted that the above-mentioned first configuration table may be pre-configured in the electronic device. For example, when the electronic device leaves the factory, the first configuration table is pre-configured inside the device. Alternatively, the first configuration table may also be obtained by the electronic device from a server. For example, the electronic device may periodically send a request to the server to obtain the first configuration table. Alternatively, the server may also periodically actively send the first configuration table to the electronic device. Alternatively, the first configuration table is generated by autonomous learning by the electronic device in the process of determining whether to enter an independent transmission state based on the use of an indicator threshold. The first configuration table may be continuously updated.

[0256] It should be noted that if the first configuration table does not contain the first communication parameter, or does not contain the working mode corresponding to the electronic device, it indicates that the electronic device cannot directly determine the first working mode using the first configuration table, and thus cannot accurately determine whether the electronic device should enter the independent transmission state. In this way, unnecessary waste of resources can be reduced.

[0257] S904, for each working mode, the electronic device determines the WIFI rate in the working mode, wherein the first working mode is the working mode corresponding to the highest WIFI rate among the WIFI rates in each working mode.

[0258] Specifically, when the first configuration table does not contain the identification information of the electronic device determining the first Bluetooth coding format and / or the first router, the electronic device can collect the WIFI rate in the corresponding working mode for different working modes, and use the working mode with the highest WIFI rate as the first working mode. For example, if the electronic device is currently in the time-sharing mode, the electronic device can directly collect the WIFI rate in the time-sharing mode. Afterwards, the electronic device can switch to the parallel mode to collect the WIFI rate in the parallel mode.

[0259] Of course, the WIFI rates in the above different working modes can also be collected and saved by the electronic device when the electronic device is in the corresponding working mode. Afterwards, when the WIFI rates in different working modes of the electronic device are needed, they can be directly obtained.

[0260] For example, if the electronic device determines that the WIFI rate of the electronic device in the time-sharing mode is 5 Mbps and the WIFI rate in the parallel mode is 80 Mbps, the first working mode is the parallel mode.

[0261] In a possible implementation, when there is no working mode identifier corresponding to the first communication parameter in the first configuration table, the determination process of the above-mentioned first working mode may include: the electronic device determines the first WIFI rate of the electronic device in the time-sharing mode, and if the first WIFI rate is greater than the preset rate, it means that the transmission rate when WIFI and Bluetooth share the antenna is very high, and the first working mode is the time-sharing mode, and there is no need to use the first communication indicator threshold to determine whether it is necessary to enter the independent transmission state.

[0262] When the electronic device determines that the first WIFI rate is less than the preset rate, it indicates that the WIFI communication quality is poor. Therefore, the electronic device needs to determine the second WIFI rate when the electronic device enters the independent transmission state. If the second WIFI rate is higher than the first WIFI rate, it indicates that the WIFI rate in the parallel mode is higher, and the above-mentioned first working mode can be the parallel mode.

[0263] In some embodiments, it is described above that when it is determined that the electronic device meets the first preset condition, the electronic device uses the first configuration table to determine the first working mode. Of course, the electronic device may also first use the first configuration table to determine the first working mode (such as executing the above S901-S904). After obtaining the first working mode, if the first working mode is a time-sharing mode, the electronic device no longer needs to continue to determine whether the electronic device meets the first preset condition; if the first working mode is a parallel mode, it indicates that the hardware resources of the electronic device can meet the requirements of the parallel mode. Therefore, the electronic device can continue to determine whether the electronic device meets the first preset condition, that is, to determine whether the electronic device has the need to enter an independent transmission state.

[0264] In a possible implementation, in order to improve the accuracy of determining the first working mode, after the electronic device determines that the above-mentioned first WIFI rate (i.e., the WIFI rate in the time-sharing mode) is less than the preset rate, it is necessary to determine the WIFI rate of the electronic device in the parallel mode, such as the third WIFI rate corresponding to the first parallel mode and the fourth WIFI rate corresponding to the second parallel mode. After that, the electronic device can use the parallel mode corresponding to the maximum value of the third WIFI rate corresponding to the first parallel mode and the fourth WIFI rate corresponding to the second parallel mode as the first working mode. For example, the first WIFI rate of the electronic device in the time-sharing mode is 5Mpbs. Since the first WIFI rate is low, the electronic device may need to enter an independent transmission state. However, after the electronic device enters the independent transmission state for Bluetooth communication, it is determined that the third WIFI rate of the electronic device in the first parallel mode is 80Mbps, and the fourth WIFI rate of the electronic device in the second parallel mode is 100Mbps. The fourth WIFI rate is higher than the third WIFI rate. Therefore, the first working mode can be the second parallel mode.

[0265] In another possible implementation, when the above-mentioned first WIFI rate (i.e., the WIFI rate in the time-sharing mode) is less than the preset rate, the electronic device compares the third WIFI rate and the fourth WIFI rate with the preset WIFI rate (or called the preset rate) respectively, and takes the working mode corresponding to the WIFI rate greater than the preset WIFI rate as the first working mode.

[0266] For example, if the third WIFI rate and the fourth WIFI rate are both greater than the preset WIFI rate, the working mode corresponding to the maximum value of the third WIFI rate and the fourth WIFI rate can be used as the first working mode; if the third WIFI rate and the fourth WIFI rate are both less than or equal to the preset WIFI rate, the working mode corresponding to the maximum value of the first WIFI rate, the third WIFI rate and the fourth WIFI rate needs to be used as the first working mode.

[0267] S905: The electronic device determines whether the first operating mode is a parallel mode.

[0268] Exemplarily, if yes, it indicates that the electronic device can support the parallel mode, and it can continue to determine whether it is necessary for the electronic device to enter the parallel mode, and the electronic device can execute step S804; if no, it indicates that the electronic device may not be able to meet the hardware resources required for the parallel mode, and if it enters the parallel mode, the communication quality will be improved less or even worse. Therefore, there is no need for the electronic device to enter the parallel mode, and the electronic device can execute step S906.

[0269] In the present application, when the electronic device determines that the first working mode is a parallel mode, it indicates that the hardware resources of the electronic device meet the resources required for the independent transmission state, and the electronic device can use the parallel mode for Bluetooth communication and WIFI communication. The electronic device can determine the first communication indicator threshold corresponding to the first Bluetooth coding format from the above-mentioned second configuration table, so as to use the first communication indicator threshold to determine whether it is necessary for the electronic device to enter an independent transmission state; if the electronic device determines that the first working mode is a time-sharing mode, it indicates that the hardware resources of the electronic device cannot meet the resources required for the independent transmission state, and then it can be directly determined to use the time-sharing mode for Bluetooth communication and WIFI communication.

[0270] S906. The electronic device performs Bluetooth communication and WIFI communication in a time-sharing mode.

[0271] S804: The electronic device determines a first communication indicator threshold corresponding to the first Bluetooth coding format.

[0272] Exemplarily, after the electronic device determines that the first working mode is the parallel mode, the first communication indicator threshold corresponding to the latest (i.e., current) communication parameter (such as the first Bluetooth encoding format) can be determined from the third configuration table. The third configuration table includes communication parameters, working mode identifiers, and the first communication indicator threshold corresponding to the communication parameters and the working mode identifier.

[0273] For example, the third configuration table may include at least one Bluetooth encoding format, at least one router identification information, at least one isolation range, at least one working mode identification (or described as the first working mode), and a first communication indicator threshold value corresponding to a working mode identification, a Bluetooth encoding format, a router identification information, and an isolation range. For example, if the Bluetooth encoding format is LDAC 990kbps, the router identification information is A, and the isolation between the antennas is a, the a is greater than the first isolation threshold value a. 1 Through Table 7, the electronic device can determine that the working mode is identified as the parallel mode + 40Mhz (i.e., the second parallel mode), and the first communication indicator threshold can include: Bluetooth transmission power threshold BT TX1, Bluetooth received signal strength threshold BT RSSI1, Bluetooth bit error rate threshold BT BTBLER 1, WIFI transmission power threshold WIFITX1, WIFI received signal strength threshold WIFI RSSI1, WIFI bit error rate threshold WIFI BTBLER 1, and WIFI signal-to-noise ratio threshold WIFI SNR1, etc.

[0274] It is understandable that, since the coding rate corresponding to some Bluetooth coding formats (such as Bluetooth coding formats other than LDAC) is a single value or a relatively small rate range, the electronic device does not need to distinguish the coding rate acquisition.

[0275] Table 7

[0276]

[0277]

[0278] It should be understood that the third configuration table and the second configuration table may belong to the same table or may be different tables.

[0279] Specifically, after the electronic device determines that the first working mode is the time-sharing mode, it can determine to use the time-sharing mode for Bluetooth communication and WIFI communication without entering an independent transmission state for Bluetooth communication, thus reducing unnecessary waste of resources.

[0280] In some embodiments, after the electronic device enters the independent transmission state, that is, in the process of using the parallel mode for Bluetooth communication and WIFI communication, it can also obtain the current communication index (i.e., the latest communication index) in real time and periodically, so as to use the current communication index to determine whether the electronic device exits the independent transmission state, so that the WIFI communication can enjoy the benefits of large bandwidth. Exemplarily, the process of exiting the independent transmission state can be as follows: Fig.11 Steps shown.

[0281] S1001: When the electronic device enters an independent transmission state to perform Bluetooth communication, determine a second communication indicator threshold corresponding to a first Bluetooth coding format.

[0282] Specifically, after determining that the electronic device enters an independent transmission state for Bluetooth communication, it is necessary to determine a second communication indicator threshold corresponding to the latest communication indicator (such as the first Bluetooth coding format, i.e., the latest Bluetooth coding format) from the fourth configuration table. Among them, the second communication indicator threshold represents the threshold of the communication indicator when exiting the independent Bluetooth antenna in the fourth configuration table. In some embodiments, generally speaking, the second communication indicator threshold is different from the above-mentioned first communication indicator threshold, and the second communication indicator threshold is less than the first communication indicator threshold. Of course, in some embodiments, the second communication indicator threshold may also be equal to the first communication indicator threshold.

[0283] Exemplarily, the fourth configuration table may include at least one Bluetooth encoding format, at least one router identification information, at least one isolation range, at least one working mode (or described as the first working mode), a first communication indicator threshold corresponding to a working mode, a Bluetooth encoding format, a router identification information and an isolation range, and a first communication indicator threshold corresponding to a working mode, a Bluetooth encoding format, a router identification information and an isolation range. For example, if the Bluetooth encoding format is LDAC 990kbps, the router identification information is A, and the isolation between antennas is a, the a is greater than the first isolation threshold a. 1 Through Table 8, the electronic device can determine that the second communication indicator threshold may include: Bluetooth transmission power threshold BT TX2, Bluetooth received signal strength threshold BT RSSI2, Bluetooth bit error rate threshold BT BTBLER 2, WIFI transmission power threshold WIFI TX2, WIFI received signal strength threshold WIFI RSSI2, WIFI bit error rate threshold WIFI BTBLER2, and WIFI signal-to-noise ratio threshold WIFI SNR2, etc.

[0284] Table 8

[0285]

[0286]

[0287] It should be noted that the first communication indicator threshold and the second communication indicator threshold in Table 8 are merely exemplary. In some instances, the first communication indicator threshold and the second communication indicator threshold may only include WIFI received signal strength RSSI; in some instances, the first communication indicator threshold and the second communication indicator threshold may include Bluetooth received signal strength RSSI and WIFI received signal strength RSSI, etc., without specific limitation.

[0288] It can be understood that if the first working mode is the time-sharing mode, it means that the electronic device does not need to enter the independent transmission state to perform Bluetooth communication, and therefore, there is no need to set the first communication indicator threshold and the second communication indicator threshold.

[0289] S1002: The electronic device compares the second communication indicator threshold with the latest communication indicator to determine whether the latest communication indicator meets a third preset condition.

[0290] Exemplarily, the electronic device determines whether the latest communication indicator meets the third preset condition. If so, the electronic device may determine to exit the independent transmission state, and the electronic device may execute S1003. If not, the electronic device may continue to be in the independent transmission state, and may execute S1004.

[0291] In some examples, the third preset condition may include that the WIFI received signal strength is less than the first WIFI received signal strength threshold.

[0292] In other embodiments, of course, the third preset condition including that the WIFI received signal strength is less than the first WIFI received signal strength threshold is only an example, and the third preset condition may also not include that the WIFI received signal strength is less than the first WIFI received signal strength threshold. That is to say, the third preset condition may include at least one of the following: the WIFI received signal strength is less than the first WIFI received signal strength threshold, the Bluetooth transmission power is less than the first Bluetooth transmission power threshold, the Bluetooth received signal strength is less than the first Bluetooth received signal strength threshold, the Bluetooth bit error rate is greater than the first Bluetooth bit error rate threshold, the WIFI transmission power is less than the first WIFI transmission power threshold, the WIFI signal-to-noise ratio is greater than the first WIFI signal-to-noise ratio threshold, the WIFI bit error rate is greater than the first WIFI bit error rate threshold, and the Bluetooth signal-to-noise ratio is greater than the first Bluetooth signal-to-noise ratio threshold.

[0293] It should be understood that the above configuration tables (such as the first configuration table, the second configuration table, the third configuration table and the fourth configuration table) can be one table or different tables, and this application is not limited thereto.

[0294] In one example, the current communication indicator includes WIFI received signal strength, the second communication indicator threshold includes a second WIFI received signal strength threshold, and the third preset condition may include that the WIFI received signal strength is less than the second WIFI received signal strength threshold. The electronic device determines whether the WIFI received signal strength is less than the second WIFI received signal strength threshold. If the WIFI received signal strength is less than the second WIFI received signal strength threshold, it means that the current electronic device has a low benefit value in parallel mode. The electronic device determines that the electronic device does not meet the third preset condition and can exit the independent transmission state without continuing to use the parallel mode for Bluetooth communication. In this way, while saving resources, the WIFI rate is maintained, thereby improving the user experience. If the WIFI received signal strength is greater than or equal to the WIFI received signal strength threshold, it means that the current electronic device still has a high benefit value in parallel mode, and therefore, it is still necessary to continue to use the parallel mode for Bluetooth communication, that is, the electronic device continues to enter the independent transmission state for Bluetooth communication.

[0295] For example, as shown in Table 5 above, taking router D and the encoding format of LDAC 990kbps as an example, when the WIFI receiving signal strength is -50dB, the gain is 155%; when the WIFI receiving signal strength is -60dB, the gain is 6%. Thus, it can be determined that the gain is low when the WIFI receiving signal strength is -60dB. Therefore, it is necessary to withdraw the independent Bluetooth antenna to reduce unnecessary waste of resources. Taking router C and the encoding format of LDAC 990kbps as an example, when the WIFI receiving signal strength is -70dB, the gain is still 462%, that is, even when the WIFI receiving signal strength is weak, the gain is still high. Therefore, the electronic device can continue to enter the independent transmission state for Bluetooth communication.

[0296] In another example, the current communication indicator includes the latest Bluetooth transmission power, the second communication indicator threshold includes the second Bluetooth transmission power threshold, and the third preset condition may include that the Bluetooth transmission power is less than the second Bluetooth transmission power threshold. The electronic device determines whether the latest Bluetooth transmission power is less than the second Bluetooth transmission power threshold. If the latest Bluetooth transmission power is less than the second Bluetooth transmission power threshold, it is determined that the electronic device meets the third preset condition and can exit the independent transmission state to perform Bluetooth communication; if the latest Bluetooth transmission power is greater than or equal to the second Bluetooth transmission power threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state to perform Bluetooth communication.

[0297] In another example, the current communication indicator includes the latest Bluetooth received signal strength, the second communication indicator threshold includes the second Bluetooth received signal strength threshold, and the third preset condition may include that the Bluetooth received signal strength is less than the second Bluetooth received signal strength threshold. The electronic device determines whether the latest Bluetooth received signal strength is less than the second Bluetooth received signal strength threshold. If the latest Bluetooth received signal strength is less than the second Bluetooth received signal strength threshold, it is determined that the electronic device meets the third preset condition and can exit the independent transmission state to perform Bluetooth communication; if the latest Bluetooth received signal strength is greater than or equal to the second Bluetooth received signal strength threshold, it is determined that the electronic device does not meet the third preset condition, and therefore, can continue to enter the independent transmission state to perform Bluetooth communication.

[0298] In another example, the current communication indicator includes the latest Bluetooth bit error rate, the second communication indicator threshold includes the second Bluetooth bit error rate threshold, and the second preset condition may include that the Bluetooth bit error rate is greater than the first Bluetooth bit error rate threshold. The electronic device determines whether the latest Bluetooth bit error rate is greater than the first Bluetooth bit error rate threshold. If the latest Bluetooth bit error rate is greater than the second Bluetooth bit error rate threshold, it means that the Bluetooth communication is less interfered by the WIFI communication, that is, the data transmission quality of the Bluetooth module is better. Therefore, it is determined that the electronic device meets the third preset condition and can exit the independent transmission state to perform Bluetooth communication; if the latest Bluetooth bit error power is less than or equal to the second Bluetooth bit error rate threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state for Bluetooth communication.

[0299] In another example, the current communication indicator includes the latest Bluetooth signal-to-noise ratio, and the second communication indicator threshold includes the second Bluetooth signal-to-noise ratio threshold. The above-mentioned third preset condition may include that the Bluetooth signal-to-noise ratio is greater than the second Bluetooth signal-to-noise ratio threshold. Specifically, the electronic device determines whether the latest Bluetooth signal-to-noise ratio is greater than the second Bluetooth signal-to-noise ratio threshold. If the latest Bluetooth signal-to-noise ratio is greater than the second Bluetooth signal-to-noise ratio threshold, it means that the Bluetooth signal is less affected by the interference signal (such as noise). Therefore, it is determined that the electronic device can meet the third preset condition and exit the independent transmission state to perform Bluetooth communication; if the latest Bluetooth signal-to-noise ratio is less than or equal to the second Bluetooth signal-to-noise ratio threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state for Bluetooth communication.

[0300] In another example, the current communication indicator includes the latest WIFI transmission power, and the second communication indicator threshold includes the second WIFI transmission power threshold. The third preset condition may include that the WIFI transmission power is less than the second WIFI transmission power threshold. The electronic device determines whether the latest WIFI transmission power is less than the second WIFI transmission power threshold. If the latest WIFI transmission power is less than the second WIFI transmission power threshold, it is determined that the electronic device meets the third preset condition and can exit the independent transmission state for Bluetooth communication; if the latest WIFI transmission power is greater than or equal to the second WIFI transmission power threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state for Bluetooth communication.

[0301] In another example, the current communication indicator includes the latest WIFI bit error rate, and the second communication indicator threshold includes the second WIFI bit error rate threshold. The above-mentioned third preset condition may include that the WIFI bit error rate is greater than the second WIFI bit error rate threshold. The electronic device determines whether the latest WIFI bit error rate is greater than the second WIFI bit error rate threshold. If the latest WIFI bit error rate is greater than the second WIFI bit error rate threshold, it means that the WIFI communication is less interfered by the Bluetooth communication, that is, the data transmission quality of the WIFI module is better. Therefore, it is determined that the electronic device meets the third preset condition and can exit the independent transmission state for Bluetooth communication; if the latest WIFI bit error power is less than or equal to the second WIFI bit error rate threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state for Bluetooth communication.

[0302] In another example, the current communication indicator includes the latest WIFI signal-to-noise ratio, and the second communication indicator threshold includes a second WIFI signal-to-noise ratio threshold. The above-mentioned third preset condition may include that the WIFI signal-to-noise ratio is greater than the second WIFI signal-to-noise ratio threshold. The electronic device determines whether the latest WIFI signal-to-noise ratio is greater than the second WIFI signal-to-noise ratio threshold. If the latest WIFI signal-to-noise ratio is greater than the second WIFI signal-to-noise ratio threshold, it means that the WIFI signal is less affected by the interference signal (such as noise). Therefore, it is determined that the electronic device can meet the third preset condition and exit the independent transmission state for Bluetooth communication; if the latest WIFI signal-to-noise ratio is less than or equal to the second WIFI signal-to-noise ratio threshold, it is determined that the electronic device does not meet the third preset condition and can continue to enter the independent transmission state for Bluetooth communication.

[0303] The above describes how the electronic device determines whether the electronic device satisfies the third preset condition when the current communication indicator includes one indicator and the third preset condition includes one condition.

[0304] Of course, in some embodiments, the current communication indicator may also include multiple indicators, and accordingly, the third preset condition may also include multiple conditions, that is, the third preset condition may include the condition corresponding to each indicator in the multiple indicators. In this case, for each indicator in the current communication indicator, the electronic device determines whether the electronic device meets the condition corresponding to the indicator. If the electronic device meets the condition corresponding to at least one indicator, the electronic device can determine that the electronic device meets the third preset condition. If the electronic device does not meet the conditions corresponding to all indicators, the electronic device can determine that the electronic device does not meet the third preset condition.

[0305] For example, the current communication indicator may include the current WIFI received signal strength and the current WIFI transmit power. The third preset condition may include the two conditions that the WIFI received signal strength is less than the second WIFI received signal strength threshold, and the WIFI transmit power is less than the second WIFI transmit power threshold. If the latest WIFI received signal strength of the electronic device is less than the second WIFI received signal strength threshold, or the latest WIFI transmit power is less than the second WIFI transmit power threshold, it can be determined that the electronic device meets the third preset condition.

[0306] Alternatively, if the electronic device meets the conditions corresponding to each indicator, the electronic device may determine that the electronic device meets the third preset condition. If the electronic device does not meet the conditions corresponding to at least one indicator, the electronic device may determine that the electronic device does not meet the third preset condition.

[0307] S1003: The electronic device exits the independent transmission state.

[0308] Specifically, when the electronic device determines that the electronic device meets the third preset condition, it determines that the electronic device can exit the independent transmission state, that is, the electronic device adopts the time-sharing mode to perform Bluetooth communication and WIFI communication.

[0309] S1004. The electronic device continues to maintain an independent transmission state.

[0310] Specifically, when the electronic device determines that the electronic device does not meet the third preset condition, it determines that the electronic device can continue to use the parallel mode for Bluetooth communication and WIFI communication, that is, the electronic device can continue to maintain an independent transmission state for Bluetooth communication.

[0311] It is understandable that, when the electronic device or server does not include the above configuration table (such as the above first configuration table, the second configuration table, the third configuration table, and the fourth configuration table), or the configuration table does not include the latest information, such as the latest model of router and Bluetooth encoding format, the electronic device or server can determine the relevant information by autonomous learning, and add it to the corresponding configuration table after the learning is completed, so as to quickly find the relevant information from the configuration table, saving the learning cost. For example, the electronic device can determine the first communication indicator threshold and the second communication indicator threshold by autonomous learning.

[0312] It should be noted that when the above-mentioned electronic device is simultaneously performing WIFI communication and Bluetooth communication, if the working frequency bands corresponding to the WIFI communication and the Bluetooth communication do not overlap, the electronic device can directly perform Bluetooth communication and WIFI communication based on the time-sharing mode or the parallel mode. The electronic device can also use the scheme disclosed in this application to determine whether there is a need to enter an independent transmission state. If there is a need, the electronic device can directly perform the parallel mode. Alternatively, the electronic device uses the scheme disclosed in this application to determine whether there is a need to enter an independent transmission state. If there is a need, the electronic device can determine whether it is necessary to perform Bluetooth communication, and this application does not limit it.

[0313] In some embodiments, in the process of determining the above-mentioned first working mode, the electronic device can obtain the WIFI rates corresponding to different working modes, so that the WIFI benefits when the time-sharing mode is switched to the parallel mode can be determined based on the WIFI rates corresponding to the different working modes, and then the electronic device can use the communication index corresponding to the time when the WIFI benefit is higher (such as the WIFI benefit is greater than 0, or greater than a certain set value) as the above-mentioned first communication index threshold. For example, taking the first communication index threshold as the first WIFI received signal strength threshold as an example, the WIFI rate in the time-sharing mode is rate 1, and after switching to the parallel mode, the WIFI rate is rate 2. Gain 1 is obtained by rate 1 and rate 2. If gain 1 is greater than the set value, it can be determined that the WIFI received signal strength at this time is the first WIFI received signal strength threshold.

[0314] In some embodiments, in the process of determining the first working mode, the WIFI rates in different working modes can be obtained. After determining the first working mode using the WIFI rates in different working modes, the electronic device can use the WIFI rate in the first working mode to determine the second communication indicator threshold. If the WIFI rate in the first working mode is lower than the WIFI rate threshold, it means that in the current situation, negative benefits may be generated, and the corresponding WIFI received signal strength is the second WIFI received signal strength threshold.

[0315] In some embodiments, in the embodiments of the present application, the electronic device may include a WIFI module, a Bluetooth module (or referred to as a Bluetooth chip) and a first processing module. The first processing module is used to determine the working mode, the first communication indicator threshold and the second communication indicator threshold. Exemplarily, the first processing module may include a processor, such as an AP.

[0316] In one example, the WIFI module and the Bluetooth module may be integrated into one chip, which may be called a WIFI Bluetooth chip, or they may be in different chips, such as the WIFI module is integrated into one chip and the Bluetooth module is integrated into another chip.

[0317] In the present application, after the electronic device updates the configuration table (such as the first configuration table mentioned above), the updated first configuration table can be uploaded to the server. In this way, other electronic devices can obtain the updated configuration table from the server, so that other electronic devices can quickly find the corresponding working mode from the updated first configuration table, and other electronic devices no longer need to determine whether the electronic device meets the second preset condition to determine the working mode, which effectively simplifies the processing process and improves processing efficiency.

[0318] Exemplarily, the electronic device may upload the updated first configuration table to the server periodically or in real time, wherein the resource overhead caused by uploading the first configuration table after each update can be avoided by periodically uploading the first configuration table.

[0319] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software units in a processor for execution. The software unit can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0320] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.

[0321] The embodiment of the present application also provides a computer program product, including a computer program. When the computer program runs on an electronic device, the electronic device executes each function or step in the above method embodiment.

[0322] The embodiment of the present application provides a chip, the chip is used to execute instructions, when the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar, and will not be repeated here.

[0323] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0324] It should be understood that the "embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0325] It should also be understood that in the present application, "when", "if" and "if" all mean that the UE or base station will take corresponding actions under certain objective circumstances. It is not a time limit, and it does not require the UE or base station to make judgments when implementing it, nor does it mean that there are other limitations.

[0326] A person skilled in the art may understand that the various numerical numbers such as first and second involved in the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application, and also indicate the order of precedence.

[0327] In this application, elements expressed in the singular are intended to mean "one or more" rather than "one and only one", unless otherwise specified. In this application, "at least one" is intended to mean "one or more", and "more than one" is intended to mean "two or more", unless otherwise specified.

[0328] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A can be singular or plural, and B can be singular or plural.

[0329] In this document, the term "at least one of..." or "at least one of..." means all or any combination of the listed items. For example, "at least one of A, B, and C" may mean: A exists alone, B exists alone, C exists alone, A and B exist at the same time, B and C exist at the same time, and A, B, and C exist at the same time, where A may be singular or plural, B may be singular or plural, and C may be singular or plural.

[0330] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0331] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0332] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0333] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0334] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0335] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0336] The same or similar parts between the various embodiments in this application can refer to each other. In the various embodiments in this application, and the various implementation methods / implementation methods / implementation methods in each embodiment, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment can be combined to form new embodiments, implementation methods, implementation methods, or implementation methods according to their inherent logical relationships. The above-described implementation methods of this application do not constitute a limitation on the scope of protection of this application.

[0337] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims. In short, the above is only a preferred embodiment of the technical solution of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A communication method, applied to an electronic device, wherein the electronic device is configured with a first antenna and a second antenna, wherein the first antenna is different from the second antenna, and wherein: The method comprises: In the case where the electronic device performs wireless fidelity WIFI communication, if the electronic device meets a first preset condition, the electronic device determines a first communication parameter of the electronic device; wherein, in the case where the electronic device meets the first preset condition, the electronic device uses the first antenna to perform Bluetooth communication and WIFI communication; Determine the first working mode according to the first communication parameter, or determine the first working mode based on the WIFI rate corresponding to the time-sharing mode and / or the parallel mode; When the first working mode is the parallel mode and the latest communication indicator meets the second preset condition, the first antenna is used for WIFI communication and the second antenna is used for Bluetooth communication; wherein the second preset condition includes that the WIFI received signal strength is greater than the first WIFI received signal strength threshold.

2. The method according to claim 1, characterized in that The first communication parameter includes at least one of the following parameters: Bluetooth encoding format, identification information of the router, or isolation.

3. The method according to claim 2, characterized in that The determining the first working mode according to the first communication parameter includes: When the first communication parameter includes at least one of the following, the first working mode is a parallel mode: The Bluetooth encoding format is the first format, the identification information of the router is the first identification or the isolation degree is the first isolation degree; and / or, When the first communication parameter includes at least one of the following, the first working mode is a time-sharing mode: The Bluetooth encoding format is the second format, the identification information of the router is the second identification, or the isolation degree is the second isolation degree.

4. The method according to any one of claims 1 to 3, characterized in that: The determining the first working mode according to the first communication parameter includes: When there is a working mode identifier corresponding to the first communication parameter in the first configuration table, the first working mode is the working mode indicated by the working mode identifier corresponding to the first communication parameter.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When there is no working mode identifier corresponding to the first communication parameter in the first configuration table, the first working mode is determined based on the WIFI rate corresponding to the time-sharing mode and / or the parallel mode; the parallel mode indicates that the antenna used by the electronic device for WIFI communication is different from the antenna used by the electronic device for Bluetooth communication.

6. A communication method, applied to an electronic device, wherein the electronic device is configured with a first antenna and a second antenna, the first antenna is different from the second antenna, characterized in that: The method comprises: In the case where the electronic device performs wireless fidelity WIFI communication, if the electronic device meets a first preset condition, the electronic device determines a first communication parameter of the electronic device; wherein, in the case where the electronic device meets the first preset condition, the electronic device uses the first antenna to perform Bluetooth communication and WIFI communication; When the first communication parameter includes at least one of the following, the first working mode is a parallel mode: The Bluetooth encoding format is the first format, the identification information of the router is the first identification or the isolation degree is the first isolation degree; When the first communication parameter includes at least one of the following, the first working mode is a time-sharing mode: The Bluetooth encoding format is the second format, the identification information of the router is the second identification or the isolation degree is the second isolation degree; When the first working mode is the parallel mode and the latest communication indicator meets the second preset condition, the first antenna is used for WIFI communication and the second antenna is used for Bluetooth communication; wherein the second preset condition includes that the WIFI received signal strength is greater than the first WIFI received signal strength threshold.

7. The method according to any one of claims 1 to 6, characterized in that: The first communication indicator threshold also includes at least one of a first Bluetooth transmission power threshold, a first WIFI bit error rate threshold, a first Bluetooth received signal strength threshold, a first Bluetooth bit error rate threshold, a first WIFI transmission power threshold, a first WIFI signal-to-noise ratio threshold, and a first Bluetooth signal-to-noise ratio threshold; The second preset condition also includes: at least one of: Bluetooth transmission power greater than the first Bluetooth transmission power threshold, Bluetooth received signal strength greater than the first Bluetooth received signal strength threshold, Bluetooth bit error rate less than the first Bluetooth bit error rate threshold, WIFI transmission power greater than the first WIFI transmission power threshold, WIFI signal-to-noise ratio less than the first WIFI signal-to-noise ratio threshold, WIFI bit error rate less than the first WIFI bit error rate threshold, and Bluetooth signal-to-noise ratio less than the first Bluetooth signal-to-noise ratio threshold.

8. The method according to any one of claims 1 to 7, characterized in that: The first preset condition includes that the electronic device starts to perform Bluetooth communication, or, in the process of the electronic device using the first antenna to perform Bluetooth communication and WIFI communication, the communication quality value of the target communication mode of the electronic device is lower than the preset quality value; wherein the target communication mode includes a WIFI communication mode and / or a Bluetooth communication mode.

9. The method according to any one of claims 1 to 8, characterized in that: The first working mode is determined based on the WIFI rate corresponding to the time-sharing mode and / or the parallel mode, including: the first working mode is the working mode with the highest WIFI rate among the time-sharing mode and the parallel mode.

10. The method according to any one of claims 1 to 9, characterized in that: The first working mode is determined based on the WIFI rate corresponding to the time-sharing mode and / or the parallel mode, including: when the first WIFI rate corresponding to the time-sharing mode is less than the preset rate, and the second WIFI rate corresponding to the parallel mode is greater than the first WIFI rate, the first working mode is the parallel mode; or When the first WIFI rate corresponding to the time-sharing mode is greater than or equal to the preset rate, the first working mode is the time-sharing mode.

11. The method according to claim 10, characterized in that The parallel mode includes a first parallel mode and a second parallel mode. When the first parallel mode adopts the parallel mode for Bluetooth communication and WIFI communication, the working bandwidth corresponding to the WIFI communication is the first working bandwidth; when the second parallel mode adopts the parallel mode for Bluetooth communication and WIFI communication, the working bandwidth corresponding to the WIFI communication is the second working bandwidth; The first operating bandwidth is different from the second operating bandwidth; The first working mode is the parallel mode, including: the first working mode is a working mode with the highest WIFI rate between the first parallel mode and the second parallel mode.

12. The method according to any one of claims 1 to 8, characterized in that: The first working mode is determined based on the WIFI rate corresponding to the time-sharing mode and / or the parallel mode, including: when the first WIFI rate corresponding to the time-sharing mode is less than the preset rate, and the second WIFI rate corresponding to the parallel mode is greater than the preset rate, the first working mode is the parallel mode; or When the first WIFI rate corresponding to the time-sharing mode is less than the preset rate, and the second WIFI rate corresponding to the parallel mode is less than the preset rate, the first working mode is the working mode with the highest WIFI rate among the time-sharing mode and the parallel mode.

13. The method according to claims 1-12, characterized in that The method further comprises: After the electronic device uses the first antenna for WIFI communication and the second antenna for Bluetooth communication, the electronic device determines a second communication indicator threshold; the second communication indicator threshold is used to determine whether the electronic device meets a third preset condition, and the second communication indicator threshold includes a second WIFI received signal strength threshold; When the latest communication indicator meets the third preset condition, the electronic device uses the first antenna to perform Bluetooth communication and WIFI communication; wherein the third preset condition includes that the WIFI received signal strength is less than the second WIFI received signal strength threshold.

14. The method according to claim 13, characterized in that The second communication indicator threshold also includes at least one of a second Bluetooth transmission power threshold, a second WIFI bit error rate threshold, a second Bluetooth received signal strength threshold, a second Bluetooth bit error rate threshold, a second WIFI transmission power threshold, a second WIFI signal-to-noise ratio threshold, and a second Bluetooth signal-to-noise ratio threshold; The third preset condition also includes: at least one of: Bluetooth transmission power is less than the second Bluetooth transmission power threshold, Bluetooth received signal strength is less than the second Bluetooth received signal strength threshold, Bluetooth bit error rate is greater than the second Bluetooth bit error rate threshold, WIFI transmission power is less than the second WIFI transmission power threshold, WIFI signal-to-noise ratio is greater than the second WIFI signal-to-noise ratio threshold, WIFI bit error rate is greater than the second WIFI bit error rate threshold, and Bluetooth signal-to-noise ratio is greater than the second Bluetooth signal-to-noise ratio threshold.

15. An electronic device, characterized in that: The electronic device includes a display screen, a memory, a Bluetooth module, a WIFI module and one or more processors; the display screen, the memory, the Bluetooth module, the WIFI module and the processor are coupled; the Bluetooth module is used for Bluetooth communication, the WIFI module is used for WIFI communication, the display screen is used to display an image generated by the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 14.

16. A chip system, applied to electronic equipment, characterized in that: The chip system includes at least one processor and an interface, wherein the interface is used to receive instructions and transmit them to the at least one processor; the at least one processor executes the instructions so that the electronic device executes the method as described in any one of claims 1 to 14.

17. A chip, applied to electronic equipment, characterized in that: The chip is used to run instructions so that the electronic device executes the method according to any one of claims 1 to 14.