Antenna multiplexing method and device, electronic equipment and storage medium

By counting the number of communication times between WiFi and Bluetooth, updating the time-sharing duty cycle and configuring antenna registers, the problem of low antenna usage efficiency when WiFi and Bluetooth share antennas is solved, dynamically adjusting the antenna duty cycle, and improving WiFi and Bluetooth Communication efficiency.

CN119010925APending Publication Date: 2024-11-22HISENSE HOME APPLIANCES GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310580575.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, when WiFi and Bluetooth share antennas, it is difficult to effectively improve the time-sharing efficiency of antennas, resulting in low communication quality and efficiency of WiFi and Bluetooth.

Method used

By counting the number of communication times between WiFi and Bluetooth, update its time-sharing duty cycle, and configure the antenna's duty cycle register to dynamically adjust the duty cycle of WiFi and Bluetooth multiplexed antennas to improve the efficiency of the antenna usage.

Benefits of technology

It realizes dynamic and adaptive adjustment of the duty cycle of WiFi and Bluetooth multiplexed antennas according to actual application conditions, improves the antenna multiplexing efficiency, and takes into account the communication performance of WiFi and Bluetooth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010925A_ABST
    Figure CN119010925A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an antenna multiplexing method and device, electronic equipment and a storage medium, and belongs to the technical field of communication. According to the method, under the condition that WiFi and Bluetooth share an antenna, the WiFi time-sharing duty ratio and the Bluetooth time-sharing duty ratio are updated according to the counted WiFi communication times and Bluetooth communication times in a first period, and then the duty ratio of the WiFi and Bluetooth multiplexing antenna is adjusted from the hardware level by configuring a duty ratio register of the antenna. Thus, according to the actual application conditions of WiFi and Bluetooth, the duty ratio of the WiFi and Bluetooth multiplexing antenna is dynamically and adaptively adjusted, and the antenna multiplexing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an antenna multiplexing method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of communication technology, most electronic devices such as mobile phones, computers, and set-top boxes support wireless fidelity (WiFi) and Bluetooth functions. At present, WiFi and Bluetooth in some electronic devices use the same antenna, which is called WiFi and Bluetooth shared antenna or multiplexing antenna. In this case, WiFi and Bluetooth use a time-sharing strategy to reuse antennas, thereby reducing mutual interference between WiFi and Bluetooth during operation and ensuring the communication quality of WiFi and Bluetooth. How to improve the time-sharing efficiency of antennas when WiFi and Bluetooth use multiplexing antennas is a hot topic in the industry. Summary of the invention

[0003] The embodiments of the present application provide an antenna multiplexing method, device, electronic device and storage medium, which can improve the time-sharing use efficiency of antennas when WiFi and Bluetooth multiplexing antennas are used. The technical solution is as follows:

[0004] On the one hand, an antenna multiplexing method is provided, where WiFi and Bluetooth time-division multiplexing antennas are used, and the method comprises:

[0005] Count the number of WiFi communications and Bluetooth communications in the first cycle;

[0006] Based on the number of WiFi communications and the number of Bluetooth communications, updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle;

[0007] According to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle, configure the duty cycle register of the antenna;

[0008] In a cycle next to the first cycle, the WiFi and the Bluetooth are controlled to time-share the antenna according to the value of the duty cycle register.

[0009] Optionally, updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle based on the WiFi communication times and the Bluetooth communication times includes:

[0010] Determine the sum of the WiFi communication times and the Bluetooth communication times as the total communication times;

[0011] Determine the ratio of the number of WiFi communications to the total number of communications as the WiFi communication weight, and determine the ratio of the number of Bluetooth communications to the total number of communications as the Bluetooth communication weight;

[0012] Updating the WiFi algorithm weight based on the WiFi communication proportion, and updating the Bluetooth algorithm weight based on the Bluetooth communication proportion;

[0013] The WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

[0014] Optionally, updating the WiFi algorithm weight based on the WiFi communication proportion includes:

[0015] The product of the WiFi communication proportion and the WiFi reference weight is determined as the updated WiFi algorithm weight;

[0016] In the case where the WiFi algorithm weight is updated for the first time, the WiFi reference weight refers to the initial value of the WiFi algorithm weight;

[0017] When the WiFi algorithm weight is not updated for the first time, the WiFi reference weight refers to the WiFi algorithm weight obtained by the last update.

[0018] Optionally, updating the Bluetooth algorithm weight based on the Bluetooth communication proportion includes:

[0019] The product of the Bluetooth communication proportion and the Bluetooth reference weight is determined as the updated Bluetooth algorithm weight;

[0020] In the case where the Bluetooth algorithm weight is updated for the first time, the Bluetooth reference weight refers to the initial value of the Bluetooth algorithm weight;

[0021] When the Bluetooth algorithm weight is not updated for the first time, the Bluetooth reference weight refers to the Bluetooth algorithm weight obtained by the last update.

[0022] Optionally, updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight includes:

[0023] Determine a difference between the updated WiFi algorithm weight and the WiFi algorithm weight before the update as a weight difference;

[0024] Determine a duty cycle adjustment value based on the weight difference and the antenna time-sharing granularity, wherein the duty cycle adjustment value is an integer multiple of the antenna time-sharing granularity, and a difference between the duty cycle adjustment value and the weight difference is less than the antenna time-sharing granularity;

[0025] The WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the duty cycle adjustment value and the configurable range of the duty cycle, and the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are both within the configurable range of the duty cycle.

[0026] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times; the method further includes:

[0027] Based on the Bluetooth communication times and the Bluetooth broadcast times, updating the Bluetooth broadcast weight and the Bluetooth scan weight;

[0028] According to the updated Bluetooth broadcast weight and Bluetooth scan weight, update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration, wherein the sum of the Bluetooth broadcast unit duration and the Bluetooth scan unit duration is equal to the duration corresponding to the Bluetooth time-sharing duty cycle;

[0029] Configure the Bluetooth register according to the updated Bluetooth broadcast unit duration and Bluetooth scan unit duration;

[0030] In a cycle next to the first cycle, the Bluetooth is controlled to use the antenna for broadcasting and scanning according to the value of the Bluetooth register.

[0031] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times;

[0032] The method further comprises:

[0033] Based on the WiFi communication times, the Bluetooth broadcast times and the Bluetooth scan times, the service configurable communication interval is updated, and the service configurable communication interval includes one or more of a WiFi beacon interval, a Bluetooth broadcast interval and a Bluetooth scan interval.

[0034] On the other hand, an antenna multiplexing device is provided, the device is applied to an electronic device including WiFi, Bluetooth and an antenna, the WiFi and the Bluetooth time-division multiplexing the antenna, the device comprising:

[0035] A statistics module is used to count the number of WiFi communications and the number of Bluetooth communications in the first cycle;

[0036] A first updating module, configured to update a WiFi time-sharing duty cycle and a Bluetooth time-sharing duty cycle based on the WiFi communication times and the Bluetooth communication times;

[0037] A first configuration module, configured to configure the duty cycle register of the antenna according to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle;

[0038] The first control module is used to control the WiFi and the Bluetooth to time-share the antenna according to the value of the duty cycle register in a cycle next to the first cycle.

[0039] Optionally, the first updating module includes:

[0040] A first determining submodule, configured to determine the sum of the number of WiFi communications and the number of Bluetooth communications as the total number of communications;

[0041] A second determination submodule is used to determine the ratio of the number of WiFi communications to the total number of communications as the WiFi communication weight, and to determine the ratio of the number of Bluetooth communications to the total number of communications as the Bluetooth communication weight;

[0042] A first updating submodule, configured to update a WiFi algorithm weight based on the WiFi communication proportion, and to update a Bluetooth algorithm weight based on the Bluetooth communication proportion;

[0043] The second updating submodule is used to update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

[0044] Optionally, the first updating submodule is specifically used for:

[0045] The product of the WiFi communication proportion and the WiFi reference weight is determined as the updated WiFi algorithm weight;

[0046] In the case where the WiFi algorithm weight is updated for the first time, the WiFi reference weight refers to the initial value of the WiFi algorithm weight;

[0047] When the WiFi algorithm weight is not updated for the first time, the WiFi reference weight refers to the WiFi algorithm weight obtained by the last update.

[0048] Optionally, the first updating submodule is specifically used for:

[0049] The product of the Bluetooth communication proportion and the Bluetooth reference weight is determined as the updated Bluetooth algorithm weight;

[0050] In the case where the Bluetooth algorithm weight is updated for the first time, the Bluetooth reference weight refers to the initial value of the Bluetooth algorithm weight;

[0051] When the Bluetooth algorithm weight is not updated for the first time, the Bluetooth reference weight refers to the Bluetooth algorithm weight obtained by the last update.

[0052] Optionally, the second updating submodule is specifically used for:

[0053] Determine a difference between the updated WiFi algorithm weight and the WiFi algorithm weight before the update as a weight difference;

[0054] Determine a duty cycle adjustment value based on the weight difference and the antenna time-sharing granularity, wherein the duty cycle adjustment value is an integer multiple of the antenna time-sharing granularity, and a difference between the duty cycle adjustment value and the weight difference is less than the antenna time-sharing granularity;

[0055] The WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the duty cycle adjustment value and the configurable range of the duty cycle, and the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are both within the configurable range of the duty cycle.

[0056] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times; and the device further includes:

[0057] A second updating module, configured to update a Bluetooth broadcast weight and a Bluetooth scan weight based on the Bluetooth communication times and the Bluetooth broadcast times;

[0058] A third updating module, configured to update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration according to the updated Bluetooth broadcast weight and the Bluetooth scan weight, wherein the sum of the Bluetooth broadcast unit duration and the Bluetooth scan unit duration is equal to the duration corresponding to the Bluetooth time-sharing duty cycle;

[0059] A second configuration module, configured to configure a Bluetooth register according to the updated Bluetooth broadcast unit duration and Bluetooth scan unit duration;

[0060] The second control module is used to control the Bluetooth to use the antenna to broadcast and scan according to the value of the Bluetooth register in a cycle next to the first cycle.

[0061] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times;

[0062] The device also includes:

[0063] The fourth update module is used to update the service-configurable communication interval based on the WiFi communication number, the Bluetooth broadcast number and the Bluetooth scan number, and the service-configurable communication interval includes one or more of the WiFi beacon interval, the Bluetooth broadcast interval and the Bluetooth scan interval.

[0064] On the other hand, an electronic device is provided, the electronic device includes WiFi, Bluetooth, an antenna, a processor and a memory, the Bluetooth and the WiFi time-division multiplex the antenna, the memory is used to store computer programs, and the processor is used to execute the programs stored in the memory to implement the steps of the antenna multiplexing method described above. Optionally, the electronic device also includes a communication interface and a communication bus, and the processor, the communication interface and the memory communicate with each other through the communication bus.

[0065] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned antenna multiplexing method are implemented.

[0066] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the antenna multiplexing method described above.

[0067] The technical solution provided by the embodiments of the present application can at least bring the following beneficial effects:

[0068] In the embodiment of the present application, when WiFi and Bluetooth share an antenna, the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the statistical number of WiFi communications and the number of Bluetooth communications in the first cycle, and then the duty cycle of the WiFi and Bluetooth multiplexing antenna is adjusted from the hardware level by configuring the antenna duty cycle register. In this way, according to the actual application of WiFi and Bluetooth, the duty cycle of the WiFi and Bluetooth multiplexing antenna is dynamically and adaptively adjusted, thereby improving the antenna multiplexing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0070] Figure 1 is a flow chart of an antenna multiplexing method provided in an embodiment of the present application;

[0071] Figure 2 It is a flow chart of a method for updating WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle provided by an embodiment of the present application;

[0072] Figure 3 It is another method flow chart of updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle provided by the embodiment of the present application;

[0073] Figure 4 is a schematic diagram of the Bluetooth broadcast interval measured by the chip platform in an embodiment of the present application;

[0074] Figure 5 is a schematic diagram of the Bluetooth scanning interval measured by the chip platform in an embodiment of the present application;

[0075] Figure 6 It is a schematic diagram of the WiFi beacon interval measured by the chip platform in an embodiment of the present application;

[0076] Figure 7 It is a flowchart of another antenna multiplexing method provided in an embodiment of the present application;

[0077] Figure 8 is a structural schematic diagram of an antenna multiplexing device provided in an embodiment of the present application;

[0078] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0079] Fig.10 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0081] First, a brief introduction is given to the business scenarios involved in the embodiments of the present application.

[0082] With the continuous development of communication technology, in order to meet product requirements, WiFi and Bluetooth in some electronic devices need to share antennas, such as reusing one or more antennas. Since WiFi and Bluetooth usually work in the 2.4GHz (Hertz) frequency band, in order to reduce the mutual interference between WiFi and Bluetooth during operation and ensure the communication quality of WiFi and Bluetooth, WiFi and Bluetooth use a time-sharing strategy to reuse antennas.

[0083] In the related art, WiFi and Bluetooth use chip-level antenna time-sharing strategies, such as WiFi preemption priority strategy, that is, when WiFi needs to communicate, the antenna is allocated to WiFi, regardless of whether there is a Bluetooth communication demand at the same time, that is, the Bluetooth transceiver performance is sacrificed to ensure WiFi communication performance. However, this is not conducive to ensuring the quality and communication efficiency of Bluetooth services, and the antenna utilization efficiency is also low.

[0084] The antenna multiplexing method provided in the embodiment of the present application can dynamically and adaptively adjust the duty cycle of the WiFi and Bluetooth time-division multiplexing antennas, thereby improving the use efficiency of the antennas while taking into account the communication performance of WiFi and Bluetooth.

[0085] It should be understood that the device architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the device architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0086] Next, the antenna multiplexing method provided in the embodiment of the present application is explained in detail. The method can be performed by an electronic device. Alternatively, the electronic device has a corresponding server, then the method can be performed by the server or by the electronic device. The electronic device can be a mobile phone, a computer, a smart home appliance, a set-top box or a smart speaker, etc. The server can be a cloud server or other forms of servers.

[0087] Figure 1 is a flow chart of an antenna multiplexing method provided in an embodiment of the present application. Taking the method executed by an electronic device as an example, please refer to Figure 1 , the method comprises the following steps.

[0088] Step 101: Count the number of WiFi communications and the number of Bluetooth communications in the first cycle.

[0089] In the embodiment of the present application, Bluetooth and WiFi time-share the antenna of the electronic device to ensure the communication quality of Bluetooth and WiFi. In the case of Bluetooth and WiFi time-share antennas, the electronic device can obtain the actual application of WiFi and Bluetooth, so as to dynamically and adaptively adjust the duty cycle of the WiFi and Bluetooth time-share antennas.

[0090] The actual application of WiFi and Bluetooth is characterized by the number of WiFi communications and the number of Bluetooth communications, and the electronic device can periodically count the number of WiFi communications and the number of Bluetooth communications in each cycle. For example, the electronic device counts the number of WiFi communications and the number of Bluetooth communications in the first cycle.

[0091] The cycle length of the first cycle may be 1s, 3s, 4s, etc. The embodiment of the present application is introduced by taking the cycle length of 3s as an example, and the electronic device may count the number of WiFi communications and the number of Bluetooth communications every 3s.

[0092] The number of WiFi communications is determined by the number of WiFi transmissions and receptions, and the number of Bluetooth communications is determined by the number of Bluetooth broadcasts and Bluetooth scans. For example, the number of WiFi communications is equal to the sum of the number of WiFi receptions and the number of WiFi transmissions. The number of Bluetooth communications is equal to the sum of the number of Bluetooth broadcasts and the number of Bluetooth scans.

[0093] Step 102: Based on the number of WiFi communications and the number of Bluetooth communications, update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle.

[0094] As can be seen from the foregoing, the electronic device counts the sum of the number of WiFi communications and the number of Bluetooth communications in the first cycle, and can update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle based on the number of WiFi communications and the number of Bluetooth communications.

[0095] The WiFi time-sharing duty cycle indicates the proportion of the unit communication time length of the antenna occupied by WiFi, and the Bluetooth time-sharing duty cycle indicates the proportion of the unit communication time length of the antenna occupied by Bluetooth. In the standard protocols of Bluetooth and WiFi, the unit communication time length of the antenna is 0.625ms (milliseconds).

[0096] Figure 2 1 is a flow chart of a method for updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle provided by an embodiment of the present application. Figure 2 The method includes the following steps 201 to 204.

[0097] Step 201: The sum of the WiFi communication times and the Bluetooth communication times is determined as the total communication times.

[0098] Step 202: Determine the ratio of the WiFi communication times to the total communication times as the WiFi communication weight, and determine the ratio of the Bluetooth communication times to the total communication times as the Bluetooth communication weight.

[0099] Step 203: updating the WiFi algorithm weight based on the WiFi communication proportion, and updating the Bluetooth algorithm weight based on the Bluetooth communication proportion.

[0100] Step 204: Update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

[0101] Simply put, the electronic device dynamically adjusts the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the WiFi communication proportion and the Bluetooth communication proportion in the first cycle.

[0102] Among them, one implementation method of the electronic device updating the WiFi algorithm weight based on the WiFi communication proportion is: the electronic device determines the product of the WiFi communication proportion and the WiFi reference weight as the updated WiFi algorithm weight. In the case of the first update of the WiFi algorithm weight, the WiFi reference weight refers to the initial value of the WiFi algorithm weight. In the case of not updating the WiFi algorithm weight for the first time, the WiFi reference weight refers to the WiFi algorithm weight obtained in the last update. The so-called last update refers to the update performed in the last cycle of the first cycle.

[0103] Similarly, one implementation method for an electronic device to update the Bluetooth algorithm weight based on the Bluetooth communication ratio is: the electronic device determines the updated Bluetooth algorithm weight as the product of the Bluetooth communication ratio and the Bluetooth reference weight. In the case of the first update of the Bluetooth algorithm weight, the Bluetooth reference weight refers to the initial value of the Bluetooth algorithm weight. In the case of not updating the Bluetooth algorithm weight for the first time, the Bluetooth reference weight refers to the Bluetooth algorithm weight obtained in the last update.

[0104] Exemplarily, the electronic device updates the WiFi algorithm weight and the Bluetooth algorithm weight according to formula (1) and formula (2).

[0105]

[0106]

[0107] In formula (1) and formula (2), WiFi_socket_count, Blue_adv_count, and Blue_scan_count represent the number of WiFi communications, the number of Bluetooth broadcasts, and the number of Bluetooth scans in the same cycle, respectively.

[0108] In an embodiment of the present application, the initial value of the WiFi algorithm weight and the initial value of the Bluetooth algorithm weight can be the default value set by the electronic device before leaving the factory, that is, the chip configuration value, or can be the value manually set by the electronic device after leaving the factory. Among them, the sum of the initial value of the WiFi algorithm weight and the initial value of the Bluetooth algorithm weight can be 1. For example, the initial value of the WiFi algorithm weight is 60%, and the initial value of the Bluetooth algorithm weight is 40%. In this way, the sum of the updated WiFi algorithm weight and the updated Bluetooth algorithm weight obtained by the electronic device according to this solution remains unchanged and is still 1.

[0109] In addition to the above-described implementation method for updating the WiFi algorithm weight and the Bluetooth algorithm weight, the electronic device may also update the WiFi algorithm weight and the Bluetooth algorithm weight in other ways.

[0110] For example, a fixed value is added to the right side of the equal sign in formula (1), and the fixed value is subtracted from the right side of the equal sign in formula (2). The fixed value can be set to a smaller value, such as 1% or 5%, which is smaller than the antenna time-sharing granularity (taking 10% as an example). The antenna time-sharing granularity is a chip-related parameter that represents the minimum adjustable value of the time-sharing duty cycle. In this way, the sum of the updated WiFi algorithm weight and the Bluetooth algorithm weight remains unchanged, but the WiFi algorithm weight updated in this way is slightly larger than the WiFi algorithm weight updated in the implementation method described above. Correspondingly, the Bluetooth algorithm weight updated in this way is slightly smaller than the Bluetooth algorithm weight updated in the implementation method described above.

[0111] For another example, a fixed value is subtracted from the right side of the equal sign in formula (1), and the fixed value is added to the right side of the equal sign in formula (2). The fixed value can be set to be smaller, for example, to a value smaller than the antenna time-sharing granularity. In this way, the sum of the updated WiFi algorithm weight and the Bluetooth algorithm weight remains unchanged, but the WiFi algorithm weight updated in this way is slightly smaller than the WiFi algorithm weight updated in the implementation method described above. Correspondingly, the Bluetooth algorithm weight updated in this way is slightly larger than the Bluetooth algorithm weight updated in the implementation method described above.

[0112] It can be seen that this solution allows the WiFi algorithm ratio and the Bluetooth algorithm ratio to be dynamically updated not strictly according to the ratio of the WiFi communication times to the Bluetooth communication times. In this way, according to actual needs, in the scenario focusing on ensuring the WiFi communication performance, or in the scenario focusing on ensuring the Bluetooth communication performance, the WiFi algorithm ratio and the Bluetooth algorithm ratio can be dynamically updated not strictly according to the ratio of the WiFi communication times to the Bluetooth communication times.

[0113] After updating the WiFi algorithm weight and the Bluetooth algorithm weight, the electronic device can update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

[0114] Figure 3 This is another method flow chart for updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle provided by the embodiment of the present application. Figure 3 The method includes the following steps 301 to 303.

[0115] Step 301: Determine the difference between the updated WiFi algorithm weight and the WiFi algorithm weight before the update as the weight difference.

[0116] Step 302: Determine a duty cycle adjustment value based on the weight difference and the antenna time-sharing granularity.

[0117] The duty cycle adjustment value is an integer multiple of the antenna time-sharing granularity, and the difference between the duty cycle adjustment value and the weight difference is smaller than the antenna time-sharing granularity.

[0118] Step 303: Update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the duty cycle adjustment value and the configurable duty cycle range.

[0119] Among them, the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle are both within the configurable range of the duty cycle. The configurable range of the duty cycle can be represented by the maximum and minimum values ​​of the duty cycle. In this way, the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the granularity of the chip configuration (i.e., the antenna time-sharing granularity) and the configurable maximum and minimum values ​​of the duty cycle.

[0120] Among them, if the weight of the updated WiFi algorithm is greater than the weight of the WiFi algorithm before the update, the weight difference is a positive number, and if the weight of the updated WiFi algorithm is smaller than the weight of the WiFi algorithm before the update, the weight difference is a negative number. If the weight of the updated WiFi algorithm is the same as the weight of the WiFi algorithm before the update, the weight difference is zero. In the case where the weight difference is a positive number, the duty cycle adjustment value is a non-negative number, the updated WiFi time-sharing duty cycle is not less than the WiFi time-sharing duty cycle before the update, and the updated Bluetooth time-sharing duty cycle is not greater than the Bluetooth time-sharing duty cycle before the update. In the case where the weight difference is a negative number, the duty cycle adjustment value is a non-positive number, the updated WiFi time-sharing duty cycle is not greater than the updated WiFi time-sharing duty cycle, and the updated Bluetooth time-sharing duty cycle is not less than the updated Bluetooth time-sharing duty cycle. The sum of the updated WiFi time-sharing duty cycle and the updated Bluetooth time-sharing duty cycle is equal to the sum of the WiFi time-sharing duty cycle before the update and the Bluetooth time-sharing duty cycle before the update.

[0121] Exemplarily, the weight difference is 7%, the antenna time-sharing granularity is 10%, and the duty cycle adjustment value is 0 or 10%.

[0122] Optionally, if the remainder obtained by dividing the weight difference by the antenna time-sharing granularity is greater than half of the antenna time-sharing granularity, the difference between the duty cycle adjustment value and the weight difference is less than half of the antenna time-sharing granularity. If the remainder obtained by dividing the weight difference by the antenna time-sharing granularity is less than half of the antenna time-sharing granularity, the difference between the duty cycle adjustment value and the weight difference is less than half of the antenna time-sharing granularity. For example, in the above example, the duty cycle adjustment value is finally determined to be 10%. For another example, if the weight difference is 3% and the antenna time-sharing granularity is 10%, the duty cycle adjustment value is finally determined to be 0.

[0123] Step 103: configure the antenna duty cycle register according to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle.

[0124] In the embodiment of the present application, after updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle, the electronic device configures the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle in the duty cycle register of the antenna.

[0125] Step 104: In a cycle next to the first cycle, WiFi and Bluetooth are controlled to time-share the antenna according to the value of the duty cycle register.

[0126] In the embodiment of the present application, after configuring the duty cycle register of the antenna, the electronic device can control WiFi and Bluetooth to time-share the antenna according to the value of the duty cycle register. In this way, WiFi and Bluetooth can multiplex the antenna according to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle, thereby improving the antenna multiplexing efficiency and taking into account both WiFi communication performance and Bluetooth communication performance.

[0127] As can be seen from the above, the Bluetooth communication times include the Bluetooth broadcast times and the Bluetooth scan times. Based on this, the embodiment of the present application can further dynamically adjust the duty cycle of the Bluetooth broadcast and Bluetooth scan. This will be introduced below.

[0128] In an embodiment of the present application, the electronic device can also update the Bluetooth broadcast weight and the Bluetooth scan weight based on the number of Bluetooth communications and the number of Bluetooth broadcasts, and update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration according to the updated Bluetooth broadcast weight and the Bluetooth scan weight, and the sum of the Bluetooth broadcast unit duration and the Bluetooth scan unit duration is equal to the duration corresponding to the Bluetooth time-sharing duty cycle. Then, the electronic device configures the Bluetooth register according to the updated Bluetooth broadcast unit duration and the Bluetooth scan unit duration. In this way, in the next cycle of the first cycle, the electronic device can control Bluetooth to use the antenna for broadcasting and scanning according to the value of the Bluetooth register.

[0129] The electronic device may update the Bluetooth broadcast weight and the Bluetooth scan weight according to formula (3) and formula (4).

[0130]

[0131]

[0132] Electronic devices can update the Bluetooth broadcast unit duration and Bluetooth scan unit duration according to the Bluetooth time-sharing granularity and Bluetooth configurable range, as well as the updated Bluetooth broadcast weight and Bluetooth scan weight. The difference between the updated Bluetooth broadcast unit duration and the Bluetooth broadcast unit duration before the update is an integer multiple of the Bluetooth time-sharing granularity, and the updated Bluetooth broadcast unit duration and Bluetooth scan unit duration do not exceed the Bluetooth configurable range. This process is similar to the electronic device updating the WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle according to the antenna time-sharing granularity and the configurable range of the duty cycle. It will not be introduced in detail here.

[0133] Exemplarily, the Bluetooth time-sharing granularity is equivalent to 0.002ms, and the Bluetooth configurable range corresponds to 0.002ms to 0.225ms. The difference between the updated Bluetooth broadcast duration and the Bluetooth broadcast unit duration before the update is an integer multiple of 0.002ms, and the updated Bluetooth broadcast unit duration and the Bluetooth scan unit duration are still between 0.002ms and 0.225ms.

[0134] In addition, the electronic device in the embodiment of the present application can also update the service-configurable communication interval based on the number of WiFi communications, the number of Bluetooth broadcasts, and the number of Bluetooth scans. The service-configurable communication interval includes one or more of the WiFi beacon interval, the Bluetooth broadcast interval, and the Bluetooth scan interval. That is, in addition to being able to dynamically adjust the value of the register on the underlying hardware, this solution can also adjust the communication interval on the upper software. In this way, the combination of software and hardware can greatly improve the antenna usage efficiency.

[0135] In a specific implementation, the electronic device updates the WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle based on the number of WiFi communications, the number of Bluetooth broadcasts, and the number of Bluetooth scans. The sum of the Bluetooth broadcast time-sharing duty cycle and the Bluetooth scan time-sharing duty cycle is equal to the Bluetooth time-sharing duty cycle mentioned above. The electronic device updates the service-configurable communication interval based on the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle. The WiFi beacon interval, the Bluetooth broadcast interval, and the Bluetooth scan interval after the service-configurable communication interval are updated, which is consistent with the changes in the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle.

[0136] Optionally, the service-configurable communication interval includes the Bluetooth broadcast interval, but does not include the WiFi beacon interval and the Bluetooth scan interval. If the Bluetooth broadcast time-sharing duty cycle increases, the electronic device increases the Bluetooth broadcast interval according to the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle. If the Bluetooth broadcast time-sharing duty cycle decreases, the electronic device decreases the Bluetooth broadcast interval according to the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle. Among them, the value of the increase or decrease of the Bluetooth broadcast interval can be determined according to the amount of change in the Bluetooth broadcast time-sharing duty cycle.

[0137] Similarly, when the service-configurable communication interval includes a WiFi beacon interval but does not include a Bluetooth broadcast interval and a Bluetooth scan interval, the electronic device may increase or decrease the WiFi beacon interval according to the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle. When the service-configurable communication interval includes a Bluetooth scan interval but does not include a Bluetooth broadcast interval and a WiFi beacon interval, the electronic device may increase or decrease the Bluetooth scan interval according to the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle. When the service-configurable communication interval includes two of the WiFi beacon interval, the Bluetooth broadcast interval, and the Bluetooth scan interval, the electronic device may increase or decrease the two items included in the service-configurable communication interval according to the updated WiFi time-sharing duty cycle, the Bluetooth broadcast time-sharing duty cycle, and the Bluetooth scan time-sharing duty cycle.

[0138] When updating the service-configurable communication interval, the electronic device may also operate according to the configuration granularity and configuration range corresponding to the service-configurable communication interval. The configuration granularity of the WiFi beacon interval, the Bluetooth broadcast interval, and the Bluetooth scan interval may be the same or different, and the configuration range of the WiFi beacon interval, the Bluetooth broadcast interval, and the Bluetooth scan interval may also be the same or different.

[0139] Exemplarily, when the service configurable communication interval includes a WiFi beacon interval, a Bluetooth broadcast interval and a Bluetooth scanning interval, the configuration granularities of the WiFi beacon interval, the Bluetooth broadcast interval and the Bluetooth scanning interval are 5ms, 3ms and 2ms respectively, and the configurable ranges of the WiFi beacon interval, the Bluetooth broadcast interval and the Bluetooth scanning interval are 90ms to 110ms, 100ms to 120ms, and 140ms to 160ms respectively.

[0140] It should be understood that the WiFi beacon interval refers to the duration of a WiFi communication event, with a typical value of 100ms. The Bluetooth broadcast interval refers to the duration of a Bluetooth broadcast event, with a typical value of 106ms. The Bluetooth scan interval refers to the duration of a Bluetooth scan event, with a typical value of 157.5ms. The standard protocol stipulates that the Bluetooth broadcast interval and Bluetooth scan interval must be integer multiples of 0.625ms.

[0141] Figures 4 to 6 They are schematic diagrams of the Bluetooth broadcast interval, Bluetooth scan interval, and WiFi beacon interval measured by the chip platform in the embodiment of the present application. Figures 4 to 6 The intervals of the rectangular waves shown respectively can derive initial values ​​of the Bluetooth broadcast interval, the Bluetooth scan interval, and the WiFi beacon interval.

[0142] Next, we will refer to Figure 7The embodiments of the present application are explained again by way of example.

[0143] Figure 7 is a flow chart of another antenna multiplexing method provided in an embodiment of the present application. Figure 7 , the electronic device initializes various parameters when it is powered on. After the power-on operation, the electronic device executes the module application layer code to start the WiFi service and the Bluetooth service, and then starts the WiFi and Bluetooth weight calculation service to regularly count the number of WiFi communications and the number of Bluetooth communications. After the timer expires, such as after the first cycle ends, the WiFi algorithm weight and the Bluetooth algorithm weight are updated. After updating the WiFi algorithm weight and the Bluetooth algorithm weight, the electronic device determines whether to update the chip configuration. Among them, when the WiFi algorithm weight and the Bluetooth algorithm weight change, and the change is greater than the antenna time-sharing granularity, the electronic device determines to update the chip configuration. In other cases, the electronic device determines not to update the chip configuration. After determining to update the chip configuration, the electronic device updates the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight. Optionally, the electronic device can also update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration. After that, the electronic device can implement the configuration. Specifically, the electronic device configures the antenna duty cycle register according to the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle, and configures the Bluetooth register according to the updated Bluetooth broadcast unit duration and the Bluetooth scan unit duration.

[0144] In summary, in the embodiment of the present application, when WiFi and Bluetooth share an antenna, the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the statistical number of WiFi communications and the number of Bluetooth communications in the first cycle, and then the duty cycle of the WiFi and Bluetooth multiplexing antenna is adjusted from the hardware level by configuring the antenna duty cycle register. In this way, according to the actual application of WiFi and Bluetooth, the duty cycle of the WiFi and Bluetooth multiplexing antenna is dynamically and adaptively adjusted, thereby improving the antenna multiplexing efficiency.

[0145] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and the embodiments of the present application will not be described in detail one by one.

[0146] Figure 8 This is a schematic diagram of the structure of an antenna multiplexing device 800 provided in an embodiment of the present application. The antenna multiplexing device 800 can be implemented by software, hardware, or a combination of both to become part or all of an electronic device. The device 800 is applied to an electronic device including WiFi, Bluetooth, and an antenna. The WiFi and Bluetooth time-division multiplexing antennas are referred to as Figure 8 The device 800 includes: a statistical module 801, a first updating module 802, a first configuration module 803 and a first control module 804.

[0147] A statistics module 801 is used to count the number of WiFi communications and the number of Bluetooth communications in the first cycle;

[0148] A first updating module 802, configured to update a WiFi time-sharing duty cycle and a Bluetooth time-sharing duty cycle based on the WiFi communication times and the Bluetooth communication times;

[0149] A first configuration module 803, configured to configure the duty cycle register of the antenna according to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle;

[0150] The first control module 804 is used to control the WiFi and Bluetooth to time-share antennas according to the value of the duty cycle register in a next cycle of the first cycle.

[0151] Optionally, the first updating module 802 includes:

[0152] A first determining submodule, configured to determine the sum of the WiFi communication times and the Bluetooth communication times as the total communication times;

[0153] A second determination submodule is used to determine the ratio of the WiFi communication number to the total communication number as the WiFi communication proportion, and to determine the ratio of the Bluetooth communication number to the total communication number as the Bluetooth communication proportion;

[0154] A first updating submodule, configured to update a WiFi algorithm weight based on the WiFi communication proportion, and to update a Bluetooth algorithm weight based on the Bluetooth communication proportion;

[0155] The second updating submodule is used to update the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

[0156] Optionally, the first updating submodule is specifically used for:

[0157] The product of the WiFi communication proportion and the WiFi reference weight is determined as the updated WiFi algorithm weight;

[0158] In the case of the first update of the WiFi algorithm weight, the WiFi reference weight refers to the initial value of the WiFi algorithm weight;

[0159] When the WiFi algorithm weight is not updated for the first time, the WiFi reference weight refers to the WiFi algorithm weight obtained by the last update.

[0160] Optionally, the first updating submodule is specifically used for:

[0161] The product of the Bluetooth communication proportion and the Bluetooth reference weight is determined as the updated Bluetooth algorithm weight;

[0162] In the case of the first update of the Bluetooth algorithm weight, the Bluetooth reference weight refers to the initial value of the Bluetooth algorithm weight;

[0163] When the Bluetooth algorithm weight is not updated for the first time, the Bluetooth reference weight refers to the Bluetooth algorithm weight obtained by the last update.

[0164] Optionally, the second updating submodule is specifically used for:

[0165] Determine a difference between the updated WiFi algorithm weight and the WiFi algorithm weight before the update as a weight difference;

[0166] Determine a duty cycle adjustment value based on the weight difference and the antenna time-sharing granularity, where the duty cycle adjustment value is an integer multiple of the antenna time-sharing granularity, and a difference between the duty cycle adjustment value and the weight difference is less than the antenna time-sharing granularity;

[0167] According to the duty cycle adjustment value and the configurable range of the duty cycle, the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated, and the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are both within the configurable range of the duty cycle.

[0168] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times; the device 800 further includes:

[0169] A second updating module, used for updating a Bluetooth broadcast weight and a Bluetooth scan weight based on the Bluetooth communication number and the Bluetooth broadcast number;

[0170] A third updating module is used to update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration according to the updated Bluetooth broadcast weight and the Bluetooth scan weight, wherein the sum of the Bluetooth broadcast unit duration and the Bluetooth scan unit duration is equal to the duration corresponding to the Bluetooth time-sharing duty cycle;

[0171] A second configuration module, configured to configure a Bluetooth register according to the updated Bluetooth broadcast unit duration and Bluetooth scan unit duration;

[0172] The second control module is used to control Bluetooth to use the antenna to broadcast and scan according to the value of the Bluetooth register in the next cycle of the first cycle.

[0173] Optionally, the Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times;

[0174] The apparatus 800 further comprises:

[0175] The fourth updating module is used to update the service-configurable communication interval based on the WiFi communication number, Bluetooth broadcast number and Bluetooth scan number, and the service-configurable communication interval includes one or more of the WiFi beacon interval, the Bluetooth broadcast interval and the Bluetooth scan interval.

[0176] In the embodiment of the present application, when WiFi and Bluetooth share an antenna, the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the statistical number of WiFi communications and the number of Bluetooth communications in the first cycle, and then the duty cycle of the WiFi and Bluetooth multiplexing antenna is adjusted from the hardware level by configuring the antenna duty cycle register. In this way, according to the actual application of WiFi and Bluetooth, the duty cycle of the WiFi and Bluetooth multiplexing antenna is dynamically and adaptively adjusted, thereby improving the antenna multiplexing efficiency.

[0177] It should be noted that: the antenna multiplexing device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when controlling the WiFi and Bluetooth multiplexing antennas. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the antenna multiplexing device provided in the above embodiment and the antenna multiplexing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0178] Fig. 9 is a schematic diagram of the structure of an electronic device 900 provided in an embodiment of the present application. Fig. 9 , the electronic device 900 includes WiFi 901, Bluetooth 902, an antenna 903, a processor 904 and a memory 905. Among them, WiFi 901 and Bluetooth 902 share the antenna, the memory 905 stores a computer program, and the processor 904 can execute the computer program to implement the antenna multiplexing method provided in the embodiment of the present application. In the embodiment of the present application, the electronic device 900 also includes a communication interface 906 and a communication bus 907. WiFi 901, Bluetooth 902, antenna 903, processor 904, communication interface 907 and memory 905 communicate with each other through the communication bus 907.

[0179] The number of antennas is one or more. When the number of antennas is multiple, WiFi and Bluetooth can reuse one antenna or multiple antennas.

[0180] Fig.10The structure block diagram of a terminal 1000 provided by an exemplary embodiment of the present application is shown. The terminal 1000 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a laptop computer, a desktop computer, a set-top box, a smart speaker, a smart headset, a smart home appliance, etc. The terminal 1000 may also be called an electronic device, a user device, a portable terminal, a laptop terminal, a desktop terminal, and other names.

[0181] Typically, the terminal 1000 includes a processor 1001 and a memory 1002 .

[0182] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0183] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, which is used to be executed by the processor 1001 to implement the antenna multiplexing method provided in the method embodiment of the present application.

[0184] In some embodiments, the terminal 1000 may also optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002 and the peripheral device interface 1003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1003 via a bus, a signal line or a circuit board. Specifically, in an embodiment of the present application, the peripheral device includes: a radio frequency circuit 1004. In some other embodiments, the peripheral device also includes at least one of a display screen 1005, a camera assembly 1006, an audio circuit 1007, a positioning assembly 1008 and a power supply 1009.

[0185] The peripheral device interface 1003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0186] The radio frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Among them, the radio frequency circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 1004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), Bluetooth, a wireless local area network and / or a WiFi network. In some embodiments, the radio frequency circuit 1004 may also include circuits related to NFC (Near Field Communication), which is not limited in this application. In an embodiment of the present application, the radio frequency circuit 1004 includes an antenna for multiplexing WiFi and Bluetooth.

[0187] The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to collect touch signals on the surface or above the surface of the display screen 1005. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1005 can be one, arranged on the front panel of the terminal 1000; in other embodiments, the display screen 1005 can be at least two, respectively arranged on different surfaces of the terminal 1000 or in a folding design; in other embodiments, the display screen 1005 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 1000. Even, the display screen 1005 can also be arranged as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0188] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0189] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1001 for processing, or input them into the radio frequency circuit 1004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1000. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1007 may also include a headphone jack.

[0190] The positioning component 1008 is used to locate the current geographical location of the terminal 1000 to implement navigation or LBS (Location Based Service). The positioning component 1008 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.

[0191] The power supply 1009 is used to power various components in the terminal 1000. The power supply 1009 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1009 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0192] In some embodiments, the terminal 1000 further includes one or more sensors 1010 , including but not limited to: an acceleration sensor 1011 , a gyroscope sensor 1012 , a pressure sensor 1013 , a fingerprint sensor 1014 , an optical sensor 1015 , and a proximity sensor 1016 .

[0193] The acceleration sensor 1011 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1000. For example, the acceleration sensor 1011 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1001 can control the display screen 1005 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 can also be used to collect motion data of games or users.

[0194] The gyro sensor 1012 can detect the body direction and rotation angle of the terminal 1000, and the gyro sensor 1012 can cooperate with the acceleration sensor 1011 to collect the user's 3D actions on the terminal 1000. The processor 1001 can implement the following functions based on the data collected by the gyro sensor 1012: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0195] The pressure sensor 1013 can be set on the side frame of the terminal 1000 and / or the lower layer of the display screen 1005. When the pressure sensor 1013 is set on the side frame of the terminal 1000, it can detect the user's holding signal of the terminal 1000, and the processor 1001 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1013. When the pressure sensor 1013 is set on the lower layer of the display screen 1005, the processor 1001 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0196] The fingerprint sensor 1014 is used to collect the user's fingerprint, and the processor 1001 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 1014 can be set on the front, back, or side of the terminal 1000. When a physical button or a manufacturer logo is set on the terminal 1000, the fingerprint sensor 1014 can be integrated with the physical button or the manufacturer logo.

[0197] The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 according to the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is reduced. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 according to the ambient light intensity collected by the optical sensor 1015.

[0198] The proximity sensor 1016, also called a distance sensor, is usually arranged on the front panel of the terminal 1000. The proximity sensor 1016 is used to collect the distance between the user and the front of the terminal 1000. In one embodiment, when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually decreasing, the processor 1001 controls the display screen 1005 to switch from the screen-on state to the screen-off state; when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually increasing, the processor 1001 controls the display screen 1005 to switch from the screen-off state to the screen-on state.

[0199] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the terminal 1000, and the terminal 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0200] In some embodiments, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the antenna multiplexing method in the above embodiment are implemented. For example, the computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

[0201] It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.

[0202] It should be understood that all or part of the steps to implement the above embodiments can be implemented 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. The computer instructions can be stored in the above-mentioned computer readable storage medium.

[0203] That is, in some embodiments, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of the antenna multiplexing method described above.

[0204] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.

[0205] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0206] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An antenna multiplexing method, characterized in that: Wireless fidelity WiFi and Bluetooth time-division multiplexing antenna, the method comprising: Count the number of WiFi communications and Bluetooth communications in the first cycle; Based on the number of WiFi communications and the number of Bluetooth communications, updating the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle; According to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle, configure the duty cycle register of the antenna; In a cycle next to the first cycle, the WiFi and the Bluetooth are controlled to time-share the antenna according to the value of the duty cycle register.

2. The method according to claim 1, characterized in that The updating of the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle based on the WiFi communication times and the Bluetooth communication times includes: Determine the sum of the WiFi communication times and the Bluetooth communication times as the total communication times; Determine the ratio of the number of WiFi communications to the total number of communications as the WiFi communication weight, and determine the ratio of the number of Bluetooth communications to the total number of communications as the Bluetooth communication weight; Updating the WiFi algorithm weight based on the WiFi communication proportion, and updating the Bluetooth algorithm weight based on the Bluetooth communication proportion; The WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the updated WiFi algorithm weight and the Bluetooth algorithm weight.

3. The method according to claim 2, characterized in that The updating of the WiFi algorithm weight based on the WiFi communication proportion includes: The product of the WiFi communication proportion and the WiFi reference weight is determined as the updated WiFi algorithm weight; In the case where the WiFi algorithm weight is updated for the first time, the WiFi reference weight refers to the initial value of the WiFi algorithm weight; When the WiFi algorithm weight is not updated for the first time, the WiFi reference weight refers to the WiFi algorithm weight obtained by the last update.

4. The method according to claim 2, characterized in that: The updating of the Bluetooth algorithm weight based on the Bluetooth communication proportion includes: The product of the Bluetooth communication proportion and the Bluetooth reference weight is determined as the updated Bluetooth algorithm weight; In the case where the Bluetooth algorithm weight is updated for the first time, the Bluetooth reference weight refers to the initial value of the Bluetooth algorithm weight; When the Bluetooth algorithm weight is not updated for the first time, the Bluetooth reference weight refers to the Bluetooth algorithm weight obtained by the last update.

5. The method according to any one of claims 2 to 4, characterized in that: The updating of the WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle according to the updated WiFi algorithm weight and the Bluetooth algorithm weight includes: Determine a difference between the updated WiFi algorithm weight and the WiFi algorithm weight before the update as a weight difference; Determine a duty cycle adjustment value based on the weight difference and the antenna time-sharing granularity, wherein the duty cycle adjustment value is an integer multiple of the antenna time-sharing granularity, and a difference between the duty cycle adjustment value and the weight difference is less than the antenna time-sharing granularity; The WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are updated according to the duty cycle adjustment value and the configurable range of the duty cycle, and the updated WiFi time-sharing duty cycle and the Bluetooth time-sharing duty cycle are both within the configurable range of the duty cycle.

6. The method according to any one of claims 1 to 4, characterized in that: The Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times; the method further includes: Based on the Bluetooth communication times and the Bluetooth broadcast times, updating the Bluetooth broadcast weight and the Bluetooth scan weight; According to the updated Bluetooth broadcast weight and Bluetooth scan weight, update the Bluetooth broadcast unit duration and the Bluetooth scan unit duration, wherein the sum of the Bluetooth broadcast unit duration and the Bluetooth scan unit duration is equal to the duration corresponding to the Bluetooth time-sharing duty cycle; Configure the Bluetooth register according to the updated Bluetooth broadcast unit duration and Bluetooth scan unit duration; In a cycle next to the first cycle, the Bluetooth is controlled to use the antenna for broadcasting and scanning according to the value of the Bluetooth register.

7. The method according to any one of claims 1 to 4, characterized in that: The Bluetooth communication times include Bluetooth broadcast times and Bluetooth scan times; The method further comprises: Based on the WiFi communication times, the Bluetooth broadcast times and the Bluetooth scan times, the service configurable communication interval is updated, and the service configurable communication interval includes one or more of a WiFi beacon interval, a Bluetooth broadcast interval and a Bluetooth scan interval.

8. An antenna multiplexing device, characterized in that: The device is applied to an electronic device including wireless fidelity WiFi, Bluetooth and an antenna, the WiFi and the Bluetooth time-division multiplex the antenna, and the device includes: A statistics module is used to count the number of WiFi communications and the number of Bluetooth communications in the first cycle; A first updating module, configured to update a WiFi time-sharing duty cycle and a Bluetooth time-sharing duty cycle based on the WiFi communication times and the Bluetooth communication times; A first configuration module, configured to configure the duty cycle register of the antenna according to the updated WiFi time-sharing duty cycle and Bluetooth time-sharing duty cycle; The first control module is used to control the WiFi and the Bluetooth to time-share the antenna according to the value of the duty cycle register in a cycle next to the first cycle.

9. An electronic device, characterized in that: The electronic device comprises a wireless fidelity WiFi, a Bluetooth, an antenna, a processor and a memory, and the Bluetooth and the WiFi time-share the antenna; The memory is used to store computer programs; The processor is used to execute the computer program to implement the steps of any one of the methods of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods of claims 1-7 are implemented.