[go: up one dir, main page]

CN108882345B - Bluetooth device and sleep control method, device, and computer-readable storage medium - Google Patents

Bluetooth device and sleep control method, device, and computer-readable storage medium Download PDF

Info

Publication number
CN108882345B
CN108882345B CN201710338032.6A CN201710338032A CN108882345B CN 108882345 B CN108882345 B CN 108882345B CN 201710338032 A CN201710338032 A CN 201710338032A CN 108882345 B CN108882345 B CN 108882345B
Authority
CN
China
Prior art keywords
data packet
sleep
time interval
bluetooth
bluetooth device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710338032.6A
Other languages
Chinese (zh)
Other versions
CN108882345A (en
Inventor
陈龙
梅锐
马腾飞
秦路芳
马伟
徐前
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201710338032.6A priority Critical patent/CN108882345B/en
Publication of CN108882345A publication Critical patent/CN108882345A/en
Application granted granted Critical
Publication of CN108882345B publication Critical patent/CN108882345B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is leader and terminal is follower
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is leader and terminal is follower using a pre-established activity schedule, e.g. traffic indication frame
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种蓝牙设备及其睡眠控制方法、装置、计算机可读存储介质,所述方法包括以下步骤:确定突发时间间隔,所述突发时间间隔包括多个周期;在每一突发时间间隔的第一个周期内,将所述多个周期内的多个数据包发送至接收设备;确定所述突发时间间隔内的剩余时长,并且基于所述剩余时长与第一预设阈值的比较结果,确定进入浅度睡眠或者进入深度睡眠。本发明方案可以使蓝牙设备在包括多个周期的突发时间间隔内的剩余时长进入睡眠,从而有更多机会进入深度睡眠,以节省更多功耗。

Figure 201710338032

A Bluetooth device and a sleep control method, apparatus, and computer-readable storage medium thereof, the method comprising the steps of: determining a burst time interval, the burst time interval includes a plurality of cycles; In the first period, multiple data packets in the multiple periods are sent to the receiving device; the remaining duration in the burst time interval is determined, and based on the comparison result between the remaining duration and the first preset threshold , to determine whether to enter light sleep or enter deep sleep. The solution of the present invention can make the Bluetooth device enter sleep for the remaining duration in the burst time interval including multiple cycles, so that there are more opportunities to enter deep sleep, so as to save more power consumption.

Figure 201710338032

Description

Bluetooth device, sleep control method and device thereof, and computer-readable storage medium
Technical Field
The invention relates to the technical field of communication, in particular to a Bluetooth device, a sleep control method and a sleep control device of the Bluetooth device, and a computer readable storage medium.
Background
In the existing bluetooth wireless transmission technology, according to the flow direction of data, a bluetooth device can be divided into a bluetooth transmitting end (Transmit, TX) and a bluetooth receiving end (Receive, RX), where the transmitting end can be a mobile phone, a tablet, etc., and the receiving end can be an earphone, a sound box, etc.
Whether it is a sending end or a receiving end, the protocol processing may include a Host device (Host) and a Controller (Controller), and conform to the peer-to-peer communication principle of the bluetooth protocol, where the Host device and the Controller may be independent chips and perform data packet transceiving. Specifically, at a bluetooth sending end, the master device periodically sends a data packet to the controller, the controller sends the modulated data packet to the controller of the bluetooth receiving end through a radio frequency technology, and then the controller of the receiving end sends the data packet to the master device of the receiving end, so that the master device of the receiving end demodulates and processes the data packet.
In each transmission cycle, the bluetooth device only occupies a part of the time slot to transmit the data packet, and in the remaining air interface time slots, the bluetooth device is usually controlled to sleep in order to reduce power consumption. However, in the existing bluetooth wireless transmission technology, the time for the sending device to sleep in each transmission cycle is usually short, so that the bluetooth device usually only can go into shallow sleep, and compared with deep sleep, the power consumption saving is very limited, which makes it difficult to meet the power consumption requirement.
Especially, with the popularization of bluetooth devices, Advanced Audio Distribution Profile (A2 DP) services are increasingly applied, and since the A2DP services transmit Audio data packets, the files are large, so that the time for the bluetooth devices to sleep in each period is shorter. For example, the bluetooth protocol stack (BlueDroid) widely used in android phones, the transmission cycle of A2DP voice packets is 20ms, where the sleep time left for bluetooth devices is only about 13ms, which is not enough for bluetooth devices to go into deep sleep after sending out data packets.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a Bluetooth device, a sleep control method and device thereof, and a computer readable storage medium, which can enable the Bluetooth device to enter into sleep for the remaining duration in a burst time interval comprising a plurality of cycles, so that more opportunities are provided for entering into deep sleep, and more power consumption is saved.
In order to solve the above technical problem, an embodiment of the present invention provides a sleep control method for a bluetooth device, including the following steps: determining a burst interval, the burst interval comprising a plurality of cycles; transmitting a plurality of data packets in a plurality of periods to a receiving device in a first period of each burst interval; determining the remaining time length in the burst time interval, and determining to enter shallow sleep or deep sleep based on the comparison result of the remaining time length and a first preset threshold.
Optionally, the determining a burst interval, where the burst interval includes a plurality of periods, includes: determining the size of a buffer space of the receiving device, and determining the number of cycles contained in the burst time interval based on the size of the buffer space.
Optionally, the data packets include an A2DP data packet and a service data packet other than the A2DP data packet, and the number of cycles included in the burst interval is determined by using the following formula:
Figure BDA0001294432230000021
wherein N represents the number of cycles contained in the burst interval;
s represents the size of the cache space;
b represents a preset bit rate for transmitting the A2DP data packets;
t represents the period;
L1representing the size of the pre-stored information in the period;
L2indicating the size of the service data packet.
Optionally, the bluetooth device includes one or more of: the Bluetooth receiving terminal comprises a Bluetooth sending terminal main device, a Bluetooth sending terminal controller and a Bluetooth receiving terminal controller.
Optionally, determining to enter shallow sleep or deep sleep based on a comparison result of the remaining time duration and a first preset threshold includes: when the remaining duration is greater than or equal to a first preset threshold, determining that the Bluetooth equipment enters deep sleep; and when the remaining time is less than a first preset threshold value, determining that the Bluetooth equipment enters shallow sleep.
Optionally, the data packets include an A2DP data packet and a service data packet, and sending, in a first period of each burst interval, a plurality of data packets in the plurality of periods to the receiving device includes: configuring the transmission priority of the data packet at the beginning of each burst interval, wherein the transmission priority of the service data packet is lower than that of the A2DP data packet, so that the A2DP data packet is preferentially transmitted in each burst interval.
Optionally, determining to enter shallow sleep or deep sleep based on a comparison result of the remaining time duration and a first preset threshold includes: determining, within the burst interval, a remaining time within the burst interval before transmitting each traffic data packet; and when the remaining time is less than a second preset threshold and is greater than or equal to the first preset threshold, entering deep sleep, and delaying the service data packet to a next burst time interval for sending, wherein the second preset threshold is greater than the first preset threshold.
Optionally, the service data packet includes one or more of the following items: and playing the data packet sent by the control service, playing the data packet sent by the information display service and playing the data packet sent by the volume control service.
In order to solve the above technical problem, an embodiment of the present invention provides a sleep control apparatus for a bluetooth device, including: a burst determination module adapted to determine a burst interval, the burst interval comprising a plurality of periods; a sending module, adapted to send a plurality of data packets in a plurality of periods to a receiving device in a first period of each burst interval; a sleep determination module adapted to determine a remaining time duration within the burst time interval and determine to enter shallow sleep or deep sleep based on a comparison of the remaining time duration with a first preset threshold.
Optionally, the burst determining module includes: and the period determining submodule is suitable for determining the size of the buffer space of the receiving equipment and determining the number of periods contained in the burst time interval based on the size of the buffer space.
Optionally, the data packets include an A2DP data packet and a service data packet other than the A2DP data packet, and the period determination submodule determines the number of periods included in the burst time interval by using the following formula:
Figure BDA0001294432230000031
wherein N represents the number of cycles contained in the burst interval;
s represents the size of the cache space;
b represents a preset bit rate for transmitting the A2DP data packets;
t represents the period;
L1representing the size of the pre-stored information in the period;
L2indicating the size of the service data packet.
Optionally, the bluetooth device includes one or more of: the Bluetooth receiving terminal comprises a Bluetooth sending terminal main device, a Bluetooth sending terminal controller and a Bluetooth receiving terminal controller.
Optionally, the sleep determination module includes: the deep sleep determining submodule is suitable for determining that the Bluetooth equipment enters deep sleep when the remaining duration is greater than or equal to a first preset threshold; and the light sleep determining submodule is suitable for determining that the Bluetooth equipment enters light sleep when the remaining time is less than a first preset threshold.
Optionally, the data packet includes an A2DP data packet and a service data packet, and the sending module includes: a priority configuration sub-module, adapted to configure the transmission priority of the data packet at the beginning of each burst interval, the transmission priority of the service data packet is lower than the transmission priority of the A2DP data packet, so that the A2DP data packet is preferentially transmitted in each burst interval.
Optionally, the sleep determination module includes: a time length determining submodule adapted to determine, within the burst interval, a remaining time within the burst interval before transmitting each service data packet; and the sleep control submodule is suitable for entering deep sleep and delaying the service data packet to a next burst time interval for sending when the remaining time is less than a second preset threshold and is greater than or equal to the first preset threshold, wherein the second preset threshold is greater than the first preset threshold.
Optionally, the service data packet includes one or more of the following items: and playing the data packet sent by the control service, playing the data packet sent by the information display service and playing the data packet sent by the volume control service.
To solve the above technical problem, an embodiment of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are executed when the computer instructions execute the steps of the sleep control method of the bluetooth device according to any one of the above.
In order to solve the above technical problem, an embodiment of the present invention provides a bluetooth device, including a memory and a processor, where the memory stores computer instructions capable of running on the processor, and the processor executes the computer instructions to perform the steps of the sleep control method of the bluetooth device according to any one of the above items.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
in an embodiment of the present invention, a burst interval is determined, the burst interval comprising a plurality of periods; transmitting a plurality of data packets in a plurality of periods to a receiving device in a first period of each burst interval; determining the remaining time length in the burst time interval, and determining to enter shallow sleep or deep sleep based on the comparison result of the remaining time length and a first preset threshold. By adopting the scheme, the burst time interval comprising a plurality of cycles can be configured, and the data packets of the plurality of cycles are sent in the first cycle of each burst time interval, so that the Bluetooth device can go to sleep in the rest time of the burst time interval.
Further, the bluetooth device may include one or more of: the Bluetooth receiving terminal comprises a Bluetooth sending terminal main device, a Bluetooth sending terminal controller and a Bluetooth receiving terminal controller. Thereby enabling more bluetooth devices to have the opportunity to go into deep sleep to save more power consumption.
Further, the data packets include A2DP data packets and service data packets, and in the embodiment of the present invention, by configuring the transmission priority of the data packets, each time before transmitting a service data packet, it is checked whether the remaining time in a burst time interval is still sufficient to enable the sending device to enter deep sleep, and if the remaining time is short, the service data packet is delayed to the next burst time interval for transmission, so as to preferentially guarantee the transmission of the A2DP data packets and the deep sleep of the bluetooth device, thereby saving more power consumption.
Drawings
Fig. 1 is a diagram illustrating a prior art scenario for transmitting bluetooth packets;
fig. 2 is a schematic diagram of an application scenario of a sleep control method of a bluetooth device in the prior art;
fig. 3 is a flowchart of a sleep control method of a bluetooth device according to an embodiment of the present invention;
fig. 4 is a data flow diagram of a sleep control method of a bluetooth device in an embodiment of the present invention;
fig. 5 is a schematic diagram of a scenario for transmitting a bluetooth packet according to an embodiment of the present invention;
fig. 6 is a partial flowchart of another sleep control method of a bluetooth device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a sleep control apparatus of a bluetooth device in an embodiment of the present invention;
fig. 8 is a schematic diagram of a specific implementation of the sleep determination module 73 in fig. 7.
Detailed Description
In the existing bluetooth wireless transmission technology, according to the flow direction of data, can divide into bluetooth sending end and bluetooth receiving terminal with bluetooth equipment to all can include master equipment and controller, thereby carry out the receiving and dispatching of data packet through bluetooth sending end master equipment, bluetooth sending end controller, bluetooth receiving end controller and bluetooth receiving terminal master equipment.
Specifically, fig. 1 is a schematic view of a scenario of transmitting a bluetooth packet in the prior art, at a bluetooth transmitting end, a bluetooth transmitting end master device 101 transmits a packet 11 to a bluetooth transmitting end controller 102, and the bluetooth transmitting end controller 102 transmits a modulated packet 12 to a controller of a bluetooth receiving end through a radio frequency technology. Here, the transmission cycle is cycle 13. When the transmitted bluetooth data packets are A2DP data packets, the receiving end does not need to transmit and receive the data packets according to the original time interval of the A2DP data packets, as long as the receiving end can receive and buffer a plurality of complete A2DP data packets, and then demodulate and play the data packets according to the preset time interval, so that the played music can be ensured to be smooth.
In each transmission cycle, the sending device only occupies a part of the time slot to transmit the data packet, and in the remaining air interface time slots, the sending device is usually controlled to sleep in order to reduce power consumption.
Fig. 2 is a schematic diagram of an application scenario of a sleep control method of a bluetooth device in the prior art. In one transmission cycle 21, the bluetooth device is controlled to go to sleep during an idle time according to the transmission step.
Specifically, the transmission cycle of the A2DP data packet is 20ms, and the bluetooth device is described as an example of a bluetooth sender-side master device. The bluetooth sending end master device can encode and send an A2DP data packet to the bluetooth sending end controller in a time period 201, and the consumed time is about 1.6 ms; go to sleep for a period of time 202, approximately 4ms in duration; awakening by a Bluetooth sending end controller in a time period 203, and receiving a confirmation reply packet (NOCP), wherein the duration time is about 0.5 ms; sleep is entered during the time period 204, and the duration is the remaining duration of the transmission cycle, which is about 13 ms.
Further, when the bluetooth device is a bluetooth transmitting end controller, since it needs to receive an A2DP data packet of the bluetooth transmitting end master device, then send the data packet to the bluetooth receiving end controller, and send an acknowledgement reply packet to the bluetooth transmitting end master device, it can only go to sleep within the remaining time after the above steps are completed in the sending period, which is about 13 ms.
In the existing bluetooth wireless transmission technology, the time for the sending device to sleep in each sending period is too short, which is not enough to enable the bluetooth device to go into deep sleep after sending a data packet, so that the bluetooth device can only go into shallow sleep generally, and compared with deep sleep, the power consumption is very limited, and the power consumption requirement is difficult to meet.
The inventor of the present invention has found through research that, in the prior art, only one cycle of data packets is sent in each cycle, so that a bluetooth device can only go to sleep for the remaining duration of one cycle, and the sleep duration is too short. In the implementation, it is not required that each data packet must be transmitted in the current period, and it is only necessary that the receiving end can receive the complete data packet and buffer the data packet for processing on time. Specifically, taking the A2DP packet as an example, although the A2DP has a high requirement for real-time performance, it is possible to ensure that the played music is smooth if the receiving end receives and buffers a plurality of complete A2DP packets, and then demodulates and plays the packets at predetermined time intervals.
In an embodiment of the present invention, a burst interval is determined, the burst interval comprising a plurality of periods; transmitting a plurality of data packets in a plurality of periods to a receiving device in a first period of each burst interval; determining the remaining time length in the burst time interval, and determining to enter shallow sleep or deep sleep based on the comparison result of the remaining time length and a first preset threshold. By adopting the scheme, the burst time interval comprising a plurality of cycles can be configured, and the data packets of the plurality of cycles are sent in the first cycle of each burst time interval, so that the Bluetooth device can go to sleep in the rest time of the burst time interval.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 3, fig. 3 is a flowchart of a sleep control method of a bluetooth device in an embodiment of the present invention. The sleep control method may include steps S31 to S33:
step S31: determining a burst interval, the burst interval comprising a plurality of cycles;
step S32: transmitting a plurality of data packets in a plurality of periods to a receiving device in a first period of each burst interval;
step S33: determining the remaining time length in the burst time interval, and determining to enter shallow sleep or deep sleep based on the comparison result of the remaining time length and a first preset threshold.
In a specific implementation of step S31, determining a burst interval including multiple cycles, may directly set the number of cycles included in the burst interval, or may determine the size of the buffer space of the receiving device by detection or the like, and determine the number of cycles included in the burst interval based on the size of the buffer space.
Specifically, the size of the buffer space of the receiving device may be determined based on the buffer space of the buffer of the bluetooth receiving end, so that the master device of the bluetooth receiving end may take out the data packet from the buffer for demodulation and processing.
Further, the data packets include A2DP data packets and service data packets except the A2DP data packets, and the number of periods included in the burst interval may be determined by using the following formula:
Figure BDA0001294432230000081
wherein N represents the number of cycles contained in the burst interval;
s represents the size of the buffer space and can be determined based on a buffer of a specific Bluetooth receiving end;
b represents a preset bit rate for transmitting the A2DP data packets;
t represents the period, for example 20 ms;
b × T represents the bit number of the A2DP data packet in each period, and for example, the preset bit rate is 328kb/s, the period is 20ms, and the bit number of the A2DP data packet in each period is 6560 bits, that is, 820 bytes;
L1indicating the size of the pre-stored information in the period, such as the packet header information of A2 DP;
L2the size of the service data packet may be determined based on the specific service type.
In an implementation of step S32, during the first period of each burst interval, a plurality of packets in the period included in the burst interval are transmitted.
Referring to fig. 4, fig. 4 is a data flow diagram of a sleep control method of a bluetooth device in an embodiment of the present invention. The sleep control method may include steps S401 to S405, and each step is specifically described below.
Step S401: at the beginning of each burst interval 45 (i.e., at the beginning of burst interval 45 or at a time near the beginning), the bluetooth sender master 41 wakes up the bluetooth sender controller 42, encodes a packet to be sent, and sends a plurality of packets of a plurality of cycles included in the burst interval to the bluetooth sender controller 42.
Step S402: the bluetooth sender controller 42 sends a NOCP to the bluetooth sender master device 41 to acknowledge receipt of the data packet. When receiving the NOCP, the bluetooth sender master device 41 will be awakened briefly, and since there is still time remaining in the burst interval, the bluetooth sender master device 41 will continue to sleep. It should be noted that in some types of bluetooth devices, the bluetooth transmitting side controller 42 transmits the NOCP, while some do not, and in the embodiment of the present invention, there is no limitation on whether the bluetooth transmitting side controller transmits the NOCP.
Step S403: the bluetooth transmitting end controller 42 transmits the plurality of data packets to the bluetooth receiving end controller 43, and the bluetooth transmitting end controller 42 may go to sleep for the remaining duration in the burst interval.
Step S404: the bluetooth receiving end controller 43 sends the plurality of data packets to the bluetooth receiving end master device 44, and the bluetooth receiving end controller 43 may go to sleep for the remaining duration in the burst interval.
Step S405: at the beginning of the next burst interval, the bluetooth sender master device 41 sends a plurality of packets of a plurality of cycles included in the next burst interval to the bluetooth sender controller 42.
In particular implementations, the bluetooth device may include one or more of: the Bluetooth receiving terminal comprises a Bluetooth sending terminal main device, a Bluetooth sending terminal controller and a Bluetooth receiving terminal controller.
Referring to fig. 5, which is a schematic diagram of a scenario for transmitting a bluetooth packet, at a bluetooth transmitting end, a bluetooth transmitting end master device 501 transmits a packet 51 to a bluetooth transmitting end controller 502, and the bluetooth transmitting end controller 502 transmits a modulated packet 52 to a controller at a bluetooth receiving end through a radio frequency technology. Wherein the transmission period is a burst interval 53. The bluetooth sending end master device 501 and the bluetooth sending end controller 502 do not need to send and receive data packets according to the original time interval of the data packets, and can send a plurality of data packets of a plurality of periods included in the burst time interval to the next bluetooth device at the beginning of the burst time interval 53.
In the embodiment of the invention, more Bluetooth devices can enter deep sleep at a chance so as to save more power consumption.
With continued reference to fig. 3, in an implementation of step S33, determining a remaining time duration within the burst time interval, and determining to enter light sleep or deep sleep based on a comparison of the remaining time duration to a first preset threshold includes: when the remaining duration is greater than or equal to a first preset threshold, determining that the Bluetooth equipment enters deep sleep; and when the remaining time is less than a first preset threshold value, determining that the Bluetooth equipment enters shallow sleep.
Specifically, the first preset threshold may be set according to a specific bluetooth device, and as a non-limiting example, the first preset threshold may be set to a value of 30ms to 50 ms.
In the embodiment of the invention, the burst time interval comprising a plurality of cycles can be configured, and the data packets of the plurality of cycles are sent in the first cycle of each burst time interval, so that the Bluetooth device enters the sleep in the rest time of the burst time interval, and compared with the prior art that the Bluetooth device can only enter the sleep in the rest time of a single cycle, the Bluetooth device has more chances to enter the deep sleep, thereby saving more power consumption.
Further, the data packets sent by the bluetooth device include A2DP data packets and service data packets, and sending a plurality of data packets in a plurality of periods to the receiving device in the first period of each burst interval includes: configuring the transmission priority of the data packet at the beginning of each burst interval, wherein the transmission priority of the service data packet is lower than that of the A2DP data packet, so that the A2DP data packet is preferentially transmitted in each burst interval.
Wherein the service data packet may include one or more of the following: and playing the data packet sent by the control service, playing the data packet sent by the information display service and playing the data packet sent by the volume control service.
Specifically, the data packet sent by the play control service may be a data packet sent in the process of controlling to play the next audio file or the previous audio file; the data packet sent by the playing information display service can be a data packet sent in the process of controlling the Bluetooth equipment to display information such as the name, the size and the like of an audio file; the data packet sent by the volume control service may be a data packet sent in the process of controlling the bluetooth device to increase or decrease the volume.
In the embodiment of the invention, by setting the high sending priority for the A2DP data packet, the smoothness of the A2DP data stream can be ensured in the process of processing the service by the Bluetooth device, and the reduction of user experience due to the tone is avoided.
Referring to fig. 6, fig. 6 is a partial flowchart of another sleep control method for a bluetooth device in an embodiment of the present invention. The determining of the entering of the light sleep or the entering of the deep sleep based on the comparison result of the remaining time period with the first preset threshold may include steps S61 to S62:
step S61: determining, within the burst interval, a remaining time within the burst interval before transmitting each traffic data packet;
step S62: and when the remaining time is less than a second preset threshold and is greater than or equal to the first preset threshold, entering deep sleep, and delaying the service data packet to a next burst time interval for sending, wherein the second preset threshold is greater than the first preset threshold.
In the specific implementation of step S61, during the burst interval, the A2DP packets are transmitted first, and then the service packets are transmitted in sequence according to the configured transmission priority, and before each service packet is transmitted, the remaining time in the burst interval is determined.
In the specific implementation of step S62, when the remaining time is less than the second preset threshold, it is likely that the bluetooth device cannot enter deep sleep in the burst time interval if the service data packet is continuously sent, and at this time, the bluetooth device enters deep sleep after the service data packet is sent to the next burst time interval.
Specifically, the second preset threshold is greater than the first preset threshold, so that after the remaining time is determined, it is still sufficient for the bluetooth device to enter deep sleep. The second preset threshold may be set according to a specific bluetooth device, and as a non-limiting example, the second preset threshold may be set to a value of 32ms to 52 ms.
In the embodiment of the invention, by configuring the transmission priority of the A2DP data packet and the service data packet, before transmitting the service data packet, whether the remaining time in the burst time interval is enough to enable the sending device to enter deep sleep is checked, and the service data packet is delayed to the next burst time interval to be transmitted under the condition that the remaining time is short, so that the transmission of the A2DP data packet and the deep sleep of the Bluetooth device are preferentially ensured, and more power consumption is saved.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a sleep control apparatus of a bluetooth device in an embodiment of the present invention. The sleep control apparatus may include a burst determination module 71, a transmission module 72, and a sleep determination module 73.
Wherein the burst determining module 71 is adapted to determine a burst interval, the burst interval comprising a plurality of periods;
the sending module 72 is adapted to send a plurality of data packets in the plurality of periods to the receiving device in a first period of each burst interval;
the sleep determination module 73 is adapted to determine a remaining time duration within the burst time interval, and determine to enter shallow sleep or deep sleep based on a comparison result of the remaining time duration with a first preset threshold.
Further, the burst determining module includes a period determining submodule (not shown) adapted to determine a size of a buffer space of the receiving device, and determine a number of periods included in the burst time interval based on the size of the buffer space.
The data packets include an A2DP data packet and a traffic data packet other than the A2DP data packet, and the period determination submodule determines the number of periods included in the burst interval using the following formula:
Figure BDA0001294432230000121
wherein N represents the number of cycles contained in the burst interval;
s represents the size of the cache space;
b represents a preset bit rate for transmitting the A2DP data packets;
t represents the period;
L1representing the size of the pre-stored information in the period;
L2indicating the size of the service data packet.
Further, the bluetooth device includes one or more of: the Bluetooth receiving terminal comprises a Bluetooth sending terminal main device, a Bluetooth sending terminal controller and a Bluetooth receiving terminal controller.
Referring to fig. 8, fig. 8 is a schematic diagram of a specific implementation of the sleep determination module 73 in fig. 7. The sleep determination module 73 may include a deep sleep determination sub-module 731 and a shallow sleep determination sub-module 732.
The deep sleep determining submodule 731 is adapted to determine that the bluetooth device enters deep sleep when the remaining duration is greater than or equal to a first preset threshold.
The light sleep determination sub-module 732 is adapted to determine that the bluetooth device enters light sleep when the remaining time is less than a first preset threshold.
With continued reference to fig. 7, the data packets may include A2DP data packets and service data packets, and the sending module 72 may include: a priority configuration submodule (not shown) adapted to configure the transmission priority of the data packet at the beginning of each burst interval, the transmission priority of the service data packet being lower than the transmission priority of the A2DP data packet, so that the A2DP data packet is preferentially transmitted in each burst interval.
Further, the sleep determination module 73 may include: a duration determination sub-module (not shown) and a sleep control module (not shown).
Wherein the duration determination submodule is adapted to determine, within the burst interval, a remaining time within the burst interval before transmitting each service data packet;
the sleep control module is adapted to enter deep sleep and delay the service data packet to a next burst time interval for sending when the remaining time is less than a second preset threshold and greater than or equal to the first preset threshold, wherein the second preset threshold is greater than the first preset threshold.
Further, the service data packet may include one or more of the following: and playing the data packet sent by the control service, playing the data packet sent by the information display service and playing the data packet sent by the volume control service.
For more details of the sleep control apparatus of the bluetooth device, please refer to the related description of the sleep control method of the bluetooth device shown in fig. 1 to 6, which is not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, which stores computer instructions, and the computer instructions execute the steps of the sleep control method of the bluetooth device when running. The computer readable storage medium may be an optical disc, a mechanical hard disk, a solid state hard disk, etc.
The embodiment of the invention also provides the Bluetooth equipment, which comprises a memory and a processor, wherein the memory is stored with computer instructions capable of running on the processor, and the processor executes the steps of the sleep control method of the Bluetooth equipment when running the computer instructions. The Bluetooth device can be used for various terminal devices such as smart phones and tablet computers.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (18)

1.一种蓝牙设备的睡眠控制方法,其特征在于,包括以下步骤:1. a sleep control method of a bluetooth device, is characterized in that, comprises the following steps: 确定突发时间间隔,所述突发时间间隔包括多个周期;determining a burst time interval, the burst time interval including a plurality of cycles; 在每一突发时间间隔的第一个周期内,将所述多个周期内的多个数据包发送至接收设备;in the first period of each burst time interval, sending the plurality of data packets in the plurality of periods to the receiving device; 确定所述突发时间间隔内的剩余时长,并且基于所述剩余时长与第一预设阈值的比较结果,确定进入浅度睡眠或者进入深度睡眠;determining the remaining duration in the burst time interval, and determining to enter light sleep or enter deep sleep based on the comparison result of the remaining duration and a first preset threshold; 其中,所述突发时间间隔包含多个数量的周期。Wherein, the burst time interval includes a plurality of periods. 2.根据权利要求1所述的蓝牙设备的睡眠控制方法,其特征在于,所述确定突发时间间隔,所述突发时间间隔包括多个周期包括:2 . The sleep control method of a Bluetooth device according to claim 1 , wherein the determining a burst time interval, the burst time interval comprising a plurality of cycles including: 2 . 确定所述接收设备的缓存空间的大小,基于所述缓存空间大小,确定所述突发时间间隔包含的周期的数量。The size of the buffer space of the receiving device is determined, and based on the size of the buffer space, the number of cycles included in the burst time interval is determined. 3.根据权利要求2所述的蓝牙设备的睡眠控制方法,其特征在于,所述数据包包括A2DP数据包和除所述A2DP数据包之外的业务数据包,采用下述公式确定所述突发时间间隔包含的周期的数量:3. The sleep control method of a Bluetooth device according to claim 2, wherein the data packet comprises an A2DP data packet and a service data packet other than the A2DP data packet, and the following formula is used to determine the sudden The number of cycles included in the send interval:
Figure FDA0002971533530000011
Figure FDA0002971533530000011
其中,N表示所述突发时间间隔包含的周期的数量;Wherein, N represents the number of cycles included in the burst time interval; S表示所述缓存空间的大小;S represents the size of the cache space; B表示传输所述A2DP数据包的预设比特率;B represents the preset bit rate for transmitting the A2DP data packet; T表示所述周期;T represents the period; L1表示所述周期内的预存信息的大小;L 1 represents the size of the pre-stored information in the period; L2表示所述业务数据包的大小。 L2 represents the size of the service data packet.
4.根据权利要求1所述的蓝牙设备的睡眠控制方法,其特征在于,所述蓝牙设备包括以下一项或多项:蓝牙发送端主设备、蓝牙发送端控制器和蓝牙接收端控制器。4 . The sleep control method for a Bluetooth device according to claim 1 , wherein the Bluetooth device comprises one or more of the following: a Bluetooth transmitter master device, a Bluetooth transmitter controller, and a Bluetooth receiver controller. 5 . 5.根据权利要求1所述的蓝牙设备的睡眠控制方法,其特征在于,基于所述剩余时长与第一预设阈值的比较结果,确定进入浅度睡眠或者进入深度睡眠包括:5 . The sleep control method for a Bluetooth device according to claim 1 , wherein, based on the comparison result between the remaining duration and the first preset threshold, determining that entering light sleep or entering deep sleep comprises: 5 . 当所述剩余时长大于等于第一预设阈值时,确定所述蓝牙设备进入深度睡眠;When the remaining duration is greater than or equal to a first preset threshold, it is determined that the Bluetooth device enters deep sleep; 当所述剩余时长小于第一预设阈值时,确定所述蓝牙设备进入浅度睡眠。When the remaining duration is less than the first preset threshold, it is determined that the Bluetooth device enters light sleep. 6.根据权利要求1所述的蓝牙设备的睡眠控制方法,其特征在于,所述数据包包括A2DP数据包和业务数据包,在每一突发时间间隔的第一个周期内,将所述多个周期内的多个数据包发送至接收设备包括:6. The sleep control method of a Bluetooth device according to claim 1, wherein the data packet comprises an A2DP data packet and a service data packet, and in the first period of each burst time interval, the Multiple data packets sent to the receiving device over multiple cycles include: 在每一突发时间间隔开始时,配置所述数据包的发送优先级,所述业务数据包的发送优先级低于所述A2DP数据包的发送优先级,以使得在每一突发时间间隔内,优先发送所述A2DP数据包。At the beginning of each burst time interval, the transmission priority of the data packet is configured, and the transmission priority of the service data packet is lower than the transmission priority of the A2DP data packet, so that in each burst time interval within, the A2DP packet is sent preferentially. 7.根据权利要求6所述的蓝牙设备的睡眠控制方法,其特征在于,基于所述剩余时长与第一预设阈值的比较结果,确定进入浅度睡眠或者进入深度睡眠包括:7 . The sleep control method for a Bluetooth device according to claim 6 , wherein, based on the comparison result between the remaining duration and the first preset threshold, determining that entering light sleep or entering deep sleep comprises: 8 . 在所述突发时间间隔内,在发送每一业务数据包之前,确定在所述突发时间间隔内的剩余时间;In the burst time interval, before sending each service data packet, determine the remaining time in the burst time interval; 当所述剩余时间小于第二预设阈值且大于等于所述第一预设阈值时,进入深度睡眠,并且将所述业务数据包延至下一突发时间间隔进行发送,所述第二预设阈值大于所述第一预设阈值。When the remaining time is less than the second preset threshold and greater than or equal to the first preset threshold, enter deep sleep, and delay the transmission of the service data packet to the next burst time interval, the second preset The threshold is greater than the first preset threshold. 8.根据权利要求6所述的蓝牙设备的睡眠控制方法,其特征在于,所述业务数据包包括以下一项或多项:播放控制业务发送的数据包、播放信息显示业务发送的数据包和音量控制业务发送的数据包。8. The sleep control method of a bluetooth device according to claim 6, wherein the service data packet comprises one or more of the following: a data packet sent by a broadcast control service, a data packet sent by a broadcast information display service, and Data packets sent by the volume control service. 9.一种蓝牙设备的睡眠控制装置,其特征在于,包括:9. A sleep control device for a Bluetooth device, comprising: 突发确定模块,适于确定突发时间间隔,所述突发时间间隔包括多个周期;a burst determination module, adapted to determine a burst time interval, the burst time interval including a plurality of periods; 发送模块,适于在每一突发时间间隔的第一个周期内,将所述多个周期内的多个数据包发送至接收设备;a sending module, adapted to send a plurality of data packets in the plurality of cycles to the receiving device in the first cycle of each burst time interval; 睡眠确定模块,适于确定所述突发时间间隔内的剩余时长,并且基于所述剩余时长与第一预设阈值的比较结果,确定进入浅度睡眠或者进入深度睡眠;a sleep determination module, adapted to determine the remaining duration in the burst time interval, and based on the comparison result between the remaining duration and the first preset threshold, determine entering light sleep or entering deep sleep; 其中,所述突发时间间隔包含多个数量的周期。Wherein, the burst time interval includes a plurality of periods. 10.根据权利要求9所述的蓝牙设备的睡眠控制装置,其特征在于,所述突发确定模块包括:10. The sleep control device for a Bluetooth device according to claim 9, wherein the burst determination module comprises: 周期确定子模块,适于确定所述接收设备的缓存空间的大小,基于所述缓存空间大小,确定所述突发时间间隔包含的周期的数量。The period determination submodule is adapted to determine the size of the buffer space of the receiving device, and based on the size of the buffer space, determine the number of periods included in the burst time interval. 11.根据权利要求10所述的蓝牙设备的睡眠控制装置,其特征在于,所述数据包包括A2DP数据包和除所述A2DP数据包之外的业务数据包,所述周期确定子模块采用下述公式确定所述突发时间间隔包含的周期的数量:11. The sleep control device of a Bluetooth device according to claim 10, wherein the data packet includes an A2DP data packet and a service data packet other than the A2DP data packet, and the period determination submodule adopts the following: The above formula determines the number of cycles contained in the burst interval:
Figure FDA0002971533530000031
Figure FDA0002971533530000031
其中,N表示所述突发时间间隔包含的周期的数量;Wherein, N represents the number of cycles included in the burst time interval; S表示所述缓存空间的大小;S represents the size of the cache space; B表示传输所述A2DP数据包的预设比特率;B represents the preset bit rate for transmitting the A2DP data packet; T表示所述周期;T represents the period; L1表示所述周期内的预存信息的大小;L 1 represents the size of the pre-stored information in the period; L2表示所述业务数据包的大小。 L2 represents the size of the service data packet.
12.根据权利要求9所述的蓝牙设备的睡眠控制装置,其特征在于,所述蓝牙设备包括以下一项或多项:蓝牙发送端主设备、蓝牙发送端控制器和蓝牙接收端控制器。12 . The sleep control device for a Bluetooth device according to claim 9 , wherein the Bluetooth device comprises one or more of the following: a Bluetooth transmitter master device, a Bluetooth transmitter controller, and a Bluetooth receiver controller. 13 . 13.根据权利要求9所述的蓝牙设备的睡眠控制装置,其特征在于,所述睡眠确定模块包括:13. The sleep control device of a Bluetooth device according to claim 9, wherein the sleep determination module comprises: 深度睡眠确定子模块,适于当所述剩余时长大于等于第一预设阈值时,确定所述蓝牙设备进入深度睡眠;A deep sleep determination submodule, adapted to determine that the Bluetooth device enters deep sleep when the remaining duration is greater than or equal to a first preset threshold; 浅度睡眠确定子模块,适于当所述剩余时长小于第一预设阈值时,确定所述蓝牙设备进入浅度睡眠。The light sleep determination submodule is adapted to determine that the Bluetooth device enters light sleep when the remaining duration is less than a first preset threshold. 14.根据权利要求9所述的蓝牙设备的睡眠控制装置,其特征在于,所述数据包包括A2DP数据包和业务数据包,所述发送模块包括:14. The sleep control device of a Bluetooth device according to claim 9, wherein the data packet comprises an A2DP data packet and a service data packet, and the sending module comprises: 优先级配置子模块,适于在每一突发时间间隔开始时,配置所述数据包的发送优先级,所述业务数据包的发送优先级低于所述A2DP数据包的发送优先级,以使得在每一突发时间间隔内,优先发送所述A2DP数据包。A priority configuration sub-module, adapted to configure the sending priority of the data packet at the beginning of each burst time interval, and the sending priority of the service data packet is lower than the sending priority of the A2DP data packet, so as to So that in each burst time interval, the A2DP data packet is sent preferentially. 15.根据权利要求14所述的蓝牙设备的睡眠控制装置,其特征在于,所述睡眠确定模块包括:15. The sleep control device of a Bluetooth device according to claim 14, wherein the sleep determination module comprises: 时长确定子模块,适于在所述突发时间间隔内,在发送每一业务数据包之前,确定在所述突发时间间隔内的剩余时间;a duration determination submodule, adapted to determine the remaining time in the burst time interval before sending each service data packet in the burst time interval; 睡眠控制子模块,适于当所述剩余时间小于第二预设阈值且大于等于所述第一预设阈值时,进入深度睡眠,并且将所述业务数据包延至下一突发时间间隔进行发送,所述第二预设阈值大于所述第一预设阈值。A sleep control sub-module, adapted to enter deep sleep when the remaining time is less than the second preset threshold and greater than or equal to the first preset threshold, and delay the transmission of the service data packet to the next burst time interval , the second preset threshold is greater than the first preset threshold. 16.根据权利要求14所述的蓝牙设备的睡眠控制装置,其特征在于,所述业务数据包包括以下一项或多项:播放控制业务发送的数据包、播放信息显示业务发送的数据包和音量控制业务发送的数据包。16. The sleep control device of a bluetooth device according to claim 14, wherein the service data packet comprises one or more of the following: a data packet sent by a playback control service, a data packet sent by a playback information display service, and Data packets sent by the volume control service. 17.一种计算机可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令运行时执行权利要求1至8任一项所述蓝牙设备的睡眠控制方法的步骤。17 . A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions execute the steps of the sleep control method for a Bluetooth device according to any one of claims 1 to 8 when the computer instructions are run. 18 . 18.一种蓝牙设备,包括存储器和处理器,所述存储器上存储有能够在所述处理器上运行的计算机指令,其特征在于,所述处理器运行所述计算机指令时执行权利要求1至8任一项所述蓝牙设备的睡眠控制方法的步骤。18. A Bluetooth device, comprising a memory and a processor, wherein the memory stores computer instructions that can run on the processor, wherein the processor executes claims 1 to 1 when the processor runs the computer instructions. 8. Steps of any one of the sleep control methods of the Bluetooth device.
CN201710338032.6A 2017-05-15 2017-05-15 Bluetooth device and sleep control method, device, and computer-readable storage medium Active CN108882345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710338032.6A CN108882345B (en) 2017-05-15 2017-05-15 Bluetooth device and sleep control method, device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710338032.6A CN108882345B (en) 2017-05-15 2017-05-15 Bluetooth device and sleep control method, device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108882345A CN108882345A (en) 2018-11-23
CN108882345B true CN108882345B (en) 2021-05-28

Family

ID=64320395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710338032.6A Active CN108882345B (en) 2017-05-15 2017-05-15 Bluetooth device and sleep control method, device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108882345B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561491A (en) * 2018-12-11 2019-04-02 深圳市联智物联网科技有限公司 A kind of half-duplex wireless communication system for realizing energy conservation wake-up
CN116055230B (en) * 2023-03-28 2023-06-09 北京博上网络科技有限公司 DPDK sleep time control method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883420A (en) * 2012-10-23 2013-01-16 中国科学院微电子研究所 A transmission scheduling method and device in sleep mode
EP2939463A1 (en) * 2013-01-31 2015-11-04 Apple Inc. Dynamic adaptation of a traffic inactivity timer
CN105307249A (en) * 2015-11-09 2016-02-03 深圳市银河风云网络系统股份有限公司 Wireless transmission system having low power consumption and transmission method thereof
CN106455021A (en) * 2016-10-18 2017-02-22 上海斐讯数据通信技术有限公司 Energy saving method based on data frame aggregation transmission and energy saving device thereof
CN106559734A (en) * 2015-09-28 2017-04-05 展讯通信(上海)有限公司 Bluetooth data transmission method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883420A (en) * 2012-10-23 2013-01-16 中国科学院微电子研究所 A transmission scheduling method and device in sleep mode
EP2939463A1 (en) * 2013-01-31 2015-11-04 Apple Inc. Dynamic adaptation of a traffic inactivity timer
CN106559734A (en) * 2015-09-28 2017-04-05 展讯通信(上海)有限公司 Bluetooth data transmission method and device
CN105307249A (en) * 2015-11-09 2016-02-03 深圳市银河风云网络系统股份有限公司 Wireless transmission system having low power consumption and transmission method thereof
CN106455021A (en) * 2016-10-18 2017-02-22 上海斐讯数据通信技术有限公司 Energy saving method based on data frame aggregation transmission and energy saving device thereof

Also Published As

Publication number Publication date
CN108882345A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
US10805753B2 (en) Multi-channel audio over a wireless network
US9832578B2 (en) Enabling concurrent proprietary audio and Bluetooth low energy using enhanced LE link layer for hearing device
EP4158920B1 (en) Connected isochronous stream swapping
EP3745813B1 (en) Method for operating a bluetooth device
WO2020239985A1 (en) Method for operating a bluetooth device
TWI704823B (en) Mobile terminal and method of controlling power consumption in a computing device
CN111527733B (en) Controlling dual-mode Bluetooth low energy multimedia devices
CN101652766A (en) Self-organizing network power saving system and method
CN106303933A (en) A Bluetooth power adjustment method and device
EP2629446A1 (en) Dynamic Buffer Management in High-Throughput Wireless Systems
US11917543B2 (en) Bluetooth-based data transmission method and data receiving method, communicating apparatus and computer storage medium
US20130034061A1 (en) Reverse direction protocol implementation
TWI707598B (en) Method for controlling audio device and associated control circuit
CN105955702A (en) Wireless audio equipment and method for playing music in same
CN111436042B (en) Bluetooth headset and dynamic master-slave switching method, device and system thereof
CN108882345B (en) Bluetooth device and sleep control method, device, and computer-readable storage medium
TW202044862A (en) Bluetooth device, method of operating bluetooth device, and non-transitory computer readable medium
CN112437370B (en) Link switching method, system, TWS earphone pair, chip and medium
CN117596233A (en) Timing control management method and timing control management system
CN115209476A (en) Method for sending ACK message, audio receiver, audio equipment and earphone
CN115243322A (en) Cache capacity determination method and device, bluetooth playing equipment and storage medium
US8909304B1 (en) Wireless network with power save mode
US20250280269A1 (en) Electronic device, and method of transmitting data in electronic device
US8073383B2 (en) Method and apparatus for long-time music play on a mobile communication terminal
CN118784007A (en) Method and device for playing audio, chip and audio equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant