Data transmission method, device, electronic device and storage medium

By monitoring the amount of data to be sent in the sending buffer pool and adjusting the number of data transmission times in the sending window, the data packet loss problem caused by overloading the sending buffer pool under the sliding window mechanism is solved, and higher data transmission accuracy and transmission efficiency are achieved.

CN115038114BActive Publication Date: 2025-02-14MIDEA GROUP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210707478.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2025-02-14
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

Under the sliding window mechanism, the increase in the frequency and number of data transmission in the sending window lead to overload of the sending buffer pool, which in turn causes data packet loss and affects the accuracy of data transmission.

Method used

By monitoring the amount of data to be sent by the sending buffer pool in the current connection interval, adjust the number of data transmissions in the sending window in the next connection interval to alleviate the overload of the buffer pool and prevent data packet loss. The specific method includes determining whether the overload threshold exceeds the overload threshold based on the ratio of the amount of data to be sent to the total capacity of the buffer pool, or determining that the data input amount is greater than the output amount, and appropriately reducing the number of data transmission times.

Benefits of technology

It effectively alleviates the overload of the sending buffer pool, prevents data packet loss, improves the accuracy of data transmission, and improves the transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115038114B_ABST
    Figure CN115038114B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of wireless communication technology, and provides a data transmission method, device, electronic device and storage medium. The method is applied to a sending device, and the method comprises: obtaining the amount of data to be sent cached in a sending buffer pool of the sending device in the current connection interval; and adjusting the number of data transmissions of a sending window of the sending device in the next connection interval based on the amount of data to be sent. The method reduces the number of data transmissions when the sending buffer pool is overloaded by adjusting the number of data transmissions of the sending window, effectively alleviating the overload, avoiding packet loss, and improving the accuracy of data transmission. When the overload of the sending buffer pool disappears, the number of data transmissions is restored to ensure the data transmission rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technologies, and in particular to a data transmission method, device, electronic device and storage medium. Background Art

[0002] When using the sliding window mechanism for data transmission, the sending window in the sliding window will maximize the use of the connection interval to transmit data. The increase in the frequency of data transmission and the number of data transmissions will cause data overload in the sending buffer pool on the sending window side, which will lead to data packet loss and affect the data transmission accuracy of the sliding window. At the same time, the channel environment between the sending window and the receiving window is also related to data packet loss. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a data transmission method to solve the problems of data congestion and overload and prevent the occurrence of data packet loss.

[0004] According to a data transmission method of an embodiment of the first aspect of the present invention, the method is applied to a sending device, and the method includes:

[0005] Acquire the amount of data to be sent in the sending buffer pool of the sending device in the current connection interval, wherein the data to be sent is input into the sending buffer pool from the sending window and output from the sending buffer pool to the radio frequency end for transmission;

[0006] Based on the amount of the data to be sent, the number of data transmissions in the sending window of the sending device in the next connection interval is adjusted.

[0007] According to the data transmission method of an embodiment of the present invention, the sending buffer pool is monitored, and the overload of the sending buffer pool is alleviated by adjusting the number of data transmissions in the sending window. Data packet loss can also be prevented, effectively improving the accuracy of data transmission.

[0008] According to an embodiment of the present invention, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent includes:

[0009] Determine that the ratio of the amount of the data to be sent to the total capacity of the sending buffer pool is greater than an overload threshold, and reduce the number of data transmissions in the sending window in the next connection interval.

[0010] According to an embodiment of the present invention, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent includes:

[0011] Based on the data volume of the to-be-sent data, it is determined that the data input volume of the sending buffer pool in the current connection interval is greater than the data output volume, and the number of data transmissions in the sending window in the next connection interval is reduced.

[0012] According to an embodiment of the present invention, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent includes:

[0013] Apply the formula

[0014]

[0015] Determine the number of data transmissions adjusted by the sending window in the next connection interval;

[0016] Where X is the number of data transmissions adjusted by the sending window in the next connection interval, X now is the number of data transmissions in the sending window in the current connection interval, T output The amount of data transmitted by the RF end of the sending device in a single connection interval, data len is the amount of data transmitted each time in the sending window, V now is the amount of data to be sent cached in the sending buffer pool in the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0017] According to an embodiment of the present invention, after obtaining the amount of data to be sent cached in the sending buffer pool of the sending device in the current connection interval, the method further includes:

[0018] Based on the data amount of the data to be sent, it is determined that packet loss occurs in the data transmitted by the radio frequency end of the sending device in the current connection interval, and the radio frequency end is controlled to retransmit the data transmitted in the current connection interval in the next connection interval.

[0019] According to an embodiment of the present invention, determining, based on the amount of data to be sent, that packet loss occurs in data transmitted by the radio frequency end of the sending device in the current connection interval, includes:

[0020] Apply the formula

[0021]

[0022] Determining that packet loss occurs in data transmitted during the current connection interval of the radio frequency end;

[0023] Among them, V now is the amount of data to be sent cached in the sending buffer pool in the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0024] According to a data transmission method of an embodiment of a second aspect of the present invention, the method is applied to a sending device, and the method includes:

[0025] Acquire channel quality information between the sending device and the receiving device in the current connection interval;

[0026] Based on the channel quality information, the number of data transmissions in the sending window of the sending device in the next connection interval is adjusted.

[0027] According to the data transmission method of an embodiment of the present invention, the channel through which a sending device and a receiving device communicate is monitored, and the data congestion and overload situation in the channel is judged based on the channel environment reflected by the channel quality information. The number of data transmissions in the sending window of the sending device is adjusted in real time to alleviate the overload and congestion of data transmission in the channel and prevent the occurrence of packet loss.

[0028] According to an embodiment of the present invention, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the channel quality information includes:

[0029] Determining, based on the channel quality information, a number of unavailable channels between the transmitting device and the receiving device;

[0030] The number of data transmissions in the sending window in the next connection interval is adjusted to the ratio of the target value to the number of the unavailable channels, the ratio is rounded, and the target value is a positive integer that is not 0.

[0031] According to an embodiment of the present invention, after determining the number of unavailable channels between the transmitting device and the receiving device, the method further includes:

[0032] It is determined that the ratio of the target value to the number of unavailable channels is greater than the number of data transmissions in the sending window in the current connection interval, and the sending window is controlled to stop data transmission.

[0033] According to one embodiment of the present invention, the method further includes:

[0034] It is determined that the update frequency of the available channel list between the transmitting device and the receiving device is greater than a target threshold, and the radio frequency end of the transmitting device is controlled to retransmit the data transmitted in the current connection interval in the next connection interval.

[0035] According to a data transmission device of an embodiment of a third aspect of the present invention, the device is applied to a sending device, and the device includes:

[0036] A first acquisition module, used for acquiring the amount of data to be sent cached in the sending buffer pool of the sending device in the current connection interval;

[0037] The first processing module is used to adjust the number of data transmissions in the sending window of the sending device in the next connection interval based on the amount of data to be sent.

[0038] According to a data transmission device of an embodiment of a fourth aspect of the present invention, the device is applied to a sending device, and the device includes:

[0039] A second acquisition module, used to acquire the channel quality information between the sending device and the receiving device in the current connection interval;

[0040] The second processing module is used to adjust the number of data transmissions in the sending window of the sending device in the next connection interval based on the channel quality information.

[0041] An electronic device according to an embodiment of the fifth aspect of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned data transmission methods when executing the computer program.

[0042] According to the non-transitory computer-readable storage medium of the sixth aspect of the present invention, a computer program is stored thereon, and when the computer program is executed by a processor, any one of the data transmission methods described above is implemented.

[0043] The computer program product according to the seventh aspect of the present invention comprises a computer program, and when the computer program is executed by a processor, it implements any one of the above-mentioned data transmission methods.

[0044] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0045] Monitor the sending buffer pool and adjust the data transmission times in the sending window to alleviate the overload of the sending buffer pool. It can also prevent data packet loss and effectively improve the accuracy of data transmission.

[0046] Furthermore, a quantitative relationship between the amount of data to be sent cached in the sending buffer pool and the number of data transmissions adjusted by the sending window is proposed. When the sending buffer pool is overloaded and congested, the number of data transmissions in the sending window can be accurately adjusted to effectively alleviate the overload and congestion of the sending buffer pool and prevent packet loss.

[0047] Furthermore, based on the amount of data to be sent cached in the buffer pool during the current connection interval, it is predicted whether packet loss will occur in the data transmitted by the RF end during the current connection interval, and the RF end is promptly controlled to retransmit the packet loss data that occurred during the current connection interval, thereby reducing the waiting time of the sending device and effectively improving the sending efficiency.

[0048] Furthermore, the channel through which the sending device and the receiving device communicate is monitored, and the data congestion and overload situation in the channel is determined based on the channel environment reflected by the channel quality information. The data transmission times in the sending window of the sending device are adjusted in real time to alleviate the overload and congestion of data transmission in the channel and prevent packet loss.

[0049] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 This is one of the flowcharts of the data transmission method provided by the embodiment of the present invention;

[0052] Figure 2 This is a second flow chart of the data transmission method provided by an embodiment of the present invention;

[0053] Figure 3 It is one of the structural schematic diagrams of the data transmission device provided by the embodiment of the present invention;

[0054] Figure 4 This is a second structural diagram of the data transmission device provided by an embodiment of the present invention;

[0055] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0057] In the description of the embodiments of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0058] In the description of the embodiments of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a communication connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0059] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0060] The sliding window is a data transmission mechanism. The sliding window is divided into a sending window and a receiving window. The sending window is used to send data, and the receiving window is used to receive data. Devices that can communicate with each other have a sending window and a receiving window.

[0061] When the sending device performs window transmission, a buffer pool is created between the data sent in the sending window and the data actually sent to the RF end, which is called the sending buffer pool.

[0062] The sending buffer pool is used to cache the data to be sent. The sending window inputs the data to be sent into the sending buffer pool, and the sending buffer pool outputs the data to be sent to the RF end, which is then transmitted to the receiving device by the RF end.

[0063] When using the sliding window mechanism for data transmission, the sending window in the sliding window will maximize the use of the connection interval to transmit data. The increase in the frequency of data transmission and the number of data transmissions will cause data overload in the sending buffer pool on one side of the sending window, which will lead to data packet loss and affect the data transmission accuracy of the sliding window.

[0064] The connection interval refers to the periodic communication time after two devices are successfully connected. An appropriate interval time is selected within a certain range of values ​​according to usage.

[0065] Combine the following Figure 1A data transmission method according to an embodiment of the present invention is described. The data transmission method is applied to a sending device, where the sending device is a device that sends data. The sending device sends data to a receiving device to implement data transmission communication between the two devices.

[0066] In the embodiment of the present invention, the sending device and the receiving device may be devices that communicate based on Bluetooth Low Energy (BLE).

[0067] like Figure 1 As shown, the data transmission method of the embodiment of the present invention includes steps 110 to 120.

[0068] Step 110: Obtain the amount of data to be sent cached in the sending buffer pool during the current connection interval.

[0069] In this step, the amount of data to be sent cached in the sending buffer pool during the current connection interval is obtained.

[0070] The current connection interval refers to the periodic communication time that the sending device is currently in. Correspondingly, the previous connection interval refers to the previous periodic communication time that the sending device is in, and the next connection interval refers to the next periodic communication time that the sending device is in.

[0071] The data to be sent is input from the sending window to the sending buffer pool for buffering. The sending buffer pool then sends the buffered data to be sent in sequence to the RF end, which then transmits it to the receiving device.

[0072] It is understandable that the sending buffer pool has a certain capacity limit. When the amount of data to be sent cached in the sending buffer pool is too large, the sending buffer pool may be overloaded, which may lead to data packet loss and affect the accuracy of data transmission.

[0073] The amount of data to be sent refers to the number of bytes of the data to be sent.

[0074] Step 120: Based on the amount of data to be sent, adjust the number of data transmissions in the next connection interval sending window.

[0075] In this step, the data transmission times of the next connection interval sending window are adjusted according to the data volume of the to-be-sent data cached in the sending buffer pool of the current connection interval, so as to adjust the data volume of the to-be-sent data output from the sending window to the sending buffer pool.

[0076] In this embodiment, the sending buffer pool is monitored, and the congestion and overload of the sending buffer pool are determined based on the amount of data to be sent cached in the sending buffer pool. The overload of the sending buffer pool is adjusted by adjusting the number of data transmissions in the sending window.

[0077] In actual execution, when it is determined that the sending buffer pool is congested and overloaded based on the amount of data to be sent cached in the sending buffer pool, the number of data transmissions in the sending window is reduced; when it is determined that the congestion in the sending buffer pool is reduced and the overload situation disappears based on the amount of data to be sent cached in the sending buffer pool, the number of data transmissions in the sending window is restored.

[0078] It is understandable that due to the influence of the radio frequency at the RF end, the speed at which the RF end transmits the data to be sent is limited, the input speed of the data to be sent in the sending buffer pool is higher than the output speed, and the sending buffer pool is prone to enter an overload state.

[0079] The embodiment of the present invention monitors the data volume of the data to be sent cached in the sending buffer pool, and the sending window inputs data into the sending buffer pool. When the data input speed of the sending buffer pool is greater than the data output speed, the data volume of the data to be sent in the sending buffer pool continues to increase, causing congestion and overload of the sending buffer pool. At this time, the number of data transmissions in the sending window is reduced, the data input from the sending window to the sending buffer pool is reduced, the data volume of the data to be sent in the sending buffer pool is reduced, and the overload state of the sending buffer pool is alleviated.

[0080] The amount of data to be sent in the sending buffer pool decreases as the number of data transmissions in the sending window decreases, and the overload state of the sending buffer pool is alleviated and gradually exits the overload state; after judging that the overload state of the sending buffer pool ends, the number of data transmissions that the sending window needs to restore is dynamically calculated based on the amount of data to be sent in the sending buffer pool.

[0081] It should be noted that the sending device sends data to the receiving device through a sliding window mechanism. When the receiving device is overloaded due to insufficient buffer data processing capacity or other reasons, the receiving device will use window sliding negotiation to feedback the overload situation to the sending device. The corresponding sending device will reduce the number of data transmissions, and then reduce or stop outputting data to the receiving device. The amount of data to be sent in the sending buffer pool of the sending device decreases as the number of data transmissions in the sending window decreases, thereby avoiding overload of the sending buffer pool of the sending device or packet loss in data transmission. At the same time, the data received by the receiving device is also reduced, which helps to alleviate the overload on the receiving device as soon as possible.

[0082] According to the data transmission method of an embodiment of the present invention, by adjusting the number of data transmissions in the sending window, when the sending buffer pool is overloaded, the number of data transmissions is reduced to alleviate the overload, avoid packet loss, and improve the accuracy of data transmission. When the overload of the sending buffer pool disappears, the number of data transmissions is restored to ensure the data transmission rate.

[0083] Step 120 of the above data transmission method includes:

[0084] It is determined that the ratio of the amount of data to be sent to the total capacity of the sending buffer pool is greater than the overload threshold, and the number of data transmissions in the next connection interval sending window is reduced.

[0085] In this embodiment, the ratio of the amount of data to be sent cached in the sending buffer pool in the current connection interval to the total capacity of the sending buffer pool is calculated, and the ratio is compared with the overload threshold.

[0086] When the ratio of the amount of data to be sent cached in the sending buffer pool in the current connection interval to the total capacity of the sending buffer pool is greater than the overload threshold, the number of data transmissions in the sending window of the next connection interval is reduced, that is, the amount of data to be sent input from the sending window to the sending buffer pool in the next connection interval is reduced.

[0087] It is understandable that the total capacity of the sending buffer pool is the number of bytes of data that can be cached in the sending buffer pool, and the total capacity of the sending buffer pool is related to the settings and performance of the sending device.

[0088] The overload threshold is a preset percentage threshold, which represents the ratio of the amount of data at the overload boundary to the total capacity of the sending buffer pool.

[0089] In actual implementation, the overload threshold value may range from [0,1].

[0090] For example, the overload threshold is 50%, the amount of data to be sent cached in the sending buffer pool in the current connection interval is 1Mb, the total capacity of the sending buffer pool is 4Mb, and the ratio of the amount of data to be sent cached in the sending buffer pool in the current connection interval to the total capacity of the sending buffer pool is 25%. There is no need to adjust the number of data transmissions in the next connection interval sending window.

[0091] The amount of data to be sent cached in the sending buffer pool in the current connection interval reaches 3Mb, and the total capacity of the sending buffer pool is 4Mb. The ratio of the amount of data to be sent cached in the sending buffer pool in the current connection interval to the total capacity of the sending buffer pool is 75%. 75% is greater than the overload threshold of 50%. The sending buffer pool is overloaded, and the number of data transmissions in the next connection interval sending window needs to be reduced.

[0092] Step 120 of the above data transmission method includes:

[0093] Based on the amount of data to be sent, it is determined that the data input amount of the current connection interval sending buffer pool is greater than the data output amount, and the number of data transmissions in the next connection interval sending window is reduced.

[0094] In this embodiment, the relationship between the data input amount and the data output amount of the current connection interval sending buffer pool is determined according to the data amount of the data to be sent in the current connection interval sending buffer pool.

[0095] The data input amount of the sending buffer pool in the current connection interval is the data amount of the data to be sent input to the sending buffer pool by the sending window, and the data output amount of the sending buffer pool in the current connection interval is the data amount of the data to be sent output by the sending buffer pool to the RF end.

[0096] In actual implementation, the relationship between the data input and data output of the current connection interval sending buffer pool can be determined based on the difference between the amount of data to be sent cached in the current connection interval sending buffer pool and the amount of data to be sent cached in the previous connection interval sending buffer pool.

[0097] For example, if the amount of data to be sent cached in the current connection interval sending buffer pool is greater than the amount of data to be sent cached in the previous connection interval sending buffer pool, it can be determined that the data input amount of the current connection interval sending buffer pool is greater than the data output amount.

[0098] In this embodiment, the data input amount of the sending buffer pool of the current connection interval is greater than the data output amount. It can be determined that the RF capability of the RF end cannot meet the data sending capability of the sending window, and the sending buffer pool may be overloaded. At this time, the number of data transmissions in the next connection interval sending window is reduced to alleviate the overload of the sending buffer pool and prevent the occurrence of data packet loss.

[0099] The number of data transmissions adjusted by the next connection interval sending window in step 120 of the above data transmission method can be determined by applying the following formula:

[0100]

[0101] Determine the number of data transmissions for the next connection interval send window adjustment;

[0102] Where X is the number of data transmissions adjusted by the sending window in the next connection interval, X now is the number of data transmissions in the sending window during the current connection interval, T output The amount of data transmitted by the RF end in a single connection interval, data len is the amount of data transmitted each time in the sending window, V now The amount of data to be sent in the buffer pool for the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0103] In this embodiment, X<0 indicates that the number of data transmissions in the sending window is reduced in the next connection interval, and X>0 indicates that the number of data transmissions in the sending window is increased in the next connection interval.

[0104] Among them, T outputIt is the amount of data transmitted by the RF end in a single connection interval. A single connection interval is also called the connection interval, which refers to the periodic communication time after the sending device and the receiving device are successfully connected.

[0105] μ is the overload threshold, which is a preset percentage threshold that represents the amount of data in the send buffer pool at the overload boundary and V total The ratio of the total capacity of the send buffer pool. The value range of μ can be [0,1].

[0106] In this embodiment, the formula for determining the number of data transmissions for the next connection interval send window adjustment is derived from the following equation:

[0107]

[0108] In the above equation, V now -V total ×μ represents the amount of data that has been overloaded in the current connection interval sending buffer pool relative to the preset overload capacity, now ×data len -X×data len -T output Indicates the total net value of data to be sent within a single connection interval after adjustment.

[0109] In the above equation Indicates the number of connection intervals within which the send window needs to perform output transmissions with the adjusted number of data transmissions to resolve the congestion in the send buffer pool.

[0110] In this embodiment, a quantitative relationship between the amount of data to be sent cached in the sending buffer pool and the number of data transmissions adjusted by the sending window is proposed. When the sending buffer pool is overloaded and congested, the number of data transmissions in the sending window can be accurately adjusted to effectively alleviate the overload and congestion of the sending buffer pool and prevent packet loss.

[0111] The above data transmission method, after step 110, further includes:

[0112] Based on the amount of data to be sent, it is determined that packet loss occurs in data transmitted in the current connection interval of the radio frequency end, and the radio frequency end is controlled to transmit the data transmitted in the current connection interval again in the next connection interval.

[0113] In this embodiment, the overload and congestion of the sending buffer pool can be determined according to the amount of data to be sent cached in the sending buffer pool at the current connection interval, and then whether the sending data packet is lost can be determined according to the overload and congestion conditions.

[0114] According to the amount of data to be sent, it is determined that packet loss occurs in the data transmitted in the current connection interval of the radio frequency end, and the radio frequency end is controlled to transmit the data transmitted in the current connection interval again in the next connection interval.

[0115] Packet loss refers to the inability of one or more data packets sent by a sending device to reach a receiving device.

[0116] In the related art, after data packet loss occurs, it is necessary to wait for the response from the receiving device before resending the data. The sending device needs a long waiting period to retransmit the lost data, resulting in a waste of resources and low sending efficiency.

[0117] In an embodiment of the present invention, based on the amount of data to be sent cached in the buffer pool during the current connection interval, it is predicted whether packet loss occurs in the data transmitted by the radio frequency end during the current connection interval, and the radio frequency end is promptly controlled to retransmit the packet loss data that occurs during the current connection interval, thereby reducing the waiting time of the sending device and effectively improving the sending efficiency.

[0118] In the above data transmission method, the following formula can be applied:

[0119]

[0120] Determine that packet loss occurs in the data transmitted during the current connection interval of the radio end;

[0121] Among them, V now The amount of data to be sent in the buffer pool for the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0122] μ is the overload threshold, which is a preset percentage threshold that represents the amount of data in the send buffer pool at the overload boundary and V total The ratio of the total capacity of the send buffer pool. The value range of μ can be [0,1].

[0123] In this embodiment, Greater than This indicates that the instantaneous overload of the sending buffer pool in the current connection interval is greater than the overload capacity. It is judged that the data to be sent transmitted by the RF end in the current connection interval may cause air packet loss. At this time, the RF end is controlled to retransmit the data to be sent transmitted in the current connection interval, effectively improving the sending efficiency.

[0124] It is understandable that the environment of the channel connecting the sending window and the receiving window is also related to data congestion, overload and packet loss.

[0125] Combine the following Figure 2A data transmission method according to an embodiment of the present invention is described. The data transmission method is applied to a sending device, where the sending device is a device that sends data. The sending device sends data to a receiving device to implement data transmission communication between the two devices.

[0126] In an embodiment of the present invention, the sending device and the receiving device may be devices that communicate based on Bluetooth Low Energy (BLE), and frequency hopping is used for data transmission between the sending device and the receiving device, and different channels are used for two connection intervals.

[0127] like Figure 2 As shown, the data transmission method of the embodiment of the present invention includes steps 210 to 220.

[0128] Step 210: Obtain channel quality information between the sending device and the receiving device in the current connection interval.

[0129] In this step, the radio frequency end of the sending device in the current connection interval uses the current channel to transmit data, and the physical layer of the sending device monitors the radio frequency conditions of the radio frequency end to obtain the channel quality information between the sending device and the receiving device.

[0130] The channel condition of the wireless transmission channel between the transmitting device and the receiving device will change continuously. The RF condition of the RF end is monitored, and the channel quality condition of the current channel used in the current connection interval is determined based on the channel quality information.

[0131] In actual implementation, the channel quality information may be determined based on a channel signal-to-noise ratio measurement. When the channel quality is poor, data transmission between a transmitting device and a receiving device may be affected, which may lead to data congestion, overload, and packet loss.

[0132] Step 220: Based on the channel quality information, adjust the number of data transmissions in the sending window of the sending device in the next connection interval.

[0133] In this step, the number of data transmissions in the next connection interval sending window is adjusted according to the channel quality information between the sending device and the receiving device in the current connection interval, so as to adjust the data volume of the data output by the sending device.

[0134] In this embodiment, the channel through which the sending device and the receiving device communicate is monitored, and based on the channel environment reflected by the channel quality information, the data congestion and overload situation in the channel is determined, and the number of data transmissions in the sending window of the sending device is adjusted in real time.

[0135] When it is determined based on the channel quality information that the channel environment is poor, the number of data transmissions in the sending window is reduced; when it is determined based on the channel quality information that the channel environment is restored, the number of data transmissions in the sending window is restored.

[0136] In actual implementation, the physical layer of the sending device will monitor the RF conditions of the RF end. When the channel environment is poor, the physical layer will report the channel quality information of the poor channel environment.

[0137] When the detectable channel environment between the sending device and the receiving device deteriorates to a certain extent, both the sending device and the receiving device will update the available channel list. When the update of the available channel list occurs continuously and multiple times, it is determined that data congestion occurs on the channel.

[0138] According to the data transmission method of an embodiment of the present invention, the channel quality is judged based on the channel quality information between the sending device and the receiving device, and the overload and congestion of data transmission in the channel are alleviated by adjusting the number of data transmissions in the sending window to prevent the occurrence of packet loss.

[0139] Step 220 of the above data transmission method includes:

[0140] determining, based on the channel quality information, a number of unavailable channels between the transmitting device and the receiving device;

[0141] The number of data transmissions in the next connection interval sending window is adjusted to a ratio of the target value to the number of unavailable channels.

[0142] In this embodiment, a frequency hopping method is used for data transmission between the sending device and the receiving device, and different channels are used for two connection intervals, that is, the sending device and the receiving device can communicate through multiple channels.

[0143] The number of unavailable channels between the sending device and the receiving device is determined according to the channel quality information between the sending device and the receiving device in the current connection interval, wherein the unavailable channels are channels with poor channel quality and cannot accurately perform data transmission.

[0144] The multiple channels between the transmitting device and the receiving device include available channels and unavailable channels, and the number of the unavailable channels is determined according to the channel quality information.

[0145] In this embodiment, the number of unavailable channels between the sending device and the receiving device in the current connection interval is determined, and the number of data transmissions in the next connection interval sending window is adjusted to the ratio of the target value to the number of unavailable channels, which can effectively solve the channel congestion and overload caused by the poor channel environment.

[0146] Among them, the target value is a positive integer that is not 0. The target value may be a value determined according to experiments. When the channel is congested and overloaded due to a poor channel environment, the number of data transmissions in the sending window is adjusted to a ratio of the target value to the number of unavailable channels, which can effectively alleviate channel congestion and overload.

[0147] In this embodiment, the target number is related to the number of channels between the transmitting device and the receiving device, and the target value may range from 20 to 80, for example, 30, 36, 37, 38, 40, 48 or 50.

[0148] For example, the target value may be 37. During data transmission based on Bluetooth LE, the number of data transmissions in the next connection interval sending window is adjusted to the ratio of 37 to the number of unavailable channels, which can effectively alleviate channel congestion and overload caused by poor channel quality.

[0149] It should be noted that, in actual implementation, the number of data transmissions in the sending window is adjusted to the ratio of the target value to the number of unavailable channels, and the ratio needs to be rounded. In actual implementation, the rounding of the ratio can be rounded off, or it can be directly rounded up or down.

[0150] For example, the target value is 37, the target value is 37, the number of unavailable channels is 3, 37 / 3=12.333, 12.333 can be rounded up to 13, or rounded down to 12. After determining the number of unavailable channels between the sending device and the receiving device, the data transmission method further includes:

[0151] It is determined that the ratio of the target value to the number of unavailable channels is greater than the number of data transmissions in the current connection interval sending window, and the sending window is controlled to stop data transmission.

[0152] In this embodiment, the channel quality difference of some channels between the sending device and the receiving device is determined based on the channel quality information, and then the number of unavailable channels between the sending device and the receiving device is determined. When the ratio of the target value to the number of unavailable channels is greater than the number of data transmissions in the sending window of the current connection interval, the sending window is controlled to stop data transmission.

[0153] It is understandable that the channel quality of some channels between the sending device and the receiving device is poor, indicating that channel congestion and overload have occurred between the sending device and the receiving device. At this time, adjusting the number of data transmissions in the sending window of the next connection interval to a ratio greater than the target value of the number of data transmissions in the sending window of the current connection interval and the number of unavailable channels will further aggravate channel congestion and overload.

[0154] In actual implementation, the number of data transmissions in the next connection interval sending window is adjusted to the ratio of the target value to the number of unavailable channels, that is, the number of data transmissions in the next connection interval sending window is reduced to the ratio of the target value to the number of unavailable channels, so as to effectively alleviate channel congestion and overload caused by poor channel environment.

[0155] After step 210, the data transmission method further includes:

[0156] Based on the channel quality information, it is determined that the update frequency of the available channel list between the transmitting device and the receiving device is greater than a target threshold, and the radio frequency end of the transmitting device is controlled to retransmit the data transmitted in the current connection interval in the next connection interval.

[0157] The sending device determines the available channels and unavailable channels based on the channel quality information, and then adjusts and updates the list of available channels for data transmission with the receiving device. At the same time, the receiving device also adjusts and updates the list of available channels for data transmission with the sending device in real time.

[0158] In this embodiment, when the update frequency of the available channel list between the sending device and the receiving device is greater than the target threshold, it indicates that the available channel lists at both ends of the sending device and the receiving device have undergone continuous and multiple updates of the available channel lists, and the channels are frequently congested and overloaded, and it is judged that the data transmission at the RF end may experience air packet loss.

[0159] The target threshold is a preset threshold of the available channel list update frequency, and the available channel list update frequency is related to the update times and update time of the available channel list.

[0160] In the related art, after data packet loss occurs, it is necessary to wait for the response from the receiving device before resending the data. The sending device needs a long waiting period to retransmit the lost data, resulting in a waste of resources and low sending efficiency.

[0161] In an embodiment of the present invention, when the list of available channels is continuously updated, it is determined that packet loss occurs in the data transmission between the sending device and the receiving device, and the RF end of the sending device promptly retransmits the data sent in the current connection interval, thereby reducing the waiting time of the sending device and effectively improving the sending efficiency of the sending device.

[0162] It can be understood that in some embodiments, the sending device can adjust the number of data transmissions in the next connection interval sending window based on two parameters: the amount of data to be sent cached in the sending buffer pool at the current connection interval and the channel quality information between the sending device and the receiving device at the current connection interval, so as to alleviate the data congestion and overload of the sending buffer pool and the channel and prevent packet loss.

[0163] The following describes two data transmission devices provided in the embodiments of the present invention. The two data transmission devices described below and the two data transmission methods described above can refer to each other.

[0164] The data transmission device provided in the embodiment of the present invention is applied to a sending device, where the sending device is a device that sends data. The sending device sends data to a receiving device to realize data transmission communication between the two devices.

[0165] In the embodiment of the present invention, the sending device and the receiving device may be devices that communicate based on Bluetooth Low Energy (BLE).

[0166] like Figure 3 As shown, the data transmission device provided by the embodiment of the present invention includes:

[0167] The first acquisition module 310 is used to acquire the amount of data to be sent cached in the sending buffer pool of the sending device in the current connection interval, where the data to be sent is input into the sending buffer pool cache from the sending window and output from the sending buffer pool to the radio end for transmission;

[0168] The first processing module 320 is configured to adjust the number of data transmissions in the sending window of the sending device at the next connection interval based on the amount of data to be sent.

[0169] The sending buffer pool is used to cache the data to be sent. The sending window inputs the data to be sent into the sending buffer pool, and the sending buffer pool outputs the data to be sent to the RF end, which is then transmitted to the receiving device by the RF end.

[0170] In this embodiment, the sending buffer pool is monitored, and the congestion and overload of the sending buffer pool are determined based on the amount of data to be sent cached in the sending buffer pool. The overload of the sending buffer pool is adjusted by adjusting the number of data transmissions in the sending window.

[0171] According to the data transmission device provided by the embodiment of the present invention, by adjusting the number of data transmissions in the sending window, when the sending buffer pool is overloaded, the number of data transmissions is reduced to alleviate the overload, avoid packet loss, and improve the accuracy of data transmission. When the overload of the sending buffer pool disappears, the number of data transmissions is restored to ensure the data transmission rate.

[0172] The first processing module 320 is used to determine that the ratio of the amount of data to be sent to the total capacity of the sending buffer pool is greater than the overload threshold, and reduce the number of data transmissions in the next connection interval sending window.

[0173] The first processing module 320 is used to determine that the data input amount of the current connection interval sending buffer pool is greater than the data output amount based on the data amount of the data to be sent, and reduce the number of data transmission times of the next connection interval sending window.

[0174] The first processing module 320 is used to apply the formula

[0175]

[0176] Determine the number of data transmissions for the next connection interval send window adjustment;

[0177] Where X is the number of data transmissions adjusted by the sending window in the next connection interval, X now is the number of data transmissions in the sending window during the current connection interval, T output The amount of data transmitted by the RF end in a single connection interval, data len is the amount of data transmitted each time in the sending window, V now The amount of data to be sent in the buffer pool for the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0178] The first processing module 320 is used to determine, based on the amount of data to be sent, that packet loss occurs in data transmitted by the radio frequency end in the current connection interval, and control the radio frequency end to retransmit the data transmitted in the current connection interval in the next connection interval.

[0179] The first processing module 320 is used to apply the formula

[0180]

[0181] Determine that packet loss occurs in the data transmitted during the current connection interval of the radio end;

[0182] Among them, V now The amount of data to be sent in the buffer pool for the current connection interval, V total is the total capacity of the sending buffer pool, and μ is the overload threshold.

[0183] Combine the following Figure 4 A data transmission device according to an embodiment of the present invention is described. The data transmission device is applied to a sending device. The sending device is a device that sends data. The sending device sends data to a receiving device to realize data transmission communication between the two devices.

[0184] In an embodiment of the present invention, the sending device and the receiving device may be devices that communicate based on Bluetooth Low Energy (BLE), and frequency hopping is used for data transmission between the sending device and the receiving device, and different channels are used for two connection intervals.

[0185] like Figure 4 As shown, the data transmission device provided by the embodiment of the present invention includes:

[0186] A second acquisition module 410 is used to acquire channel quality information between a sending device and a receiving device;

[0187] The second processing module 420 is configured to adjust the number of data transmissions in the sending window of the sending device at the next connection interval based on the channel quality information.

[0188] In this embodiment, the channel through which the sending device and the receiving device communicate is monitored, and based on the channel environment reflected by the channel quality information, the data congestion and overload situation in the channel is determined, and the number of data transmissions in the sending window of the sending device is adjusted in real time.

[0189] According to the data transmission device provided by the embodiment of the present invention, the channel quality is judged based on the channel quality information between the sending device and the receiving device, and the overload and congestion of data transmission in the channel are alleviated by adjusting the number of data transmissions in the sending window, thereby preventing the occurrence of packet loss.

[0190] The second processing module 420 is used to determine the number of unavailable channels between the sending device and the receiving device based on the channel quality information;

[0191] The number of data transmissions in the next connection interval sending window is adjusted to the ratio of the target value to the number of unavailable channels, the ratio is rounded, and the target value is a positive integer that is not 0.

[0192] The second processing module 420 is further configured to determine that the ratio of the target value to the number of unavailable channels is greater than the number of data transmissions in the current connection interval sending window, and control the sending window to stop data transmission.

[0193] The second processing module 420 is further configured to determine that the update frequency of the available channel list between the transmitting device and the receiving device is greater than a target threshold, and control the radio frequency end of the transmitting device to retransmit the data transmitted in the current connection interval in the next connection interval.

[0194] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute a data transmission method, which is applied to a sending device, and the method includes: obtaining the amount of data to be sent cached in a sending buffer pool of the sending device in the current connection interval; adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent;

[0195] Alternatively, the channel quality information between the sending device and the receiving device in the current connection interval is obtained; and based on the channel quality information, the number of data transmissions in the sending window of the sending device in the next connection interval is adjusted.

[0196] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0197] Furthermore, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data transmission method provided by the above-mentioned method embodiments, the method is applied to a sending device, the method includes: obtaining the data amount of the to-be-sent data cached in the sending buffer pool of the sending device in the current connection interval; based on the data amount of the to-be-sent data, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval;

[0198] Alternatively, the channel quality information between the sending device and the receiving device in the current connection interval is obtained; and based on the channel quality information, the number of data transmissions in the sending window of the sending device in the next connection interval is adjusted.

[0199] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for performing the data transmission method provided by the above embodiments is implemented, and the method is applied to a sending device, and the method includes: obtaining the amount of data to be sent cached in a sending buffer pool of the sending device in the current connection interval; adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent;

[0200] Alternatively, the channel quality information between the sending device and the receiving device in the current connection interval is obtained; and based on the channel quality information, the number of data transmissions in the sending window of the sending device in the next connection interval is adjusted.

[0201] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0204] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and should be included in the scope of the claims of the present invention.

Claims

1. A data transmission method, characterized in that: The method is applied to a sending device, and the method includes: Obtaining the amount of data to be sent cached in the sending buffer pool of the sending device during the current connection interval; Based on the amount of the data to be sent, adjusting the number of data transmissions of the sending window of the sending device in the next connection interval; The adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of the data to be sent includes: Apply the formula ; Determine the number of data transmissions adjusted by the sending window in the next connection interval; in, the number of data transmissions adjusted by the send window for the next connection interval, is the number of data transmissions in the sending window for the current connection interval, is the amount of data transmitted by the radio frequency end of the sending device in a single connection interval, is the amount of data transmitted each time in the sending window, The amount of data to be sent cached in the sending buffer pool for the current connection interval, is the total capacity of the sending buffer pool, is the overload threshold.

2. The data transmission method according to claim 1, characterized in that: The adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of the data to be sent includes: Determine that the ratio of the amount of the data to be sent to the total capacity of the sending buffer pool is greater than an overload threshold, and reduce the number of data transmissions in the sending window in the next connection interval.

3. The data transmission method according to claim 1, characterized in that: The adjusting the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of the data to be sent includes: Based on the data volume of the to-be-sent data, it is determined that the data input volume of the sending buffer pool in the current connection interval is greater than the data output volume, and the number of data transmissions in the sending window in the next connection interval is reduced.

4. The data transmission method according to any one of claims 1 to 3, characterized in that: After obtaining the amount of data to be sent cached in the sending buffer pool of the sending device in the current connection interval, the method further includes: Based on the data amount of the data to be sent, it is determined that packet loss occurs in the data transmitted by the radio frequency end of the sending device in the current connection interval, and the radio frequency end is controlled to retransmit the data transmitted in the current connection interval in the next connection interval.

5. The data transmission method according to claim 4, characterized in that: The determining, based on the amount of data to be sent, that packet loss occurs in data transmitted by the radio frequency end of the sending device in the current connection interval includes: Apply the formula ; Determining that packet loss occurs in data transmitted during the current connection interval of the radio frequency end; in, The amount of data to be sent cached in the sending buffer pool for the current connection interval, is the total capacity of the sending buffer pool, is the overload threshold.

6. A data transmission method, characterized in that: The method is applied to a sending device, and the method includes: Acquire channel quality information between the sending device and the receiving device in the current connection interval; Based on the channel quality information and the data transmission method according to any one of claims 1 to 5, the number of data transmissions of the sending window of the sending device in the next connection interval is adjusted respectively.

7. The data transmission method according to claim 6, characterized in that: The adjusting, based on the channel quality information, the number of data transmissions of the sending window of the sending device in the next connection interval comprises: Determining, based on the channel quality information, a number of unavailable channels between the transmitting device and the receiving device; The number of data transmissions in the sending window in the next connection interval is adjusted to the ratio of the target value to the number of the unavailable channels, the ratio is rounded, and the target value is a positive integer that is not 0.

8. The data transmission method according to claim 7, characterized in that: After determining the number of unavailable channels between the transmitting device and the receiving device, the method further includes: It is determined that the ratio of the target value to the number of unavailable channels is greater than the number of data transmissions in the sending window in the current connection interval, and the sending window is controlled to stop data transmission.

9. The data transmission method according to any one of claims 6 to 8, characterized in that: The method further comprises: It is determined that the update frequency of the available channel list between the transmitting device and the receiving device is greater than a target threshold, and the radio frequency end of the transmitting device is controlled to retransmit the data transmitted in the current connection interval in the next connection interval.

10. A data transmission device, characterized in that: The device is applied to a sending device, and the device includes: A first acquisition module, used for acquiring the amount of data to be sent cached in the sending buffer pool of the sending device in the current connection interval; A first processing module, configured to adjust the number of data transmissions of the sending window of the sending device in the next connection interval based on the amount of data to be sent; The first acquisition module and the first processing module are used to implement a data transmission method according to any one of claims 1 to 5.

11. A data transmission device, characterized in that: The device is applied to a sending device, and the device includes: A second acquisition module, used to acquire the channel quality information between the sending device and the receiving device in the current connection interval; A second processing module, configured to adjust the number of data transmissions of the sending window of the sending device in the next connection interval based on the channel quality information; The second acquisition module and the second processing module are used to implement a data transmission method as described in any one of claims 6 to 9.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the data transmission method according to any one of claims 1 to 9 is implemented.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 9 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for dynamically managing aretransmission persistence

    KR1020060100081A