US11606718B2ActiveUtilityA1
Method and device for data transmission, and storage medium
Assignee: BEIJING XIAOMI MOBILE SOFTWARE CO LTDPriority: May 28, 2020Filed: Jan 11, 2021Granted: Mar 14, 2023
Est. expiryMay 28, 2040(~13.9 yrs left)· nominal 20-yr term from priority
Inventors:Zhe Wu
H04L 47/36H04W 8/04H04W 28/06H04L 43/12H04W 8/005H04W 4/80H04L 69/16H04W 28/18H04L 47/365H04L 1/1607H04W 84/18Y02D30/70
43
PatentIndex Score
0
Cited by
16
References
13
Claims
Abstract
A method for data transmission includes: during Bluetooth communication, negotiating, by transmitting a sounding data packet at a data size which is a candidate value of a maximum transmission unit (MTU), with a second electronic device about an applied value of the MTU for the Bluetooth communication. Through the technical solution according to embodiments of the disclosure, MTU sounding is performed by sending a data packet during data transmission between Bluetooth devices. Through the MTU negotiation between the two parties of interaction, an appropriate and stable MTU value is finally obtained to serve as a standard parameter of the interaction.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. A method for data transmission, applied to a first electronic device and comprising:
during Bluetooth communication, negotiating, by transmitting a sounding data packet at a data size which is a candidate value of a maximum transmission unit (MTU), with a second electronic device about an applied value of the MTU for the Bluetooth communication,
wherein the negotiating, by transmitting the sounding data packet at the data size which is the candidate value of the MTU, with the second electronic device about the applied value of the MTU for the Bluetooth communication comprises:
sending, according to the candidate value of the MTU, the sounding data packet for the Bluetooth communication to the second electronic device;
receiving a feedback data packet from the second electronic device within a preset period of time;
in response to that a data size of the received feedback data packet is equal to that of the sounding data packet, determining the candidate value of the MTU to be the applied value of the MTU for the Bluetooth communication between the first electronic device and the second electronic device;
decrementing the candidate value of the MTU, in response to receiving no feedback data packet at a data size which is equal to that of the sounding data packet;
according to the decremented candidate value of the MTU, continuing to negotiate, by transmitting a sounding data packet at a data size which is the decremented candidate value of the MTU, with the second electronic device about the applied value of the MTU for the Bluetooth communication; and
stopping negotiation of the MTU, in response to receiving, from the second electronic device, the feedback data packet at the data size which is equal to that of the sounding data packet, or in response to that the candidate value has been decremented to a minimum candidate value of the MTU.
2. The method of claim 1 , wherein the decrementing the candidate value of the MTU, in response to receiving no feedback data packet at a data size which is equal to that of the sounding data packet comprises:
in response to receiving, from the second electronic device within the preset period of time, a feedback data packet at a data size which is different from that of the sounding data packet, decrementing the candidate value of the MTU according to the data size of the feedback data packet; or
in response to receiving, from the second electronic device within the preset period of time, a feedback data packet at a data size which is different from that of the sounding data packet, decrementing the candidate value of the MTU according to a first predetermined adjustment value.
3. The method of claim 1 , wherein the decrementing the candidate value of the MTU, in response to receiving no feedback data packet at a data size which is equal to that of the sounding data packet comprises:
in response to receiving no feedback data packet from the second electronic device within the preset period of time, decrementing the candidate value of the MTU according to a second predetermined adjustment value.
4. The method of claim 1 , wherein the negotiating, by transmitting the sounding data packet at the data size which is the candidate value of the MTU, with the second electronic device about the applied value of the MTU for the Bluetooth communication further comprises:
in response receiving no feedback data packet at a data size which is equal to that of the sounding data packet, determining a minimum candidate value to be the applied value of the MTU.
5. The method of claim 1 , wherein during the Bluetooth communication, the negotiating, by transmitting the sounding data packet at the data size which is the candidate value of the MTU, with the second electronic device about the applied value of the MTU for the Bluetooth communication comprises:
after data transmission is initiated in the Bluetooth communication, negotiating with the second electronic device about the applied value of the MTU for the Bluetooth communication, by transmitting, at a predetermined interval or at a moment when the data transmission is suspended, the sounding data packet at the data size which is the candidate value of the MTU.
6. A non-transitory computer-readable storage medium having computer-executable instructions stored thereon for execution by a processor to implement steps of the method for data transmission of claim 1 .
7. A method for data transmission, applied to a second electronic device and comprising:
during Bluetooth communication, receiving a sounding data packet for the Bluetooth communication, wherein the sounding data packet is sent by a first electronic device according to a candidate value of a maximum transmission unit (MTU); and
sending a feedback data packet to the first electronic device according to a data size of the sounding data packet, wherein the feedback data packet is used for the first electronic device to determine an applied value of the MTU,
wherein the sending the feedback data packet to the first electronic device according to the data size of the sounding data packet comprises:
determining whether the data size of the sounding data packet is equal to a predetermined MTU of the second electronic device;
in response to that the data size of the sounding data packet is equal to the predetermined MTU, sending, to the first electronic device, the feedback data packet at a data size which is equal to that of the sounding data packet, wherein the feedback data packet is used for the first electronic device to determine the candidate value of the MTU as the applied value of the MTU for the Bluetooth communication between the first electronic device and the second electronic device; and
in response to that the data size of the sounding data packet is different from the predetermined MTU, sending, to the first electronic device, the feedback data packet at a data size which is smaller than or equal to that of the sounding data packet.
8. A device for data transmission, applied to a second electronic device and comprising:
a processor; and
memory for storing instructions executable by the processor;
wherein the processor is configured to:
during Bluetooth communication, receive a sounding data packet for the Bluetooth communication, wherein the sounding data packet is sent by a first electronic device according to a candidate value of a maximum transmission unit (MTU); and
send a feedback data packet to the first electronic device according to a data size of the sounding data packet, wherein the feedback data packet is used for the first electronic device to determine an applied value of the MTU,
wherein the processor is further configured to:
determine whether the data size of the sounding data packet is equal to a predetermined MTU of the second electronic device;
in response to that the data size of the sounding data packet is equal to the predetermined MTU, send, to the first electronic device, the feedback data packet at a data size which is equal to that of the sounding data packet, wherein the feedback data packet is used for the first electronic device to determine the candidate value of the MTU as the applied value of the MTU for the Bluetooth communication between the first electronic device and the second electronic device; and
in response to that the data size of the sounding data packet is different from the predetermined MTU, send, to the first electronic device, the feedback data packet at a data size which is smaller than or equal to that of the sounding data packet.
9. A device for data transmission, applied to a first electronic device and comprising:
a processor; and
memory for storing instructions executable by the processor;
wherein the processor is configured to: during Bluetooth communication, negotiate, by transmitting a sounding data packet at a data size which is a candidate value of a maximum transmission unit (MTU), with a second electronic device about an applied value of the MTU for the Bluetooth communication,
wherein the processor is further configured to:
send, according to the candidate value of the MTU, the sounding data packet for the Bluetooth communication to the second electronic device;
receive a feedback data packet from the second electronic device within a preset period of time;
in response to that a data size of the received feedback data packet is equal to that of the sounding data packet, determine the candidate value of the MTU to be the applied value of the MTU for the Bluetooth communication between the first electronic device and the second electronic device;
decrement the candidate value of the MTU in response to receiving no feedback data packet at a data size which is equal to that of the sounding data packet;
according to the decremented candidate value of the MTU, continue to negotiate, by transmitting a sounding data packet at a data size which is the decremented candidate value of the MTU, with the second electronic device about the applied value of the MTU for the Bluetooth communication; and
stop negotiation of the MTU, in response to receiving, from the second electronic device, the feedback data packet at the data size which is equal to that of the sounding data packet, or in response to that the candidate value has been decremented to a minimum candidate value of the MTU.
10. The device of claim 9 , wherein the processor is further configured to:
in response to receiving, from the second electronic device within the preset period of time, a feedback data packet at a data size which is different from that of the sounding data packet, decrement the candidate value of the MTU according to the data size of the feedback data packet; or
in response to receiving, from the second electronic device within the preset period of time, a feedback data packet at a data size which is different from that of the sounding data packet, decrement the candidate value of the MTU according to a first predetermined adjustment value.
11. The device of claim 9 , wherein the processor is further configured to:
in response to receiving no feedback data packet from the second electronic device within the preset period of time, decrement the candidate value of the MTU according to a second predetermined adjustment value.
12. The device of claim 9 , wherein the processor is further configured to:
in response receiving no feedback data packet at a data size which is equal to that of the sounding data packet, determine a minimum candidate value to be the applied value of the MTU.
13. The device of claim 9 , wherein the processor is further configured to:
after data transmission is initiated in the Bluetooth communication, negotiate with the second electronic device about the applied value of the MTU for the Bluetooth communication, by transmitting, at a predetermined interval or at a moment when the data transmission is suspended, the sounding data packet at the data size which is the candidate value of the MTU.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.