WO2022266964A1 - 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质 - Google Patents

基于低功耗蓝牙的数据传输方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022266964A1
WO2022266964A1 PCT/CN2021/102203 CN2021102203W WO2022266964A1 WO 2022266964 A1 WO2022266964 A1 WO 2022266964A1 CN 2021102203 W CN2021102203 W CN 2021102203W WO 2022266964 A1 WO2022266964 A1 WO 2022266964A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
packet
fragment
duration
data packet
Prior art date
Application number
PCT/CN2021/102203
Other languages
English (en)
French (fr)
Inventor
董建利
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2021/102203 priority Critical patent/WO2022266964A1/zh
Priority to CN202180096750.1A priority patent/CN117157921A/zh
Publication of WO2022266964A1 publication Critical patent/WO2022266964A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • 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

Definitions

  • the embodiments of the present application relate to the field of communication technology, and in particular to a data transmission method, device, device and storage medium based on Bluetooth low energy consumption.
  • BLE Bluetooth Low Energy, Bluetooth Low Energy
  • Bluetooth Low Energy Bluetooth Low Energy
  • a Bluetooth connection can be established between two devices based on BLE technology, and then data transmission can be performed based on the Bluetooth connection.
  • BLE transmission introduces a retransmission mechanism. If a certain data sent by the sender is not successfully received by the receiver, the sender will retransmit the data, which increases the data transmission delay and reduces the data transmission efficiency.
  • Embodiments of the present application provide a data transmission method, device, device, and storage medium based on Bluetooth low energy consumption. Described technical scheme is as follows:
  • a data transmission method based on Bluetooth low energy consumption is provided, the method is executed by a first device, and the method includes:
  • the first data is not successfully received by the second device, acquire the transmission duration of the first data
  • the second data is sent to the second device through the Bluetooth connection established with the second device.
  • a data transmission method based on Bluetooth low energy consumption is provided, the method is executed by a second device, and the method includes:
  • the second data is sent by the first device when it is determined that the first data has not been successfully received by the second device, and the transmission duration of the first data is greater than or equal to the timeout threshold of.
  • a data transmission device based on Bluetooth low energy consumption comprising:
  • An obtaining module configured to obtain the transmitted duration of the first data when the first data is not successfully received by the second device
  • a sending module configured to send the second data to the second device through the Bluetooth connection established with the second device when the transmitted duration of the first data is greater than or equal to the timeout threshold .
  • a data transmission device based on Bluetooth low energy consumption comprising:
  • a receiving module configured to receive second data from the first device through the Bluetooth connection established with the first device
  • the second data is sent by the first device when it is determined that the first data has not been successfully received by the second device, and the transmission duration of the first data is greater than or equal to the timeout threshold of.
  • a data transmission device based on Bluetooth low energy consumption includes a processor and a memory, a computer program is stored in the memory, and the processor executes the computer program In order to realize the above-mentioned data transmission method based on low-power bluetooth.
  • a computer-readable storage medium is provided, and a computer program is stored in the storage medium, and the computer program is used to be executed by a processor to realize the above-mentioned data processing based on Bluetooth low energy consumption. transfer method.
  • a chip is provided, the chip includes a programmable logic circuit and/or program instructions, and when the chip is running, is used to implement the above data transmission method based on Bluetooth low energy consumption.
  • a computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and a processor reads from the The computer-readable storage medium reads and executes the computer instructions, so as to realize the above-mentioned data transmission method based on Bluetooth low energy consumption.
  • FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • Fig. 2 exemplarily shows a schematic diagram of a data transmission process based on Bluetooth Low Energy
  • FIG. 3 exemplarily shows a schematic diagram of a confirmation and flow control mechanism for Bluetooth low energy transmission
  • FIG. 4 is a flowchart of a data transmission method based on Bluetooth low energy provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of a flow control mechanism based on Bluetooth low energy provided by an embodiment of the present application
  • FIG. 6 is a flowchart of a data transmission method based on Bluetooth low energy provided by another embodiment of the present application.
  • FIG. 7 is a schematic diagram of a data transmission process in a non-fragmentation scenario provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of a data transmission method based on Bluetooth low energy provided by another embodiment of the present application.
  • FIG. 9 and FIG. 10 are schematic diagrams of a data transmission process in a fragmentation scenario provided by an embodiment of the present application.
  • FIG. 11 is a block diagram of a data transmission device based on Bluetooth low energy provided by an embodiment of the present application.
  • FIG. 12 is a block diagram of a data transmission device based on Bluetooth low energy provided by another embodiment of the present application.
  • Fig. 13 is a structural block diagram of a data transmission device based on Bluetooth low energy provided by an embodiment of the present application.
  • the network architecture and business scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided by the embodiments of the present application.
  • the evolution of the technology and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
  • FIG. 1 shows a schematic diagram of a network architecture provided by an embodiment of the present application.
  • the network architecture may include: a first device 10 and a second device 20 .
  • a Bluetooth connection can be established between the first device 10 and the second device 20 through Bluetooth low energy technology, and then use the Bluetooth connection to communicate.
  • the Bluetooth low energy technology can be applied in many different scenarios, and in different scenarios, the specific implementations of the above-mentioned first device 10 and the second device 20 will also be different.
  • the first device 10 can be a Bluetooth mouse or a Bluetooth keyboard
  • the second device 20 can be a host
  • the Bluetooth mouse/keyboard and the host can be established through low-power Bluetooth technology.
  • the Bluetooth mouse/keyboard can send the movement data of the mouse and the button data of the keyboard to the host through the above-mentioned Bluetooth connection, and the host performs corresponding operations after receiving the above-mentioned data.
  • the first device 10 may be a device for collecting target monitoring data (such as a data collection device), and the second device 20 may be a device for receiving target monitoring data (such as a data receiving device).
  • a Bluetooth connection can be established between the data acquisition device and the data receiving device through Bluetooth low energy technology.
  • the data collection device can send the collected target monitoring data to the data receiving device through the above-mentioned Bluetooth connection, and the data receiving device performs corresponding operations after receiving the above-mentioned target monitoring data.
  • the target monitoring data is different.
  • the target monitoring data can be environmental data collected by the sensor of the data acquisition device, such as temperature, humidity, air pressure and other data.
  • the target monitoring data may be human body data collected by the sensor of the data collection device, such as body temperature, heart rate and other data, which is not limited in this application.
  • Different application scenarios require low-power Bluetooth communication to have different data transmission characteristics. For example, some scenarios require low-power Bluetooth technology to have low-latency characteristics during data transmission, while some scenarios require low-power Bluetooth technology to transmit
  • the process of data has high reliability characteristics.
  • the communication scenario between the Bluetooth mouse/keyboard and the host and the real-time data monitoring scenario mentioned above have high requirements for delay, and require low delay characteristics during the data transmission process.
  • the retransmission mechanism mentioned above in the background art is mainly to ensure high reliability, but cannot satisfy low latency. Therefore, it is necessary to expand the data transmission scheme of Bluetooth low energy technology so that it supports different QoS (Quality of Service, quality of service) mechanisms to adapt to the data transmission requirements in different application scenarios.
  • This application provides a data transmission solution that can meet the requirement of low delay.
  • CRC Cyclic Redundancy Check, cyclic redundancy check
  • FIG. 2 exemplarily shows a schematic diagram of a data transmission process based on Bluetooth low energy consumption.
  • a Bluetooth connection can be established between the first device and the second device through low-power Bluetooth technology.
  • the first device is the central device and the second device is the peripheral device.
  • the first device may provide data to the second device, and the second device may perform a corresponding operation based on the data provided by the first device.
  • the second device may also provide data to the first device, and the first device may perform a corresponding operation based on the data provided by the second device.
  • the first device and the second device send and receive in turn.
  • the length of the connection event depends on the resource scheduling and data transmission volume of both devices.
  • connection event can was closed early.
  • the first device monitors and receives; when the first device transmits, the second device monitors and receives; the first device and the second device send alternately .
  • Fig. 3 exemplarily shows a schematic diagram of the confirmation and flow control mechanism of Bluetooth low energy transmission.
  • the first device confirms the content of the transmitted data before sending data to the second device. If tSqNo (transmitSeqNum, sending sequence number) is the same as NESN (Next Expected Sequence Number, the next expected sequence number), the first device sends the second device Send old data and tSqNo; if tSqNo is different from NESN, then the first device performs Inc tSqNo operation (update tSqNo) and then sends new data and tSqNo to the second device.
  • tSqNo is a sending sequence number maintained by the first device itself, representing data sent by the local device (that is, the first device).
  • the NESN comes from the feedback message sent by the second device, and represents the data that the peer device (that is, the second device) expects from the local device (that is, the first device).
  • Inc tSqNo operation means +1 operation on tSqNo.
  • tSqNo is different from NESN, it means that the second device feedbacks Nack (Negative Acknowledgment, negative acknowledgment), indicating that the last data transmission failed (for example, the first device failed to send data, or the first device sent data successfully but the second device received data) CRC check error), it is necessary to retransmit the old data (that is, the data that failed the previous transmission).
  • Nack Negative Acknowledgment, negative acknowledgment
  • tSqNo is the same as NESN, it means that the second device feedbacks Ack (Acknowledgment, positive confirmation), indicating that the last data transmission was successful (such as the first device sending data successfully, and the CRC check is correct after the second device receives the data), then update tSqNo and send new data.
  • Ack Acknowledgment, positive confirmation
  • the second device After receiving the data, the second device confirms whether the data is repeated. If SN (Sequence Number, serial number) is the same as nExSqNo (nextExpectedSeqNum, next expected sequence number), it means that the currently received data is the new data that the second device expects to receive , the second device performs an Inc nExSqNo operation (updates nExSqNo), and receives the new data. If SN is not the same as nExSqNo, it means that the currently received data is not the new data expected to be received by the second device, and the second device can ignore the data. Wherein, the SN is from the data packet sent by the first device, and represents the data being sent by the peer device (that is, the first device).
  • nExSqNo is the next expected sequence number maintained by the second device itself, representing the data that the local device (ie, the second device) expects to send from the peer device (ie, the first device). Inc nExSqNo is to perform +1 operation on nExSqNo.
  • the current tSqNo when sending a data message, the current tSqNo will be copied into the SN field of the data message, and when sending a feedback message, the current nExSqNo will be copied into the NESN field of the feedback message.
  • both the SN field and the NESN field are 1 bit.
  • FIG. 4 shows a flowchart of a data transmission method based on Bluetooth low energy provided by an embodiment of the present application. This method can be applied to the network architecture shown in FIG. 1 .
  • the method may include the following steps (410-420):
  • Step 410 in the case that the first data is not successfully received by the second device, the first device obtains the transmission duration of the first data.
  • the first data is data that the first device has sent to the second device, and after sending the first data to the second device, the first device judges whether the first data is successfully received by the second device. In a case where the first device determines that the first data has not been successfully received by the second device, the first device acquires a transmission duration of the first data.
  • the transmitted duration of the first data refers to the duration that has been consumed for transmitting the first data.
  • the transmitted duration of the first data is obtained in the following manner: obtain the current moment and the first moment, the first moment refers to the moment when the first data is written into a buffer (buffer), and the buffer is used to store data to be sent data; determining the interval duration between the current moment and the first moment as the transmitted duration of the first data. For example, if the current time is recorded as t, and the time when the first data is written into the buffer is recorded as t 0 , then the transmission duration of the first data is tt 0 . In this way, the transmitted duration of the first data starts counting from when the first data is written into the buffer, and the transmitted duration of the first data includes the waiting duration after the first data is written into the buffer and the first data Elapsed time during transmission.
  • This method of determining the elapsed transmission time can more accurately reflect the data transmission delay.
  • the controller controls the time stamp when each data arrives in the buffer.
  • the transmitted duration of the first data is obtained in the following manner: obtain the current time and the second time, the second time refers to the time when the first device sends the first data for the first time;
  • the interval duration between is determined as the transmitted duration of the first data.
  • the current time is recorded as t
  • the time when the first device first sends out the first data is recorded as t 0 ′
  • the transmission duration of the first data is recorded as tt 0 ′.
  • the transmitted duration of the first data starts counting from the moment when the first data is sent out for the first time
  • the transmitted duration of the first data only includes the consumed duration of the first data during transmission, not Including the waiting time after the first data is written into the buffer. This method of determining the duration of the transmission will not affect the transmission opportunity and retransmission times of the next data when the current data is delayed.
  • the transmitted duration of the first data may also be determined in other ways, which is not limited in this application.
  • the interval between the current time and the third time is determined as the transmitted time of the first data
  • the third time refers to the time when the controller of the buffer receives the first data that needs to be written into the buffer.
  • the controller receives data to be written into the buffer from the HCI or the high layer, the controller records the time stamp of receiving each data.
  • the first device judges whether the first data is successfully received by the second device in the following manner: the first device receives the first feedback from the second device after sending the first data to the second device message, the first feedback message includes the next expected sequence number of the second device; if the next expected sequence number is the same as the sending sequence number corresponding to the first data recorded by the first device, the first device determines that the second A piece of data is not successfully received by the second device; if the next expected sequence number is different from the sending sequence number corresponding to the first data recorded by the first device, the first device determines that the first data has been successfully received by the second device.
  • Step 420 if the transmitted duration of the first data is greater than or equal to the timeout threshold, the first device sends the second data to the second device through the Bluetooth connection established with the second device.
  • the first device when it is determined that the first data has not been successfully received by the second device, the first device will directly retransmit the first data to the second device.
  • the first device when it is determined that the first data has not been successfully received by the second device, the first device first determines whether the transmitted duration of the first data is greater than or equal to the timeout threshold; if the first data If the data transmission duration is greater than or equal to the timeout threshold, the first device sends the second data to the second device through the Bluetooth connection established with the second device.
  • the second data is different from the first data.
  • the second data is another data to be sent different from the first data, for example, the second data may be the next data to be sent after the first data in the buffer.
  • the timeout threshold represents the maximum transmission time that a data is allowed to spend during transmission.
  • the timeout threshold may be specified by the protocol, or determined by the first device itself, or determined through negotiation between the first device and the second device, which is not limited in this application.
  • the corresponding timeout thresholds may be the same or different.
  • corresponding timeout thresholds may be the same or different.
  • the timeout threshold of high-priority data is larger than that of low-priority data, so as to ensure that high-priority data can obtain more retransmission opportunities and ensure that high-priority data is correctly received .
  • the timeout threshold may be smaller than the time span of one connection event, or may be greater than the time span of one connection event, which is not limited in this application.
  • the sending sequence number (tSqNo) corresponding to the second data is the same as the sending sequence number (tSqNo) corresponding to the first data.
  • the purpose of keeping the sending sequence number corresponding to the second data consistent with the sending sequence number corresponding to the first data is to ensure that when the second device receives the second data, it will confirm that the sequence number (SN) corresponding to the second data is the same as that of the second device.
  • the device itself maintains the consistency of the next expected sequence number (nExSqNo), thereby receiving the second data.
  • the sending sequence number (tSqNo) corresponding to the second data is different from the sending sequence number (tSqNo) corresponding to the first data, it will cause the second device to confirm the sequence corresponding to the second data when receiving the second data
  • the number (SN) is inconsistent with the next expected sequence number (nExSqNo) maintained by the second device itself, and the second device will ignore the second data at this time, so that the second data cannot be successfully received by the second device.
  • the first device sends the first data to the second device through the Bluetooth connection established with the second device.
  • the first device will resend the first data to the second device until the first data is successfully received by the second device or the transmitted duration of the first data greater than or equal to the timeout threshold.
  • the sending sequence number corresponding to the first data should be consistent with that at the initial transmission.
  • the reliability of data transmission is improved as much as possible by retransmitting the first data.
  • FIG. 5 shows a schematic diagram of a flow control mechanism corresponding to the method of this embodiment.
  • the first device After the first device sends the first data to the second device, it will receive a feedback message from the second device, where the feedback message carries a next expected sequence number (NESN) of the second device.
  • the first device Before transmitting data, the first device first judges whether the sending sequence number (tSqNo) maintained by the first device itself is the same as the next expected sequence number (NESN) of the second device. If tSqNo is different from NESN, it means that the last data transmission was successful (that is, the first data transmission was successful), and the first device sends second data (new data different from the first data) to the second device.
  • tSqNo sending sequence number maintained by the first device itself is the same as the next expected sequence number of the second device.
  • tSqNo is the same as NESN, it means that the last data transmission failed (that is, the first data transmission failed), and the first device further determines whether the transmitted duration of the first data is greater than or equal to the timeout threshold. If the transmitted duration of the first data is greater than or equal to the timeout threshold, the first device discards the first data from the buffer, and sends the second data to the second device, and the corresponding sending sequence number (tSqNo ) is the same as the sending sequence number (tSqNo) corresponding to the first data. If the transmitted duration of the first data is less than the timeout threshold, the first device retransmits the first data to the second device.
  • the technical solution provided by the embodiment of this application provides a solution for effectively controlling the data transmission delay for the data transmission scenario based on Bluetooth low energy.
  • a certain data is not successfully received by the peer device
  • the transmitted duration of the data is greater than or equal to the timeout threshold value
  • the next data will be sent directly, thereby effectively controlling the data transmission delay. control to meet the business requirements of some low-latency scenarios.
  • FIG. 6 shows a flowchart of a data transmission method based on Bluetooth low energy provided by another embodiment of the present application.
  • This method can be applied to the network architecture shown in FIG. 1 .
  • the method may include the following steps (610-620):
  • Step 610 in the case that the first data packet is not successfully received by the second device, the first device obtains the transmission duration of the first data packet.
  • Step 620 If the transmitted duration of the first data packet is greater than or equal to the timeout threshold, the first device sends the second data packet to the second device through the Bluetooth connection established with the second device.
  • the first data is a first data packet
  • the second data is a second data packet
  • the first data packet and the second data packet are two different data packets.
  • the second data packet is another data packet to be sent different from the first data packet, for example, the second data packet may be the next data packet to be sent after the first data packet in the buffer.
  • the sending sequence number (tSqNo) corresponding to the second data packet is the same as the sending sequence number (tSqNo) corresponding to the first data packet , so as to ensure that the second device can correctly receive the second data packet.
  • the first device sends the first data packet to the second device through the Bluetooth connection established with the second device.
  • the first device will resend the first data packet to the second device until the first data packet is successfully received by the second device or the first data packet
  • the transmitted duration of is greater than or equal to the timeout threshold.
  • the sending sequence number corresponding to the first data packet should be consistent with that in the initial transmission.
  • the controller records each The timestamp when the packet arrived in the buffer.
  • the first device sends the first data packet D 0 to the second device, if the second device returns Nack to the first device, or due to environmental interference and other reasons, the Ack returned by the second device to the first device contains a CRC check error , the first device judges whether the transmitted duration of the first data packet D0 is greater than or equal to the timeout threshold when the next sending window arrives.
  • the first device directly discards the first data packet D 0 , sends the second data packet D 1 to the second device, and sends the second data packet
  • the sequence number tSqNo sent when D 1 remains the same as when the first data packet D 0 is sent.
  • the value of the timeout threshold is small, which is smaller than the time span of a connection event; in the example marked by arrow 2 in Figure 7, the value of the timeout threshold Larger than the time span of a connection event.
  • the timeout threshold may be specified by the protocol, or determined by the first device itself, or determined through negotiation between the first device and the second device, which is not limited in this application.
  • the technical solution provided by the embodiment of the present application provides a solution to effectively control the data transmission delay for the data transmission scenario based on Bluetooth low energy.
  • a certain data packet is not successfully received by the peer device
  • the transmitted duration of the data packet is greater than or equal to the timeout threshold value
  • the next data packet is directly sent, so that the data transmission
  • the delay is effectively controlled to meet the business needs of some low-latency scenarios.
  • FIG. 8 shows a flowchart of a data transmission method based on Bluetooth low energy provided by another embodiment of the present application.
  • This method can be applied to the network architecture shown in FIG. 1 .
  • the method may include the following steps (810-820):
  • Step 810 in the case that the first fragmented packet is not successfully received by the second device, the first device obtains the transmission duration of the first fragmented packet.
  • the first fragmented packet is a plurality of fragments obtained by dividing the first data packet. One of the packs.
  • Step 820 if the transmitted duration of the first fragmented packet is greater than or equal to the timeout threshold, the first device sends the second fragmented packet to the second device through the Bluetooth connection established with the second device, and the second The fragmented packet is one of the plurality of fragmented packets obtained by dividing the second data packet.
  • data fragmentation is involved.
  • the first device can fragment the data packet to obtain multiple fragmented packets. For example, if the data volume of the data packet to be transmitted is 550 bytes, and the maximum length of the PDU is about 200 bytes, then the first device can divide the data packet into 3 fragment packets, the first fragment packet and the second fragment packet. Fragmented packets are 200 bytes, and the third fragmented packet is 150 bytes.
  • the first fragment packet is also referred to as a starting fragment packet, and other fragment packets after the first fragment packet may be referred to as intermediate fragment packets.
  • the first data is a first fragment packet
  • the second data is a second fragment packet.
  • the first fragment packet is one of the plurality of fragment packets obtained by dividing the first data packet
  • the second fragment packet is one of the plurality of fragment packets obtained by dividing the second data packet
  • the first data packet and the second packet are two different packets.
  • the second data packet is another data packet to be sent different from the first data packet, for example, the second data packet may be the next data packet to be sent after the first data packet in the buffer.
  • the second fragment packet is a starting fragment packet among the plurality of fragment packets obtained by dividing the second data packet. That is, when the data in the next new data packet (ie, the second data packet) is sent, it is sent sequentially from its initial fragment packet.
  • the sending sequence number (tSqNo) corresponding to the second fragment packet is the same as the sending sequence number (tSqNo) corresponding to the first fragment packet ( tSqNo) are the same, so as to ensure that the second device can correctly receive the second fragment packet.
  • the first device discards fragmented packets of the first data packet stored in the buffer.
  • the first fragment packet is the initial fragment packet of the first data packet.
  • the first device determines that the first fragment packet has been transmitted If the duration is greater than or equal to the overtime threshold value, the first device directly discards the first fragment packet and the intermediate fragment packet from the same data packet as the first fragment packet, and sends the data in the next data packet (such as second fragment package).
  • the first fragment packet is an intermediate fragment packet of the first data packet, and if the first fragment packet is not successfully received by the second device, if the first device determines that the first fragment packet has been transmitted If the duration is greater than or equal to the timeout threshold value, the first device directly discards the first fragment packet and other intermediate fragment packets to be sent from the same data packet as the first fragment packet, and sends the next data packet data (such as the second fragment packet).
  • the first device sends the second fragment packet in the following manner: the first device sends a second data message to the second device through the Bluetooth connection established with the second device, and the second data message contains Including the second fragment packet, the initial fragment identifier and length information.
  • the initial fragment identifier is used to indicate whether the second fragment packet is the initial fragment packet
  • the length information is used to indicate the data amount of the second fragment packet.
  • the second device can determine whether the second fragment packet carried in the packet is the initial fragment packet according to the initial fragment identifier carried in the packet, so as to Determine if the last packet has been sent.
  • the second device may also determine the data volume of the second fragment packet carried in the message according to the length information carried in the message.
  • the second device compares the first data packet The size relationship between the total data volume of the first data packet and the actual received data volume of the first data packet determines whether the data in the first data packet is received completely; if it is determined that the data in the first data packet is not completely received (ie The total data volume of the first data packet is greater than the actual received data volume of the first data packet), then the fragmented packets belonging to the first data packet can be discarded; if it is determined that the data in the first data packet has been received completely (that is, the first data packet total data volume is equal to the actual received data volume of the first data packet), then the fragmented packets belonging to the first data packet can be saved or used.
  • the total data volume of the first data packet may be notified by the first device to the second device, such as in the packet header when sending the data in the first data packet (such as the initial fragment packet of the first data packet) Carrying the total data volume of the first data packet, the actual received data volume of the first data packet can be calculated by the second device itself.
  • the first device sends the first fragmented packet to the second device through the Bluetooth connection established with the second device.
  • the first device will resend the first fragmented packet to the second device until the first fragmented packet is successfully received by the second device or the first The transmitted duration of a fragmented packet is greater than or equal to the timeout threshold.
  • the sending sequence number corresponding to the first fragmented packet should be consistent with the initial transmission.
  • the controller detects whether fragmentation needs to be performed, and if a If the data volume of a data packet is larger than the PDU, fragmentation is performed on the data packet, and if the data volume of a certain data packet is less than or equal to the PDU, fragmentation does not need to be performed on the data packet. Assume that fragmentation is performed on the first data packet D 0 to obtain two fragmented packets D 00 and D 01 , and two fragmented packets D 10 and D 11 are obtained by performing fragmentation on the second data packet D 1 . In addition, the controller records the time stamps when it receives each data packet that needs to be written into the buffer, such as the time stamp when D 0 is received, the time stamp when D 1 is received, and so on.
  • the first device After the first device sends D 00 to the second device, if the second device returns Nack to the first device, or due to environmental interference, etc., the Ack returned by the second device to the first device contains a CRC checksum. If there is an error checking, the first device judges whether the transmitted duration of D 00 is greater than or equal to the timeout threshold when the next sending window arrives.
  • the first device directly discards the D 00 and other fragmented packets to be transmitted in D 0 (such as D 01 ), and sends the next data packet to the second device For the first fragment packet D 10 in D 1 , when sending D 10 , the sending sequence number tSqNo remains the same as when sending D 00 .
  • the first device sends D 01 to the second device, if the second device returns Nack to the first device, or due to environmental interference, etc., the second device returns to the first device If the Ack contains a CRC check error, the first device judges whether the transmitted duration of D 01 is greater than or equal to the timeout threshold when the next sending window arrives.
  • the first device directly discards the D 01 (since there are no other fragment packets to be transmitted in D 0 , there are no other fragment packets to be discarded), and the The second device sends the first fragment packet D 10 in the next data packet D 1 , and the sequence number tSqNo when sending D 10 remains the same as when sending D 01 .
  • the value of the timeout threshold is small, which is smaller than the time span of a connection event; in the example marked by arrow 2 in Figure 9 and Figure 10, the timeout threshold The value of the threshold is relatively large, which is greater than the time span of one connection event.
  • the timeout threshold may be specified by the protocol, or determined by the first device itself, or determined through negotiation between the first device and the second device, which is not limited in this application.
  • the second data packet There is no need for fragmentation, that is, the first data is the first fragmented packet belonging to the first data packet, and the second data is the second data packet.
  • the first device obtains the transmission duration of the first fragment packet. If the transmitted duration of the first fragmented packet is greater than or equal to the timeout threshold, the first device sends the second data packet to the second device through the Bluetooth connection established with the second device. If the transmitted duration of the first fragmented packet is less than the timeout threshold, the first device resends the first fragmented packet to the second device through the Bluetooth connection established with the second device.
  • the technical solution provided by the embodiment of the present application provides a solution to effectively control the data transmission delay for the data transmission scenario based on low-power bluetooth.
  • the peer device receives it successfully, by judging whether the transmitted duration of the fragmented packet is greater than or equal to the timeout threshold, if the transmitted duration of the fragmented packet is greater than or equal to the timeout threshold, it will directly send the next Data in the data packet, so as to effectively control the data transmission delay to meet the business needs of some low-latency scenarios.
  • the first device may be a peripheral device and the second device may be a central device, or the first device may be a central device.
  • the second device is a peripheral device (peripheral device). That is, the data transmission method provided by the above-mentioned embodiments is applicable to the sending process from a peripheral device to a central device, and is also applicable to a sending process from a central device to a peripheral device. .
  • the above-mentioned steps performed by the second device can be independently implemented as a data transmission method based on Bluetooth low energy consumption on the second device side.
  • FIG. 11 shows a block diagram of a data transmission device based on Bluetooth low energy provided by an embodiment of the present application.
  • the device has the function of realizing the above method example, and the function may be realized by hardware, or may be realized by executing corresponding software by hardware.
  • the apparatus may be the first device described above, or may be set in the first device. As shown in FIG. 11 , the apparatus 1100 may include: an acquiring module 1110 and a sending module 1120 .
  • the obtaining module 1110 is configured to obtain the transmission duration of the first data when the first data is not successfully received by the second device.
  • the sending module 1120 is configured to send the second data to the second device through the bluetooth connection established with the second device when the transmitted duration of the first data is greater than or equal to a timeout threshold. data.
  • the acquiring module 1110 is configured to acquire the current moment and the first moment, the first moment refers to the moment when the first data is written into a buffer, and the buffer is used to store the The data to be sent: determine the interval duration between the current moment and the first moment as the transmitted duration of the first data.
  • the obtaining module 1110 is configured to obtain the current time and a second time, the second time refers to the time when the first device sends the first data for the first time; combine the current time with the The interval duration between the second moments is determined as the transmitted duration of the first data.
  • the transmission sequence number corresponding to the second data is the same as the transmission sequence corresponding to the first data same number.
  • the first data is a first data packet
  • the second data is a second data packet
  • the first data packet and the second data packet are two different data packets .
  • the first data is a first fragment packet, and the first fragment packet is one of a plurality of fragment packets obtained by dividing the first data packet;
  • the second data is The second fragment packet, and the second fragment packet is one of a plurality of fragment packets obtained by dividing the second data packet; wherein, the first data packet and the second data packet are two different data packets.
  • the second fragment packet is a starting fragment packet among a plurality of fragment packets obtained by dividing the second data packet.
  • the sending module 1120 is configured to send a second data packet to the second device through the Bluetooth connection established with the second device, and the second data packet includes the The second fragment packet, the initial fragment identifier and length information; wherein, the initial fragment identifier is used to indicate whether the second fragment packet is the initial fragment packet, and the length information is used to indicate the Describe the data volume of the second fragment packet.
  • the sending module 1120 is further configured to discard the segment of the first data packet stored in the buffer when the transmitted duration of the first data is greater than or equal to the timeout threshold value. Fragment packets, the buffer is used to store data to be sent.
  • the sending module 1120 is further configured to, when the transmitted duration of the first data is less than the timeout threshold, send , sending the first data to the second device.
  • the apparatus 1100 further includes: a receiving module and a determining module (not shown in FIG. 11 ).
  • a receiving module configured to receive a first feedback message from the second device after sending the first data to the second device, the first feedback message includes the next An expected serial number.
  • a determining module configured to determine that the first data has not been successfully received by the second device when the next expected sequence number is the same as the sending sequence number corresponding to the first data recorded by the first device Receiving: determining that the first data has been successfully received by the second device when the next expected sequence number is different from the transmission sequence number corresponding to the first data recorded by the first device.
  • the technical solution provided by the embodiment of this application provides a solution for effectively controlling the data transmission delay for the data transmission scenario based on Bluetooth low energy.
  • a certain data is not successfully received by the peer device
  • the transmitted duration of the data is greater than or equal to the timeout threshold value
  • the next data will be sent directly, thereby effectively controlling the data transmission delay. control to meet the business requirements of some low-latency scenarios.
  • FIG. 12 shows a block diagram of a data transmission device based on Bluetooth low energy provided by another embodiment of the present application.
  • the device has the function of realizing the above method example, and the function may be realized by hardware, or may be realized by executing corresponding software by hardware.
  • the apparatus may be the second device described above, or may be set in the second device. As shown in FIG. 12 , the apparatus 1200 may include: a receiving module 1210 .
  • a receiving module 1210 configured to receive second data from the first device through the Bluetooth connection established with the first device
  • the second data is sent by the first device when it is determined that the first data has not been successfully received by the second device, and the transmission duration of the first data is greater than or equal to the timeout threshold of.
  • the transmission sequence number corresponding to the second data is the same as the transmission sequence corresponding to the first data same number.
  • the first data is a first data packet
  • the second data is a second data packet
  • the first data packet and the second data packet are two different data packets .
  • the first data is a first fragment packet, and the first fragment packet is one of a plurality of fragment packets obtained by dividing the first data packet;
  • the second data is The second fragment packet, and the second fragment packet is one of a plurality of fragment packets obtained by dividing the second data packet; wherein, the first data packet and the second data packet are two different data packets.
  • the second fragment packet is a starting fragment packet among a plurality of fragment packets obtained by dividing the second data packet.
  • the receiving module 1210 is configured to receive a second data packet from the first device through the Bluetooth connection established with the first device, and the second data packet includes the The second fragment packet, the initial fragment identifier and length information; wherein, the initial fragment identifier is used to indicate whether the second fragment packet is the initial fragment packet, and the length information is used to indicate The data volume of the second fragment packet.
  • the apparatus 1200 further includes: a discarding module (not shown in FIG. 12 ), configured to compare the first The total data volume of the data packet and the actual received data volume; if the total data volume is greater than the actual received data volume, discarding the fragmented packets belonging to the first data packet.
  • a discarding module (not shown in FIG. 12 ), configured to compare the first The total data volume of the data packet and the actual received data volume; if the total data volume is greater than the actual received data volume, discarding the fragmented packets belonging to the first data packet.
  • the technical solution provided by the embodiment of this application provides a solution for effectively controlling the data transmission delay for the data transmission scenario based on Bluetooth low energy.
  • a certain data is not successfully received by the peer device
  • the transmitted duration of the data is greater than or equal to the timeout threshold value
  • the next data will be sent directly, thereby effectively controlling the data transmission delay. control to meet the business requirements of some low-latency scenarios.
  • the device provided by the above embodiment realizes its functions, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • FIG. 13 shows a structural block diagram of a data transmission device 130 based on Bluetooth low energy provided by an embodiment of the present application.
  • the device 130 may be the first device in the above embodiment, which is used to implement the data transmission method based on Bluetooth low energy on the first device side; the device 130 may also be the second device in the above embodiment.
  • the device is configured to execute the data transmission method based on Bluetooth low energy on the second device side.
  • the device 130 may include: a processor 131 , a receiver 132 , a transmitter 133 , a memory 134 and a bus 135 .
  • the processor 131 includes one or more processing cores, and the processor 131 executes various functional applications and information processing by running software programs and modules.
  • the receiver 132 and the transmitter 133 can be realized as a transceiver 136, and the transceiver 136 can be a communication chip.
  • the memory 134 is connected to the processor 131 through the bus 135 .
  • the memory 134 may be used to store a computer program, and the processor 131 is used to execute the computer program, so as to implement various steps performed by the first device in the foregoing method embodiments.
  • memory 134 can be realized by any type of volatile or nonvolatile storage device or their combination, and volatile or nonvolatile storage device includes but not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory, read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, electrically erasable programmable read-only memory memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, tapes, disks storage or other magnetic storage devices.
  • RAM Random-Access Memory, random access memory
  • ROM Read-Only Memory, read-only memory
  • EPROM Erasable Programmable Read-Only Memory, erasable programmable read-only memory
  • EEPROM Electrically Eras
  • the processor 131 is configured to obtain a transmission duration of the first data when the first data is not successfully received by the second device.
  • the transceiver 136 is configured to send the second data to the second device through the bluetooth connection established with the second device when the transmitted duration of the first data is greater than or equal to the timeout threshold value. Second data.
  • the processor 131 is configured to obtain the current time and the first time, the first time refers to the time when the first data is written into a buffer, and the buffer is used to store data; determining the interval duration between the current moment and the first moment as the transmitted duration of the first data.
  • the processor 131 is configured to obtain the current time and a second time, the second time refers to the time when the first device sends the first data for the first time; The interval duration between the second moments is determined as the transmitted duration of the first data.
  • the transmission sequence number corresponding to the second data is the same as the transmission sequence corresponding to the first data same number.
  • the first data is a first data packet
  • the second data is a second data packet
  • the first data packet and the second data packet are two different data packets .
  • the first data is a first fragment packet, and the first fragment packet is one of a plurality of fragment packets obtained by dividing the first data packet;
  • the second data is The second fragment packet, and the second fragment packet is one of a plurality of fragment packets obtained by dividing the second data packet; wherein, the first data packet and the second data packet are two different data packets.
  • the second fragment packet is a starting fragment packet among a plurality of fragment packets obtained by dividing the second data packet.
  • the transceiver 136 is configured to send a second data packet to the second device through the Bluetooth connection established with the second device, and the second data packet includes the first Two fragment packets, a start fragment identifier and length information; wherein, the start fragment identifier is used to indicate whether the second fragment packet is a start fragment packet, and the length information is used to indicate the The data volume of the second fragment packet.
  • the transceiver 136 is further configured to discard fragments of the first data packet stored in the buffer when the transmitted duration of the first data is greater than or equal to the timeout threshold packet, the buffer is used to store data to be sent.
  • the transceiver 136 is further configured to, when the transmitted duration of the first data is less than the timeout threshold, through the Bluetooth connection established with the second device, sending the first data to the second device.
  • the transceiver 136 is further configured to receive a first feedback message from the second device after sending the first data to the second device, the first feedback message
  • the text includes the next expected serial number of the second device.
  • the processor 131 is further configured to determine that the first data has not been recorded by the first data when the next expected sequence number is the same as the sending sequence number corresponding to the first data recorded by the first device.
  • the second device successfully receives; in the case that the next expected sequence number is different from the sending sequence number corresponding to the first data recorded by the first device, it is determined that the first data has been successfully received by the second device.
  • the transceiver 136 is configured to receive second data from the first device through a Bluetooth connection established with the first device; wherein the second data It is sent by the first device when it is determined that the first data has not been successfully received by the second device, and the transmission duration of the first data is greater than or equal to a timeout threshold.
  • the transmission sequence number corresponding to the second data is the same as the transmission sequence corresponding to the first data same number.
  • the first data is a first data packet
  • the second data is a second data packet
  • the first data packet and the second data packet are two different data packets .
  • the first data is a first fragment packet, and the first fragment packet is one of a plurality of fragment packets obtained by dividing the first data packet;
  • the second data is The second fragment packet, and the second fragment packet is one of a plurality of fragment packets obtained by dividing the second data packet; wherein, the first data packet and the second data packet are two different data packets.
  • the second fragment packet is a starting fragment packet among a plurality of fragment packets obtained by dividing the second data packet.
  • the transceiver 136 is configured to receive a second data packet from the first device through the Bluetooth connection established with the first device, and the second data packet includes the The second fragment packet, the initial fragment identifier and length information; wherein, the initial fragment identifier is used to indicate whether the second fragment packet is the initial fragment packet, and the length information is used to indicate The data volume of the second fragment packet.
  • the processor 131 is used for a discarding module, configured to compare the total data amount of the first data packet with The actual amount of received data; if the total amount of data is greater than the actual amount of received data, discarding fragmented packets belonging to the first data packet.
  • the embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used to be executed by the processor of the device, so as to realize the above-mentioned data transmission method based on Bluetooth low energy consumption .
  • the computer-readable storage medium may include: ROM (Read-Only Memory, read-only memory), RAM (Random-Access Memory, random access memory), SSD (Solid State Drives, solid state drive) or an optical disc, etc.
  • the random access memory may include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
  • the embodiment of the present application also provides a chip, the chip includes a programmable logic circuit and/or program instructions, and when the chip runs on a device, it is used to implement the above data transmission method based on Bluetooth low energy consumption.
  • the embodiment of the present application also provides a computer program product or computer program, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and the processor of the device can read from the computer Reading the storage medium reads and executes the computer instructions, so as to realize the above-mentioned data transmission method based on Bluetooth low energy consumption.
  • the "indication" mentioned in the embodiments of the present application may be a direct indication, may also be an indirect indication, and may also mean that there is an association relationship.
  • a indicates B which can mean that A directly indicates B, for example, B can be obtained through A; it can also indicate that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also indicate that there is an association between A and B relation.
  • the term "corresponding" may indicate that there is a direct or indirect correspondence between the two, or that there is an association between the two, or that it indicates and is indicated, configuration and is configuration etc.
  • the "plurality” mentioned herein means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships. For example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character “/” generally indicates that the contextual objects are an "or” relationship.
  • the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps.
  • the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers
  • the steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.
  • the functions described in the embodiments of the present application may be implemented by hardware, software, firmware or any combination thereof.
  • the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • a storage media may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

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

Abstract

本申请公开了一种基于低功耗蓝牙的数据传输方法、装置、设备及存储介质,涉及通信技术领域。所述方法包括:在第一数据未被第二设备成功接收的情况下,第一设备获取第一数据的已传输时长;若第一数据的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据。对于基于低功耗蓝牙的数据传输场景,本申请提供了一种有效控制数据传输时延的方案,在某一数据未被对端设备成功接收的情况下,通过判断该数据的已传输时长是否大于或等于超时门限值,如果该数据的已传输时长大于或等于超时门限值,则直接发送下一个数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。

Description

基于低功耗蓝牙的数据传输方法、装置、设备及存储介质 技术领域
本申请实施例涉及通信技术领域,特别涉及一种基于低功耗蓝牙的数据传输方法、装置、设备及存储介质。
背景技术
BLE(Bluetooth Low Energy,低功耗蓝牙)技术作为一种无线数据和语言通信开放的全球规范,当前已经被应用于各种各样的产品和场景中,如消费电子、工业物联网、智能家居等。
目前,两个设备间可以基于BLE技术建立蓝牙连接,然后基于该蓝牙连接进行数据传输。而且BLE传输引入了重传机制,如果发送端发出的某一数据未被接收端成功接收,发送端会重传该数据,这增加了数据传输延时,降低了数据传输效率。
发明内容
本申请实施例提供了一种基于低功耗蓝牙的数据传输方法、装置、设备及存储介质。所述技术方案如下:
根据本申请实施例的一个方面,提供了一种基于低功耗蓝牙的数据传输方法,所述方法由第一设备执行,所述方法包括:
在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长;
若所述第一数据的已传输时长大于或等于超时门限值,则通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
根据本申请实施例的一个方面,提供了一种基于低功耗蓝牙的数据传输方法,所述方法由第二设备执行,所述方法包括:
通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;
其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
根据本申请实施例的一个方面,提供了一种基于低功耗蓝牙的数据传输装置,所述装置包括:
获取模块,用于在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长;
发送模块,用于在所述第一数据的已传输时长大于或等于超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
根据本申请实施例的一个方面,提供了一种基于低功耗蓝牙的数据传输装置,所述装置包括:
接收模块,用于通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;
其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
根据本申请实施例的一个方面,提供了一种基于低功耗蓝牙的数据传输设备,所述设备包括处理器和存储器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序以实现上述基于低功耗蓝牙的数据传输方法。
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被处理器执行,以实现上述基于低功耗蓝牙的数据传输 方法。
根据本申请实施例的一个方面,提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片运行时,用于实现上述基于低功耗蓝牙的数据传输方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品或计算机程序,所述计算机程序产品或计算机程序包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机指令,以实现上述基于低功耗蓝牙的数据传输方法。
本申请实施例提供的技术方案可以包括如下有益效果:
对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据未被对端设备成功接收的情况下,通过判断该数据的已传输时长是否大于或等于超时门限值,如果该数据的已传输时长大于或等于超时门限值,则直接发送下一个数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
附图说明
图1是本申请一个实施例提供的网络架构的示意图;
图2示例性示出了基于低功耗蓝牙的数据传输过程的示意图;
图3示例性示出了低功耗蓝牙传输的确认与流控机制的示意图;
图4是本申请一个实施例提供的基于低功耗蓝牙的数据传输方法的流程图;
图5是本申请一个实施例提供的基于低功耗蓝牙的流控机制的示意图;
图6是本申请另一个实施例提供的基于低功耗蓝牙的数据传输方法的流程图;
图7是本申请一个实施例提供的非分片场景下的数据传输过程的示意图;
图8是本申请另一个实施例提供的基于低功耗蓝牙的数据传输方法的流程图;
图9和图10是本申请一个实施例提供的分片场景下的数据传输过程的示意图;
图11是本申请一个实施例提供的基于低功耗蓝牙的数据传输装置的框图;
图12是本申请另一个实施例提供的基于低功耗蓝牙的数据传输装置的框图;
图13是本申请一个实施例提供的基于低功耗蓝牙的数据传输设备的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
本申请实施例描述的网络架构以及业务场景是为了更加清楚地说明本申请实施例的技术方案,并不构成对本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
请参考图1,其示出了本申请一个实施例提供的网络架构示意图,该网络架构可以包括:第一设备10和第二设备20。
第一设备10和第二设备20之间可以通过低功耗蓝牙技术建立蓝牙连接,然后利用该蓝牙连接进行通信。低功耗蓝牙技术可应用在多种不同的场景中,在不同场景中,上述第一设备10和第二设备20的具体实现也会有所不同。
以蓝牙鼠标/键盘与主机间的通信场景为例,第一设备10可以是蓝牙鼠标或蓝牙键盘,第二设备20可以是主机,蓝牙鼠标/键盘与主机之间可以通过低功耗蓝牙技术建立蓝牙连接。蓝牙鼠标/键盘可以将鼠标的运动数据和键盘的按键数据,通过上述蓝牙连接发送给主机,主机接收到上述数据之后,执行相应的操作。
以实时数据监控场景为例,第一设备10可以是用于采集目标监控数据的设备(如称为数据采集设备),第二设备20可以是接收目标监控数据的设备(如称为数据接收设备),数据采集设备和数据接收设备之间可以通过低功耗蓝牙技术建立蓝牙连接。数据采集设备可以将采 集得到的目标监控数据,通过上述蓝牙连接发送给数据接收设备,数据接收设备在接收到上述目标监控数据之后,执行相应的操作。在不同的监控场景下,目标监控数据相应有所不同,如在环境监控场景下,目标监控数据可以是通过数据采集设备的传感器采集的环境数据,如温度、湿度、气压等数据,又如在人体监控场景下,目标监控数据可以是通过数据采集设备的传感器采集的人体数据,如体温、心率等数据,本申请对此不作限定。
不同的应用场景要求低功耗蓝牙通信具有不同的数据传输特性,例如有些场景要求低功耗蓝牙技术在传输数据的过程中具有低时延的特性,而有些场景要求低功耗蓝牙技术在传输数据的过程中具有高可靠性的特性。例如上述蓝牙鼠标/键盘与主机间的通信场景和实时数据监控场景,这类场景对时延要求较高,要求在传输数据的过程中具有低时延的特性。然而,如上文背景技术提及的重传机制,其主要是为了保证高可靠性的特性,而无法满足低时延的特性。因此,有必要对低功耗蓝牙技术的数据传输方案进行扩展,使其支持不同的QoS(Quality of Service,服务质量)机制,以适应不同应用场景下的数据传输需求。本申请提供了一种能够满足低时延需求的数据传输方案。
在介绍本申请技术方案之前,先对目前蓝牙核心规范中定义的用于低功耗蓝牙传输的确认与流控机制进行介绍说明。
目前,基于低功耗蓝牙的数据传输方法普遍使用CRC(Cyclic Redundancy Check,循环冗余校验)来判断接收数据的准确性。CRC是一种根据网络数据包或计算机文件等数据产生简短固定位数校验码的一种信道编码技术,主要用来检测或校验数据传输或者保存后可能出现的错误。
图2示例性示出了基于低功耗蓝牙的数据传输过程的示意图。第一设备和第二设备之间可以通过低功耗蓝牙技术建立蓝牙连接,在图2示例中,以第一设备为中心设备(central device),第二设备为外围设备(peripheral device)为例。第一设备可以向第二设备提供数据,第二设备可以基于第一设备提供的数据执行相应操作。相应地,第二设备也可以向第一设备提供数据,第一设备可以基于第二设备提供的数据执行相应操作。在一个连接事件(connection event)中,第一设备与第二设备之间轮流进行发送和接收,连接事件的长度取决于双方设备的资源调度和数据传输量,若没有数据待传输时连接事件可以提前被关闭。如图2所示,在第二设备进行发送时,第一设备进行监听和接收;在第一设备进行发送时,第二设备进行监听和接收;第一设备和第二设备的发送轮流交替进行。
图3示例性示出了低功耗蓝牙传输的确认与流控机制的示意图。
第一设备在向第二设备发送数据前确认传输数据的内容,若tSqNo(transmitSeqNum,发送序列号)与NESN(Next Expected Sequence Number,下一个预期序列号)相同,则第一设备向第二设备发送旧数据和tSqNo;若tSqNo与NESN不相同,则第一设备进行Inc tSqNo操作(更新tSqNo)然后向第二设备发送新数据和tSqNo。其中,tSqNo是第一设备自身维护的发送序列号,代表本地设备(即第一设备)发送出去的数据。NESN来自第二设备发送的反馈报文,代表对端设备(即第二设备)期望本地设备(即第一设备)发送的数据。Inc tSqNo操作表示对tSqNo进行+1操作。当tSqNo与NESN不相同时表示第二设备反馈Nack(Negative Acknowledgement,否定确认),说明上一次数据传输失败(如第一设备发送数据失败,或第一设备发送数据成功但第二设备接收数据后CRC校验错误),需要重传旧数据(也即上一次传输失败的数据)。当tSqNo与NESN相同时表示第二设备反馈Ack(Acknowledgement,肯定确认),说明上一次数据传输成功(如第一设备发送数据成功,且第二设备接收数据后CRC校验正确),那么就更新tSqNo并发送新数据。
第二设备接收数据后确认该数据是否重复,若SN(Sequence Number,序列号)与nExSqNo(nextExpectedSeqNum,下一个预期序列号)相同,则说明当前接收的数据是第二设备期望接收到的新数据,第二设备进行Inc nExSqNo操作(更新nExSqNo),并接收该新数据。若SN与nExSqNo不相同,则说明当前接收的数据并不是第二设备所期望接收到的新数据,第 二设备可以忽略该数据。其中,SN来自第一设备发送的数据报文,代表对端设备(即第一设备)正在发送的数据。nExSqNo是第二设备自身维护的下一个预期序列号,代表本地设备(即第二设备)期望对端设备(即第一设备)发送的数据。Inc nExSqNo是对nExSqNo进行+1操作。
需要说明的是,在发送数据报文时,会将当前的tSqNo复制到数据报文的SN字段中,在发送反馈报文时,会将当前的nExSqNo复制到反馈报文的NESN字段中。另外,SN字段和NESN字段均为1比特。
请参考图4,其示出了本申请一个实施例提供的基于低功耗蓝牙的数据传输方法的流程图。该方法可应用于图1所示的网络架构中。该方法可以包括如下几个步骤(410~420):
步骤410,在第一数据未被第二设备成功接收的情况下,第一设备获取第一数据的已传输时长。
第一数据是第一设备已经向第二设备发送的数据,第一设备在向第二设备发送第一数据之后,判断该第一数据是否被第二设备成功接收。第一设备在确定第一数据未被第二设备成功接收的情况下,第一设备获取该第一数据的已传输时长。第一数据的已传输时长是指传输该第一数据已经消耗的时长。
在一个示例中,通过如下方式获取第一数据的已传输时长:获取当前时刻和第一时刻,第一时刻是指第一数据写入缓冲区(buffer)的时刻,缓冲区用于存储待发送的数据;将当前时刻与第一时刻之间的间隔时长,确定为第一数据的已传输时长。例如,当前时刻记为t,第一数据写入缓冲区的时刻记为t 0,那么第一数据的已传输时长为t-t 0。在这种方式下,第一数据的已传输时长从该第一数据写入缓冲区就开始计时,该第一数据的已传输时长包括第一数据写入缓冲区后的等待时长和第一数据在传输过程中的消耗时长。这种确定已传输时长的方式,能够更准确地反映出数据的传输时延。可选地,当HCI(Host Controller Interface,主机控制接口)或者高层(high layer)向缓冲区中写入待发送的数据时,由控制器(controller)记录每个数据到达缓冲区的时间戳。
在另一个示例中,通过如下方式获取第一数据的已传输时长:获取当前时刻和第二时刻,第二时刻是指第一设备首次发出第一数据的时刻;将当前时刻与第二时刻之间的间隔时长,确定为第一数据的已传输时长。例如,当前时刻记为t,第一设备首次发出第一数据的时刻记为t 0’,那么第一数据的已传输时长记为t-t 0’。在这种方式下,第一数据的已传输时长从该第一数据首次被发出的时刻开始计时,该第一数据的已传输时长仅包括该第一数据在传输过程中的消耗时长,而不包括该第一数据写入缓冲区后的等待时长。这种确定已传输时长的方式,能够在当前数据产生延迟的情况下,不会影响到下一个数据的传输机会和重传次数。
当然,还可以通过其他方式确定第一数据的已传输时长,本申请对此不作限定。例如将当前时刻与第三时刻之间的间隔时长,确定为第一数据的已传输时长,该第三时刻是指缓冲区的控制器接收到需要写入缓冲区的第一数据的时刻。例如,当控制器接收到来自HCI或者高层所要写入缓冲区的数据时,由控制器记录接收每个数据的时间戳。
另外,在示例性实施例中,第一设备通过如下方式判断第一数据是否被第二设备成功接收:第一设备在向第二设备发送第一数据之后,接收来自第二设备的第一反馈报文,该第一反馈报文中包括第二设备的下一个预期序列号;若该下一个预期序列号与第一设备记录的第一数据对应的发送序列号相同,则第一设备确定第一数据未被第二设备成功接收;若下一个预期序列号与第一设备记录的第一数据对应的发送序列号不同,则第一设备确定第一数据已被第二设备成功接收。
步骤420,若第一数据的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据。
与上述相关技术所不同的是,相关技术在确定出第一数据未被第二设备成功接收的情况 下,第一设备会直接向第二设备重传该第一数据。但在本申请实施例中,在确定出第一数据未被第二设备成功接收的情况下,第一设备先判断该第一数据的已传输时长是否大于或等于超时门限值;如果该第一数据的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据。第二数据和第一数据不同。例如,第二数据是不同于第一数据的另一个待发送的数据,如第二数据可以是在缓冲区中位于第一数据之后的下一个待发送的数据。
超时门限值代表了一个数据在传输过程中所允许花费的最大传输时长。超时门限值可以由协议规定,也可以由第一设备自行确定,或者由第一设备和第二设备协商确定,本申请对此不作限定。另外,针对不同业务场景的数据,相应的超时门限值可以相同,也可以不同。或者,针对不同优先级的数据,相应的超时门限值可以相同,也可以不同。例如,高优先级数据的超时门限值相比于低优先级数据的超时门限值大,以此保证高优先级数据能够获得更多次数的重传机会,确保高优先级数据被正确接收。另外,超时门限值可以小于一次连接事件的时间跨度,也可以大于一次连接事件的时间跨度,本申请对此不作限定。
可选地,在第一数据的已传输时长大于或等于超时门限值的情况下,第二数据对应的发送序列号(tSqNo)与第一数据对应的发送序列号(tSqNo)相同。第二数据对应的发送序列号与第一数据对应的发送序列号保持一致的目的,是为了保证第二设备接收到第二数据时,确认该第二数据对应的序列号(SN)与第二设备自身维护下一个预期序列号(nExSqNo)一致,从而接收该第二数据。试想,如果第二数据对应的发送序列号(tSqNo)与第一数据对应的发送序列号(tSqNo)不同,则会导致第二设备在接收到第二数据时,确认该第二数据对应的序列号(SN)与第二设备自身维护下一个预期序列号(nExSqNo)不一致,这时第二设备就会忽略该第二数据,导致第二数据无法被第二设备成功接收。
可选地,若第一数据的已传输时长小于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第一数据。在第一数据的已传输时长小于超时门限值的情况下,第一设备会向第二设备重发该第一数据,直至第一数据被第二设备成功接收或第一数据的已传输时长大于或等于超时门限值。另外,第一设备重发第一数据时,该第一数据对应的发送序列号应与初传时保持一致。本申请实施例在时延允许范围之内(即第一数据的已传输时长小于超时门限值),通过重传第一数据以尽可能地提升数据传输的可靠性。
请参考图5,其示出了本实施例方法所对应的流控机制的示意图。第一设备在向第二设备发送第一数据之后,会接收来自第二设备的反馈报文,该反馈报文中携带第二设备的下一个预期序列号(NESN)。第一设备在传输数据之前,先判断第一设备自身维护的发送序列号(tSqNo)和第二设备的下一个预期序列号(NESN)是否相同。若tSqNo和NESN不相同,则说明上一次数据传输成功(即第一数据传输成功),第一设备向第二设备发送第二数据(不同于第一数据的新数据)。若tSqNo和NESN相同,则说明上一次数据传输失败(即第一数据传输失败),第一设备进一步判断该第一数据的已传输时长是否大于或等于超时门限值。如果第一数据的已传输时长大于或等于超时门限值,第一设备从缓冲区中丢弃该第一数据,向第二设备发送第二数据,且该第二数据对应的发送序列号(tSqNo)与第一数据对应的发送序列号(tSqNo)相同。如果第一数据的已传输时长小于超时门限值,第一设备向第二设备重传该第一数据。
综上所述,本申请实施例提供的技术方案,对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据未被对端设备成功接收的情况下,通过判断该数据的已传输时长是否大于或等于超时门限值,如果该数据的已传输时长大于或等于超时门限值,则直接发送下一个数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
请参考图6,其示出了本申请另一个实施例提供的基于低功耗蓝牙的数据传输方法的流 程图。该方法可应用于图1所示的网络架构中。该方法可以包括如下几个步骤(610~620):
步骤610,在第一数据包未被第二设备成功接收的情况下,第一设备获取第一数据包的已传输时长。
步骤620,若第一数据包的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据包。
在本实施例中,第一数据为第一数据包,第二数据为第二数据包,且该第一数据包和第二数据包是两个不同的数据包。例如,第二数据包是不同于第一数据包的另一个待发送的数据包,如第二数据包可以是在缓冲区中位于第一数据包之后的下一个待发送的数据包。
可选地,在第一数据包的已传输时长大于或等于超时门限值的情况下,第二数据包对应的发送序列号(tSqNo)与第一数据包对应的发送序列号(tSqNo)相同,以此保证第二设备能够正确接收该第二数据包。
可选地,若第一数据包的已传输时长小于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第一数据包。在第一数据包的已传输时长小于超时门限值的情况下,第一设备会向第二设备重发该第一数据包,直至第一数据包被第二设备成功接收或第一数据包的已传输时长大于或等于超时门限值。另外,第一设备重发第一数据包时,该第一数据包对应的发送序列号应与初传时保持一致。
如图7所示,当HCI或高层向第一设备的缓冲区写入待发送的数据包(D 0,D 1,D 2,D 3,…,D n)时,由控制器记录每个数据包到达缓冲区的时间戳。第一设备在向第二设备发送第一数据包D 0之后,如果第二设备向第一设备返回Nack,或者由于环境干扰等原因,第二设备向第一设备返回的Ack含有CRC校验错误,则第一设备在下一个发送窗口到达时判断第一数据包D 0的已传输时长是否大于或等于超时门限值。有关第一数据包D 0的已传输时长的计算方式,可参见上文实施例的介绍说明,此处不再赘述。如果第一数据包D 0的已传输时长大于或等于超时门限值,则第一设备直接丢弃该第一数据包D 0,向第二设备发送第二数据包D 1,发送第二数据包D 1时发送序列号tSqNo保持和发送第一数据包D 0时相同。另外,在图7中箭头①标记的示例中,超时门限值的取值较小,其小于一次连接事件的时间跨度;在图7中箭头②标记的示例中,超时门限值的取值较大,其大于一次连接事件的时间跨度。超时门限值可以由协议规定,也可以由第一设备自行确定,或者由第一设备和第二设备协商确定,本申请对此不作限定。
综上所述,本申请实施例提供的技术方案,对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据包未被对端设备成功接收的情况下,通过判断该数据包的已传输时长是否大于或等于超时门限值,如果该数据包的已传输时长大于或等于超时门限值,则直接发送下一个数据包,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
请参考图8,其示出了本申请另一个实施例提供的基于低功耗蓝牙的数据传输方法的流程图。该方法可应用于图1所示的网络架构中。该方法可以包括如下几个步骤(810~820):
步骤810,在第一分片包未被第二设备成功接收的情况下,第一设备获取第一分片包的已传输时长,第一分片包是第一数据包划分得到的多个分片包中的一个。
步骤820,若第一分片包的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二分片包,第二分片包是第二数据包划分得到的多个分片包中的一个。
在本实施例中,涉及数据分片的情形。当某一个待传输的数据包的数据量大于PDU(Protocol Data Unit,协议数据单元)最大长度时,第一设备可以对该数据包进行分片,得到多个分片包。例如,待传输的数据包的数据量为550字节,PDU最大长度约为200字节,那么第一设备可以将该数据包分成3个分片包,第1个分片包和第2个分片包为200字节,第 3个分片包为150字节。其中,第1个分片包也称为起始分片包,该第1个分片包之后的其他分片包则可以称为中间分片包。
在本实施例中,第一数据为第一分片包,第二数据为第二分片包。第一分片包是第一数据包划分得到的多个分片包中的一个,第二分片包是第二数据包划分得到的多个分片包中的一个,且该第一数据包和第二数据包是两个不同的数据包。例如,第二数据包是不同于第一数据包的另一个待发送的数据包,如第二数据包可以是在缓冲区中位于第一数据包之后的下一个待发送的数据包。
可选地,第二分片包是第二数据包划分得到的多个分片包中的起始分片包。也即,在发送下一个新数据包(即第二数据包)中的数据时,先从其起始分片包开始,按序发送。
可选地,在第一分片包的已传输时长大于或等于超时门限值的情况下,第二分片包对应的发送序列号(tSqNo)与第一分片包对应的发送序列号(tSqNo)相同,以此保证第二设备能够正确接收该第二分片包。
可选地,若第一数据的已传输时长大于或等于超时门限值,第一设备丢弃缓冲区中存储的第一数据包的分片包。例如,第一分片包是第一数据包的起始分片包,在第一分片包未被第二设备成功接收的情况下,如果第一设备确定该第一分片包的已传输时长大于或等于超时门限值,则第一设备将该第一分片包以及与该第一分片包来自同一数据包的中间分片包直接丢弃,发送下一个数据包中的数据(如第二分片包)。又例如,第一分片包是第一数据包的中间分片包,在第一分片包未被第二设备成功接收的情况下,如果第一设备确定该第一分片包的已传输时长大于或等于超时门限值,则第一设备将该第一分片包以及与该第一分片包来自同一数据包的其他待发送的中间分片包直接丢弃,发送下一个数据包中的数据(如第二分片包)。
可选地,第一设备通过如下方式发送第二分片包:第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据报文,该第二数据报文中包括第二分片包、起始分片标识和长度信息。其中,起始分片标识用于指示第二分片包是否为起始分片包,长度信息用于指示第二分片包的数据量。第二设备在接收到第二数据报文之后,可以依据该报文中携带的起始分片标识,来确定该报文中携带的第二分片包是否为起始分片包,以此确定上一个数据包是否已经发送结束。另外,第二设备还可以根据该报文中携带的长度信息,确定该报文中携带的第二分片包的数据量。在一些实施例中,第二设备在接收到第二数据报文之后,如果基于起始分片标识确定该第二分片包为起始分片包,则第二设备比对第一数据包的总数据量和第一数据包的实际接收数据量之间的大小关系,确定第一数据包中的数据是否接收完整;如果确定第一数据包中的数据没有接收完整(即第一数据包的总数据量大于该第一数据包的实际接收数据量),则可以丢弃属于该第一数据包的分片包;如果确定第一数据包中的数据已接收完整(即第一数据包的总数据量等于该第一数据包的实际接收数据量),则可以保存或使用属于该第一数据包的分片包。另外,第一数据包的总数据量可以由第一设备告知给第二设备,如在发送第一数据包中的数据(如第一数据包的起始分片包)时在报文头中携带该第一数据包的总数据量,第一数据包的实际接收数据量可以由第二设备自行计算得到。
可选地,若第一分片包的已传输时长小于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第一分片包。在第一分片包的已传输时长小于超时门限值的情况下,第一设备会向第二设备重发该第一分片包,直至第一分片包被第二设备成功接收或第一分片包的已传输时长大于或等于超时门限值。另外,第一设备重发第一分片包时,该第一分片包对应的发送序列号应与初传时保持一致。
当HCI或高层向第一设备的缓冲区写入待发送的数据包(D 0,D 1,D 2,D 3,…,D n)时,由控制器检测是否需要执行分片,如果某一数据包的数据量大于PDU则对该数据包执行分片,如果某一数据包的数据量小于或等于PDU则不必对该数据包执行分片。假设对第一数据包D 0执行分片得到D 00和D 01共2个分片包,对第二数据包D 1执行分片得到D 10和D 11共2 个分片包。另外,控制器记录其接收到需要写入缓冲区的各个数据包的时间戳,如接收到D 0的时间戳,接收到D 1的时间戳,等等。
如图9所示,第一设备在向第二设备发送D 00之后,如果第二设备向第一设备返回Nack,或者由于环境干扰等原因,第二设备向第一设备返回的Ack含有CRC校验错误,则第一设备在下一个发送窗口到达时判断D 00的已传输时长是否大于或等于超时门限值。如果D 00的已传输时长大于或等于超时门限值,则第一设备直接丢弃该D 00以及D 0中其他待传输的分片包(如D 01),向第二设备发送下一个数据包D 1中的首个分片包D 10,发送D 10时发送序列号tSqNo保持和发送D 00时相同。
如图10所示,在D 00传输成功之后,第一设备向第二设备发送D 01,如果第二设备向第一设备返回Nack,或者由于环境干扰等原因,第二设备向第一设备返回的Ack含有CRC校验错误,则第一设备在下一个发送窗口到达时判断D 01的已传输时长是否大于或等于超时门限值。如果D 01的已传输时长大于或等于超时门限值,则第一设备直接丢弃该D 01(由于D 0中不存在其他待传输的分片包,因此没有其他分片包需要丢弃),向第二设备发送下一个数据包D 1中的首个分片包D 10,发送D 10时发送序列号tSqNo保持和发送D 01时相同。
另外,在图9和图10中箭头①标记的示例中,超时门限值的取值较小,其小于一次连接事件的时间跨度;在图9和图10中箭头②标记的示例中,超时门限值的取值较大,其大于一次连接事件的时间跨度。超时门限值可以由协议规定,也可以由第一设备自行确定,或者由第一设备和第二设备协商确定,本申请对此不作限定。
此外,在一些其他实施例中,如果第一数据包的数据量大于PDU,第二数据包的数据量小于或等于PDU,即第二数据包未达到需要分片的标准,那么第二数据包就不必分片,也即第一数据为属于第一数据包的第一分片包,第二数据为第二数据包。在第一分片包未被第二设备成功接收的情况下,第一设备获取第一分片包的已传输时长。若第一分片包的已传输时长大于或等于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备发送第二数据包。若第一分片包的已传输时长小于超时门限值,则第一设备通过与第二设备之间建立的蓝牙连接,向第二设备重发第一分片包。
综上所述,本申请实施例提供的技术方案,对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据包中的分片包未被对端设备成功接收的情况下,通过判断该分片包的已传输时长是否大于或等于超时门限值,如果该分片包的已传输时长大于或等于超时门限值,则直接发送下一个数据包中的数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
而且,对于该数据分片场景来说,如果一个数据包中的某一分片包未成功接收,那么该数据包中的其他分片包即便接收也无法成功解码出该数据包的数据,因此本申请选择丢弃该数据包直接传输下一个数据包,以避免执行不必要的传输过程,有助于进一步降低数据传输时延。
需要说明的是,在上述各个方法实施例中,可以是第一设备为外围设备(peripheral device)且第二设备为中心设备(central device),也可以是第一设备为中心设备(central device)且第二设备为外围设备(peripheral device)。也即上述实施例提供的数据传输方法,适用于外围设备(peripheral device)向中心设备(central device)的发送过程,同样也适用于中心设备(central device)向外围设备(peripheral device)的发送过程。
还需要说明的是,上文仅从第一设备和第二设备交互的角度,对本申请技术方案进行了介绍说明,上述有关第一设备执行的步骤可以单独实现成为第一设备侧的基于低功耗蓝牙的数据传输方法,上述有关第二设备执行的步骤可以单独实现成为第二设备侧的基于低功耗蓝牙的数据传输方法。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图11,其示出了本申请一个实施例提供的基于低功耗蓝牙的数据传输装置的框图。该装置具有实现上述方法示例的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该装置可以是上文介绍的第一设备,也可以设置于在第一设备中。如图11所示,该装置1100可以包括:获取模块1110和发送模块1120。
获取模块1110,用于在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长。
发送模块1120,用于在所述第一数据的已传输时长大于或等于超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
在示例性实施例中,所述获取模块1110,用于获取当前时刻和第一时刻,所述第一时刻是指所述第一数据写入缓冲区的时刻,所述缓冲区用于存储待发送的数据;将所述当前时刻与所述第一时刻之间的间隔时长,确定为所述第一数据的已传输时长。
在示例性实施例中,所述获取模块1110,用于获取当前时刻和第二时刻,所述第二时刻是指第一设备首次发出所述第一数据的时刻;将所述当前时刻与所述第二时刻之间的间隔时长,确定为所述第一数据的已传输时长。
在示例性实施例中,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
在示例性实施例中,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
在示例性实施例中,所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;其中,所述第一数据包和所述第二数据包是两个不同的数据包。
可选地,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
可选地,所述发送模块1120,用于通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
可选地,所述发送模块1120,还用于在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,丢弃缓冲区中存储的所述第一数据包的分片包,所述缓冲区用于存储待发送的数据。
在示例性实施例中,所述发送模块1120,还用于在所述第一数据的已传输时长小于所述超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送所述第一数据。
在示例性实施例中,所述装置1100还包括:接收模块和确定模块(图11中未示出)。
接收模块,用于在向所述第二设备发送所述第一数据之后,接收来自所述第二设备的第一反馈报文,所述第一反馈报文中包括所述第二设备的下一个预期序列号。
确定模块,用于在所述下一个预期序列号与所述第一设备记录的所述第一数据对应的发送序列号相同的情况下,确定所述第一数据未被所述第二设备成功接收;在下一个预期序列号与所述第一设备记录的所述第一数据对应的发送序列号不同的情况下,确定所述第一数据已被所述第二设备成功接收。
综上所述,本申请实施例提供的技术方案,对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据未被对端设备成功接收的情况下,通过判断该数据的已传输时长是否大于或等于超时门限值,如果该数据的已传输时长大于或等于超 时门限值,则直接发送下一个数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
请参考图12,其示出了本申请另一个实施例提供的基于低功耗蓝牙的数据传输装置的框图。该装置具有实现上述方法示例的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该装置可以是上文介绍的第二设备,也可以设置于在第二设备中。如图12所示,该装置1200可以包括:接收模块1210。
接收模块1210,用于通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;
其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
在示例性实施例中,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
在示例性实施例中,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
在示例性实施例中,所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;其中,所述第一数据包和所述第二数据包是两个不同的数据包。
可选地,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
可选地,所述接收模块1210,用于通过与所述第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
可选地,所述装置1200还包括:丢弃模块(图12中未示出),用于在确定出所述第二分片包是起始分片包的情况下,比对所述第一数据包的总数据量和实际接收数据量;若所述总数据量大于所述实际接收数据量,则丢弃属于所述第一数据包的分片包。
综上所述,本申请实施例提供的技术方案,对于基于低功耗蓝牙的数据传输场景,提供了一种有效控制数据传输时延的方案,在某一数据未被对端设备成功接收的情况下,通过判断该数据的已传输时长是否大于或等于超时门限值,如果该数据的已传输时长大于或等于超时门限值,则直接发送下一个数据,从而对数据传输时延进行有效控制,以满足一些低时延场景的业务需求。
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
请参考图13,其示出了本申请一个实施例提供的基于低功耗蓝牙的数据传输设备130的结构框图。例如,该设备130可以是上文实施例中的第一设备,用于执行上述第一设备侧的基于低功耗蓝牙的数据传输方法;该设备130也可以是上文实施例中的第二设备,用于执行上述第二设备侧的基于低功耗蓝牙的数据传输方法。具体来讲:该设备130可以包括:处理器131、接收器132、发射器133、存储器134和总线135。
处理器131包括一个或者一个以上处理核心,处理器131通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。
接收器132和发射器133可以实现为一个收发器136,该收发器136可以是一块通信芯片。
存储器134通过总线135与处理器131相连。
存储器134可用于存储计算机程序,处理器131用于执行该计算机程序,以实现上述方法实施例中第一设备执行的各个步骤。
此外,存储器134可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:RAM(Random-Access Memory,随机存储器)和ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM(Compact Disc Read-Only Memory,只读光盘)、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。
在设备130为第一设备的情况下,所述处理器131用于在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长。
所述收发器136用于在所述第一数据的已传输时长大于或等于超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
在示例性实施例中,所述处理器131用于获取当前时刻和第一时刻,所述第一时刻是指所述第一数据写入缓冲区的时刻,所述缓冲区用于存储待发送的数据;将所述当前时刻与所述第一时刻之间的间隔时长,确定为所述第一数据的已传输时长。
在示例性实施例中,所述处理器131用于获取当前时刻和第二时刻,所述第二时刻是指第一设备首次发出所述第一数据的时刻;将所述当前时刻与所述第二时刻之间的间隔时长,确定为所述第一数据的已传输时长。
在示例性实施例中,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
在示例性实施例中,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
在示例性实施例中,所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;其中,所述第一数据包和所述第二数据包是两个不同的数据包。
可选地,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
可选地,所述收发器136用于通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
可选地,所述收发器136还用于在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,丢弃缓冲区中存储的所述第一数据包的分片包,所述缓冲区用于存储待发送的数据。
在示例性实施例中,所述收发器136还用于在所述第一数据的已传输时长小于所述超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送所述第一数据。
在示例性实施例中,所述收发器136还用于在向所述第二设备发送所述第一数据之后,接收来自所述第二设备的第一反馈报文,所述第一反馈报文中包括所述第二设备的下一个预期序列号。
所述处理器131还用于在所述下一个预期序列号与所述第一设备记录的所述第一数据对 应的发送序列号相同的情况下,确定所述第一数据未被所述第二设备成功接收;在下一个预期序列号与所述第一设备记录的所述第一数据对应的发送序列号不同的情况下,确定所述第一数据已被所述第二设备成功接收。
在设备130为第二设备的情况下,所述收发器136,用于通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
在示例性实施例中,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
在示例性实施例中,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
在示例性实施例中,所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;其中,所述第一数据包和所述第二数据包是两个不同的数据包。
可选地,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
可选地,所述收发器136,用于通过与所述第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
可选地,所述处理器131,用于丢弃模块,用于在确定出所述第二分片包是起始分片包的情况下,比对所述第一数据包的总数据量和实际接收数据量;若所述总数据量大于所述实际接收数据量,则丢弃属于所述第一数据包的分片包。
对于上述实施例中未详细说明的细节,可参见上文方法实施例中的介绍说明,此处不再赘述。
本申请实施例还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被设备的处理器执行,以实现上述基于低功耗蓝牙的数据传输方法。
可选地,该计算机可读存储介质可以包括:ROM(Read-Only Memory,只读存储器)、RAM(Random-Access Memory,随机存储器)、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。
本申请实施例还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在设备上运行时,用于实现上述基于低功耗蓝牙的数据传输方法。
本申请实施例还提供了一种计算机程序产品或计算机程序,所述计算机程序产品或计算机程序包括计算机指令,所述计算机指令存储在计算机可读存储介质中,设备的处理器从所述计算机可读存储介质读取并执行所述计算机指令,以实现上述基于低功耗蓝牙的数据传输方法。
应理解,在本申请的实施例中提到的“指示”可以是直接指示,也可以是间接指示,还可以是表示具有关联关系。举例说明,A指示B,可以表示A直接指示B,例如B可以通过A获取;也可以表示A间接指示B,例如A指示C,B可以通过C获取;还可以表示A和B之间具有关联关系。
在本申请实施例的描述中,术语“对应”可表示两者之间具有直接对应或间接对应的关系,也可以表示两者之间具有关联关系,也可以是指示与被指示、配置与被配置等关系。
在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示 可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (40)

  1. 一种基于低功耗蓝牙的数据传输方法,其特征在于,所述方法由第一设备执行,所述方法包括:
    在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长;
    若所述第一数据的已传输时长大于或等于超时门限值,则通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述第一数据的已传输时长,包括:
    获取当前时刻和第一时刻,所述第一时刻是指所述第一数据写入缓冲区的时刻,所述缓冲区用于存储待发送的数据;
    将所述当前时刻与所述第一时刻之间的间隔时长,确定为所述第一数据的已传输时长。
  3. 根据权利要求1所述的方法,其特征在于,所述获取所述第一数据的已传输时长,包括:
    获取当前时刻和第二时刻,所述第二时刻是指所述第一设备首次发出所述第一数据的时刻;
    将所述当前时刻与所述第二时刻之间的间隔时长,确定为所述第一数据的已传输时长。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
  6. 根据权利要求1至4任一项所述的方法,其特征在于,
    所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;
    所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;
    其中,所述第一数据包和所述第二数据包是两个不同的数据包。
  7. 根据权利要求6所述的方法,其特征在于,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
  8. 根据权利要求6或7所述的方法,其特征在于,所述通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据,包括:
    通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;
    其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
  9. 根据权利要求6至8任一项所述的方法,其特征在于,若所述第一数据的已传输时长大于或等于所述超时门限值,所述方法还包括:
    丢弃缓冲区中存储的所述第一数据包的分片包,所述缓冲区用于存储待发送的数据。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述获取所述第一数据的已传输时长之后,还包括:
    若所述第一数据的已传输时长小于所述超时门限值,则通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送所述第一数据。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述方法还包括:
    在向所述第二设备发送所述第一数据之后,接收来自所述第二设备的第一反馈报文,所 述第一反馈报文中包括所述第二设备的下一个预期序列号;
    若所述下一个预期序列号与所述第一设备记录的所述第一数据对应的发送序列号相同,则确定所述第一数据未被所述第二设备成功接收;
    若所述下一个预期序列号与所述第一设备记录的所述第一数据对应的发送序列号不同,则确定所述第一数据已被所述第二设备成功接收。
  12. 一种基于低功耗蓝牙的数据传输方法,其特征在于,所述方法由第二设备执行,所述方法包括:
    通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;
    其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
  13. 根据权利要求12所述的方法,其特征在于,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
  14. 根据权利要求12或13所述的方法,其特征在于,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
  15. 根据权利要求12或13所述的方法,其特征在于,
    所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;
    所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;
    其中,所述第一数据包和所述第二数据包是两个不同的数据包。
  16. 根据权利要求15所述的方法,其特征在于,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
  17. 根据权利要求15或16所述的方法,其特征在于,所述通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据,包括:
    通过与所述第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;
    其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
  18. 根据权利要求15至17任一项所述的方法,其特征在于,所述通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据之后,还包括:
    在确定出所述第二分片包是起始分片包的情况下,比对所述第一数据包的总数据量和实际接收数据量;
    若所述总数据量大于所述实际接收数据量,则丢弃属于所述第一数据包的分片包。
  19. 一种基于低功耗蓝牙的数据传输装置,其特征在于,所述装置包括:
    获取模块,用于在第一数据未被第二设备成功接收的情况下,获取所述第一数据的已传输时长;
    发送模块,用于在所述第一数据的已传输时长大于或等于超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据。
  20. 根据权利要求19所述的装置,其特征在于,所述获取模块用于:
    获取当前时刻和第一时刻,所述第一时刻是指所述第一数据写入缓冲区的时刻,所述缓冲区用于存储待发送的数据;
    将所述当前时刻与所述第一时刻之间的间隔时长,确定为所述第一数据的已传输时长。
  21. 根据权利要求19所述的装置,其特征在于,所述获取模块用于:
    获取当前时刻和第二时刻,所述第二时刻是指第一设备首次发出所述第一数据的时刻;
    将所述当前时刻与所述第二时刻之间的间隔时长,确定为所述第一数据的已传输时长。
  22. 根据权利要求19至21任一项所述的装置,其特征在于,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
  23. 根据权利要求19至22任一项所述的装置,其特征在于,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
  24. 根据权利要求19至22任一项所述的装置,其特征在于,
    所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;
    所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;
    其中,所述第一数据包和所述第二数据包是两个不同的数据包。
  25. 根据权利要求24所述的装置,其特征在于,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
  26. 根据权利要求24或25所述的装置,其特征在于,
    所述发送模块,用于通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;
    其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
  27. 根据权利要求24至26任一项所述的装置,其特征在于,
    所述发送模块,还用于在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,丢弃缓冲区中存储的所述第一数据包的分片包,所述缓冲区用于存储待发送的数据。
  28. 根据权利要求19至27任一项所述的装置,其特征在于,
    所述发送模块,还用于在所述第一数据的已传输时长小于所述超时门限值的情况下,通过与所述第二设备之间建立的蓝牙连接,向所述第二设备发送所述第一数据。
  29. 根据权利要求19至28任一项所述的装置,其特征在于,所述装置还包括:
    接收模块,用于在向所述第二设备发送所述第一数据之后,接收来自所述第二设备的第一反馈报文,所述第一反馈报文中包括所述第二设备的下一个预期序列号;
    确定模块,用于在所述下一个预期序列号与第一设备记录的所述第一数据对应的发送序列号相同的情况下,确定所述第一数据未被所述第二设备成功接收;
    所述确定模块,还用于在所述下一个预期序列号与第一设备记录的所述第一数据对应的发送序列号不同的情况下,确定所述第一数据已被所述第二设备成功接收。
  30. 一种基于低功耗蓝牙的数据传输装置,其特征在于,所述装置包括:
    接收模块,用于通过与第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据;
    其中,所述第二数据是所述第一设备在确定出第一数据未被所述第二设备成功接收,且所述第一数据的已传输时长大于或等于超时门限值的情况下发送的。
  31. 根据权利要求30所述的装置,其特征在于,在所述第一数据的已传输时长大于或等于所述超时门限值的情况下,所述第二数据对应的发送序列号与所述第一数据对应的发送序列号相同。
  32. 根据权利要求30或31所述的装置,其特征在于,所述第一数据为第一数据包,所述第二数据为第二数据包,且所述第一数据包和所述第二数据包是两个不同的数据包。
  33. 根据权利要求30或31所述的装置,其特征在于,
    所述第一数据为第一分片包,且所述第一分片包是第一数据包划分得到的多个分片包中的一个;
    所述第二数据为第二分片包,且所述第二分片包是第二数据包划分得到的多个分片包中的一个;
    其中,所述第一数据包和所述第二数据包是两个不同的数据包。
  34. 根据权利要求33所述的装置,其特征在于,所述第二分片包是所述第二数据包划分得到的多个分片包中的起始分片包。
  35. 根据权利要求33或34所述的装置,其特征在于,
    所述接收模块,用于通过与所述第一设备之间建立的蓝牙连接,接收来自所述第一设备的第二数据报文,所述第二数据报文中包括所述第二分片包、起始分片标识和长度信息;
    其中,所述起始分片标识用于指示所述第二分片包是否为起始分片包,所述长度信息用于指示所述第二分片包的数据量。
  36. 根据权利要求33至35任一项所述的装置,其特征在于,所述装置还包括:
    丢弃模块,用于在确定出所述第二分片包是起始分片包的情况下,比对所述第一数据包的总数据量和实际接收数据量;若所述总数据量大于所述实际接收数据量,则丢弃属于所述第一数据包的分片包。
  37. 一种基于低功耗蓝牙的数据传输设备,其特征在于,所述设备包括处理器和存储器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序以实现如权利要求1至11任一项所述的方法,或者实现如权利要求12至18任一项所述的方法。
  38. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序,所述计算机程序用于被处理器执行,以实现如权利要求1至11任一项所述的方法,或者实现如权利要求12至18任一项所述的方法。
  39. 一种芯片,其特征在于,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片运行时,用于实现如权利要求1至11任一项所述的方法,或者实现如权利要求12至18任一项所述的方法。
  40. 一种计算机程序产品或计算机程序,其特征在于,所述计算机程序产品或计算机程序包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机指令,以实现如权利要求1至11任一项所述的方法,或者实现如权利要求12至18任一项所述的方法。
PCT/CN2021/102203 2021-06-24 2021-06-24 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质 WO2022266964A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/102203 WO2022266964A1 (zh) 2021-06-24 2021-06-24 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质
CN202180096750.1A CN117157921A (zh) 2021-06-24 2021-06-24 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/102203 WO2022266964A1 (zh) 2021-06-24 2021-06-24 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022266964A1 true WO2022266964A1 (zh) 2022-12-29

Family

ID=84544001

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102203 WO2022266964A1 (zh) 2021-06-24 2021-06-24 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN117157921A (zh)
WO (1) WO2022266964A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116634469A (zh) * 2023-07-21 2023-08-22 南京源兴智达信息科技有限公司 一种基于多LoRa节点的数据传输管理系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130010960A1 (en) * 2011-07-05 2013-01-10 Texas Instruments Incorporated Methods to Improve Bluetooth Low Energy Performance
WO2017031928A1 (zh) * 2015-08-24 2017-03-02 中兴通讯股份有限公司 一种数据包传输方法及装置、通信系统
CN108365924A (zh) * 2017-01-26 2018-08-03 华为技术有限公司 一种数据重传方法、通信装置
CN108541387A (zh) * 2017-07-25 2018-09-14 北京小米移动软件有限公司 一种数据包丢弃方法、装置和系统
CN112311725A (zh) * 2019-07-26 2021-02-02 华为技术有限公司 一种数据处理方法、装置及终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130010960A1 (en) * 2011-07-05 2013-01-10 Texas Instruments Incorporated Methods to Improve Bluetooth Low Energy Performance
WO2017031928A1 (zh) * 2015-08-24 2017-03-02 中兴通讯股份有限公司 一种数据包传输方法及装置、通信系统
CN108365924A (zh) * 2017-01-26 2018-08-03 华为技术有限公司 一种数据重传方法、通信装置
CN108541387A (zh) * 2017-07-25 2018-09-14 北京小米移动软件有限公司 一种数据包丢弃方法、装置和系统
CN112311725A (zh) * 2019-07-26 2021-02-02 华为技术有限公司 一种数据处理方法、装置及终端

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116634469A (zh) * 2023-07-21 2023-08-22 南京源兴智达信息科技有限公司 一种基于多LoRa节点的数据传输管理系统及方法
CN116634469B (zh) * 2023-07-21 2023-09-19 南京源兴智达信息科技有限公司 一种基于多LoRa节点的数据传输管理系统及方法

Also Published As

Publication number Publication date
CN117157921A (zh) 2023-12-01

Similar Documents

Publication Publication Date Title
US7567515B2 (en) Inter-layer communication of receipt confirmation for releasing retransmission buffer contents
TWI519097B (zh) 無線網路中接收混合自動重傳請求之方法及裝置
BRPI0818722B1 (pt) método para monitorar temporizador para processamento de controle de erro em um sistema de comunicação sem fio, e, aparelho de comunicações sem fio para monitorar temporizadores para processamento de controle de erro
KR100750170B1 (ko) 통신 네트워크에서 데이터 프레임을 효율적으로 전송하는방법 및 장치
CN111132358B (zh) 数据包的传输方法、终端及存储介质
WO2008000181A1 (fr) Procédés et systèmes de retransmission sur couche de transport
WO2018171455A1 (zh) 发送反馈信息的方法和设备
WO2020143635A1 (zh) 数据的重传方法、装置、存储介质及电子装置
WO2022052507A1 (zh) 蓝牙低功耗音频数据传输方法以及装置、设备
WO2022266964A1 (zh) 基于低功耗蓝牙的数据传输方法、装置、设备及存储介质
WO2018027814A1 (zh) 一种数据传输方法、数据接收设备及数据发送设备
US11297529B2 (en) Toggling based indicator of reception success
JP2007325270A (ja) 無線通信システムのデータ伝送効率を向上させる方法及び装置
JP2016174211A (ja) 通信システム
WO2020063501A1 (zh) 传输确认报文的方法和通信设备
CN105191198A (zh) 数据传输及反馈的处理方法及装置
US8522104B2 (en) Smart aging retry buffer
CN114337938A (zh) 一种数据传输方法、数据重传方法、装置和相关设备
US20230224084A1 (en) Packet Retransmission Method and Apparatus
US9172511B2 (en) Apparatus and method of communicating automatic repeat request (ARQ) feedback in a wireless communication network
JP2004187010A (ja) データ処理装置、通信装置、データ処理方法、データ処理プログラム、データ処理プログラムを記録したコンピュータ読取可能な記録媒体
WO2023202566A1 (zh) 状态报告生成方法、装置、计算机设备及可读介质
WO2015077960A1 (zh) 一种数据报文的传输方法和设备
WO2017143772A1 (zh) 基于dvb-rcs系统的数据重传方法及装置
US10999006B2 (en) Communications having reduced latency

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946460

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE