Data transmission method, communication device and system

By introducing a transit device or a split data transmission channel in the communication system, the length of the data transmission queue is controlled to avoid network congestion, and the problem of a low average rate of data transmission to the second device is solved, and more efficient data transmission is achieved.

CN114765593BActive Publication Date: 2025-02-28HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011611357.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2025-02-28
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

The average rate of data transmission to the second device is low, mainly due to the large fluctuation in the rate of data transmission, which causes network congestion to reduce the efficiency of data transmission.

Method used

Through the combination of the transit device or the optical line terminal OLT and the optical network terminal ONT, the data transmission channel is divided, and the data is added and sent when the length of the target transmission queue is less than or equal to the length threshold to avoid network congestion.

Benefits of technology

The stability of data transmission rate and the average rate are improved, the probability of network congestion is reduced, and the utilization rate of communication equipment is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application discloses a data transmission method, communication equipment and system, belonging to the field of communication technology. The method is used for a transfer device, and the transfer device has a target transmission queue corresponding to a second device, and the target transmission queue corresponds to the second device; the method includes: the transfer device receives the target data sent by the first device for sending to the second device; then, when the transfer device determines that the length of the target transmission queue in the transfer device is less than the length threshold, the target data is added to the target transmission queue, and the data in the target transmission queue is sent to the second device, thereby sending the target data to the second device. The present application solves the problem of low average data transmission rate from the first device to the second device, and improves the average data transmission rate from the first device to the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, communication equipment and system. Background Art

[0002] A communication system includes multiple communication devices for transmitting data. During data transmission, the communication devices usually use a congestion avoidance mechanism to minimize the probability of network congestion.

[0003] For example, the first device can send multiple data to the second device in sequence. After each data is received, the second device will determine whether the next data is received within the time threshold after the data is received. If the second device does not receive the next data within the time threshold, the second device will repeatedly send a packet loss indication of the next data to the first device until the next data is received. After receiving three packet loss indications, the first device will retransmit the next data to the second device. In addition, the first device can determine that network congestion is about to occur. At this time, the first device will reduce the data sending rate to half the current rate (or lower) to minimize the probability of network congestion.

[0004] However, when the first device reduces the data sending rate to half of the current rate (or lower), the data sending rate will fluctuate greatly. Since the fluctuation degree of the sending rate is negatively correlated with the average sending rate, the average rate at which the first device transmits data to the second device is lower. Summary of the Invention

[0005] This application provides a data transmission method, communication device, and system that can solve the problem of low average data transmission rate from a first device to a second device. The technical solution is as follows:

[0006] In a first aspect, a data transmission method is provided for a transfer device, wherein the transfer device has a target sending queue corresponding to a second device, and the target sending queue corresponds to the second device; the method comprises: the transfer device receives target data sent by the first device for sending to the second device; thereafter, when the transfer device determines that the length of the target sending queue in the transfer device is less than a length threshold, the transfer device adds the target data to the target sending queue and sends the data in the target sending queue to the second device, thereby sending the target data to the second device.

[0007] In the data transmission method provided in the embodiment of the present application, the first device sends data to the second device through the transfer device, and the first device does not adjust the rate of sending data by the method of avoiding network congestion in the related art. Therefore, the rate at which the first device sends data will not fluctuate greatly. In addition, the transfer device will add data to the target sending queue when the length of the target sending queue is less than the length threshold, and will stop adding data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate at which the transfer device sends data in the target sending queue can be reduced. Since the degree of fluctuation in the sending rate is negatively correlated with the average sending rate, the average rate at which the transfer device sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0008] In addition, the transfer device adds data to the target sending queue or prohibits adding data based on the length threshold. The target sending queue in the transfer device often has data, the probability of the target sending queue being empty is small, and the utilization rate of the transfer device is high.

[0009] In addition, in the embodiment of the present application, the target data is transmitted between the first device and the second device through a transfer device. The transfer device acts as a proxy device and can be regarded as the data receiving end of the first device and the data sending end of the second device. The data transmission channel between the first device and the second device is divided into: a data transmission channel between the first device and the transfer device, and a data transmission channel between the transfer device and the second device. Since the original data transmission channel is divided into two data transmission channels, the round-trip time (RTT) of each data transmission channel is relatively small. Moreover, since RTT is negatively correlated with throughput, the throughput of each data transmission channel is relatively large.

[0010] Optionally, the method further includes: when the transfer device determines that the length of the target sending queue is greater than or equal to the length threshold, prohibiting the target data from being added to the target sending queue.

[0011] When the length of the target sending queue is greater than the length threshold, it means that the transfer device needs to send a large amount of data to the second device at this time. If the data in the target cache is added to the target sending queue at this time, it may cause network congestion. Therefore, the transfer device can prohibit adding the data in the target cache to the target sending queue at this time to avoid adding the data in the target cache to the target sending queue at this time and causing network congestion.

[0012] Optionally, the first device and the second device transmit the target data via a Transmission Control Protocol (TCP) connection, and the method further includes: the transfer device determining a target cache corresponding to the TCP connection before receiving the target data. After receiving the target data, the transfer device caches the target data in the target cache.

[0013] The target buffer is different from the send buffer. The target buffer is used to buffer data sent by the first device for transmission to the second device, while the send buffer is used to buffer data in the transmit queue of the relay device. By dividing the target buffer in the relay device, the data sent by the first device can be temporarily stored in the target buffer. This allows the relay device to determine whether to add the target data from the target buffer to the transmit queue based on the length of the transmit queue.

[0014] Optionally, after caching the target data in the target cache, the method further includes: the transfer device determining whether the length of the target send queue is less than the length threshold. After the target data is cached in the target cache, the transfer device may determine whether the length of the target send queue is less than the length threshold to determine whether the target data needs to be added to the target send queue.

[0015] Optionally, the method also includes: the transit device receives a packet loss indication sent by the second device for sending to the first device, wherein the packet loss indication is used to indicate that the second device has not received the target data; after receiving the packet loss indication, the transit device can add the target data to the target sending queue according to the packet loss indication, and send the data in the target sending queue to the second device to retransmit the target data.

[0016] Optionally, the target sending queue includes multiple subqueues, and the multiple subqueues have priorities, and the data in the multiple subqueues are sent sequentially in descending order of the subqueue priorities; when the transfer device adds the target data to the target sending queue based on the packet loss indication, it may add the target data to the subqueue with the highest priority among the multiple subqueues. Since the data in the multiple subqueues are sent sequentially in descending order of the subqueue priorities, the transfer device adding the target data to the subqueue with the highest priority enables the transfer device to quickly retransmit the target data to the second device.

[0017] In a second aspect, a data transmission method is provided for an optical line terminal (OLT), wherein the OLT is connected to an optical network terminal (ONT), and the ONT includes a target send queue corresponding to a second device, the target send queue corresponding to the second device. The method includes: the OLT receiving target data sent by the first device for transmission to the second device; then, when the OLT determines that the length of the target send queue in the ONT is less than a length threshold, sending the target data to the ONT so that the ONT adds the target data to the target send queue; and sending the data in the target send queue to the second device, thereby transmitting the target data to the second device.

[0018] In the data transmission method provided in the embodiment of the present application, the first device sends data to the second device through the OLT and the ONT, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art. Therefore, the rate of sending data by the first device will not fluctuate significantly. In addition, the OLT controls the ONT to add data to the target sending queue when the length of the target sending queue is less than the length threshold, and stops controlling the ONT to add data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate of data in the target sending queue of the ONT is reduced. Since the degree of fluctuation of the sending rate is negatively correlated with the average sending rate, the average rate at which the ONT sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0019] Furthermore, the OLT controls the ONT to add data to the target sending queue or prohibits adding data according to the length threshold, so that the target sending queue in the ONT often has data, the probability of the target sending queue being empty is low, and the utilization rate of the ONT is high.

[0020] In addition, in the embodiment of the present application, target data is transmitted between the first device and the second device through the OLT and ONT. The OLT and ONT act as a proxy device and can be considered the data receiving end of the first device and the data sending end of the second device. The data transmission channel between the first device and the OLT and ONT is divided into: a data transmission channel between the first device and the OLT and ONT, and a data transmission channel between the OLT and ONT and the second device. Since the original data transmission channel is divided into two data transmission channels, the RTT of each data transmission channel is relatively small. Moreover, since RTT is negatively correlated with throughput, the throughput of each data transmission channel is relatively large.

[0021] Optionally, the method further includes: before the OLT sends the target data to the ONT, receiving information about the length of the target sending queue sent by the ONT; thereafter, the OLT may determine, based on the information about the length of the target sending queue, that the length of the target sending queue is less than the length threshold.

[0022] Optionally, the information about the length of the target send queue includes: a relationship between the length of the target send queue and the length threshold. For example, the length of the target send queue is less than the length threshold, or the length of the target send queue is greater than or equal to the length threshold. As another example, the information about the length of the target send queue may include: the length of the target send queue.

[0023] Optionally, the method further includes: when the OLT determines that the length of the target sending queue is greater than or equal to the length threshold, prohibiting sending target data to the ONT.

[0024] Optionally, the first device and the second device transmit the target data via a TCP connection, and the method further includes: the OLT determines a target cache corresponding to the TCP connection; and after receiving the target data, the OLT caches the target data in the target cache.

[0025] Optionally, after caching the target data in the target cache, the method further includes: the OLT determining whether the length of the target sending queue is less than the length threshold.

[0026] Optionally, the method further includes: the OLT receiving a packet loss indication sent by the second device for sending to the first device, wherein the packet loss indication is used to indicate that the second device has not received the target data; thereafter, the OLT sends a retransmission instruction to the ONT according to the packet loss indication, and the retransmission instruction is used to instruct the ONT to add the target data to the target sending queue according to the retransmission instruction, and send the data in the target sending queue to the second device.

[0027] In a third aspect, a data transmission method is provided for an optical network terminal (ONT). The ONT includes a target transmit queue corresponding to a second device, the target transmit queue corresponding to the second device. The method includes: the ONT sending information about the length of the target transmit queue in the ONT to an optical line terminal (OLT); then, the ONT receiving target data sent by the OLT for the second device and adding the target data to the target transmit queue; and finally, the ONT sending the data in the target transmit queue to the second device to transmit the target data to the second device.

[0028] Optionally, the information about the length of the target sending queue includes: a relationship between the length of the target sending queue and a length threshold.

[0029] Optionally, the method further includes: after the ONT receives the retransmission instruction sent by the OLT, according to the retransmission instruction, adding the target data to the target sending queue, and sending the data in the target sending queue to the second device to retransmit the target data to the second device.

[0030] Optionally, the target sending queue includes multiple sub-queues, and the multiple sub-queues have priorities, and the data in the multiple sub-queues are sent sequentially in descending order of the priority of the sub-queues; when the ONT adds the target data to the target sending queue according to the retransmission instruction, the target data can be added to the sub-queue with the highest priority among the multiple sub-queues.

[0031] In a fourth aspect, a communication device is provided for use as a transfer device, wherein the communication device includes: modules for executing any one of the data transmission methods provided in the first aspect.

[0032] In a fifth aspect, a communication device is provided for an optical line terminal OLT, wherein the communication device includes modules for executing any one of the data transmission methods provided in the second aspect.

[0033] In a sixth aspect, a communication device is provided for an optical network terminal ONT, wherein the communication device includes modules for executing any one of the data transmission methods provided in the third aspect.

[0034] In the seventh aspect, a communication device is provided for use as a transfer device, the communication device comprising: a processor and a memory; the processor is used to execute a program stored in the memory to implement any one of the data transmission methods provided in the first aspect.

[0035] In an eighth aspect, a communication device is provided for an optical line terminal OLT, the communication device comprising: a processor and a memory; the processor is configured to execute a program stored in the memory to implement any one of the data transmission methods provided in the second aspect.

[0036] In a ninth aspect, a communication device is provided for an optical network terminal ONT, the communication device comprising: a processor and a memory; the processor is configured to execute a program stored in the memory to implement any one of the data transmission methods provided in the third aspect.

[0037] In the tenth aspect, a communication system is provided, which includes: a first device, a second device and a transfer device; the transfer device is: any one of the communication devices provided in the fourth aspect or the seventh aspect.

[0038] In an eleventh aspect, a communication system is provided, comprising: a first device, a second device, an optical line terminal OLT, and an optical network terminal ONT;

[0039] The OLT is any communication device provided in the fifth aspect, and the ONT is any communication device provided in the sixth aspect; or, the OLT is any communication device provided in the eighth aspect, and the ONT is any communication device provided in the ninth aspect.

[0040] In the twelfth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes any one of the data transmission methods provided in the first aspect, the second aspect or the third aspect.

[0041] In a thirteenth aspect, a computer program product comprising instructions is provided, which, when run on a computer, enables the computer to execute any one of the data transmission methods provided in the first aspect, the second aspect or the third aspect.

[0042] The effects of the corresponding solutions in the above-mentioned first to thirteenth aspects can be referenced to each other, and this application will not go into details here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of a first device transmitting data to a second device provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of a change in the second rate provided in an embodiment of the present application;

[0047] Figure 5 Another schematic diagram of the change of the second rate provided in an embodiment of the present application;

[0048] Figure 6 A schematic diagram of a rate at which a first device sends data according to an embodiment of the present application is provided;

[0049] Figure 7 A flowchart of a data transmission method provided in an embodiment of the present application;

[0050] Figure 8A schematic diagram of the data transmission rate of a transfer device provided in an embodiment of the present application;

[0051] Figure 9 A schematic diagram of the structure of another data transmission system provided in an embodiment of the present application;

[0052] Figure 10 A flowchart of another data transmission method provided in an embodiment of the present application;

[0053] Figure 11 A schematic diagram of the structure of another communication device provided in an embodiment of the present application;

[0054] Figure 12 A schematic diagram of the structure of another communication device provided in an embodiment of the present application;

[0055] Figure 13 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the principles and technical solutions of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0057] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the communication system includes: multiple communication devices, such as Figure 1 The first device 01 and the second device 02 in the communication system. The communication device can be any device capable of communication, such as a router, a gateway, a server or a terminal. The embodiment of the present application does not limit the number of communication devices in the communication system. Figure 1 Only two communication devices are taken as an example.

[0058] For example, the communication device may include: a processor; the processor is used to couple with a memory, and after reading the instructions in the memory, execute the method performed by the communication device as described in the embodiment of the present application according to the instructions. Among them, the number of processors can be multiple, and the memory coupled with the processor can be independent of the processor or independent of the communication device, or it can be inside the processor or the communication device. The memory can be a physically independent unit, or it can be a storage space on a cloud server or a network hard disk, etc. Optionally, the memory can be one or more. When the number of memories is multiple, they can be located in the same or different locations, and can be used independently or in combination. For example, when the memory is located inside the communication device, please refer to Figure 2 , Figure 2The present invention provides a structural diagram of a communication device according to an embodiment of the present invention. The communication device 200 includes: a processor 202 and a memory 201, wherein the memory 201 is used to store programs, and the processor 202 is used to call the programs stored in the memory 201 so that the communication device executes the corresponding method or function. Optionally, as Figure 2 As shown, the communication device 200 may further include at least one communication interface 203 and at least one communication bus 204. The memory 201, the processor 202, and the communication interface 203 are communicatively connected via the communication bus 204. The communication interface 203 is used to communicate with other devices under the control of the processor 202, and the processor 202 can call programs stored in the memory 201 via the communication bus 204.

[0059] Communication devices in a communication system may establish a communication connection between them, and these communication devices may communicate (e.g., transmit data) based on the established communication connection. For example, the communication devices may be connected via a wired network or a wireless network, where the wired network may include, but is not limited to, a Universal Serial Bus (USB), and the wireless network may include, but is not limited to, Wireless Fidelity (WIFI), Bluetooth, infrared, Zigbee, data, etc.

[0060] When communicating, the communication devices in the communication system may communicate based on any communication protocol, such as TCP or User Datagram Protocol (UDP).

[0061] For example, Figure 3 A schematic diagram of a first device transmitting data to a second device provided in an embodiment of the present application is shown in FIG. Figure 3As shown, before the first device transmits data to the second device, it can perform a three-way handshake with the second device based on TCP. In the first handshake, the second device sends a first handshake signal to the first device, and the first handshake signal may include: a first synchronization sequence number (Synchronize Sequence Numbers, SYN), wherein the first SYN=x, and x is an arbitrary value. In the second handshake, the first device sends a second handshake signal to the second device based on the above-mentioned first handshake signal, and the second handshake signal may include: a second synchronization sequence number (Synchronize Sequence Numbers, SYN) and a first confirmation character (Acknowledge character, ACK), wherein the second SYN=y, y is an arbitrary value, and the first ACK=x+1. In the third handshake, the second device sends a third handshake signal to the first device, and the third handshake signal includes: a second ACK, and the second ACK=y+1. After the above-mentioned three-way handshake, the first device and the second device establish a TCP connection, after which the first device can transmit data to the second device. Please continue to refer to Figure 3 Assume that the first device needs to transmit three data items, M1, M2, and M3, to the second device in sequence. After receiving each data item from the first device, the second device will send an acknowledgment response to the first device. For example, the second device sends an ACK for the data item to the first device. For example, after receiving M1 from the first device, the second device will send ACK M1 to the first device; after receiving M2 from the first device, the second device will send ACK M2 to the first device.

[0062] Each time the second device receives data transmitted by the first device, it will determine whether it has received the next data within the time threshold after receiving the data. Figure 3 After receiving M2, the second device will determine whether M3 is received within the time threshold after receiving M2. If the second device does not receive the next data within the time threshold, the second device will repeatedly send the packet loss indication of the next data to the first device until the next data is received. For example, the packet loss indication of the next data can be the same as the confirmation response of the most recently received data, for example, please continue to refer to Figure 3 If the second device does not receive M3 within the time threshold after receiving M2, the second device can repeatedly send ACK M2 to the first device. After receiving three packet loss indications, the first device will retransmit the next data to the second device. For example, please continue to refer to Figure 3After receiving the first ACK M2 and then three ACK M2s, the first device will retransmit M3 to the second device. After receiving M3, the second device will send an ACK M3 to the first device.

[0063] It should be noted that when transmitting data between communication devices, network congestion is more likely to occur, resulting in packet loss, which in turn affects the reliability and efficiency of data transmission. Therefore, when transmitting data between communication devices, congestion avoidance mechanisms are often used to minimize the occurrence of network congestion.

[0064] for example, Figure 3 In the embodiment shown, the first device continuously adjusts the data transmission rate of the first device during the data transmission process. The data transmission rate of the first device is also called the second rate, that is, the amount of data sent by the first device per second. The unit can be bits per second, or megabits per second, etc. The process of the first device adjusting the second rate can be referred to in Figure 4 , it should be noted that, Figure 4 The horizontal axis is time, which can be in seconds or milliseconds, and the vertical axis is the rate per second, which can be in bits per second or megabits per second, such as Figure 4 As shown in FIG, the initial value of the second rate of the first device is 1. Each time the first device receives a confirmation response of a data, it doubles the second rate. For example, in each transmission round, the first device sends a data to the second device and receives a confirmation response of the data sent by the second device. At this time, the first device increases the second rate to twice the original value. When the second rate reaches the second rate threshold ( Figure 4 16 is taken as an example), each time the first device receives a confirmation response for a data, it increases the second rate by 1, but the increased second rate is less than twice the original second rate. When the first device receives three packet loss indications for a certain data in succession, the first device can determine that network congestion is about to occur. At this time, the first device will update the original second rate threshold to half of the current second rate (such as the current second rate is 24, and the updated second rate threshold is 12). The first device will also reduce the value of the second rate to the initial value 1 and repeat the above process. When the value of the second rate is reduced to the initial value 1, the rate at which the first device sends data is reduced to the initial value, thereby minimizing the probability of network congestion.

[0065] For example, in Figure 4 On the basis of Figure 5As shown in the figure, when the first device determines that network congestion is about to occur, the first device may not reduce the second rate to the initial value of 1, but instead reduce the second rate to half of the original value (for example, the original second rate is 24, and the updated second rate is 12). After that, the first device increases the second rate by 1 each time it receives a confirmation response for a data item, but the increased second rate is less than twice the original second rate. When the second rate is reduced to half of the original value, the probability of network congestion can be minimized.

[0066] However, if the first device reduces the second rate to half of the current second rate (or lower, such as reducing the second rate to the initial value), the network rate will fluctuate greatly, making the average rate of data sent by the first device lower. For example, the diagram of the rate of data sent by the first device is as follows: Figure 6 As shown, it can be seen that, because the first device repeatedly reduces the data transmission rate (second rate) to half of the current rate or lower during the process of adopting the above-mentioned method to avoid network congestion, the data transmission rate of the first device fluctuates greatly. Moreover, in this way, the queue depth of the sending queue (including the data that the first device needs to send) in the first device is read multiple times, and it is found that there is a probability of about 10% to 20% that the queue depth read is 0, indicating that the first device is idle for 10% to 20% of the time during the data transmission process. It can be seen that the data transmission rate of the first device fluctuates greatly, the average rate at which the first device transmits data to the second device is low, and the utilization rate of the first device is low.

[0067] An embodiment of the present application provides a data transmission method, in which the data transmission rate fluctuation is small, the average data transmission rate is high, and the utilization rate of the communication equipment is high. Figure 1 The multiple communication devices in the communication system shown include not only the first device 01 and the second device 02, but also a transfer device 03. The data transmission method provided in the embodiment of the present application can be used for the transfer device 03. It should be noted that the first device 01 and the second device 02 are connected through the transfer device 03, and the first device 01 and the second device 02 can transmit data through the transfer device 03. The transfer device 03 can be geographically located between the first device 01 and the second device 02. Of course, the transfer device 03 may not be geographically located between the first device 01 and the second device 02, and this embodiment of the present application does not limit this. Optionally, when the first device 01 is a server and the second device 02 is a terminal, the transfer device can be a router, a gateway, etc.

[0068] For example, based on Figure 1 The communication system shown in FIG. 1 and the flowchart of the data transmission method provided in the embodiment of the present application are as follows: Figure 7 As shown, the data transmission method includes:

[0069] Step 701: A first device and a second device establish a TCP connection through a transfer device.

[0070] During the process of establishing a TCP connection between the first device and the second device, the first device and the second device will perform a three-way handshake, and the first handshake signal, the second handshake signal and the third handshake signal will be transmitted between the first device and the second device through the transfer device.

[0071] Step 702: The transfer device determines a target cache corresponding to the TCP connection established between the first device and the second device.

[0072] During the process of establishing a TCP connection between the first device and the second device, the transit device forwards the handshake signal between the first device and the second device. After forwarding the first handshake signal, the second handshake signal and the third handshake signal, the transit device can determine that a TCP connection has been established between the first device and the second device.

[0073] After determining that a TCP connection has been established between the first device and the second device, the relay device can determine the target cache corresponding to the TCP connection in its local cache. This target cache is different from the sending cache. The target cache is used to cache data sent by the first device to the second device, while the sending cache is used to cache data in the relay device's sending queue.

[0074] Optionally, the transfer device may also provide feedback to the first device regarding the size of the free storage area in the target cache, so that the first device can adjust the rate at which it sends data to the transfer device based on the size of the free storage area. For example, when the free storage area is small, the first device may reduce the rate at which it sends data to the transfer device; and when the free storage area is large, the first device may increase the rate at which it sends data to the transfer device.

[0075] Step 703: The first device sends target data to the transfer device for sending to the second device.

[0076] After the first device and the second device establish a TCP connection, the first device can send data (such as target data) to the second device through the TCP connection. Because the TCP connection is established between the first device and the second device through the relay device, the target data sent by the first device through the TCP connection will be transmitted to the relay device. After receiving the target data, the relay device can use the solution in the subsequent steps to send the target data to the first device.

[0077] Step 704: The transfer device caches the target data in the target cache.

[0078] After determining that a TCP connection has been established between the first device and the second device, the transfer device will detect whether the target data sent by the first device through the TCP connection for sending to the second device is received. After receiving the target data, the transfer device will cache the target data in the target cache.

[0079] Step 705: The transfer device determines whether the length of the target sending queue corresponding to the second device is less than the length threshold. If the length of the target sending queue is less than the length threshold, step 706 is executed; if the length of the target sending queue is greater than or equal to the length threshold, step 708 is executed.

[0080] It should be noted that the relay device is connected to at least one device and has at least one transmit queue corresponding to the at least one device. The second device is the device connected to the relay device, and the transmit queue corresponding to the second device in the at least one transmit queue is the target transmit queue. When sending data to the second device, the relay device may first add the data to the target transmit queue and then send the data in the target transmit queue to the second device.

[0081] When the length of the target send queue is less than the length threshold, it indicates that the relay device has less data to send to the second device. The relay device can then execute step 706 to continue adding data from the target cache to the target send queue. For example, if the length threshold is 100 and the current length of the target send queue is 80, the relay device can continue adding data from the target cache to the target send queue.

[0082] When the length of the target send queue is greater than the length threshold, it indicates that the transfer device has a large amount of data to send to the second device. If the data in the target cache is added to the target send queue, network congestion may occur. Therefore, the transfer device may execute step 708 to prohibit the addition of data in the target cache to the target send queue to avoid network congestion caused by the addition of data in the target cache to the target send queue. For example, assuming the length threshold is 100 and the current length of the target send queue is 100 or 110, the transfer device needs to prohibit the addition of data in the target cache to the target send queue.

[0083] It can be seen that in the embodiment of the present application, the first device sends data to the second device through the transit device, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related technology. Therefore, the rate of sending data by the first device will not fluctuate greatly.

[0084] Furthermore, in an embodiment of the present application, the transfer device adds data to the target sending queue when the length of the target sending queue is less than a length threshold, and stops adding data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. It can be seen that there are more cases where the target sending queue in the transfer device contains data, the probability of the target sending queue being empty is small, and the utilization rate of the transfer device is high. In addition, the transfer device adds data to the target sending queue or prohibits the addition of data based on the length threshold, which can reduce the fluctuation of the rate at which the transfer device sends data in the target sending queue. Since the degree of fluctuation in the sending rate is negatively correlated with the average sending rate, the average rate at which the transfer device sends data to the second device is high.

[0085] Step 706: The transfer device adds the target data in the target cache to the target sending queue.

[0086] On the one hand, the target sending queue may include only one sub-queue. In this case, the transfer device may directly add the target data to the sub-queue.

[0087] Alternatively, the target send queue can include multiple subqueues, each with a priority level. The multiple subqueues have different priorities. Data in these subqueues is sent sequentially in descending order of priority. In this case, the transit device can add the target data to a subqueue of a certain priority level based on a specific mechanism.

[0088] For example, the transfer device may add the target data to the sub-queue containing the least data among the multiple sub-queues.

[0089] For example, the target data may carry the priority of the target data. When the transit device adds the target data to the target sending queue, it may search for a sub-queue with the same priority as the target data among multiple sub-queues of the target sending queue and add the target data to the sub-queue.

[0090] Step 707: The transfer device sends the data in the target sending queue to the second device.

[0091] Since the transfer device adds the target data to the target sending queue in step 706 , the transfer device sends the data in the target sending queue to the second device in step 707 , thereby enabling the transfer device to send the target data to the second device.

[0092] Step 708: The transfer device prohibits adding the target data to the target sending queue.

[0093] Furthermore, when the second device fails to receive the target data, it can use the method described in the aforementioned embodiment to send a packet loss indication of the target data to the first device. The packet loss indication is used to indicate that the second device has not received the target data. Because the first device and the second device establish a TCP connection through the transit device, the transit device can receive the packet loss indication. It should be noted that after receiving the packet loss indication, the transit device does not need to send the packet loss indication to the first device.

[0094] After receiving the packet loss indication, the relay device can determine that the second device has not received the target data. In this case, the relay device needs to retransmit the target data. In this case, the relay device can add the target data to the target transmission queue based on the packet loss indication and then resend the data in the target transmission queue to the second device to achieve the retransmission of the target data to the second device.

[0095] For example, when the target transmission queue includes multiple subqueues with different priorities, the relay device may add the target data to the subqueue with the highest priority among the multiple subqueues to retransmit the target data to the second device. Because the data in the multiple subqueues is sent sequentially in descending order of subqueue priority, the relay device adding the target data to the subqueue with the highest priority enables the relay device to quickly retransmit the target data to the second device.

[0096] In summary, in the data transmission method provided in the embodiment of the present application, the first device sends data to the second device through the transfer device, and the first device will not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art. Therefore, the rate at which the first device sends data will not fluctuate greatly. In addition, the transfer device will add data to the target sending queue when the length of the target sending queue is less than the length threshold, and will stop adding data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate at which the transfer device sends data in the target sending queue can be reduced. Since the degree of fluctuation in the sending rate is negatively correlated with the average sending rate, the average rate at which the transfer device sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0097] For example, a schematic diagram of the rate at which the transfer device sends data in the target sending queue in the embodiment of the present application is as follows: Figure 8 As shown in the figure, it can be seen that the transfer device will add data to the target sending queue when the length of the target sending queue is less than the length threshold, and stop adding data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold, so that the fluctuation degree of the rate at which the transfer device sends data in the target sending queue is relatively small. Figure 6 The degree of fluctuation shown is small.

[0098] Moreover, the transfer device adds data to the target sending queue or prohibits adding data according to the length threshold. The target sending queue in the transfer device often has data, and the probability of the target sending queue being empty is small, and the utilization rate of the transfer device is high. Figure 4 or Figure 5 In the data transmission mode shown in FIG, the first device is idle for 10% to 20% of the time during the data transmission process, and the utilization rate of the first device is low. Figure 7 In the data transmission method shown, since the target sending queue always has data, the transfer device is continuously in a non-idle state, and the utilization rate of the transfer device is high. Figure 4 and Figure 5 By using the data transmission method shown, the utilization rate of the transfer equipment can be increased by 10% to 20%.

[0099] In addition, in the embodiments of the present application, target data is transmitted between the first and second devices via a relay device. The relay device acts as a proxy device and can be considered the data receiver for the first device and the data transmitter for the second device. This divides the data transmission channel between the first and second devices into two segments: one between the first device and the relay device, and another between the relay device and the second device. Because the original data transmission channel is divided into two segments, the RTT of each segment is relatively small. Furthermore, because RTT is negatively correlated with throughput, the throughput of each segment is relatively high.

[0100] The communication system provided in the embodiment of the present application can be a mobile communication system or a fixed-line communication system. Accordingly, the communication devices in the communication system (such as the first device, the second device and the transfer device mentioned above) can be mobile communication devices or fixed-line communication devices.

[0101] Optionally, when the transfer device is a fixed network communication device, if the transfer device is an optical line terminal (OLT), then Figure 9 As shown, the communication system includes: a first device 01, an OLT 03, an optical network terminal (Optical Network Terminal, ONT) 04 and a second device 02 connected in sequence.

[0102] based on Figure 9 The communication system shown in FIG. 1 , the data transmission method provided in the embodiment of the present application can be as follows Figure 10 As shown, the data transmission method may include:

[0103] Step 1001: A first device and a second device establish a TCP connection through an OLT and an ONT.

[0104] Step 1001 can refer to step 701, and the embodiment of the present application will not be described in detail here.

[0105] Step 1002: The OLT determines a target buffer corresponding to the TCP connection in the OLT and a target sending queue corresponding to the TCP connection in the ONT.

[0106] Step 1002 may refer to step 702 and will not be described in detail in this embodiment of the present application.

[0107] Step 1003: The ONT sends information about the length of the target sending queue in the ONT to the OLT.

[0108] It should be noted that the ONT is connected to at least one device and has at least one transmit queue corresponding to the at least one device. A second device is a device connected to the ONT, and the transmit queue corresponding to the second device in the at least one transmit queue is a target transmit queue. When the ONT sends data to the second device, it may first add the data to the target transmit queue and then send the data in the target transmit queue to the ONT.

[0109] In step 1003, the ONT may send information about the lengths of all transmit queues in the ONT to the OLT, so as to send information about the target transmit queue in all transmit queues to the OLT. The ONT may periodically send information about the lengths of the target transmit queue in the ONT to the OLT.

[0110] The information about the length of the target send queue may include: a relationship between the length of the target send queue and a length threshold. For example, the length of the target send queue is less than the length threshold, or the length of the target send queue is greater than or equal to the length threshold. As another example, the information about the length of the target send queue may include: the length of the target send queue.

[0111] Step 1004: The first device sends target data to the OLT for sending to the second device.

[0112] Step 1004 may refer to step 703 and will not be described in detail in this embodiment of the present application.

[0113] Step 1005: The OLT caches the target data in the target cache.

[0114] Step 1005 can refer to step 704, and will not be described in detail in this embodiment of the present application.

[0115] Step 1006: The OLT determines whether the length of the target send queue is less than a length threshold based on the information about the length of the target send queue in the ONT. If the length of the target send queue is less than the length threshold, step 1007 is executed; if the length of the target send queue is greater than or equal to the length threshold, step 1010 is executed.

[0116] Step 1006 can refer to step 705, and the embodiment of the present application will not be described in detail here.

[0117] It should be noted that, when the information about the target send queue length sent by the ONT in step 1001 includes the target send queue length, the OLT needs to compare the target send queue length with the length threshold to determine whether the target send queue length is less than the length threshold. When the information about the target send queue length sent by the ONT in step 1001 includes the relationship between the target send queue length and the length threshold, the OLT can directly determine the relationship between the target send queue length and the length threshold based on the target send queue information.

[0118] In addition, when the ONT sends information about the length of the target send queue to the OLT by sending information about the lengths of all send queues in the ONT to the OLT in step 1001, in step 1006, the OLT needs to first search for information about the length of the target send queue corresponding to the second device in the information about the lengths of all send queues, and then determine whether the length of the target send queue is less than the length threshold based on the information about the length of the target send queue.

[0119] Step 1007: The OLT sends target data to the ONT.

[0120] When the OLT determines that the length of the target sending queue is less than the length threshold, the OLT may send the target data to the ONT, so that the ONT adds the target data to the target sending queue to send the target data to the second device.

[0121] Step 1008: The ONT adds the target data to the target sending queue.

[0122] The process of the ONT adding the target data to the target sending queue can refer to the process of the transfer device adding the target data in the target buffer to the target sending queue in step 706, which will not be described in detail in this embodiment of the present application.

[0123] Step 1009: The ONT sends the data in the target sending queue to the second device.

[0124] The process of the ONT sending the data in the target sending queue to the second device can refer to the process of the transit device sending the data in the target sending queue to the second device in step 707, which is not described in detail in this embodiment of the present application.

[0125] Step 1010: The OLT prohibits sending target data to the ONT.

[0126] When the OLT determines that the length of the target sending queue is greater than or equal to the length threshold, the OLT will not send the target data to the ONT, so that the ONT will not add the target data to the target sending queue, and further the ONT will not send the target data to the second device.

[0127] Furthermore, when the second device fails to receive the target data, it can send a packet loss indication of the target data to the first device using the method described in the aforementioned embodiment. The packet loss indication is used to indicate that the second device has not received the target data. Because the first and second devices establish a TCP connection via the OLT and ONT, the OLT can receive the packet loss indication. It should be noted that after receiving the packet loss indication, the OLT does not need to send the packet loss indication to the first device.

[0128] After receiving the packet loss indication, the OLT may determine that the second device has not received the target data. In this case, the OLT needs to control the ONT to retransmit the target data. In this case, the OLT may send a retransmission instruction to the ONT based on the packet loss indication. The retransmission instruction is used to instruct the ONT to retransmit the target data, so that the ONT, based on the retransmission instruction, re-adds the target data to the target transmission queue and then retransmits the target data when sending the data in the target transmission queue to the second device.

[0129] The process of the ONT adding the target data to the target sending queue according to the retransmission instruction can refer to the process of the transfer device adding the target data to the target sending queue according to the packet loss indication in the aforementioned embodiment, and will not be described in detail in this embodiment of the present application.

[0130] In summary, in the data transmission method provided in the embodiment of the present application, the first device sends data to the second device through the OLT and the ONT, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art. Therefore, the rate at which the first device sends data will not fluctuate significantly. In addition, the OLT controls the ONT to add data to the target sending queue when the length of the target sending queue is less than the length threshold, and stops controlling the ONT to add data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate of data in the target sending queue of the ONT is smaller. Since the degree of fluctuation of the sending rate is negatively correlated with the average sending rate, the average rate at which the ONT sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0131] For example, the schematic diagram of the rate at which the ONT sends data in the target sending queue in the embodiment of the present application is as follows: Figure 8As shown in the figure, it can be seen that when the length of the target sending queue is less than the length threshold, the OLT will control the ONT to add data to the target sending queue, and will stop controlling the ONT to add data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold, so that the fluctuation degree of the rate at which the ONT sends data in the target sending queue is relatively small. Figure 6 The degree of fluctuation shown is small.

[0132] Furthermore, the OLT controls the ONT to add data to the target sending queue or prohibits adding data according to the length threshold, so that the target sending queue in the ONT has more data, the probability of the target sending queue being empty is lower, and the utilization rate of the ONT is higher. Figure 4 or Figure 5 In the data transmission mode shown in FIG, the first device is idle for 10% to 20% of the time during the data transmission process, and the utilization rate of the first device is low. Figure 10 In the data transmission method shown in FIG, since the target sending queue always has data, the ONT is continuously in a non-idle state, and the utilization rate of the ONT is high. Figure 4 and Figure 5 By using the data transmission method shown above, the utilization rate of the ONT can be increased by 10% to 20%.

[0133] In addition, in the embodiment of the present application, target data is transmitted between the first device and the second device through the OLT and ONT. The OLT and ONT act as a proxy device and can be considered the data receiving end of the first device and the data sending end of the second device. The data transmission channel between the first device and the OLT and ONT is divided into: a data transmission channel between the first device and the OLT and ONT, and a data transmission channel between the OLT and ONT and the second device. Since the original data transmission channel is divided into two data transmission channels, the RTT of each data transmission channel is relatively small. Moreover, since RTT is negatively correlated with throughput, the throughput of each data transmission channel is relatively large.

[0134] In the above embodiments, Figures 1 to 10 The data transmission method provided by the embodiment of the present application is introduced. Figures 11 to 13 Introduce the various communication devices provided in the embodiments of the present application.

[0135] For example, Figure 11 This is a structural diagram of another communication device provided in an embodiment of the present application, which can be used for Figure 1 The transfer equipment in the communication system shown in FIG. Figure 11 As shown, the communication device includes:

[0136] The first receiving module 1101 is used to receive target data sent by the first device to the second device. The function of the first receiving module 1101 can be referred to Figure 7 The functions related to the transfer device in step 703 are not described in detail in this embodiment of the application.

[0137] The first adding module 1102 is used to add the target data to the target sending queue when the length of the target sending queue in the transfer device is less than the length threshold, and the target sending queue corresponds to the second device. The function of the first adding module 1102 can be referred to Figure 7 The functions related to the transfer device in step 707 are not described in detail in this embodiment of the present application.

[0138] The first sending module 1103 is configured to send the data in the target sending queue to the second device. The function of the first sending module 1103 can be referred to Figure 7 The functions related to the transfer device in step 708 are not described in detail in this embodiment of the present application.

[0139] Optionally, the communication device further includes:

[0140] Disable Modules ( Figure 11 (not shown) for prohibiting the target data from being added to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. The function of the prohibition module can be referred to Figure 7 The functions related to the transfer device in step 709 are not described in detail in this embodiment of the present application.

[0141] Optionally, the first device and the second device transmit the target data via a Transmission Control Protocol TCP connection, and the communication device further includes:

[0142] The first determination module ( Figure 11 Not shown), for determining the target cache corresponding to the TCP connection before receiving the target data; the function of the first determination module can refer to Figure 7 The functions related to the transfer device in step 702 are not described in detail in this embodiment of the present application.

[0143] Cache Module ( Figure 11 (not shown), for caching the target data in the target cache after receiving the target data. The function of the cache module can refer to Figure 7 The functions related to the transfer device in step 704 are not described in detail in this embodiment of the present application.

[0144] Optionally, the communication device further includes:

[0145] The second determination module ( Figure 11 (not shown), for determining whether the length of the target sending queue is less than the length threshold after caching the target data in the target cache. The function of the second determining module can refer to Figure 7 The functions related to the transfer device in step 705 are not described in detail in this embodiment of the present application.

[0146] Optionally, the communication device further includes:

[0147] The second receiving module ( Figure 11 (not shown) for receiving a packet loss indication sent by the second device to the first device, the packet loss indication being used to indicate that the second device has not received the target data;

[0148] The second join module ( Figure 11 (not shown) for adding the target data to the target sending queue according to the packet loss indication;

[0149] The second sending module ( Figure 11 (not shown) for sending the data in the target sending queue to the second device.

[0150] Optionally, the target sending queue includes multiple subqueues, and the multiple subqueues have priorities, and the data in the multiple subqueues are sent in descending order of the priorities of the subqueues;

[0151] The second joining module ( Figure 11 (not shown) for adding the target data to the sub-queue with the highest priority among the multiple sub-queues according to the packet loss indication.

[0152] In summary, an embodiment of the present application provides a communication device, through which a first device sends data to a second device, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art, so that the rate at which the first device sends data will not fluctuate significantly. In addition, the communication device adds data to the target sending queue when the length of the target sending queue is less than the length threshold, and stops adding data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate at which the communication device sends data in the target sending queue is smaller. Since the degree of fluctuation of the sending rate is negatively correlated with the average sending rate, the average rate at which the communication device provides data sent to the second device according to the embodiment of the present application is higher, and the average rate at which the first device transmits data to the second device is higher.

[0153] Figure 12 This is a structural diagram of another communication device provided in an embodiment of the present application, which can be used for Figure 9The OLT in the communication system shown in FIG. Figure 12 As shown, the communication device includes:

[0154] The first receiving module 1201 is used to receive target data sent by the first device to the second device; the function of the first receiving module 1201 can be referred to Figure 10 The functions related to the OLT in step 1004 are not described in detail in this embodiment of the present application.

[0155] The first sending module 1202 is configured to send the target data to the optical network terminal ONT when the length of the target sending queue is less than a length threshold, so that the ONT adds the target data to the target sending queue, and sends the data in the target sending queue to the second device, wherein the target sending queue corresponds to the second device. The function of the first sending module 1202 can be referred to Figure 10 The functions related to the OLT in step 1008 are not described in detail in this embodiment of the present application.

[0156] Optionally, the communication device further includes:

[0157] The second receiving module ( Figure 12 Not shown), for receiving information about the length of the target sending queue sent by the ONT before sending the target data to the ONT; the function of the second receiving module can refer to Figure 10 The functions related to the OLT in step 1003 are not described in detail in this embodiment of the present application.

[0158] The first determination module ( Figure 12 ), and configured to determine, based on information about the length of the target sending queue, that the length of the target sending queue is less than the length threshold.

[0159] Optionally, the information about the length of the target sending queue includes: a relationship between the length of the target sending queue and the length threshold.

[0160] Optionally, the communication device further includes:

[0161] Disable Modules ( Figure 12 ), for prohibiting the sending of target data to the ONT when the length of the target sending queue is greater than or equal to the length threshold. The function of the prohibition module can refer to Figure 10 The functions related to the OLT in step 1011 are not described in detail in this embodiment of the present application.

[0162] Optionally, the first device and the second device transmit the target data via a Transmission Control Protocol TCP connection, and the communication device further includes:

[0163] The second determination module ( Figure 12 Not shown), for determining the target cache corresponding to the TCP connection before receiving the target data; the function of the fourth determination module can refer to Figure 10 The functions related to the OLT in step 1002 are not described in detail in this embodiment of the present application.

[0164] Cache Module ( Figure 12 (not shown), for caching the target data in the target cache after receiving the target data. The function of the cache module can refer to Figure 10 The functions related to the OLT in step 1005 are not described in detail in this embodiment of the present application.

[0165] Optionally, the communication device further includes:

[0166] The third determination module ( Figure 12 (not shown), for determining whether the length of the target sending queue is less than the length threshold after caching the target data in the target cache. The function of the fifth determining module can refer to Figure 10 The functions related to the OLT in step 1006 are not described in detail in this embodiment of the present application.

[0167] Optionally, the communication device further includes:

[0168] The third receiving module ( Figure 12 (not shown) for receiving a packet loss indication sent by the second device to the first device, the packet loss indication being used to indicate that the second device has not received the target data;

[0169] The second sending module ( Figure 12 (not shown) for sending a retransmission instruction to the ONT according to the packet loss indication, the retransmission instruction being used to instruct the ONT to add the target data to the target sending queue according to the retransmission instruction, and to send the data in the target sending queue to the second device.

[0170] In summary, an embodiment of the present application provides a communication device, which is an OLT. Since the first device sends data to the second device through the OLT and the ONT, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art, the rate at which the first device sends data will not fluctuate significantly. In addition, the OLT controls the ONT to add data to the target sending queue when the length of the target sending queue is less than the length threshold, and stops controlling the ONT to add data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate of data in the target sending queue of the ONT can be reduced. Since the degree of fluctuation of the sending rate is negatively correlated with the average sending rate, the average rate at which the ONT sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0171] Figure 13 This is a structural diagram of another communication device provided in an embodiment of the present application, which can be used for Figure 9 The ONT in the communication system shown in FIG. Figure 13 As shown, the communication device includes:

[0172] The first sending module 1301 is used to send information about the length of the target sending queue in the ONT to the optical line terminal OLT, where the target sending queue corresponds to the second device; the function of the first sending module 1301 can be referred to Figure 10 The functions related to the ONT in step 1003 are not described in detail in this embodiment of the present application.

[0173] The first receiving module 1302 is configured to receive target data sent by the OLT for transmission to the second device. The function of the first receiving module 1302 may be referred to Figure 10 The functions related to the ONT in step 1008 are not described in detail in this embodiment of the present application.

[0174] The first adding module 1303 is used to add the target data to the target sending queue; the function of the first adding module 1303 can be referred to Figure 10 The functions related to the ONT in step 1009 are not described in detail in this embodiment of the present application.

[0175] The second sending module 1304 is configured to send the data in the target sending queue to the second device. Figure 10 The functions related to the ONT in step 1010 are not described in detail in this embodiment of the present application.

[0176] Optionally, the information about the length of the target sending queue includes: a relationship between the length of the target sending queue and a length threshold.

[0177] Optionally, the communication device further includes:

[0178] The second receiving module ( Figure 13 (not shown) for receiving a retransmission instruction sent by the OLT.

[0179] The second join module ( Figure 13 (not shown), for adding the target data to the target sending queue according to the retransmission instruction;

[0180] The second sending module ( Figure 13 (not shown) for sending the data in the target sending queue to the second device.

[0181] Optionally, the target sending queue includes multiple subqueues, and the multiple subqueues have priorities, and the data in the multiple subqueues are sent in descending order of the priorities of the subqueues;

[0182] The second adding module is configured to add the target data to the sub-queue with the highest priority among the multiple sub-queues according to the retransmission instruction.

[0183] In summary, an embodiment of the present application provides a communication device, which is an ONT. Since the first device sends data to the second device through the OLT and the ONT, and the first device does not adjust the rate of sending data by adopting the method of avoiding network congestion in the related art, the rate at which the first device sends data will not fluctuate significantly. In addition, the OLT controls the ONT to add data to the target sending queue when the length of the target sending queue is less than the length threshold, and stops controlling the ONT to add data to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold. In this way, the fluctuation of the rate of data in the target sending queue of the ONT can be reduced. Since the degree of fluctuation of the sending rate is negatively correlated with the average sending rate, the average rate at which the ONT sends data to the second device is higher, and the average rate at which the first device transmits data to the second device is higher.

[0184] An embodiment of the present application provides a computer-readable storage medium having instructions stored therein. When the instructions are executed on a computer, the computer executes any one of the data transmission methods for a transit device, an OLT, or an ONT provided in the embodiments of the present application.

[0185] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a computer, the computer is caused to execute any one of the data transmission methods for a transit device, an OLT, or an ONT provided in the embodiments of the present application.

[0186] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk).

[0187] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" refers to one or more, and "a plurality" refers to two or more, unless otherwise expressly defined.

[0188] The different types of embodiments, such as the method embodiments and device embodiments provided in the embodiments of this application, can refer to each other, and the embodiments of this application are not limited thereto. The order of the operations of the method embodiments provided in the embodiments of this application can be appropriately adjusted, and the operations can be increased or decreased accordingly according to the circumstances. Any person skilled in the art who can easily think of a method of variation within the technical scope disclosed in this application should be included in the scope of protection of this application, and therefore will not be described in detail.

[0189] In the corresponding embodiments provided in this application, it should be understood that the disclosed systems, devices, and apparatuses can be implemented through other structural methods. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0190] Units described as separate components may or may not be physically separate, and components described as units may or may not be physical units, and may be located in one place or distributed across multiple devices. Some or all of these units may be selected to achieve the purpose of this embodiment based on actual needs.

[0191] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A data transmission method, characterized in that: For a transfer device, the method comprises: receiving target data sent by the first device and intended to be sent to the second device; caching the target data in a target cache, wherein the first device and the second device transmit the target data via a Transmission Control Protocol TCP connection, and the target cache corresponds to the TCP connection; When the length of the target sending queue in the transfer device is less than a length threshold, the target data in the target cache is added to the target sending queue; when the length of the target sending queue is greater than or equal to the length threshold, the target data in the target cache is prohibited from being added to the target sending queue, the target sending queue corresponds to the second device; and, sending the data in the target sending queue to the second device; Receive a packet loss indication sent by the second device for sending to the first device, wherein the packet loss indication is used to indicate that the second device has not received the target data; add the target data in the target cache to the target sending queue according to the packet loss indication; and send the data in the target sending queue to the second device.

2. The method according to claim 1, characterized in that The method further comprises: Before receiving the target data, the target cache corresponding to the TCP connection is determined.

3. The method according to claim 1, characterized in that After caching the target data in the target cache, the method further includes: It is determined whether the length of the target sending queue is less than the length threshold.

4. The method according to any one of claims 1 to 3, characterized in that: The target sending queue includes a plurality of subqueues, and the plurality of subqueues have priorities, and the data in the plurality of subqueues are sent in order from high to low priority of the subqueues; The adding the target data in the target cache to the target sending queue according to the packet loss indication includes: According to the packet loss indication, the target data in the target cache is added to a sub-queue with the highest priority among the multiple sub-queues.

5. A data transmission method, characterized in that: For an optical line terminal OLT, the method comprises: receiving target data sent by the first device and intended to be sent to the second device; caching the target data in a target cache, wherein the first device and the second device transmit the target data via a Transmission Control Protocol TCP connection, and the target cache corresponds to the TCP connection; When the length of the target sending queue in the optical network terminal ONT is less than the length threshold, sending the target data in the target cache to the ONT, so that the ONT adds the target data to the target sending queue, and sending the data in the target sending queue to the second device, the target sending queue corresponding to the second device; When the length of the target sending queue is greater than or equal to the length threshold, prohibiting sending the target data in the target buffer to the ONT; Receive a packet loss indication sent by the second device for sending to the first device, wherein the packet loss indication is used to indicate that the second device has not received the target data; send a retransmission instruction to the ONT according to the packet loss indication, wherein the retransmission instruction is used to instruct the ONT to add the target data to the target sending queue according to the retransmission instruction, and send the data in the target sending queue to the second device.

6. The method according to claim 5, characterized in that The method further comprises: Before sending the target data in the target buffer to the ONT, receiving information about the length of the target sending queue sent by the ONT; According to the information about the length of the target sending queue, it is determined that the length of the target sending queue is less than the length threshold.

7. The method according to claim 6, characterized in that The information about the length of the target sending queue includes: a relationship between the length of the target sending queue and the length threshold.

8. The method according to any one of claims 5 to 7, characterized in that: The method further comprises: Before receiving the target data, the target buffer corresponding to the TCP connection in the OLT is determined.

9. The method according to any one of claims 5 to 7, characterized in that: After caching the target data in the target cache, the method further includes: It is determined whether the length of the target sending queue is less than the length threshold.

10. A data transmission method, characterized in that: For an optical network terminal ONT, the method comprises: Sending information about the length of a target sending queue in the ONT to an optical line terminal OLT, wherein the target sending queue corresponds to a second device; receiving target data sent by the OLT for sending to the second device, the target data being sent by the OLT to the ONT when the length of the target sending queue is less than a length threshold, the OLT being used to: after receiving the target data sent by the first device for sending to the second device, cache the target data in a target cache, send the target data in the target cache to the ONT when the length of the target sending queue is less than the length threshold, and prohibit sending the target data in the target cache to the ONT when the length of the target sending queue is greater than or equal to the length threshold, the first device and the second device transmit the target data through a transmission control protocol TCP connection, and the target cache corresponds to the TCP connection; Adding the target data to the target sending queue; Sending the data in the target sending queue to the second device; Receive a retransmission instruction sent by the OLT, add the target data to the target sending queue according to the retransmission instruction, and send the data in the target sending queue to the second device, wherein the retransmission instruction is sent to the ONT according to the packet loss indication after the OLT receives a packet loss indication sent by the second device for sending to the first device, and the packet loss indication is used to indicate that the second device has not received the target data.

11. The method according to claim 10, characterized in that The information about the length of the target sending queue includes: a relationship between the length of the target sending queue and a length threshold.

12. The method according to claim 10 or 11, characterized in that: The target sending queue includes a plurality of subqueues, and the plurality of subqueues have priorities, and the data in the plurality of subqueues are sent in order from high to low priority of the subqueues; According to the retransmission instruction, adding the target data to the target sending queue includes: According to the retransmission instruction, the target data is added to the sub-queue with the highest priority among the multiple sub-queues.

13. A communication device, characterized in that: For transfer equipment, the communication equipment includes: A first receiving module, used for receiving target data sent by the first device and intended for sending to the second device; a cache module, configured to cache the target data in a target cache, wherein the first device and the second device transmit the target data via a transmission control protocol TCP connection, and the target cache corresponds to the TCP connection; a first adding module, used for adding the target data in the target buffer to the target sending queue when the length of the target sending queue in the transfer device is less than a length threshold, the target sending queue corresponding to the second device; a prohibiting module, used for prohibiting the target data in the target buffer from being added to the target sending queue when the length of the target sending queue is greater than or equal to the length threshold; and a first sending module, used for sending the data in the target sending queue to the second device; A second receiving module is used to receive a packet loss indication sent by the second device for sending to the first device, and the packet loss indication is used to indicate that the second device has not received the target data; a second adding module is used to add the target data from the target cache to the target sending queue according to the packet loss indication; and a second sending module is used to send the data in the target sending queue to the second device.

14. A communication device, characterized in that: For an optical line terminal OLT, the communication device comprises: A first receiving module, used for receiving target data sent by the first device and intended for sending to the second device; a cache module, configured to cache the target data in a target cache, wherein the first device and the second device transmit the target data via a transmission control protocol TCP connection, and the target cache corresponds to the TCP connection; A first sending module, configured to send the target data in the target cache to the optical network terminal ONT when the length of the target sending queue is less than a length threshold, so that the ONT adds the target data to the target sending queue, and sends the data in the target sending queue to the second device, the target sending queue corresponding to the second device; A prohibition module, configured to prohibit sending the target data in the target buffer to the ONT when the length of the target sending queue is greater than or equal to the length threshold; a third receiving module, configured to receive a packet loss indication sent by the second device for sending to the first device, wherein the packet loss indication is used to indicate that the second device has not received the target data; and a second sending module, configured to send a retransmission instruction to the ONT according to the packet loss indication, wherein the retransmission instruction is used to instruct the ONT to add the target data to the target sending queue according to the retransmission instruction, and to send the data in the target sending queue to the second device.

15. A communication device, characterized in that: For an optical network terminal ONT, the communication device comprises: A first sending module, configured to send information about the length of a target sending queue in the ONT to the optical line terminal OLT, wherein the target sending queue corresponds to a second device; a first receiving module, configured to receive target data sent by the OLT for sending to the second device, the target data being sent by the OLT to the ONT when the length of the target sending queue is less than a length threshold, the OLT being configured to: after receiving the target data sent by the first device for sending to the second device, cache the target data in a target cache, send the target data in the target cache to the ONT when the length of the target sending queue is less than the length threshold, and prohibit sending the target data in the target cache to the ONT when the length of the target sending queue is greater than or equal to the length threshold, wherein the first device and the second device transmit the target data via a transmission control protocol TCP connection, and the target cache corresponds to the TCP connection; A first adding module, used for adding the target data to the target sending queue; A second sending module, used for sending the data in the target sending queue to the second device; a second receiving module, configured to receive a retransmission instruction sent by the OLT, wherein the retransmission instruction is sent to the ONT according to the packet loss indication after the OLT receives a packet loss indication sent by the second device for sending to the first device, and the packet loss indication is used to indicate that the second device has not received the target data; a second adding module, configured to add the target data to the target sending queue according to the retransmission instruction; and a second sending module, configured to send the data in the target sending queue to the second device.

16. A communication device, characterized in that: For transfer equipment, the communication equipment includes: a processor and a memory; The processor is used to execute the program stored in the memory to implement the data transmission method according to any one of claims 1 to 4.

17. A communication device, characterized in that: For use in an optical line terminal OLT, the communication device comprises: a processor and a memory; The processor is used to execute the program stored in the memory to implement the data transmission method described in any one of claims 5 to 9.

18. A communication device, characterized in that: For optical network terminal ONT, the communication device includes: a processor and a memory; The processor is used to execute the program stored in the memory to implement the data transmission method according to any one of claims 10 to 12.

19. A communication system, characterized in that: The communication system includes: a first device, a second device and a transfer device; The transfer device is: the communication device described in claim 13 or 16.

20. A communication system, characterized in that: The communication system comprises: a first device, a second device, an optical line terminal OLT and an optical network terminal ONT; The OLT is: the communication device according to claim 14, and the ONT is: the communication device according to claim 15; Alternatively, the OLT is: the communication device according to claim 17, and the ONT is: the communication device according to claim 18.

21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method, device and system for controlling network congestion

    CN111355669A