CN116886616A - Congestion control method and device based on TCP, electronic equipment and storage medium - Google Patents

Congestion control method and device based on TCP, electronic equipment and storage medium Download PDF

Info

Publication number
CN116886616A
CN116886616A CN202310974521.6A CN202310974521A CN116886616A CN 116886616 A CN116886616 A CN 116886616A CN 202310974521 A CN202310974521 A CN 202310974521A CN 116886616 A CN116886616 A CN 116886616A
Authority
CN
China
Prior art keywords
acknowledgement
packet
data
window
retransmitted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310974521.6A
Other languages
Chinese (zh)
Inventor
柳澳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Letv Cloud Network Technology Beijing Co ltd
Original Assignee
Letv Cloud Network Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Letv Cloud Network Technology Beijing Co ltd filed Critical Letv Cloud Network Technology Beijing Co ltd
Priority to CN202310974521.6A priority Critical patent/CN116886616A/en
Publication of CN116886616A publication Critical patent/CN116886616A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure provides a congestion control method based on TCP. The method is applied to the technical field of network communication, and the method is applied to a transmitting end and comprises the following steps: receiving an acknowledgement packet sent by a receiving end; acquiring an acknowledgement number of an accumulated acknowledgement packet sent by an accumulated acknowledgement by a receiving end; judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number; if not, analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost; and calculating an available sending window according to the packet loss condition. In this way, by directly confirming that the receiving end has received to prevent it from being retransmitted again, it is possible to reduce the transmission of the number of retransmission packets and prevent waste of bandwidth.

Description

Congestion control method and device based on TCP, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of network communication, and in particular relates to a congestion control method, a congestion control device, electronic equipment and a storage medium based on TCP.
Background
In the development of the internet, the control requirements on the traffic cost are more and more strict, wherein the traffic cost is mainly determined by two factors, namely, the transmitted data itself and the retransmission rate of the transmitted data, and the retransmission rate of the transmitted data is determined by the quality of the network and the strategy of the transmission protocol.
Network congestion refers to the phenomenon that when data is transmitted in a network, the network transmission capacity cannot meet the requirements of users due to limited network bandwidth or overlarge network flow, so that network delay is increased, transmission speed is reduced, and even data is lost. Network congestion is common in busy network environments or large-scale network usage, and the main reasons include: high network traffic: when there are a large number of users or a large number of data transmissions in the network at the same time, the network bandwidth may not be able to carry such high traffic, resulting in network congestion; network bottleneck: some network nodes or network devices may become transmission bottlenecks, and cannot rapidly process and forward a large amount of data traffic, so that data is accumulated at the network nodes or network devices, and network congestion is further caused; improper network scheduling and management: the unreasonable or inadaptable network scheduling algorithm and network management policy of the network may cause that some resources are not fully utilized or resource allocation is unbalanced, thereby causing network congestion; external factor influence: network congestion may also be caused by external factors, such as network attacks, accidents, natural disasters, etc., which may cause abnormal increases in network traffic or failures of network devices, thereby causing congestion phenomena.
However, if congestion control is triggered due to network congestion, the transmission window is reduced, and then the packets in the network are waiting for arriving and the transmission window is increased according to the rules of congestion control and flow control.
Disclosure of Invention
The present disclosure provides a congestion control method, apparatus, electronic device, and storage medium based on TCP.
According to a first aspect of the present disclosure, there is provided a TCP-based congestion control method. The method is applied to a transmitting end and comprises the following steps:
receiving an acknowledgement packet sent by a receiving end;
acquiring an acknowledgement number of an accumulated acknowledgement packet sent by an accumulated acknowledgement by a receiving end;
judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number;
if not, analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost;
and calculating an available sending window according to the packet loss condition.
Further, judging whether the transmission data is in the queue to be retransmitted according to the confirmation number, including:
and removing the transmission data in the queue to be retransmitted from the queue to be retransmitted.
Further, the analyzing the subsequent acknowledgement packets one by one to determine whether to drop a packet includes:
if no corresponding acknowledgement number exists in the three continuous acknowledgement packets, packet loss is determined.
Further, the calculating the available sending window according to the packet loss condition includes:
the corresponding transmission data of the confirmed packet loss is moved into a queue to be retransmitted;
a congestion control algorithm is executed to reduce the maximum transmission window.
Further, the acquiring the acknowledgement number of the cumulative acknowledgement packet sent by the receiving end for cumulative acknowledgement further includes:
and determining the received data quantity of the receiving end according to the maximum acknowledgement number in the accumulated acknowledgement packet, and adjusting a congestion window and a flow window according to the received data quantity.
Further, the executing the congestion control algorithm to reduce the maximum transmission window includes:
and reducing the maximum sending window according to the congestion window.
Further, the calculating the available sending window according to the packet loss condition includes:
and continuing to send data by taking the flow window as a sending window of the sending end according to the confirmation packet without packet loss.
According to a second aspect of the present disclosure, there is provided a TCP-based congestion control apparatus. The device comprises:
the receiving module is used for receiving the acknowledgement packet sent by the receiving end;
the acquisition module is used for acquiring the confirmation number of the accumulated confirmation packet sent by the receiving end in accumulated confirmation;
the judging module is used for judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number;
the analysis module is used for analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost when judging that the transmission data is not in the queue to be retransmitted;
and the calculation module is used for calculating the available sending window according to the packet loss condition.
According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: the congestion control system comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes a congestion control method based on TCP when executing the program.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a TCP-based congestion control method.
According to the method and the device, whether the packet is lost or not is judged when the rapid retransmission of the TCP congestion control is triggered, so that when waiting is caused by triggering the protocol congestion control, the protocol can receive the packet marked to be lost in the network, whether the transmission data is directly confirmed on the data received by the receiving end in the queue to be retransmitted or not is judged according to the confirmation number, the retransmission of the transmission data is prevented, the waste of bandwidth is prevented, the retransmission rate of the data is reduced, meanwhile, whether the packet is lost or not is confirmed, retransmission is timely carried out, the transmission window is adjusted, the bandwidth utilization is optimized, the congestion control is realized, and the efficiency and the performance of the data transmission are improved.
It should be understood that the description in this summary is not intended to limit key or critical features of the disclosed embodiments, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which:
fig. 1 illustrates a flow chart of a TCP-based congestion control method according to an embodiment of the present disclosure;
fig. 2 shows a block diagram of a TCP-based congestion control apparatus in accordance with an embodiment of the present disclosure;
fig. 3 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 1 shows a flowchart of a TCP-based congestion control method according to an embodiment of the present disclosure, which is applied to a sender, including:
s101, receiving an acknowledgement packet sent by a receiving end.
For example, the transmitting end divides the data to be transmitted into smaller data packets and adds necessary protocol header information, then the data packets are sent to the receiving end one by one through network transmission, the data packets arrive at the receiving end through network transmission, and the receiving end analyzes the protocol header information after receiving the data packets to obtain corresponding data. The receiving end may check the data to ensure the integrity and accuracy of the data, and the receiving end acknowledges the received data packet, usually by using an Acknowledgement (ACK) method. The transmitting end of the embodiment can judge whether the data is successfully transmitted according to the received acknowledgement packet information.
S102, acquiring the confirmation number of the accumulated confirmation packet sent by the receiving end in accumulated confirmation.
In some embodiments, the acquiring the acknowledgement number of the cumulative acknowledgement packet sent by the receiving end for cumulative acknowledgement further includes:
and determining the received data quantity of the receiving end according to the maximum acknowledgement number in the accumulated acknowledgement packet, and adjusting a congestion window and a flow window according to the received data quantity.
For example, the maximum acknowledgement number minus 1 indicates the data amount received and acknowledged by the receiving end, calculates a congestion window and a traffic window according to the data amount, when the data amount is larger than the current congestion window size (initial congestion window size, such as 1 MSS, maximum message segment length), the congestion size is doubled (exponentially increased), if the current congestion window size reaches a certain threshold value, the congestion window size enters a congestion avoidance stage, the congestion window size is halved, and the increase rate is slowed down, and linear increase is adopted; the flow window is used for controlling the number of data packets continuously sent by the sending end so as to improve the network transmission efficiency, the mode of calculating the flow window according to the confirmation number is mainly based on a sliding window protocol, whether the flow window is adjusted to control the speed and the number of sending data is judged according to the data volume and the flow window, when the data volume is larger than the flow window, the flow window is reduced to reduce the speed and the number of sending data, and when the data volume is smaller than the flow window, the flow window is increased to increase the speed and the number of sending data, and specific adjustment can be set by oneself. Therefore, congestion control and flow control can be realized by adjusting the sizes of the congestion window and the flow window, network performance is optimized, and high efficiency and reliability of data transmission are ensured.
And S103, judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number.
In this embodiment, the acknowledgement packet generally includes an acknowledgement number, which is used to indicate the sequence number of the next data packet that the receiving end expects to receive. Thus, a 1 minus acknowledgement number indicates that the previous packet was successfully received. The transmitting end judges whether the data packet is lost or not according to the confirmation number in the confirmation packet. If the confirmation number is smaller than the maximum sequence number sent by the sending end, the packet loss condition is indicated. And under the condition of packet loss, the transmitting end adds the lost data packet into a queue to be retransmitted for retransmission. Therefore, by judging whether the transmitted data is in the queue to be retransmitted, the data which is judged to be lost before the data is received by the receiving end in the queue to be retransmitted can be removed in time, or the condition that the data is lost is found, a retransmission mechanism is triggered, and the reliability and the integrity of the data are improved. In addition, this determination also helps to optimize network performance and further evaluate and improve network stability.
In some embodiments, determining whether the transmission data is in the queue to be retransmitted according to the acknowledgement number includes: and removing the transmission data in the queue to be retransmitted from the queue to be retransmitted.
For example, when the fast retransmission mechanism is triggered, when the data in the to-be-retransmitted queue waits for retransmission, the receiving end receives the data which is not received before and will send the acknowledgement packet to the sending end again, at this time, the received data should be shifted out of the to-be-retransmitted queue in time, and the to-be-retransmitted queue stores the data which needs to be retransmitted, and the data may occupy a certain memory space. The data that has been successfully retransmitted or that has no longer been retransmitted is removed from the queue, and the occupied memory resources can be released for other data or operations, and the data in the queue to be retransmitted typically needs to be retransmitted periodically, which occupies network bandwidth and processing power of the transmitting end and the receiving end. By dequeuing the retransmitted data, redundant retransmission operations can be reduced, transmission efficiency can be improved, and data transmission speed can be increased, and then the data in the queue to be retransmitted generally represents problems in data transmission, such as packet loss, delay or other network problems. The problem data are removed from the queue, so that the sending end and the receiving end can be helped to better process normal data transmission, the negative influence on the network is reduced, and the network performance is optimized.
And S104, if not, analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost.
In some embodiments, the analyzing the subsequent acknowledgement packets one by one to determine whether to drop a packet includes: if the three continuous confirmation packets do not have corresponding determination numbers, determining packet loss.
For example, the transmitting end determines whether the data packet loss occurs according to the acknowledgement number in the acknowledgement packet. If the confirmation number is smaller than the maximum sequence number sent by the sending end, the packet loss condition is indicated. By determining packet loss when there is no corresponding determination number in the three consecutive acknowledgement packets, a retransmission mechanism can be triggered, which can help the sender and the receiver track and acknowledge the data loss situation in the transmission, the retransmission mechanism aims at solving the data loss problem in the network, and the correct reception of the data is ensured by retransmitting the lost data packets, thus ensuring the integrity and reliability of the data and providing feedback about the evaluation and improvement of the network quality. These effects help to improve the reliability of data transmission and network performance.
S105, calculating an available sending window according to the packet loss condition.
In some embodiments, the calculating the available sending window according to the packet loss condition includes: the corresponding transmission data of the confirmed packet loss is moved into a queue to be retransmitted; executing a congestion control algorithm to reduce a maximum transmission window, comprising: and reducing the maximum sending window according to the congestion window.
For example, in the case of confirming packet loss, the packet loss data is moved into the queue to be retransmitted in time to prevent the loss of the transmission data, the transmitting end updates the maximum transmission window according to the new congestion window size so that the maximum transmission window does not exceed the congestion window size, the transmitting end determines the continuously transmitted data amount according to the maximum transmission window size and notifies the receiving end of the transmission window size, the receiving end confirms or refuses to receive the data according to the receiving window size, if the maximum transmission window is smaller than the receiving window, the transmitting end needs to adjust the rate of the transmission data to the size not exceeding the maximum transmission window size, and the maximum transmission window is correspondingly reduced through the congestion window reduction operation of the congestion control algorithm, so that the transmitting end can be prevented from transmitting data too quickly, and network congestion is further aggravated. Finally, the adjustment of the congestion window and the maximum sending window can enable the sending rate of the sending end to be consistent with the congestion condition of the network, and more effective congestion control and network transmission are achieved. Therefore, executing the congestion control algorithm to reduce the maximum transmission window can avoid network congestion, control the data transmission rate, improve the reliability of data transmission, and enhance the flow regulation capability of the network. These effects help to maintain network stability and improve data transmission efficiency.
In other embodiments, the calculating the available transmission window according to the packet loss condition further includes: and continuing to send data by taking the flow window as a sending window of the sending end according to the confirmation packet without packet loss. And the transmitting end transmits the data in batches according to the size of the flow window until all the data are transmitted. Therefore, the flow window is used as the sending window of the sending end to continue sending data, so that the bandwidth utilization can be maximized, the stability of the data flow is maintained, the flow control mechanism is supported, and the change of the network condition is dynamically adapted. These effects help to improve the efficiency and reliability of data transmission.
According to the embodiment, whether the packet is lost or not is judged when the rapid retransmission of the TCP congestion control is triggered, so that when the waiting is caused by triggering the protocol congestion control, the protocol can possibly receive the packet marked to be lost in the network, whether the transmission data is directly confirmed on the receiving end which has received the data in the queue to be retransmitted or not is judged according to the confirmation number, the retransmission of the transmission data is prevented, the waste of bandwidth is prevented, the retransmission rate of the data is reduced, meanwhile, the retransmission is timely carried out and the transmission window is adjusted by confirming whether the packet is lost or not, the bandwidth utilization is optimized, the congestion control is realized, and the efficiency and the performance of the data transmission are improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the present disclosure through examples of apparatus.
Fig. 2 shows a block diagram of a TCP-based congestion control apparatus according to an embodiment of the present disclosure, the apparatus comprising:
a receiving module 201, configured to receive an acknowledgement packet sent by a receiving end;
an obtaining module 202, configured to obtain an acknowledgement number of an accumulated acknowledgement packet sent by the receiving end in an accumulated acknowledgement manner;
a judging module 203, configured to judge whether the transmission data is in the queue to be retransmitted according to the acknowledgement number;
an analysis module 204, configured to analyze subsequent acknowledgement packets one by one to determine whether to drop a packet when it is determined that the transmission data is not in the queue to be retransmitted;
the calculating module 205 is configured to calculate an available transmission window according to the packet loss situation.
According to the embodiment, whether the packet is lost or not is judged when the rapid retransmission of the TCP congestion control is triggered, so that when the waiting is caused by triggering the protocol congestion control, the protocol can possibly receive the packet marked to be lost in the network, the judging module judges whether the transmission data is directly confirmed on the data received by the receiving end in the queue to be retransmitted or not according to the confirmation number, so that the retransmission of the transmission data is prevented, the waste of bandwidth is prevented, the retransmission rate of the data is reduced, meanwhile, the retransmission is carried out in time and the transmission window is adjusted by confirming whether the packet is lost or not, the bandwidth utilization is optimized, the congestion control is realized, and the efficiency and the performance of the data transmission are improved.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 3 shows a schematic block diagram of an electronic device that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
The electronic device includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a ROM302 or a computer program loaded from a storage unit 308 into a RAM 303. In the RAM303, various programs and data required for the operation of the electronic device can also be stored. The computing unit 301, the ROM302, and the RAM303 are connected to each other by a bus 304. An I/O interface 505 is also connected to bus 304.
A number of components in the electronic device are connected to the I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, etc.; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, an optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the respective methods and processes described above, such as a congestion control method based on TCP. For example, in some embodiments, the TCP-based congestion control method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device via the ROM302 and/or the communication unit 309. When the computer program is loaded into RAM303 and executed by computing unit 301, one or more steps of the TCP-based congestion control method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the TCP-based congestion control method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems-on-chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a readable storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. The readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: display means for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that the various forms of flow described above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A congestion control method based on TCP, applied to a sender, comprising:
receiving an acknowledgement packet sent by a receiving end;
acquiring an acknowledgement number of an accumulated acknowledgement packet sent by an accumulated acknowledgement by a receiving end;
judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number;
if not, analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost;
and calculating an available sending window according to the packet loss condition.
2. The method of claim 1, determining whether the transmission data is in a queue to be retransmitted according to the acknowledgement number, comprising:
and removing the transmission data in the queue to be retransmitted from the queue to be retransmitted.
3. The method of claim 1, wherein analyzing the subsequent acknowledgement packets one by one to determine whether a packet is lost comprises:
if no corresponding acknowledgement number exists in the three continuous acknowledgement packets, packet loss is determined.
4. A method according to claim 3, wherein said calculating an available transmission window according to a packet loss condition comprises:
the corresponding transmission data of the confirmed packet loss is moved into a queue to be retransmitted;
a congestion control algorithm is executed to reduce the maximum transmission window.
5. The method of claim 1, wherein the obtaining the acknowledgement number of the cumulative acknowledgement packet sent by the receiver for cumulative acknowledgement further comprises:
and determining the received data quantity of the receiving end according to the maximum acknowledgement number in the accumulated acknowledgement packet, and adjusting a congestion window and a flow window according to the received data quantity.
6. The method of claim 4, wherein the executing a congestion control algorithm to reduce a maximum transmission window comprises:
and reducing the maximum sending window according to the congestion window.
7. The method of claim 1, wherein the calculating the available transmission window according to the packet loss condition further comprises:
and continuing to send data by taking the flow window as a sending window of the sending end according to the confirmation packet without packet loss.
8. A TCP-based congestion control apparatus, comprising:
the receiving module is used for receiving the acknowledgement packet sent by the receiving end;
the acquisition module is used for acquiring the confirmation number of the accumulated confirmation packet sent by the receiving end in accumulated confirmation;
the judging module is used for judging whether the transmission data is in a queue to be retransmitted or not according to the confirmation number;
the analysis module is used for analyzing the subsequent acknowledgement packets one by one to determine whether the packet is lost when judging that the transmission data is not in the queue to be retransmitted;
and the calculation module is used for calculating the available sending window according to the packet loss condition.
9. An electronic device, comprising:
at least one processor;
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202310974521.6A 2023-08-03 2023-08-03 Congestion control method and device based on TCP, electronic equipment and storage medium Pending CN116886616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310974521.6A CN116886616A (en) 2023-08-03 2023-08-03 Congestion control method and device based on TCP, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310974521.6A CN116886616A (en) 2023-08-03 2023-08-03 Congestion control method and device based on TCP, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116886616A true CN116886616A (en) 2023-10-13

Family

ID=88260467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310974521.6A Pending CN116886616A (en) 2023-08-03 2023-08-03 Congestion control method and device based on TCP, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116886616A (en)

Similar Documents

Publication Publication Date Title
US11418446B2 (en) Technologies for congestion control for IP-routable RDMA over converged ethernet
KR101143172B1 (en) Efficient transfer of messages using reliable messaging protocols for web services
CN106789718B (en) Data transmission congestion control method, equipment, server and programmable equipment
CN105376173B (en) Sending window flow control method and terminal
US20050213507A1 (en) Dynamically provisioning computer system resources
CN102468941A (en) Network packet loss processing method and device
EP2719132A1 (en) System and method for reliable virtual bi-directional data stream communications with single socket point-to-multipoint capability
US9485186B2 (en) Network congestion control with awareness of random packet losses
JPWO2008023656A1 (en) Communication device
US20220329354A1 (en) Data transmission method and apparatus, and electronic device
WO2017097201A1 (en) Data transmission method, transmission device and receiving device
CN104683259A (en) TCP congestion control method and device
CN102694631B (en) Method and device for controlling data transmission
CN113992588A (en) Data transmission method and device, electronic equipment and readable storage medium
WO2020211341A1 (en) Congestion control method and apparatus, computer device and storage medium
CN108432287A (en) A kind of data transmission method and network side equipment
JP2020507963A (en) Data transmission method and apparatus, and customer premises equipment
US11444882B2 (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
WO2015085849A1 (en) Method for network device congestion avoidance and network device
CN109586931B (en) Multicast method and terminal equipment
CN111314961A (en) TCP transmission method, device and system
CN117014379A (en) Code rate control method, device, electronic equipment and storage medium
CN114401208B (en) Data transmission method and device, electronic equipment and storage medium
CN116886616A (en) Congestion control method and device based on TCP, electronic equipment and storage medium
CN113259490B (en) Multi-level node network data transmission method based on UDP transmission protocol

Legal Events

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