Bluetooth transmission bit rate control method and electronic device

By monitoring Bluetooth channel quality and dynamically adjusting the transmission rate, the problem of excessive channel resource consumption when electronic devices connect to multiple Bluetooth devices simultaneously is solved, ensuring the stability and timeliness of data transmission and avoiding abnormal handwriting.

WO2025246794A1PCT designated stage Publication Date: 2025-12-04HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/092388
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-31
Filing Date
2025-04-30
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

When an electronic device is connected to multiple Bluetooth devices at the same time, transmitting data to one device occupies a large amount of Bluetooth channel resources, causing data transmission delays or interruptions to other devices. For example, when a tablet computer transmits audio data to a Bluetooth headset, the writing data from the stylus cannot be transmitted to the screen in time, resulting in abnormal situations such as pen strokes retracing or broken lines.

Method used

By monitoring Bluetooth channel quality, the transmission rate is dynamically adjusted when channel quality deteriorates, reducing the transmission rate to devices with better channel quality to ensure that other devices have sufficient Bluetooth channel resources for data transmission.

Benefits of technology

It effectively avoids excessive channel resource occupation caused by excessively high transmission bit rate, ensures the data transmission quality of other devices, and reduces latency and abnormal phenomena, such as stylus pen stroke retraction and disconnection issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025092388_04122025_PF_FP_ABST
    Figure CN2025092388_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applied to the technical field of communications, and provides a Bluetooth transmission bit rate control method and an electronic device, for use in ensuring that, when transmitting data to a Bluetooth earphone, a tablet computer can have enough Bluetooth channel resources to transmit data of other Bluetooth devices. The method is applied to a first electronic device, and comprises: at a first time point, the first electronic device establishes a Bluetooth connection with a second electronic device, and sends data to the second electronic device at a first transmission bit rate; and at a second time point, when a Bluetooth state of the first electronic device meets a preset condition, the first electronic device sends data to the second electronic device at a second transmission bit rate, the second transmission bit rate being smaller than the first transmission bit rate, wherein the Bluetooth state of the first electronic device meeting a preset condition comprises the Bluetooth channel quality of the first electronic device at the second time point is lower than the Bluetooth channel quality of the first electronic device at the first time point.
Need to check novelty before this filing date? Find Prior Art

Description

A method for controlling Bluetooth transmission rate and an electronic device

[0001] This application claims priority to Chinese Patent Application No. 202410709343.9, filed with the State Intellectual Property Office of China on May 31, 2024, entitled "A Bluetooth Transmission Rate Control Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to a method for controlling Bluetooth transmission rate and an electronic device. Background Technology

[0003] Electronic devices can connect to multiple Bluetooth devices simultaneously. When an electronic device is sending data to one Bluetooth device, it cannot transmit data from another Bluetooth device.

[0004] For example, a tablet computer supports simultaneous connection of Bluetooth headphones and a stylus via Bluetooth. While listening to music from the tablet with the Bluetooth headphones, the user can write on the tablet with the stylus. However, because the tablet's data transmission to the Bluetooth headphones consumes significant Bluetooth channel resources, the stylus data cannot be transmitted to the screen in a timely manner, potentially causing abnormalities such as hooks and broken lines in the stylus writing on the tablet screen. Summary of the Invention

[0005] This application provides a Bluetooth transmission rate control method and electronic device, which ensures that the tablet computer has sufficient Bluetooth channel resources to transmit data from other Bluetooth devices when transmitting data to a Bluetooth headset.

[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0007] Firstly, a method for controlling Bluetooth transmission rate is provided, applied to a first electronic device. The method includes:

[0008] At a first time point, a first electronic device establishes a Bluetooth connection with a second electronic device, and the first electronic device sends data to the second electronic device at a first transmission rate. After establishing the Bluetooth connection, the first electronic device monitors the Bluetooth status, such as the Bluetooth channel quality. At a second time point, if the Bluetooth status of the first electronic device meets preset conditions, the first electronic device sends data to the second electronic device at a second transmission rate. The second transmission rate is lower than the first transmission rate used when sending data to the second electronic device at the first time point. Meeting the preset conditions for the Bluetooth status of the first electronic device includes: the Bluetooth channel quality of the first electronic device at the second time point is lower than the Bluetooth channel quality at the first time point. This ensures that the transmission rate used by the first electronic device to send data to the second electronic device is not too high, guaranteeing that the first electronic device has sufficient Bluetooth channel resources to allocate to other Bluetooth devices.

[0009] In one possible implementation of the first aspect, the method further includes: after the first electronic device establishes a Bluetooth connection with the second electronic device, the first electronic device enables a dynamic bitrate adjustment function. This dynamic bitrate adjustment function is used to select an appropriate transmission bitrate based on the current Bluetooth state. In this scheme, the first electronic device can enable the dynamic bitrate adjustment function as soon as it detects the establishment of a Bluetooth connection with the second electronic device. This allows for timely adjustment of the transmission bitrate used to send data to the second electronic device when the Bluetooth state is subsequently monitored to meet preset conditions.

[0010] In one possible implementation of the first aspect, the transmission bitrate of the second electronic device is greater than or equal to a preset threshold. That is, the first electronic device only triggers the dynamic bitrate adjustment function when it detects an electronic device that has established a Bluetooth connection with it, and certain conditions (such as preset device conditions) are met. Thus, if the transmission bitrate of the electronic device that has established a Bluetooth connection with the first electronic device is low, the dynamic bitrate adjustment function will not be activated. Therefore, when an electronic device is connected to the first electronic device, its transmission bitrate will not be adjusted based on the Bluetooth status. Consequently, when an electronic device with a low transmission bitrate connects to the first electronic device, it can avoid having its transmission bitrate adjusted, thus preventing a decrease in data transmission performance.

[0011] In one possible implementation of the first aspect, the Bluetooth state of the first electronic device meets preset conditions, further including: the number of devices establishing Bluetooth connections with the first electronic device is greater than or equal to two. That is, the first electronic device will only adjust the transmission rate used to send data to the second electronic device when it detects that the Bluetooth channel quality at the second time point is lower than the Bluetooth channel quality at the first time point, if it has established Bluetooth connections with at least two electronic devices. Thus, the first electronic device will not adjust the transmission rate used to send data to the second electronic device if it only has a Bluetooth connection with the second electronic device. This avoids the problem of the second electronic device's data transmission performance deteriorating due to adjusting the transmission rate.

[0012] In one possible implementation of the first aspect, the method further includes: at a second time point, the first electronic device establishes a Bluetooth connection with a third electronic device. The first electronic device establishing a new Bluetooth connection with another electronic device may cause a degradation in Bluetooth channel quality. In this scheme, at the second time point, the second electronic device establishes a Bluetooth connection with the third electronic device, causing the Bluetooth channel quality at the second time point to be lower than the Bluetooth channel quality at the first time point. Therefore, based on this state, the first electronic device selects to send data to the third electronic device at a lower second transmission rate.

[0013] In one possible implementation of the first aspect, the method further includes: at a third time point, after the first time point and before the second time point, the first electronic device establishes a Bluetooth connection with the third electronic device and enables dynamic bitrate adjustment. This dynamic bitrate adjustment function is used to select an appropriate transmission bitrate based on the current Bluetooth state. In this scheme, the first electronic device only enables the dynamic bitrate adjustment function when at least two devices are connected. Thus, if the first electronic device only establishes a Bluetooth connection with the second electronic device, it will not adjust the transmission bitrate used to send data to the second electronic device. This avoids the problem of the data transmission performance of the second electronic device deteriorating due to bitrate adjustment.

[0014] In one possible implementation of the first aspect, the transmission bitrate of the second electronic device is greater than or equal to a preset threshold. That is, the first electronic device will only activate the dynamic bitrate adjustment function if it detects at least two electronic devices connected to it via Bluetooth, and one of these devices meets certain conditions (such as preset device conditions). If the transmission bitrate of the electronic device connected to the first electronic device is low, the dynamic bitrate adjustment function will not be activated. This avoids the problem of reduced data transmission performance caused by the lower transmission bitrate being adjusted when the first electronic device connects to it. Alternatively, if some of the electronic devices connected to the first electronic device have a higher transmission bitrate, but the first electronic device is currently only connected to one Bluetooth device, the dynamic bitrate adjustment function will not be activated. This way, when the first electronic device is only connected to the second electronic device, the transmission bitrate used to send data to the second electronic device will not be adjusted. This avoids the problem of reduced data transmission performance caused by adjusting the transmission bitrate.

[0015] In one possible implementation of the first aspect, after the first electronic device enables the dynamic bitrate adjustment function, the method further includes: disconnecting the Bluetooth connection between the first electronic device and the second electronic device, and disabling the dynamic bitrate adjustment function on the first electronic device. This avoids the first electronic device monitoring the Bluetooth status even when it has only established a Bluetooth connection with the third electronic device, reducing unnecessary power consumption.

[0016] In one possible implementation of the first aspect, after the first electronic device enables the dynamic bitrate adjustment function, the method further includes: disconnecting the Bluetooth connection between the first electronic device and the third electronic device, and disabling the dynamic bitrate adjustment function on the first electronic device. This avoids the first electronic device monitoring the Bluetooth status even when it has only established a Bluetooth connection with the second electronic device, reducing unnecessary power consumption.

[0017] In one possible implementation of the first aspect, the first electronic device disconnects its Bluetooth connection from the second electronic device, and also disconnects its Bluetooth connection from the third electronic device, while the first electronic device disables dynamic bitrate adjustment. This reduces unnecessary power consumption.

[0018] In one possible implementation of the first aspect, the transmission code rate corresponding to the second electronic device is greater than or equal to a preset threshold, which may specifically include: the first transmission code rate being greater than or equal to the preset threshold.

[0019] In one possible implementation of the first aspect, the second transmission code rate is less than or equal to a preset threshold. That is, when the first electronic device adjusts the transmission code rate used to send data to the second electronic device, it will adjust the transmission code rate that is greater than or equal to the preset threshold to be less than the preset threshold. This ensures that after the first electronic device lowers the transmission code rate used to send data to the second electronic device, the first electronic device has sufficient Bluetooth channel resources allocated for transmitting data from other Bluetooth devices.

[0020] In one possible implementation of the first aspect, the first electronic device transmits data to the second electronic device at a second transmission code rate. Specifically, this may include: the first electronic device determining target encoding information matching the Bluetooth state; the target code rate information being used to characterize the second transmission code rate. The first electronic device controls a target encoder of its own device to transmit data to the second electronic device based on the target code rate information and using the second transmission code rate. The target encoder is the encoder used by the first electronic device to transmit data to the second electronic device.

[0021] In one possible implementation of the first aspect, a first electronic device controls a target encoder to send data to a second electronic device using a second transmission code rate based on target code rate information. Specifically, this may include: the first electronic device sending the target code rate information to the target encoder via Bluetooth; and the target encoder sending data to the second electronic device using the second transmission code rate based on the target code rate information.

[0022] In one possible implementation of the first aspect, the first electronic device determines target coding information matching the Bluetooth state. Specifically, this may include: the first electronic device determining target bitrate information based on the Bluetooth channel quality. For example, the Bluetooth channel quality can be divided into different ranges, each range corresponding to a bitrate information. The first electronic device may pre-store the correspondence between Bluetooth channel quality and bitrate information to find the matching target bitrate information from this correspondence based on the Bluetooth channel quality.

[0023] In one possible implementation of the first aspect, the target bit rate information includes a second transmission bit rate. Alternatively, the target bit rate information includes a target bit rate level, which corresponds to the second transmission bit rate.

[0024] In one possible implementation of the first aspect, the method further includes: In response to the first electronic device activating Bluetooth, registering a preset callback function in the Bluetooth protocol stack. The preset callback function is used to trigger the first electronic device to control the target encoder to adjust the transmission code rate used to send data to the second electronic device based on target code rate information, when the Bluetooth state of the first electronic device meets preset conditions. Thus, when the first electronic device detects that the Bluetooth state meets the preset conditions, it can promptly control the target encoder to adjust the transmission code rate used to send data to the second electronic device.

[0025] In one possible implementation of the first aspect, the method further includes: In response to establishing a Bluetooth connection between the first electronic device and the second electronic device, the first electronic device registers a preset callback function in the Bluetooth protocol stack. The preset callback function is used to trigger the first electronic device to control the target encoder to adjust the transmission code rate used to send data to the second electronic device based on target code rate information, when the Bluetooth state of the first electronic device meets preset conditions. Thus, after the first electronic device and the second electronic device establish a Bluetooth connection, when the preset conditions are detected in the Bluetooth state, the method can promptly control the target encoder to adjust the transmission code rate used to send data to the second electronic device.

[0026] In one possible implementation of the first aspect, after the first electronic device enables the dynamic bitrate adjustment function, the method further includes: disconnecting the Bluetooth connection between the first electronic device and the second electronic device, and disabling the dynamic bitrate adjustment function in the first electronic device.

[0027] In one possible implementation of the first aspect, the second electronic device is a Bluetooth headset. The transmission bit rate of the Bluetooth headset can be greater than a preset threshold.

[0028] In one possible implementation of the first aspect, the third electronic device could be a stylus or a Bluetooth keyboard, etc.

[0029] In one possible implementation of the first aspect, the target encoder used by the first electronic device to transmit data to the second electronic device is based on either Low Latency Audio Codec (LDAC) or Low Latency High Definition Audio Codec (LHDC). Both LDAC and LHDC encoders support higher maximum transmission bitrates. When both the first and second electronic devices support either LDAC or LHDC encoding, the first electronic device will transmit data to the second electronic device at a higher transmission bitrate. Therefore, the first electronic device can dynamically adjust the transmission bitrate used to transmit data to the second electronic device based on its Bluetooth status, ensuring that the first electronic device has sufficient Bluetooth channel resources allocated to other electronic devices.

[0030] Secondly, this application also provides a method for controlling the Bluetooth transmission rate, applied to a first electronic device. The method includes: at a first time point, when the first electronic device has established a Bluetooth connection only with a second electronic device, the first electronic device transmits data to the second electronic device at a first transmission rate. At a second time point, when the first electronic device has established Bluetooth connections with both the second and third electronic devices simultaneously, the first electronic device transmits data to the second electronic device at a second transmission rate; the second transmission rate is less than the first transmission rate.

[0031] In this scheme, when the first electronic device is connected to only one Bluetooth device, it sends data to that device at a higher transmission rate. When the first electronic device is connected to two Bluetooth devices, it sends data to that device at a lower transmission rate. This ensures that the first electronic device has sufficient Bluetooth channel resources for transmitting data from other electronic devices.

[0032] In one possible implementation of the second aspect, the transmission code rate corresponding to the second electronic device is greater than a preset threshold.

[0033] In one possible implementation of the second aspect, the first time point is before the second time point. At the first time point, the first electronic device establishes a Bluetooth connection with the second electronic device. At the second time point, the second electronic device establishes a connection with the third electronic device. At the second time point, after establishing a connection with the third electronic device, the first electronic device lowers the transmission rate used to send data to the second electronic device.

[0034] In one possible implementation of the second aspect, the second time point is prior to the first time point. At the second time point, the first electronic device simultaneously establishes Bluetooth connections with both the first and second electronic devices. At the first time point, the first electronic device disconnects its Bluetooth connection with the third electronic device. At this point, the first electronic device is only connected to the second electronic device, and therefore, based on the second time point, the first electronic device can increase the transmission rate used to send data to the second electronic device.

[0035] In one possible implementation of the first aspect, the second electronic device is a Bluetooth headset. The transmission bit rate of the Bluetooth headset can be greater than a preset threshold.

[0036] In one possible implementation of the first aspect, the third electronic device could be a stylus or a Bluetooth keyboard, etc.

[0037] Thirdly, this application also provides an electronic device. This electronic device can be the first electronic device described above. The electronic device may include a processor and a memory. The memory stores computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform the Bluetooth transmission rate control method as described in any of the first aspects above.

[0038] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the Bluetooth transmission rate control method of any of the first aspects described above.

[0039] Fifthly, a computer program product containing instructions is provided, which, when run on an electronic device, enables the electronic device to execute the Bluetooth transmission rate control method of any one of the first aspects described above.

[0040] In a sixth aspect, an apparatus (e.g., a system-on-a-chip) is provided, comprising a processor for supporting an electronic device in performing the functions described in the first aspect above. In one possible design, the apparatus further comprises a memory for storing program instructions and data necessary for the electronic device. When the apparatus is a system-on-a-chip, it may be composed of chips or may include chips and other discrete devices.

[0041] The technical effects of any of the design methods in aspects two through six can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description

[0042] Figure 1 is a schematic diagram of a communication system provided in an embodiment of this application;

[0043] Figure 2 is a schematic diagram of the handwriting of a stylus provided in an embodiment of this application;

[0044] Figure 3A is a schematic diagram of the data flow of Bluetooth transmission data provided in an embodiment of this application;

[0045] Figure 3B is a schematic diagram of partial information from the Bluetooth logs of some tablet computers in some examples;

[0046] Figure 3C is a schematic diagram showing the actual audio encoding bit rate and corresponding time of a tablet computer in some examples;

[0047] Figure 4 is a flowchart of a Bluetooth transmission rate control method provided in an embodiment of this application;

[0048] Figure 5 is a flowchart of a Bluetooth transmission rate control method provided in an embodiment of this application;

[0049] Figure 6 is a flowchart of a Bluetooth transmission rate control method provided in an embodiment of this application;

[0050] Figure 7 is a flowchart of a Bluetooth transmission rate control method provided in an embodiment of this application;

[0051] Figure 8 is a flowchart of a Bluetooth transmission rate control method provided in an embodiment of this application;

[0052] Figure 9 is a hardware structure diagram of an electronic device provided in an embodiment of this application;

[0053] Figure 10 is a software framework diagram of an electronic device provided in an embodiment of this application;

[0054] Figure 11 is a structural block diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0055] The following is a brief explanation of the technical terms that may be involved in the embodiments of this application.

[0056] Low latency audio coding (LDAC) is a high-efficiency Bluetooth audio coding technology designed to solve the problem of sound quality loss in traditional Bluetooth transmission.

[0057] Low-latency hi-definition audio codec (LHDC) is a high-quality Bluetooth audio codec developed based on the Bluetooth audio distribution profile (A2DP) protocol.

[0058] The transmission rate is the number of bits transmitted per unit of time, usually expressed in bits per second (bps). Different Bluetooth codecs typically have different rate ranges and adjustment methods.

[0059] The Bluetooth interface (BTIF) is the entry point for applications to access the protocol stack library through the Java Native Interface (JNI).

[0060] Bluetooth audio / video interface vendor specific event callbacks are typically related to Bluetooth audio transmission.

[0061] Transparent transmission, also known as pass-through, refers to the process in which, regardless of the content of the transmitted business, the system only transmits the content from the source address to the destination address without making any changes to the business data content.

[0062] Electronic devices can support simultaneous connection to two or more Bluetooth devices. Taking a tablet computer as an example, as shown in Figure 1, the tablet computer 10 supports connecting a stylus 30 via Bluetooth while playing music through a connected Bluetooth headset 20. The stylus 30 can then be used for writing on the screen of the tablet computer 10. In other embodiments, the tablet computer 10 also supports connection to Bluetooth devices such as Bluetooth speakers, car infotainment systems, mobile phones, smartwatches, or Bluetooth keyboards.

[0063] When a stylus is used to write on a tablet screen, the handwriting displayed on the screen should correspond to the writing trajectory of the stylus. However, in some scenarios, the handwriting displayed on the screen does not correspond to the writing trajectory of the stylus, such as broken lines or hooks. Figure 2a shows the handwriting displayed on the screen in response to the stylus writing operation under normal conditions. In abnormal conditions, hooks may appear as shown in the dotted circle in Figure 2b, or broken lines may appear as shown in the dotted circle in Figure 2c.

[0064] Alternatively, users can perform clicks on the tablet screen using a stylus, and the tablet can respond to these clicks. For example, if a user clicks the back control on the screen with the stylus, the tablet will respond by returning to the previous page. If a user clicks a thumbnail on the screen with the stylus, the tablet will respond by displaying the image corresponding to the thumbnail. However, in some scenarios, tablets may exhibit response delays or other anomalies to click operations.

[0065] Analysis revealed that when a tablet computer simultaneously sends data to some Bluetooth headsets and uses a stylus, issues such as backlash, disconnection, or response delays can easily occur. As shown in Figure 3A, the tablet computer can send audio data to Bluetooth headsets while simultaneously receiving writing data from a stylus. The tablet's Bluetooth then reports the writing data from the stylus to the screen so that the screen can draw the handwriting. Sending writing data from the tablet to the headset does not consume Bluetooth channel resources; however, reporting writing data to the screen does. Therefore, if the tablet still uses the first transmission rate to send data to the Bluetooth headset, and the transmission rate is too high, consuming too much Bluetooth channel resources, it may affect the transmission of writing data reported to the screen. Consequently, Bluetooth cannot report the writing data from the stylus to the screen in a timely manner, and the screen cannot draw the handwriting promptly. In another scenario, the writing data reported by Bluetooth to the screen may be delayed; this can easily lead to backlash or response delays. In another scenario, the writing data reported by Bluetooth to the screen may be lost; in this case, disconnection or unresponsiveness may occur.

[0066] Figure 3B shows partial information from the Bluetooth logs of the host controller interface (HMAC) for handwriting data reported to the screen via Bluetooth in some specific examples. The Bluetooth logs show the time and time delta corresponding to multiple attribute protocol (ATT) notification packets. Each ATT notification packet corresponds to one instance of handwriting data reported to the screen via Bluetooth. The time delta represents the interval between the reporting time of this handwriting data and the reporting time of the previous handwriting data. It can be seen that the time deltas corresponding to the data highlighted in dashed lines and bold text are relatively large.

[0067] Figure 3C illustrates, in some specific examples, the actual encoded audio bitrate of the tablet computer and the corresponding time when the tablet computer sends data to the Bluetooth headset. This actual encoded audio bitrate is the transmission bitrate used by the tablet computer to send data to the Bluetooth headset. It can be seen that the actual encoded audio bitrate of the tablet computer is relatively high for most of the time, such as exceeding 1 megabit per second (Mbit / s). Comparing the information shown in Figures 3B and 3C, it can be determined that at the points in time when the tablet computer uses a higher transmission bitrate to send data to the Bluetooth headset, the time interval for the tablet computer's Bluetooth to report the writing time to the screen is relatively long.

[0068] Based on this, this application proposes a Bluetooth transmission rate control method. This method is used in scenarios where multiple Bluetooth devices, such as tablets, are simultaneously connected, to lower the transmission rate of one Bluetooth device to ensure that data from other Bluetooth devices can be transmitted normally. Taking a first electronic device as an example, at a first time point, after establishing a Bluetooth connection with a second electronic device, the first electronic device sends data to the second electronic device at a first transmission rate. At a second time point, if the first electronic device detects a decrease in Bluetooth channel quality compared to the first time point, it sends data to the second electronic device at a second transmission rate. The second transmission rate is lower than the first transmission rate. That is, when the first electronic device establishes a Bluetooth connection with the second electronic device and the Bluetooth channel quality deteriorates, the transmission rate of the second electronic device is lowered. This ensures that the first electronic device has more Bluetooth channel resources allocated to other devices that need them, guaranteeing that the first electronic device can transmit data from other devices normally.

[0069] Specifically, the transmission bitrate corresponding to a Bluetooth device can refer to the transmission bitrate at which electronic devices such as tablets send data to the Bluetooth device, such as when a tablet sends audio data to Bluetooth headphones. Alternatively, the transmission bitrate corresponding to a Bluetooth device can refer to the data transmitted by electronic devices such as tablets to the Bluetooth device, such as when a tablet's Bluetooth reports writing data from a stylus to the screen.

[0070] In some embodiments of this application, the first electronic device supports simultaneous connection to at least two Bluetooth devices. At a first time point, the first electronic device establishes a Bluetooth connection with a second electronic device, and the first electronic device sends data to the second electronic device at a first transmission code rate. The transmission code rate corresponding to the second electronic device is greater than or equal to a preset threshold. At a second time point, the first electronic device establishes a Bluetooth connection with a third electronic device. At this time, the first electronic device adds a new Bluetooth connection, which may cause a decrease in Bluetooth channel quality. If the first electronic device detects that the Bluetooth channel quality at the second time point is lower than that at the first time point, it sends data to the second electronic device at a second transmission code rate, which is lower than the first transmission code rate. That is, when the first electronic device is simultaneously connected to multiple electronic devices (including the second electronic device), the transmission code rate used when sending data to the second electronic device will be appropriately reduced. In this way, by reducing the code rate used when sending data to the second electronic device, the data transmission rate of other electronic devices (such as the third electronic device) can be guaranteed, the time interval between two adjacent data transmissions can be reduced, and latency can be reduced.

[0071] Taking a tablet computer as the first electronic device, a Bluetooth headset as the second electronic device, and a stylus as the third electronic device as an example, when the tablet computer is only connected to the Bluetooth headset, it sends data to the Bluetooth headset at a first transmission code rate, which is greater than or equal to a preset threshold. When the tablet computer is simultaneously connected to both the Bluetooth headset and the stylus, it sends data to the Bluetooth headset at a second transmission code rate, which is lower than the first transmission code rate. Therefore, in this embodiment of the application, when the tablet computer is simultaneously connected to both the Bluetooth headset and the stylus, the tablet computer will send data to the Bluetooth headset at a second transmission code rate lower than the first transmission code rate. This ensures the tablet computer's reporting rate of writing data from the stylus, reduces the time interval between two adjacent reports of writing data, and decreases latency. This ensures that the stylus data can be reported to the screen in a timely manner, and the screen can draw the handwriting based on the stylus data in a timely manner, thus avoiding abnormalities such as hooks and broken lines in the stylus handwriting display.

[0072] Specifically, the writing data from the stylus can be pressure-sensitive data. The tablet computer reports the writing data to the screen via Bluetooth, which can be achieved through pass-through.

[0073] In some embodiments of this application, the first electronic device sends data to the second electronic device using a preset encoder. For example, the preset encoder may be based on LDAC or LHDC encoding.

[0074] In some embodiments of this application, the scenario corresponding to the data sent by the first electronic device to the second electronic device is: the first electronic device sends audio data or call data to the second electronic device.

[0075] In some embodiments, the aforementioned first electronic device may be a mobile phone, tablet computer, personal computer (PC), smart screen, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, smartwatch and other wearable devices, artificial intelligence (AI) speaker, and in-vehicle equipment. It may also be various teaching aids (e.g., learning machines, early education machines), smart toys, portable robots, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, media players, and other Bluetooth-enabled devices. Furthermore, it may be a device with mobile office functions, a smart home function, an audio-visual entertainment function, a device supporting smart travel, or other Bluetooth-enabled devices. This application does not impose any special limitations on the specific form of the device.

[0076] Both the second and third electronic devices mentioned above are Bluetooth-enabled electronic devices. For example, the second electronic device can be a Bluetooth speaker, Bluetooth headset, stylus, Bluetooth keyboard, smartwatch, smart bracelet, etc. Similarly, the third electronic device can also be a Bluetooth speaker, Bluetooth headset, stylus, Bluetooth keyboard, smartwatch, smart bracelet, etc.

[0077] The Bluetooth transmission rate control method proposed in this application will be described in detail below with reference to the accompanying drawings.

[0078] Figure 4 illustrates the flowchart of a Bluetooth transmission rate control method in some embodiments of this application. In this embodiment, a tablet computer is used as the first electronic device and a Bluetooth headset is used as an example for illustration.

[0079] S201. Turn on Bluetooth on the tablet.

[0080] The specific implementation process of enabling Bluetooth on a tablet computer can be found in the descriptions in related technologies, and will not be repeated in the embodiments of this application.

[0081] S202. At the first moment, the tablet computer establishes a Bluetooth connection with the Bluetooth headset.

[0082] The specific process of establishing a Bluetooth connection between a tablet computer and a Bluetooth headset can be found in the descriptions in related technologies, and will not be repeated in the embodiments of this application.

[0083] S203. The tablet computer sends data to the Bluetooth headset at the first transmission bit rate.

[0084] In scenarios where a user listens to music on a tablet using Bluetooth headphones, or watches videos on a tablet while connected to Bluetooth headphones, the data sent by the tablet to the Bluetooth headphones can specifically be audio data.

[0085] Users can also use Bluetooth headsets to answer audio or video calls on the tablet. During a call, the tablet sends data to the Bluetooth headset, including sending call data from the tablet to the Bluetooth headset.

[0086] The tablet computer sends data to the Bluetooth headset, specifically through the tablet's Bluetooth. That is, S203 above can specifically include: the tablet computer's Bluetooth sending data to the Bluetooth headset at a first transmission code rate. Here, Bluetooth can specifically refer to a Bluetooth control module. This Bluetooth control module can include a Bluetooth application at the application layer, a Bluetooth framework at the application framework layer, a Bluetooth manager at the hardware abstraction layer, and a Bluetooth driver at the kernel layer.

[0087] The transmission bitrate used by the tablet to send data to the Bluetooth headset can be controlled by the encoder used to send data to the Bluetooth headset (hereinafter referred to as the encoder corresponding to the Bluetooth headset). After the tablet and Bluetooth headset establish a Bluetooth connection, the initial transmission bitrate used by the encoder corresponding to the Bluetooth headset is determined by the encoder itself based on the information of both parties. In the example above, the first transmission bitrate is the initial transmission bitrate used by the tablet to send data to the Bluetooth headset. For example, if the encoder is an LDAC encoder, both parties support LDAC encoding, and both support 990 kilobits per second (kbps), then the initial transmission bitrate can be 990 kbps.

[0088] In some embodiments, the second electronic device, such as a Bluetooth headset, meets certain conditions before the tablet computer executes steps S204 and S205. These conditions can be referred to as preset device conditions. The tablet computer can execute subsequent processes, such as S204 and S205, after establishing a Bluetooth connection with a device that meets the preset device conditions. In some embodiments, after step S202, the method further includes: the tablet computer determining whether the device (in this embodiment, a Bluetooth headset) that has established a Bluetooth connection with the tablet computer meets the preset device conditions. If so, steps S204 and S205 are executed. If the Bluetooth headset does not meet the preset device conditions, steps S204 and S205 do not need to be executed, and data can be continuously sent to the Bluetooth headset at the first transmission rate.

[0089] In some embodiments, the aforementioned preset device conditions may specifically include: the transmission bit rate used by the tablet computer to transmit data to the Bluetooth headset is greater than or equal to a preset threshold. That is, when the tablet computer detects that the transmission bit rate of the device establishing a Bluetooth connection with it is greater than or equal to the preset threshold, it needs to execute steps S204 and S205. The preset threshold can be set according to actual conditions, for example, it can be set to 600kbps, 660kbps, etc.

[0090] In other embodiments, the aforementioned preset device conditions may specifically include: the Bluetooth headset belongs to a preset device. The preset device may be a device that requires dynamic bitrate adjustment in advance. In some embodiments, the tablet computer may pre-store device identifiers for one or more preset devices. For example, the device identifier may specifically be a device model, such as Bluetooth headset model 1, Bluetooth headset model 2, Bluetooth speaker model 3, etc.

[0091] In some embodiments, the aforementioned preset device conditions may specifically include: the encoder corresponding to the Bluetooth headset belongs to a preset encoder. As described above, different Bluetooth encoders have different bitrate ranges. Some encoders use higher transmission bitrates. If the encoder corresponding to the device establishing a Bluetooth connection with the tablet belongs to the aforementioned preset encoder, the tablet needs to execute S204 and S205. Therefore, in some embodiments, the tablet may also pre-store encoder identifiers of some preset encoders. For example, the encoder identifier may be the encoder type or device code, etc. In some specific examples, the encoder types of the preset encoders include LDAC and LHDC.

[0092] In the technical solution proposed in this application embodiment, the tablet computer only executes S204 and S205 when connecting to certain specific Bluetooth devices. For example, if the condition is set to a higher transmission bitrate for the Bluetooth device connected to the tablet computer, then the tablet computer is triggered to execute S204 and S205. In this way, for devices with a lower initial transmission bitrate, the subsequent process will not be executed, and the tablet computer will not adjust the bitrate when transmitting data from these devices.

[0093] In the example shown in Figure 4, we will take the Bluetooth headset meeting the preset device conditions as an example. After the tablet detects that the Bluetooth headset is connected, it will trigger the execution of S204 and S205.

[0094] S204. The tablet computer detected that the Bluetooth channel quality at the second time point was lower than that at the first time point.

[0095] Before step S204 of the above method, the method may further include: at a second time point, the tablet computer acquires the Bluetooth channel quality at the second time point. Then, the Bluetooth channel quality at the second time point can be compared with the Bluetooth channel quality at the first time point to determine whether the Bluetooth channel quality of the tablet computer has decreased compared to the first time point.

[0096] Bluetooth channel quality indicates the quality of the tablet's current Bluetooth transmission; the higher the Bluetooth channel quality, the faster the Bluetooth transmission rate and the higher the transmission quality; conversely, the lower the Bluetooth channel quality, the lower the Bluetooth transmission rate and the lower the transmission quality.

[0097] In some embodiments, the Bluetooth channel quality has corresponding quantization parameters. The tablet computer can obtain the current Bluetooth channel quality by acquiring these quantization parameters. For example, a higher parameter value indicates a higher Bluetooth channel quality. Specifically, S204 may include: the tablet computer detecting a parameter value for the Bluetooth channel quality at a second time point that is lower than the parameter value for the Bluetooth channel quality at the first time point.

[0098] In some embodiments, the tablet computer detects Bluetooth channel quality, specifically by monitoring the Bluetooth channel quality through the tablet computer's Bluetooth chip.

[0099] S205. The tablet computer sends data to the Bluetooth headset at a second transmission rate, which is lower than the first transmission rate.

[0100] The tablet computer switches the transmission bitrate used to send data to the Bluetooth headset from a first transmission bitrate to a second transmission bitrate; this can also be referred to as the tablet computer updating the transmission bitrate used to send data to the Bluetooth headset. The specific implementation process of the tablet computer updating the transmission bitrate used to send data to the Bluetooth headset will be described in detail in later embodiments.

[0101] In the example shown in Figure 4, the tablet computer triggers an update to the transmission rate used to send data to the Bluetooth headset after detecting a degradation in Bluetooth channel quality. In some embodiments, the Bluetooth channel quality can be denoted as the Bluetooth state, and the condition that the tablet computer needs to meet to update the transmission rate can be denoted as the first preset condition. That is, in some embodiments, the tablet computer updates the transmission rate used to send data to the Bluetooth headset when it detects that the Bluetooth state meets the first preset condition.

[0102] In some embodiments where the Bluetooth chip monitors the Bluetooth channel quality, after S204 described above, the tablet's Bluetooth chip can send a notification message to the tablet's Bluetooth system indicating a deterioration in Bluetooth channel quality. In response to receiving this notification message, the tablet's Bluetooth system can determine a second transmission code rate lower than the first transmission code rate, and then, in S205, send the second transmission code rate to the encoder corresponding to the Bluetooth headset, so that the encoder corresponding to the Bluetooth headset encodes according to the second transmission code rate.

[0103] In other embodiments where the Bluetooth chip detects the Bluetooth channel quality, after S204 above, the tablet's Bluetooth chip can select appropriate bitrate information based on the current Bluetooth state (such as Bluetooth channel quality). The selected bitrate information can be the target bitrate information described in the above embodiments. In some embodiments, the process by which the Bluetooth chip selects appropriate bitrate information based on the current Bluetooth state can be referred to as the Bluetooth chip's dynamic bitrate adjustment function. In some embodiments, the Bluetooth chip needs to enable the dynamic bitrate adjustment function before performing the above method. The specific implementation process of enabling the Bluetooth chip's dynamic bitrate adjustment function will be described in detail in later embodiments.

[0104] It should be noted that the dynamic bitrate adjustment function of the Bluetooth chip is specifically used to adaptively adjust the transmission bitrate of the tablet computer to devices that meet preset device conditions, such as Bluetooth headsets.

[0105] Furthermore, taking the target bitrate information as the transmission bitrate as an example, after S204 above, the tablet's Bluetooth chip can select a suitable transmission bitrate based on the current Bluetooth state (e.g., the selected transmission bitrate could be the second transmission bitrate mentioned above), and then send the suitable transmission bitrate to the tablet's Bluetooth. The tablet's Bluetooth then sends the suitable transmission bitrate to the encoder corresponding to the Bluetooth headset, so that the encoder corresponding to the Bluetooth headset can encode according to the transmission bitrate.

[0106] Alternatively, taking the target bitrate information as a bitrate level as an example, after S204 above, the tablet's Bluetooth chip can also select a suitable transmission bitrate level based on the current Bluetooth status; this transmission bitrate level corresponds to the transmission bitrate. For example, the selected transmission bitrate level can correspond to the second transmission bitrate mentioned above. After the Bluetooth chip selects a suitable transmission bitrate level, it can send the selected transmission bitrate level to the tablet's Bluetooth, so that it can send the transmission bitrate level to the encoder corresponding to the Bluetooth headset, and the encoder can encode according to the transmission bitrate corresponding to the transmission bitrate level. In the above embodiment, the suitable transmission bitrate level selected by the Bluetooth chip can be the bitrate level corresponding to the second transmission bitrate.

[0107] As described in the above embodiments, the transmission bitrate used by the tablet computer to send data to the Bluetooth headset is controlled by the encoder corresponding to the Bluetooth headset. In S205, the bitrate used by the encoder corresponding to the Bluetooth headset can be updated to adjust the transmission bitrate for sending data to the Bluetooth headset. In this embodiment, updating the bitrate used by the encoder corresponding to the Bluetooth headset can be achieved by the tablet computer's Bluetooth sending the transmission bitrate to be updated to the encoder corresponding to the Bluetooth headset. That is, S205 specifically includes: the tablet computer's Bluetooth sending target bitrate information to the encoder corresponding to the Bluetooth headset, the target bitrate information representing the second transmission bitrate. Based on the target bitrate information, the encoder corresponding to the Bluetooth headset controls the transmission bitrate used to send data to the Bluetooth headset to switch from the first transmission bitrate to the second transmission bitrate. In some embodiments, the target bitrate information can be the second transmission bitrate or a bitrate level corresponding to the second transmission bitrate.

[0108] In some embodiments, the tablet's Bluetooth can send a bitrate update command to the Bluetooth chip, which carries target bitrate information.

[0109] Specifically, the tablet's Bluetooth sends the target bitrate information to the encoder corresponding to the Bluetooth headset, which can be achieved through a preset callback function. This preset callback function is used to trigger the tablet's Bluetooth to send the target bitrate information to the encoder corresponding to the Bluetooth headset. After receiving the target bitrate information reported by the Bluetooth chip, the tablet's Bluetooth calls the preset callback function to send the target bitrate information to the encoder corresponding to the Bluetooth headset.

[0110] If the tablet's Bluetooth sends target bitrate information to the encoder of the Bluetooth headset by calling a preset callback function, the tablet's Bluetooth needs to register the preset callback function first.

[0111] In some embodiments, the tablet computer's Bluetooth can register a preset callback function when the Bluetooth function is turned on. In this embodiment, after S201 above, the method may further include: registering a preset callback function for the tablet computer's Bluetooth.

[0112] In other embodiments, the tablet's Bluetooth can register a preset callback function when the tablet connects to a Bluetooth headset. In this embodiment, after S202 above, the method may further include: registering a preset callback function for the tablet's Bluetooth. Specifically, after detecting that a Bluetooth connection has been established between the tablet and a device, the tablet's Bluetooth can determine whether the device meets preset conditions. If the device that has established the Bluetooth connection meets the preset device conditions, then the tablet's Bluetooth registers the preset callback function.

[0113] Furthermore, the tablet's Bluetooth registration preset callback function can specifically be a preset callback function registered by the tablet's Bluetooth within the Bluetooth protocol stack. For example, the preset callback function could be a BTIF AV vendor-specific event callback.

[0114] In the technical solution proposed in this application embodiment, a pre-registered callback function is used to trigger the sending of target bitrate information to the corresponding encoder. This ensures that after receiving the target bitrate information, Bluetooth can accurately send it to the encoder corresponding to the Bluetooth headset. Furthermore, this ensures that when the tablet establishes a Bluetooth connection with the Bluetooth headset and the Bluetooth channel quality degrades, it controls the encoder corresponding to the Bluetooth headset to lower the transmission bitrate.

[0115] In the technical solution proposed in this application, after the tablet computer and the Bluetooth headset establish a Bluetooth connection, the tablet computer can monitor the Bluetooth channel quality. If it is found that the Bluetooth channel quality deteriorates after the tablet computer and the Bluetooth headset establish a Bluetooth connection, the tablet computer can reduce the transmission bit rate used to send data to the Bluetooth headset. By reducing the transmission bit rate used by the tablet computer to send data to the Bluetooth headset, more Bluetooth channel resources can be allocated to other devices that need them.

[0116] Next, we will explain in detail the specific implementation process of enabling the dynamic bitrate adjustment function of the Bluetooth chip.

[0117] In some embodiments, the Bluetooth chip enables the dynamic bitrate adjustment function. Specifically, the tablet computer's Bluetooth sends an enable command to the Bluetooth chip, and the Bluetooth chip responds to the enable command to enable the dynamic bitrate adjustment function.

[0118] In the example shown in Figure 4, when the tablet computer is connected to a Bluetooth headset and detects a degradation in Bluetooth channel quality, dynamic bitrate adjustment is required. As explained above, the Bluetooth chip can monitor Bluetooth channel quality. Therefore, in some embodiments, the tablet computer's Bluetooth can send an enable command to the Bluetooth chip after connecting the Bluetooth headset, causing the Bluetooth chip to activate the dynamic bitrate adjustment function. Subsequently, the tablet computer's Bluetooth chip can perform the dynamic bitrate adjustment operation. Specifically, when the Bluetooth chip detects a degradation in Bluetooth channel quality, it selects appropriate bitrate information and sends it to Bluetooth; Bluetooth then sends the appropriate bitrate information to the encoder corresponding to the Bluetooth headset.

[0119] As described in the above embodiments, the second electronic device, such as a Bluetooth headset, will only execute the subsequent processes if preset device conditions are met. Therefore, the tablet's Bluetooth can control the Bluetooth chip to enable the dynamic bitrate adjustment function after detecting that the tablet has established a Bluetooth connection with a device that meets the preset device conditions. In some embodiments, the tablet's Bluetooth can send an enable command to the Bluetooth chip when it detects that the device that has established a Bluetooth connection with the tablet meets the preset device conditions. Subsequently, the Bluetooth chip can respond to the enable command and enable the dynamic bitrate adjustment function. This ensures that the tablet can monitor the Bluetooth channel quality in a timely manner and update the transmission bitrate used to send data to the Bluetooth headset when the Bluetooth channel quality meets certain conditions.

[0120] In the implementation of the Bluetooth chip enabling the dynamic bitrate adjustment function when the tablet computer detects a Bluetooth connection established with a device that meets preset device conditions, the tablet computer can control the Bluetooth chip to disable the dynamic bitrate adjustment function after disconnecting the Bluetooth connection with the device that meets the preset device conditions. In some embodiments, after S205, the implementation further includes: the tablet computer disconnecting the Bluetooth headset, and the tablet computer's Bluetooth sending a shutdown command to the Bluetooth chip. The Bluetooth chip responds to the shutdown command and disables the dynamic bitrate adjustment function. Afterwards, if the Bluetooth channel quality changes (e.g., degrades), the Bluetooth chip may stop reporting the target bitrate information to Bluetooth. This ensures that when Bluetooth devices that do not meet the preset device conditions establish a connection with the tablet computer, the tablet computer can send data to these Bluetooth devices at a normal transmission bitrate.

[0121] In other embodiments, after the tablet computer lowers the transmission rate used to send data to the Bluetooth headset, if it detects an improvement in the Bluetooth channel quality, it can readjust the transmission rate, such as increasing it. In one specific example, after the Bluetooth channel quality improves, the transmission rate used to send data to the Bluetooth headset can be restored to the first transmission rate. In some embodiments, after S205, if the tablet computer detects that the Bluetooth channel quality at a third time point is higher than that at a second time point, it sends data to the Bluetooth headset at a third transmission rate. The third transmission rate is greater than the second transmission rate. It should be noted that the third transmission rate and the first transmission rate can be equal or unequal. Thus, while sending data to the Bluetooth headset at a lower transmission rate (such as the second transmission rate mentioned above), if the Bluetooth channel quality improves, the transmission rate used to send data to the Bluetooth headset can be increased. Therefore, while ensuring the tablet computer can transmit data to other Bluetooth devices, the sound quality of the Bluetooth headset can be improved.

[0122] Common factors affecting Bluetooth channel quality include the connection and disconnection of other Bluetooth devices, and interference from other wireless devices (such as Wi-Fi being turned on or off). Specifically, when Bluetooth channel quality degrades because another Bluetooth device establishes a Bluetooth connection with the tablet, and the tablet sends data to the Bluetooth headset at a high transmission rate, the Bluetooth headset consumes a significant amount of the tablet's Bluetooth channel resources. This can lead to insufficient Bluetooth channel resources for the tablet to allocate to other Bluetooth devices, resulting in lower data transmission rates, longer data intervals, and higher latency. In the technical solution proposed in this application, after the tablet and Bluetooth headset establish a connection, if the tablet establishes a Bluetooth connection with other devices, the Bluetooth channel quality of the tablet will degrade. In this case, the tablet will lower the transmission rate used to send data to the Bluetooth headset. This allows the tablet to allocate sufficient Bluetooth channel resources to other newly established Bluetooth devices, ensuring their Bluetooth transmission rate, reducing data intervals, and lowering latency.

[0123] The following description, with reference to Figure 5, uses a scenario where a tablet computer simultaneously establishes connections with two Bluetooth devices as an example to illustrate the Bluetooth transmission rate control method proposed in this application. In this embodiment, the first electronic device is a tablet computer, the second electronic device is a Bluetooth headset, and the third electronic device is a stylus.

[0124] S301. Turn on Bluetooth on the tablet.

[0125] S302. At the first moment, the tablet computer establishes a Bluetooth connection with the Bluetooth headset.

[0126] S303. The tablet's Bluetooth sends data to the Bluetooth headset at the first transmission bit rate.

[0127] S304. At the second time point, the tablet establishes a Bluetooth connection with the stylus.

[0128] The specific process of establishing a Bluetooth connection between the tablet and the stylus can be found in the descriptions in related technologies, and will not be repeated in the embodiments of this application.

[0129] Since the tablet established a Bluetooth connection with the Bluetooth headset at the first time point, prior to the second time point, the tablet simultaneously established Bluetooth connections with both the Bluetooth headset and the stylus after the second time point. Typically, after establishing a Bluetooth connection with the stylus, the stylus primarily sends data to the tablet.

[0130] S305. The stylus sends writing data to the tablet via Bluetooth.

[0131] S306. The tablet's Bluetooth sends the written data to the screen.

[0132] As explained above, after receiving writing data from the stylus, the tablet screen can draw and display the corresponding handwriting based on the writing data, or respond to the writing data by updating the page.

[0133] As described in the above embodiments, the addition of a Bluetooth connection between the tablet computer and the stylus at a second time point will cause a decrease in the Bluetooth channel quality of the tablet computer. In some embodiments, the tablet computer can obtain the Bluetooth channel quality after establishing a Bluetooth connection with the stylus at the second time point and compare it with the Bluetooth channel quality at the first time point.

[0134] S307. The tablet computer determines whether the Bluetooth channel quality is lower than the Bluetooth channel quality at the first time point.

[0135] In S307, the tablet compares the Bluetooth channel quality at the second time point after the tablet and stylus establish a Bluetooth connection, with the Bluetooth channel quality at the first time point. Understandably, the tablet can execute S305 and S306 first, then S307. Alternatively, the tablet can execute S307 first, then S305 and S306. Or, the tablet can execute S305, S306, and S307 simultaneously.

[0136] If the result of S307 is yes, it means that after the tablet and stylus establish a Bluetooth connection, the Bluetooth channel quality has decreased compared to the initial time point. In this case, the transmission bit rate used by the tablet to send data to the Bluetooth headset can be reduced, as in S308. It should be noted that if the result of S307 is no, the tablet's Bluetooth does not need to perform any operation; the case where the result of S307 is no is not shown in Figure 5.

[0137] S308. The tablet computer's Bluetooth sends data to the Bluetooth headset at a second transmission rate, which is lower than the first transmission rate.

[0138] In the example shown in Figure 5, the tablet first establishes a Bluetooth connection with the headset, and then with the stylus. Therefore, at the first point in time before establishing a Bluetooth connection with the stylus, the tablet sends data to the headset at a first transmission rate. At the second point in time, after establishing a Bluetooth connection with the stylus, the tablet sends data to the headset at a second transmission rate. In other words, after establishing a Bluetooth connection with the stylus, the tablet lowers the transmission rate used to send data to the headset.

[0139] In the technical solution proposed in this application embodiment, at the second time point when the tablet computer simultaneously establishes Bluetooth connections with both the stylus and the Bluetooth headset, the tablet computer can send data to the Bluetooth headset at a lower transmission rate. Reducing the transmission rate used to send data to the Bluetooth headset also reduces the Bluetooth channel resources occupied by the Bluetooth headset on the tablet computer. This allows the tablet computer's Bluetooth to allocate more Bluetooth channel resources for transmitting data from the stylus. Therefore, at the second time point, the tablet computer can ensure a higher data transmission rate from the stylus, reducing the time interval between two data transmissions and lowering latency. As explained above, the tablet computer transmits data from the stylus, primarily by sending the received writing data from the stylus to the screen via Bluetooth. Using this method, even if the tablet computer is simultaneously connected to both a Bluetooth headset and a stylus, its Bluetooth can promptly report the data from the stylus to the screen, ensuring that the screen can draw and display the corresponding handwriting in a timely manner. This also avoids abnormal situations such as stroke retraction and broken lines.

[0140] If, in the example S204 shown in Figure 4, the reason affecting the Bluetooth channel quality of the tablet is because the tablet has Wi-Fi enabled, then at the second time point, the tablet will still only be connected to the Bluetooth headset. In this case, lowering the transmission bitrate used by the tablet to send data to the Bluetooth headset may affect the transmission quality of the Bluetooth headset, such as reducing the sound quality. To avoid this, the tablet can, when simultaneously connected to the Bluetooth headset and other Bluetooth devices, decide whether to adjust (e.g., lower) the transmission bitrate used to send data to the Bluetooth headset based on the Bluetooth channel quality, ensuring that the tablet has sufficient Bluetooth channel resources to transmit data from other Bluetooth devices besides the Bluetooth headset. The above solution can be implemented in any of the following ways:

[0141] In the first method, as described in the above embodiments, the Bluetooth chip can monitor the Bluetooth channel quality when the dynamic bitrate adjustment function is enabled, and determine whether the transmission bitrate needs to be adjusted based on the Bluetooth channel quality. Therefore, the tablet computer can control the Bluetooth chip to enable the dynamic bitrate adjustment function only when at least two Bluetooth devices are connected simultaneously, including devices that meet preset device conditions (such as Bluetooth headsets). In this way, the Bluetooth chip can perform dynamic bitrate adjustment operations.

[0142] The second method involves enabling dynamic bitrate adjustment via the tablet's Bluetooth chip after connecting a Bluetooth headset. The Bluetooth chip then determines whether to adjust the transmission bitrate based on whether the tablet is connected to two Bluetooth devices and the Bluetooth channel quality. If the Bluetooth chip detects that the tablet is connected to two Bluetooth devices, including a device that meets preset device conditions (such as a Bluetooth headset), it can perform dynamic bitrate adjustment.

[0143] The first method described above will be explained below with reference to Figure 6. Figure 6 shows the flowchart of the Bluetooth transmission rate control method in some embodiments of this application.

[0144] S400 tablet PC: Turn on Bluetooth.

[0145] S401. The tablet computer establishes a Bluetooth connection with the Bluetooth headset.

[0146] S402. The tablet computer sends data to the Bluetooth headset at the first transmission bit rate.

[0147] S403. The tablet and stylus establish a Bluetooth connection.

[0148] Understandably, after S403, the tablet computer can execute S305 and S306 as shown in Figure 5. This process is not shown in Figure 6.

[0149] S404. The tablet computer determines whether at least two Bluetooth devices are connected simultaneously, and whether the transmission bit rate of at least one of the Bluetooth devices is greater than or equal to a preset threshold.

[0150] It should be noted that the tablet can execute S404 at any time after Bluetooth is enabled. For example, in the example shown in Figure 6, the tablet can execute S404 before S401, S402, or S403, but the result will be negative; this situation is not shown in Figure 6. If the result of S404 is negative, the tablet does not need to perform any other operations.

[0151] In the embodiment shown in Figure 6, the transmission bit rate corresponding to the Bluetooth headset is greater than or equal to a preset threshold, and the tablet computer simultaneously establishes a Bluetooth connection with both the Bluetooth headset and the stylus. Therefore, the determination result of S404 is that the tablet computer can control the Bluetooth chip to enable the dynamic bit rate adjustment function.

[0152] S405. The tablet computer's Bluetooth sends an enable command to the Bluetooth chip.

[0153] The S406 Bluetooth chip responds to the power-on command and enables the dynamic bitrate adjustment function.

[0154] When the S407 Bluetooth chip detects that the Bluetooth status meets the first preset condition, it reports the target bitrate information that matches the current Bluetooth status to the tablet's Bluetooth.

[0155] Because a tablet's Bluetooth only sends an enable command to the Bluetooth chip when it detects that the tablet is connected to at least two Bluetooth devices, and that the transmission bit rate of one of these devices is greater than or equal to a preset threshold, the Bluetooth chip can determine whether to adjust the transmission bit rate based solely on the Bluetooth channel quality. That is, the aforementioned Bluetooth state includes Bluetooth channel quality. The Bluetooth state meeting the first preset condition can specifically include a decrease in Bluetooth channel quality.

[0156] S408. The tablet computer's Bluetooth sends the target bit rate information to the encoder corresponding to the Bluetooth headset.

[0157] S409. The encoder corresponding to the Bluetooth headset sends data to the Bluetooth headset using a second transmission code rate based on the target code rate information; the second transmission code rate is lower than the first transmission code rate.

[0158] In some embodiments, the encoder corresponding to the Bluetooth headset can send data to the Bluetooth headset using a second transmission bit rate based on the target bit rate information, switching from the first transmission bit rate to the second transmission bit rate.

[0159] In the technical solution proposed in this application, when the tablet computer is connected to only one Bluetooth device, the transmission bitrate of that Bluetooth device will not be adjusted regardless of its actual transmission bitrate. However, when the tablet computer is connected to two or more Bluetooth devices simultaneously, and the transmission bitrate of one of the Bluetooth devices (e.g., the Bluetooth headset mentioned above) is greater than or equal to a preset threshold, the tablet computer will lower the transmission bitrate of Bluetooth device A if the Bluetooth channel quality degrades. This ensures that the tablet computer has sufficient Bluetooth channel resources for transmitting data from other Bluetooth devices.

[0160] As described in the above embodiments, the tablet computer can disable the dynamic bitrate adjustment function after enabling it. In the embodiment shown in Figure 6, when the tablet computer's Bluetooth is connected to at least two Bluetooth devices simultaneously, and the transmission bitrate of at least one of the Bluetooth devices is greater than or equal to a preset threshold, the tablet computer controls the Bluetooth chip to enable the dynamic bitrate adjustment function. Based on this, when the Bluetooth devices connected to the tablet computer no longer meet the conditions for enabling the dynamic bitrate adjustment function, the tablet computer can control the Bluetooth chip to disable the dynamic bitrate adjustment function. Specifically, the conditions for enabling the dynamic bitrate adjustment function are no longer met in any of the following situations: the number of Bluetooth devices connected to the tablet computer is less than 2 (e.g., 0 or 1), or the transmission bitrate of all Bluetooth devices connected to the tablet computer is less than or equal to the preset threshold. Specifically, after S405 above, if the tablet computer's Bluetooth detects that the tablet computer has disconnected from the Bluetooth headset or the stylus, the tablet computer's Bluetooth can send a shutdown command to the Bluetooth chip. The Bluetooth chip responds to the shutdown command and disables the dynamic bitrate adjustment function.

[0161] If the tablet's Bluetooth detects that the tablet and stylus have disconnected via Bluetooth, it means that the tablet's Bluetooth does not need to transmit data from the stylus. In this case, to ensure the sound quality of the Bluetooth headset, the transmission bitrate for sending data to the Bluetooth headset can be adjusted again, such as by increasing the transmission bitrate. Specifically, the transmission bitrate of the encoder corresponding to the Bluetooth headset can be restored to the first transmission bitrate. In some embodiments, after S405, if the tablet's Bluetooth detects that the tablet and stylus have disconnected via Bluetooth, the tablet's Bluetooth, while sending a shutdown command to the Bluetooth chip, can also send a bitrate update command (which can be denoted as bitrate update command 1) to the encoder corresponding to the Bluetooth headset. This bitrate update command 1 instructs the encoder corresponding to the Bluetooth headset to restore the transmission bitrate to the first transmission bitrate. Therefore, it can be ensured that the tablet can send data to the Bluetooth headset at a higher transmission bitrate when only establishing a Bluetooth connection with the Bluetooth headset, thus guaranteeing the sound quality of the Bluetooth headset.

[0162] This ensures that when the tablet computer updates its status to connect only to a second electronic device, such as a Bluetooth headset, the transmission bitrate corresponding to that Bluetooth headset is restored.

[0163] The second method described above will be explained below with reference to Figure 7.

[0164] S500 tablet PC: Turn on Bluetooth.

[0165] S501. The tablet computer establishes a Bluetooth connection with the Bluetooth headset.

[0166] The S502 tablet computer sends data to the Bluetooth headset at the first transmission bit rate.

[0167] S503. The tablet computer determines whether the transmission bit rate of the connected Bluetooth device is greater than or equal to a preset threshold.

[0168] It should be noted that the tablet can execute S503 at any time after Bluetooth is enabled. For example, in the example shown in Figure 7, the tablet can execute S503 before S501, but the result is negative; this situation is not shown in Figure 7. If the result of S503 is negative, the tablet does not need to perform any other operations.

[0169] In the embodiment shown in Figure 7, the transmission bit rate corresponding to the Bluetooth headset is greater than or equal to a preset threshold. Therefore, the determination result of S503 is yes, and the tablet computer can control the Bluetooth chip to enable the dynamic bit rate adjustment function.

[0170] S504. The tablet computer's Bluetooth sends an enable command to the Bluetooth chip.

[0171] The S505 Bluetooth chip responds to the power-on command and enables the dynamic bitrate adjustment function.

[0172] S506. The tablet and stylus establish a Bluetooth connection.

[0173] When the S507 Bluetooth chip detects that the Bluetooth status meets the second preset condition, it reports the target bitrate information that matches the current Bluetooth status to the tablet's Bluetooth.

[0174] Since the tablet computer sends an enable command to the Bluetooth chip when it detects that the transmission code rate of the Bluetooth device connected to the tablet is greater than or equal to a preset threshold, the Bluetooth chip needs to jointly determine whether to adjust the transmission code rate based on the Bluetooth channel quality and the number of Bluetooth devices connected to the tablet. That is, the aforementioned Bluetooth state can include Bluetooth transmission state and Bluetooth connection state. For example, the Bluetooth transmission state includes Bluetooth channel quality. The Bluetooth connection state includes the number of Bluetooth devices connected to the tablet. In some embodiments, the Bluetooth state meeting the second preset condition includes: Bluetooth channel quality deteriorating, and the number of Bluetooth devices connected to the tablet being greater than or equal to 2.

[0175] Understandably, after enabling the dynamic bitrate adjustment function, the Bluetooth chip can determine at any time whether the Bluetooth state meets the second preset condition, and when the Bluetooth state meets the second preset condition, it reports the target bitrate information matching the current Bluetooth state to the tablet's Bluetooth. For example, in the example shown in Figure 7, the tablet can determine whether the Bluetooth state meets the second preset condition before S506, but the result is no; this situation is not shown in Figure 7. If the Bluetooth state does not meet the second preset condition, the tablet does not need to perform any other operations. For example, the Bluetooth state not meeting the second preset condition can specifically include the following situations: (1) The Bluetooth channel quality decreases, remains unchanged, or increases, and the number of Bluetooth devices connected to the tablet is less than 2. (2) The Bluetooth channel quality remains unchanged or increases, and the number of Bluetooth devices connected to the tablet is greater than or equal to 2.

[0176] In the example shown in Figure 7, since the tablet has established Bluetooth connections with both the Bluetooth headset and the stylus, the number of devices connected to the tablet via Bluetooth is equal to two. Therefore, if the Bluetooth channel quality degrades, the Bluetooth state satisfies the second preset condition.

[0177] S508. The tablet computer's Bluetooth sends the target bit rate information to the encoder corresponding to the Bluetooth headset.

[0178] S509. The encoder corresponding to the Bluetooth headset responds to the target bit rate information and sends data to the Bluetooth headset using a second transmission bit rate; the second transmission bit rate is lower than the first transmission bit rate.

[0179] The technical solution proposed in this application also achieves the following technical effects: When the tablet computer is connected to only one Bluetooth device, the transmission bitrate of that Bluetooth device will not be adjusted regardless of its actual transmission bitrate. However, when the tablet computer is connected to two or more Bluetooth devices simultaneously, and the transmission bitrate of one of the Bluetooth devices (e.g., the Bluetooth headset mentioned above) is greater than or equal to a preset threshold, the tablet computer will lower the transmission bitrate of Bluetooth device A when the Bluetooth channel quality deteriorates. This ensures that the tablet computer can transmit data from other Bluetooth devices normally.

[0180] In the example shown in Figure 7, the Bluetooth devices connected to the tablet no longer meet the conditions for enabling the dynamic bitrate adjustment function as follows: the transmission bitrate of all Bluetooth devices connected to the tablet is less than or equal to a preset threshold. After S505, if it is detected that the tablet has lost its Bluetooth connection with the Bluetooth headset, the tablet's Bluetooth can send a shutdown command to the Bluetooth chip to control the Bluetooth chip to disable the dynamic bitrate adjustment function.

[0181] The above embodiments illustrate how a tablet computer establishes a Bluetooth connection with a Bluetooth headset before establishing a connection with any other Bluetooth device, such as a stylus, without first establishing a Bluetooth connection with any other device. In other embodiments, after turning on Bluetooth, the tablet computer may also establish a Bluetooth connection with other Bluetooth devices (such as the stylus mentioned above) before establishing a Bluetooth connection with the Bluetooth headset. Taking the tablet computer establishing a Bluetooth connection with the stylus as an example, since the tablet computer's Bluetooth is currently only connected to the stylus, the tablet computer can report the writing data to the screen at normal data intervals. However, after the tablet computer establishes a Bluetooth connection with the Bluetooth headset, it cannot report the writing data to the screen while sending data to the Bluetooth headset. If the tablet computer uses a high transmission bitrate when sending data to the Bluetooth headset (e.g., the transmission bitrate is greater than or equal to a preset threshold), the rate at which the tablet computer reports writing data to the screen may decrease, and the interval between two reports of writing data may increase. For the screen, the received writing data may experience significant latency, leading to abnormal issues such as hooks or broken lines when the writing is displayed on the screen. Based on this, in the technical solution proposed in this application embodiment, after the tablet computer and the Bluetooth headset establish a Bluetooth connection, data can be sent to the Bluetooth headset using a first transmission code rate. Subsequently, if the tablet computer's Bluetooth chip detects that the Bluetooth channel quality is lower after connecting the Bluetooth headset compared to when only the stylus is connected, it lowers the transmission code rate used by the tablet computer to send data to the Bluetooth headset, such as changing it from the first transmission code rate to a second transmission code rate.

[0182] Figure 8 illustrates the complete flow of the Bluetooth transmission rate control method in some embodiments. In this embodiment, an LDAC encoder corresponding to the Bluetooth headset is used as an example for illustration.

[0183] The tablet computer first enables Bluetooth. The tablet's Bluetooth settings determine if the Bluetooth chip supports dynamic bitrate adjustment (MBR). If it does, the tablet registers a preset callback function in the Bluetooth protocol stack. After establishing a Bluetooth connection between the tablet and the headset, the tablet's Bluetooth sends an enable command to the Bluetooth chip. The Bluetooth chip responds to this command by enabling MBR. Subsequently, when the Bluetooth chip detects a degradation in Bluetooth channel quality, it reports the target bitrate information to the tablet's Bluetooth. The tablet's Bluetooth then sends this target bitrate information to the LDAC encoder by calling the preset callback function. Finally, the LDAC encoder determines the corresponding target transmission bitrate based on this information and sends data to the Bluetooth headset at that target bitrate.

[0184] In some embodiments, the enable command is specifically implemented by calling the HCI interface.

[0185] The Bluetooth transmission rate control method provided in the embodiments of this application has been described above. The device implementing this method is described below. Figure 9 shows a schematic diagram of the structure of an electronic device 900 provided in an embodiment of this application. The electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, antenna 1, antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, an encoder 970A, a sensor module 980, a button 990, a motor 991, a camera 992, a display screen 993, and a subscriber identification module (SIM) card interface 994, etc. The sensor module 980 may include a pressure sensor 980A, a touch sensor 980B, etc. Exemplarily, the electronic device 900 may be the first electronic device in the above embodiments.

[0186] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 900. In other embodiments of this application, the electronic device 900 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0187] Processor 910 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, a neural network processing unit (NPU), and / or a Bluetooth chip. Different processing units may be independent devices or integrated into one or more processors. For example, processor 910 is used to execute the Bluetooth transmission rate control method in the embodiments of this application.

[0188] The Bluetooth chip is the core component responsible for Bluetooth wireless communication, including the transmission, reception, and processing of wireless signals. In the embodiments of this application, the Bluetooth chip can be used to monitor the Bluetooth channel quality and adaptively adjust the Bluetooth transmission rate when the Bluetooth channel quality meets certain conditions, or when the Bluetooth channel quality and the number of connected Bluetooth devices both meet certain conditions.

[0189] The controller can be the nerve center and command center of the electronic device 900. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0190] The processor 910 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. This memory can store instructions or data that the processor 910 has just used or that are used repeatedly. If the processor 910 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.

[0191] The USB interface 930 is a USB standard compliant interface, which can be a Mini USB interface, Micro USB interface, USB Type-C interface, etc. The USB interface 930 can be used to connect a charger to charge the electronic device 900, and can also be used for data transfer between the electronic device 900 and peripheral devices.

[0192] The external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 910 through the external memory interface 920 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0193] The internal memory 921 can be used to store executable program code, which includes instructions. The processor 910 executes various functional applications and data processing of the electronic device 900 by running the instructions stored in the internal memory 921. The internal memory 921 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.).

[0194] In addition, the internal memory 921 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0195] The charging management module 940 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 940 can receive charging input from the wired charger via a USB interface 930.

[0196] The power management module 941 is used to connect the battery 942, the charging management module 940, and the processor 910. The power management module 941 receives input from the battery 942 and / or the charging management module 940 to power the processor 910, internal memory 921, external memory, display 993, camera 992, and wireless communication module 960, etc.

[0197] In some other embodiments, the power management module 941 may also be located within the processor 910. In still other embodiments, the power management module 941 and the charging management module 940 may also be located in the same device.

[0198] The wireless communication function of electronic device 900 can be implemented through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor, and baseband processor.

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

[0200] The mobile communication module 950 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 900. The mobile communication module 950 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 950 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 950 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0201] The wireless communication module 960 can provide solutions for wireless communication applications on the electronic device 900, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth, Global Navigation Satellite System (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 960 can be one or more devices integrating at least one communication processing module. The wireless communication module 960 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 910. The wireless communication module 960 can also receive signals to be transmitted from processor 910, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0202] In the embodiments of this application, the electronic device 900 establishes a Bluetooth connection with other electronic devices through the Bluetooth in the wireless communication module 960.

[0203] In some embodiments, antenna 1 of electronic device 900 is coupled to mobile communication module 950, and antenna 2 is coupled to wireless communication module 960, enabling electronic device 900 to communicate with networks and other devices via wireless communication technology.

[0204] Electronic device 900 can implement audio functions through audio module 970 and application processor, such as music playback and recording.

[0205] The audio module 970 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 970 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 970 may be located in the processor 910, or some functional modules of the audio module 970 may be located in the processor 910.

[0206] In some embodiments, the audio module 970 may specifically include an encoder 970A, which encodes audio data to be transmitted by the electronic device 900. The electronic device 900 may include one or more encoders 970As. In some embodiments of this application, the encoder 970A may include an LDAC encoder.

[0207] Pressure sensor 980A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 980A may be disposed on display screen 993. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 980A, the capacitance between the electrodes changes. Electronic device 900 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 993, electronic device 900 detects the touch operation intensity based on pressure sensor 980A. Electronic device 900 can also calculate the touch position based on the detection signal from pressure sensor 980A.

[0208] Touch sensor 980B, also known as a "touch panel," can be located on display screen 993. The touch sensor 980B and display screen 993 together form a touchscreen, also known as a "touch screen." Touch sensor 980B detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 993. In other embodiments, touch sensor 980B may also be located on the surface of electronic device 900, in a different position than display screen 993.

[0209] Buttons 990 include a power button, volume buttons, etc. Buttons 990 can be mechanical buttons or touch-sensitive buttons. Electronic device 900 can receive button input and generate key signal inputs related to user settings and function control of electronic device 900.

[0210] Motor 991 can generate vibration alerts. Motor 991 can be used for incoming call vibration alerts or for touch vibration feedback.

[0211] The camera 992 is used to capture still images or videos. In some embodiments, the electronic device 900 may include one or N cameras 992, where N is a positive integer greater than 1.

[0212] Electronic device 900 implements display functions through a GPU, a display screen 993, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 993 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 910 may include one or more GPUs, which execute program instructions to generate or modify display information.

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

[0214] The SIM card interface 994 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 994 to make contact with or separate from the electronic device 900. The electronic device 900 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0215] Figure 10 illustrates a software framework diagram of an electronic device in some embodiments of this application. The electronic device includes an application layer, an application framework layer, an Android runtime (ART), a hardware abstraction layer (HAL), and a kernel layer.

[0216] The application layer can include a series of application packages. For example, applications such as calling, Bluetooth, video, audio, and user interface.

[0217] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes predefined functions. As shown in Figure 10, the application framework layer may include a window manager, content provider, view system, input manager, and Bluetooth framework, among others.

[0218] The window manager provides a window management service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system.

[0219] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.

[0220] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0221] The input manager can provide an input management service (IMS), which can be used to manage system inputs, such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS, distributes these events to the appropriate windows.

[0222] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to upper layers. In this embodiment, the HAL includes a call manager, Bluetooth manager, audio manager, and display manager, among others.

[0223] The Android runtime consists of the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into machine code.

[0224] The kernel layer is the layer between hardware and software. The kernel layer can contain display drivers, audio drivers, Bluetooth drivers, etc.

[0225] Other embodiments of this application provide an electronic device. This electronic device may be the first electronic device described in the above embodiments. The electronic device may include a memory and one or more processors. The memory is coupled to the processors. The memory is also used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the tablet computer in the above method embodiments. The structure of this electronic device can be referenced to the structure of the electronic device 900 shown in FIG. 9.

[0226] This application also provides a chip system, as shown in FIG11. The chip system 1100 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 are interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices (e.g., a computer's memory). As another example, the interface circuit 1102 can be used to send signals to other devices (e.g., the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in memory and send those instructions to the processor 1101. When the instructions are executed by the processor 1101, the computer can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application.

[0227] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform various functions or steps performed by the tablet computer in the above method embodiments.

[0228] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the tablet computer in the above method embodiments. The computer can be an electronic device, such as a tablet computer.

[0229] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0230] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0231] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0232] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0233] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0234] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of controlling a Bluetooth transmission code rate, characterized by, The method is applied to a first electronic device, and the method includes: At the first point in time, the first electronic device establishes a Bluetooth connection with the second electronic device, and the first electronic device sends data to the second electronic device at a first transmission code rate; At a second time point, when the Bluetooth status of the first electronic device meets preset conditions, the first electronic device sends data to the second electronic device at a second transmission code rate; the second transmission code rate is less than the first transmission code rate. The Bluetooth status of the first electronic device meets the preset conditions, including: the Bluetooth channel quality of the first electronic device at the second time point is lower than the Bluetooth channel quality at the first time point.

2. The method of claim 1, wherein, The method further includes: After the first electronic device establishes a Bluetooth connection with the second electronic device, the first electronic device enables the dynamic bitrate adjustment function.

3. The method according to claim 1 or 2, characterized in that, The Bluetooth status of the first electronic device meets preset conditions, including: The number of devices that establish Bluetooth connections with the first electronic device is greater than or equal to 2.

4. The method of claim 3, wherein, The method further includes: At the second time point, the first electronic device establishes a Bluetooth connection with the third electronic device.

5. The method of claim 3, wherein, The method further includes: At the third time point, the first electronic device establishes a Bluetooth connection with the third electronic device and enables the dynamic bitrate adjustment function; The third time point is after the first time point and before the second time point.

6. The method according to any one of claims 1-5, characterized in that, The transmission code rate corresponding to the second electronic device is greater than or equal to a preset threshold.

7. The method according to any one of claims 1-6, characterized in that, The first electronic device transmits data to the second electronic device at a second transmission code rate, including: The first electronic device determines target bitrate information that matches the Bluetooth state; the target bitrate information is used to characterize the second transmission bitrate. The first electronic device controls the target encoder of the first electronic device to send data to the second electronic device based on the target code rate information and using the second transmission code rate; the target encoder is the encoder used by the first electronic device to send data to the second electronic device.

8. The method according to claim 7, characterized in that, The target bitrate information includes the second transmission bitrate; or, the target bitrate information includes a target bitrate level, the target bitrate level corresponding to the second transmission bitrate.

9. The method according to claim 7 or 8, characterized in that, The method further includes: In response to enabling Bluetooth, the first electronic device registers a preset callback function in the Bluetooth protocol stack; or, in response to establishing a Bluetooth connection between the first electronic device and the second electronic device, the first electronic device registers a preset callback function in the Bluetooth protocol stack. The preset callback function is used to trigger the first electronic device to control the target encoder to adjust the transmission code rate used to send data to the second electronic device based on the target code rate information when the Bluetooth status of the first electronic device meets the preset conditions.

10. The method according to claim 2, characterized in that, After the first electronic device enables the dynamic bitrate adjustment function, the method further includes: The first electronic device disconnects from the second electronic device via Bluetooth, and the first electronic device disables the dynamic bitrate adjustment function.

11. The method according to claim 4, characterized in that, After the first electronic device enables the dynamic bitrate adjustment function, the method further includes: The first electronic device disconnects its Bluetooth connection from the second electronic device, and / or the first electronic device disconnects its Bluetooth connection from the third electronic device, and the first electronic device disables the dynamic bitrate adjustment function.

12. The method according to any one of claims 1-11, characterized in that, The target encoder used by the first electronic device to send data to the second electronic device is based on the low-latency audio codec LDAC or the low-latency high-definition audio codec LHDC.

13. A method for controlling Bluetooth transmission rate, characterized in that, The method is applied to a first electronic device, and the method includes: At the first point in time, when the first electronic device has only established a Bluetooth connection with the second electronic device, the first electronic device sends data to the second electronic device at a first transmission code rate. At a second time point, when the first electronic device simultaneously establishes Bluetooth connections with the second and third electronic devices, the first electronic device sends data to the second electronic device at a second transmission code rate; the second transmission code rate is less than the first transmission code rate.

14. An electronic device, characterized in that, The electronic device is a first electronic device, which includes: a processor, a memory, and a computer program stored in the memory; the memory is coupled to the processor. When the first electronic device is running, the processor executes the computer program to implement the method as described in any one of claims 1-13.

15. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor of an electronic device, implements the method as described in any one of claims 1-13.

16. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Transmission rate switching method, Bluetooth device and computer readable medium

    CN110248341A

  • Signal processing method and system, Bluetooth earphone and storage medium

    CN114244383A

  • Code rate determination method and device, Bluetooth playing equipment and storage medium

    CN114698031A

  • Method and device for adjusting data transmission rate in wireless communication system

    WO2015137601A1