Network congestion control method and device, equipment, storage medium and program product

By directly adjusting the transmission rate using the first network card in the first device, the delay problem caused by multiple interactions between the central processor and the congestion control software in the prior art is solved, and the efficiency of network congestion control is improved.

CN119544618APending Publication Date: 2025-02-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311099531.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, in network congestion control, the delay increases due to the multiple data interactions between the central processor and the congestion control software, which reduces the efficiency of congestion control.

Method used

By installing a first network card in the first device, the first network card acquires the data packet to be sent and sends the data packet at a configured transmission rate within the first transmission cycle, and directly adjusts the transmission rate according to the received feedback to realize the packet transmission rate within the second transmission cycle.

Benefits of technology

Reduces the central processor's need to handle congestion situations, reduces the data overhead of the device, and improves the efficiency of network congestion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544618A_ABST
    Figure CN119544618A_ABST
Patent Text Reader

Abstract

The invention discloses a network congestion control method and device, equipment, a storage medium and a program product, and relates to the technical field of computers. The method is applied to a first network card installed in first equipment, and comprises the following steps: acquiring a data packet to be sent to second equipment; in the first sending period, sending the data packet to the second network card according to a first transmission rate configured by the first network card; receiving a data packet receiving condition fed back by the second network card based on the data packet transmitted in the first sending period; and adjusting the first transmission rate based on the data packet receiving condition to obtain a second transmission rate. The network card is directly used for monitoring the data transmission condition between the devices, so that the transmission rate of the first device is adjusted in time according to the data transmission condition, and the network congestion control efficiency is improved. The method can be applied to the cloud technology fields of data transmission, data storage, data processing and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a network congestion control method, apparatus, device, storage medium and program product. Background Art

[0002] During data transmission after the first device and the second device establish a communication connection, taking the sending of a data packet from the first device to the second device as an example, when the first device sends a data packet to the second device, if no confirmation packet is received from the second device within a specified time range or the returned confirmation packet includes a congestion indicator, it indicates that congestion has occurred in the channel resources occupied by the data transmission between the first device and the second device.

[0003] In the related art, congestion control software is usually installed in the first device to monitor the reception status of the data packets fed back by the second device, and the transmission rate of the data packets sent by the first device is controlled according to the monitoring results to avoid congestion.

[0004] However, in the related art, when using congestion control software for congestion control, the congestion control software needs to perform multiple data interactions with the central processor in the first device to determine the transmission rate that the first device needs to adjust. A certain delay will be generated in the process of data interaction with the central processor, making it impossible for the first device to adjust the transmission rate in time, thereby reducing the congestion control efficiency. Summary of the invention

[0005] The embodiments of the present application provide a network congestion control method, apparatus, device, storage medium and program product, which can improve the congestion control efficiency of the device. The technical solution is as follows.

[0006] In one aspect, a network congestion control method is provided, the method being applied to a first network card installed in a first device, the method comprising:

[0007] Acquire a data packet to be sent to a second device, where the data packet is a data packet sent to a second network card installed in the second device according to a sending cycle;

[0008] In a first sending cycle, sending the data packet to the second network card according to a first transmission rate configured by the first network card, where the first transmission rate is used to indicate a first number of the data packets sent in the first sending cycle;

[0009] receiving a data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle;

[0010] The first transmission rate is adjusted based on the data packet reception situation to obtain a second transmission rate, where the second transmission rate is the rate at which the first network card sends data packets to the second network card in a second sending cycle, and the second transmission rate is used to indicate a second number of the data packets sent in the second sending cycle.

[0011] On the other hand, a network congestion control device is also provided, the device comprising:

[0012] an acquisition module, configured to acquire a data packet to be sent to a second device, wherein the data packet is a data packet sent to a second network card installed in the second device according to a sending cycle;

[0013] a sending module, configured to send the data packet to the second network card in a first sending cycle according to a first transmission rate configured by the first network card, wherein the first network card is a network card installed in a first device, and the first transmission rate is used to indicate a first number of the data packets sent in the first sending cycle;

[0014] A receiving module, configured to receive a data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle;

[0015] An adjustment module is used to adjust the first transmission rate based on the data packet reception situation to obtain a second transmission rate, where the second transmission rate is the rate at which the first network card sends data packets to the second network card in a second sending cycle, and the second transmission rate is used to indicate a second number of the data packets sent in the second sending cycle.

[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the network congestion control method as described in any of the above-mentioned embodiments of the present application.

[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a network congestion control method as described in any of the above-mentioned embodiments of the present application.

[0018] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the network congestion control method described in any of the above embodiments.

[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0020] By installing a first network card in a first device, using the first network card to obtain a data packet to be sent to a second device and sending a data packet to the second device at a first transmission rate within a first sending cycle, and directly adjusting the first transmission rate through the first network card according to the data packet reception status received and fed back by the second network card, a second transmission rate corresponding to sending a data packet within a second sending cycle is obtained. That is, the network card is directly used to monitor the data transmission status between devices, so that the transmission rate of the first device is adjusted in time according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the data packet transmitted by the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0023] Figure 2 is a flow chart of a network congestion control method provided by an exemplary embodiment of the present application;

[0024] Figure 3 is a flow chart of a network congestion control method provided by another exemplary embodiment of the present application;

[0025] Figure 4 This is a schematic diagram of a method for adjusting the number of data packets sent in a large window mode provided by an exemplary embodiment of the present application;

[0026] Figure 5 It is a schematic diagram of a transmission rate adjustment method in a packet loss scenario provided by an exemplary embodiment of the present application;

[0027] Figure 6 is a schematic diagram of a rate adjustment method in a small window transmission mode provided by another exemplary embodiment of the present application;

[0028] Figure 7 is a schematic diagram of hardware congestion control provided by an exemplary embodiment of the present application;

[0029] Figure 8 is a flow chart of a network congestion control method provided by an exemplary embodiment of the present application;

[0030] Fig. 9 is a network transmission schematic diagram provided by an exemplary embodiment of the present application;

[0031] Fig.10 is a schematic diagram of a network congestion control method provided by an exemplary embodiment of the present application;

[0032] Fig.11 This is a schematic diagram for comparing the effects of a solution provided by an exemplary embodiment of the present application;

[0033] Fig.12 is a structural block diagram of a network congestion control device provided by an exemplary embodiment of the present application;

[0034] Fig.13 is a structural block diagram of a network congestion control device provided by another exemplary embodiment of the present application;

[0035] Fig.14 It is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objectives, technical solutions and advantages 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.

[0037] First, the implementation environment of this application is introduced. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the implementation environment includes a first device 110 and a second device 120 , and the first device 110 and the second device 120 are connected via a communication network 130 .

[0038] First, a first network card 111 is installed in the first device 110, and a second network card 121 is installed in the second device 120. Below, a scenario in which the first device 110 sends a data packet to the second network card 121 in the second device 120 through the first network card 111 is taken as an example for description.

[0039] The first device 110 obtains a data packet to be sent to the second device 120 , and sends the data packet to the second network card 121 in the second device 120 according to the first transmission rate configured by the first network card 111 in a first sending cycle.

[0040] After receiving the data packet sent by the first network card 111 , the second network card 121 in the second device 120 feeds back a confirmation packet to the first device 110 as the data packet reception status.

[0041] When the first network card 111 receives the data packet reception status, the first transmission rate corresponding to the first device 110 is adjusted according to the data packet reception status to obtain a second transmission rate, wherein the second transmission rate is used to indicate the number of data packets sent by the first device in the second sending cycle.

[0042] Among them, the first device 110 and the second device 120 may be optional. When implemented as a terminal device, they may be a desktop computer, a laptop, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart TV, a smart car, and other devices, which are not limited to the embodiments of the present application.

[0043] When the first device 110 and the second device 120 are implemented as server-type devices, they can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0044] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0045] In some embodiments, the first device 110 and the second device 120 described above may also be implemented as nodes in a blockchain system.

[0046] It is worth noting that the above-mentioned communication network can be implemented as a wired network or a wireless network, and the communication network can be implemented as any one of a local area network, a metropolitan area network or a wide area network, which is not limited in the embodiments of the present application.

[0047] It should be noted that before collecting relevant data of users and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant regions.

[0048] In combination with the above-mentioned noun introduction and implementation environment, the network congestion control method provided in the embodiment of the present application is described, and the method is performed by a first device as an example. The first device is installed with a first network card. For example, please refer to Figure 2 , which shows a flow chart of a network congestion control method provided by an exemplary embodiment of the present application, the method includes the following steps.

[0049] Step 210: Acquire a data packet to be sent to the second device.

[0050] The data packet is a data packet sent to the second network card installed in the second device according to a sending cycle.

[0051] Illustratively, a first network card is installed in the first device, and a second network card is installed in the second device.

[0052] The network card is a computer hardware designed to enable devices to communicate with each other on the network. That is, the process of data transmission between the first device and the second device is the process of data transmission between the first network card and the second network card.

[0053] Optionally, the first device and the second device may be implemented as at least one device type of a physical device or a cloud device.

[0054] Illustratively, a data packet refers to a data unit transmitted between devices. Therefore, in the embodiments of the present application, a data packet may also be referred to as a data message or a data block.

[0055] In some embodiments, the data packet includes data content sent by the first device to the second device, for example: a data acquisition request (for reading data cached in the second device), a data processing request (for requesting the second device to process the data and then feedback the data processing result), a data write request (writing the data in the first device to the second device), a log viewing request (requesting to view historical data stored in the log of the second device), and at least one of the other content types.

[0056] Optionally, when there are multiple data packets to be sent to the second device, the data sizes corresponding to the multiple data packets are the same or different; and the data content types corresponding to the multiple data packets are the same or different, without limitation.

[0057] Illustratively, the first network card divides the data packets into data windows and then sends the data packets to the second network card. That is, the data windows are used to indicate the number of data packets sent by the first network card to the second network card.

[0058] Optionally, each data window includes one data packet, that is, the corresponding number of data packets sent by the first network card to the second network card corresponds to the number of data windows; or, each data window includes multiple data packets, that is, the corresponding number of data packets sent by the first network card to the second network card is greater than the number of data windows.

[0059] Optionally, the data window may be configured with different data sizes, for example: 1K bytes, 2K bytes, 4K bytes or 8K bytes.

[0060] In this embodiment, a data window represents a maximum transmission unit (Maximum Transmission Unit, MTU), which is used to indicate the maximum size of a data service unit that can be received by the first device, indicating the effective load size that can be received by the first device.

[0061] Optionally, the method for acquiring the data packet to be sent to the second device includes at least one of the following methods:

[0062] 1. A designated application is installed in the first device. When the designated application has a data transmission demand, the designated application sends a data packet for data transmission to the first network card. That is, the first network card obtains the data packet from the designated application installed in the first device.

[0063] 2. A designated application is installed in the first device, a first account is logged in the designated application, and a designated application is also installed in the second device and a second account is logged in. When the first account and the second account interact with each other in the designated application, interaction data is generated according to the interaction operation received by the first device, and the interaction data is divided into data packets and sent to the second device;

[0064] 3. The first network card obtains target data content from the data cached in the first device, splits the target data content, and obtains at least one data packet as a data packet to be sent to the second device.

[0065] It is worth noting that the above-mentioned method for obtaining the data packet to be sent to the second device is only an illustrative example, and the embodiments of the present application are not limited to this.

[0066] Step 220: Send a data packet to the second network card according to a first transmission rate configured by the first network card during a first sending cycle.

[0067] The first transmission rate is used to indicate a first number of data packets sent in a first sending cycle.

[0068] Illustratively, data is transmitted between the first device and the second device via a network interconnection device, that is, the first device sends a data packet to the network interconnection device via a first network card, and the data packet is forwarded to the second device via the network interconnection device.

[0069] Optionally, the network interconnection device includes at least one of switches, routers, firewalls, bridges, hubs, gateways, VPN servers, network interface cards, wireless access points, modems, 5G base stations, optical terminals, fiber optic transceivers, optical cables and other equipment types.

[0070] Optionally, data is transmitted between the first device and the second device via a single network interconnection device; or, a plurality of network interconnection devices are included between the first device and the second device, and the first device selects one network interconnection device from among them for data transmission.

[0071] Illustratively, the first sending cycle is used to represent a time period corresponding to when the first network card sends a data packet to the second network card and the second network card feeds back a data packet reception status.

[0072] In this embodiment, taking the round-trip time (RTT) as the minimum period unit as an example, the first sending period includes at least one RTT. Wherein, when the first sending period includes multiple RTTs, the first device usually sends a data packet to the second device within the first RTT, or the first device sends a data packet to the second device within a random RTT among the multiple RTTs.

[0073] Illustratively, the first transmission rate refers to the number of data packets sent by the first network card to the second network card. The more data packets the first network card sends to the second network card in the first sending cycle, the faster the first transmission rate is.

[0074] Illustratively, the first transmission rate is determined by the period length of the first sending period and the first number, for example: first transmission rate=first number / first sending period.

[0075] Optionally, the first network card sends the multiple data packets to the second network card simultaneously in the first sending cycle; or, the first network card sends the multiple data packets to the second network card sequentially in a specified order in the first sending cycle.

[0076] Optionally, the method for determining the first transmission rate includes at least one of the following methods:

[0077] 1. Pre-configure different transmission rates for different communication network types, so as to determine the first transmission rate according to the target network type corresponding to the first device;

[0078] 2. Determine a first transmission rate based on a transmission rate corresponding to a data packet sent by the first device within a historical time range;

[0079] 3. Randomly generate a rate value as the first transmission rate.

[0080] It is worth noting that the above-mentioned method for determining the first transmission rate is only an illustrative example and is not limited to this in the embodiments of the present application.

[0081] Step 230: receiving the data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle.

[0082] Illustratively, the data packet reception status refers to the reception indication information sent by the second network card to the first network card after the second network card receives the data packet sent by the first network card.

[0083] Optionally, the receiving information includes two types of information: receiving success information and receiving failure information. The receiving success information means that the second network card successfully receives the data packet sent by the first network card; the receiving failure information means that the second network card does not receive the data packet, or the data packet is damaged so that the second network card cannot read the data packet after receiving it.

[0084] In this embodiment, the successful reception information may also be referred to as an acknowledgment packet or an acknowledgment message (ACK).

[0085] In some embodiments, the second network card promptly feeds back the status of receiving the data packet within the first sending cycle; or, the second network card feeds back the status of receiving the data packet after the first sending cycle ends.

[0086] Optionally, when the first network card sends multiple data packets to the second network card, the data packet reception status includes a single reception indication information, and the reception indication information includes the data reception status (received / not received) corresponding to the multiple data packets. For example: the data packet reception status is a string result, wherein 1 indicates received and 0 indicates not received, the number of characters in the string result corresponds to the first number sent, and the arrangement position of each character in the string result corresponds to the sending order corresponding to the multiple data packets. When the string result is 1101, it indicates that the first network card has sent 4 data packets to the second network card, wherein, except for the third data packet which was not received by the second network card, the other three data packets have been received by the second network card.

[0087] Optionally, when the first network card sends multiple data packets to the second network card, the data packet reception status includes reception indication information corresponding to the multiple data packets, for example: the first network card sends 3 data packets, namely "0", "1", and "2". When the data packet reception status includes three characters "0", "1", and "2", it indicates that all three data packets are received; when the data packet reception status includes two characters "1" and "2", it indicates that data packet "0" is lost during transmission; when the data packet reception status includes characters "0_ECN", "1", and "2_ECN", it indicates that the second network card has generated network congestion in the current situation, but no packet loss has occurred yet.

[0088] Optionally, when the second network card fails to receive the data packet sent by the first network card, it may feed back reception failure information to the first network card, or it may not feed back reception failure information to the first network card, which is not limited.

[0089] Schematically, network congestion means that the number of data packets sent by the first network card to the second network card exceeds the resource capacity and processing power of the network interconnection device, that is, "demand" is greater than "supply". Among them, network congestion includes performances such as data packet loss, feedback delay, and system performance degradation. Among them, data packet loss means that the data packet is lost during transmission and the second device cannot receive the data packet; feedback delay means that the second device receives the data packet sent by the first device, but because the processing power has reached saturation, the data packet is temporarily cached, and the cached data packet is marked with a congestion mark. The larger the cache amount, the higher the probability of being marked with a congestion mark.

[0090] Step 240: Adjust the first transmission rate based on the data packet reception status to obtain a second transmission rate.

[0091] The second transmission rate is a rate at which the first network card sends data packets to the second network card in the second sending cycle, and the second transmission rate is used to indicate a second number of data packets sent in the second sending cycle.

[0092] Illustratively, adjusting the first transmission rate includes at least one of increasing speed adjustment or decreasing speed adjustment.

[0093] Optionally, the adjustment method includes adjusting at least one of the first quantity and the first sending cycle, wherein the quantity adjustment includes increasing the first quantity by a specified quantity (corresponding to the growth rate adjustment) and reducing the first quantity by a specified quantity (corresponding to the deceleration adjustment); the cycle adjustment includes extending the first sending cycle (corresponding to the deceleration adjustment) and shortening the first sending cycle (corresponding to the growth rate adjustment).

[0094] Optionally, the second sending cycle is a cycle connected to the first sending cycle; or, the second sending cycle is a sending cycle that starts at a specified time set by the user; or, the second sending cycle is a sending cycle that starts after a specified time interval after the end of the first sending cycle.

[0095] Optionally, the first sending cycle is the same as the second sending cycle: for example, the first sending cycle includes 1 RTT, and the second sending cycle also includes 1 RTT; or, the first sending cycle is different from the second sending cycle, for example, the first sending cycle includes 1 RTT, and the second sending cycle includes 2 RTTs. In this case, the second sending cycle is greater than the first sending cycle. Therefore, when the first number remains unchanged, the second transmission rate corresponding to the second sending cycle is less than the first transmission rate corresponding to the first sending cycle.

[0096] Optionally, the first quantity is the same as the second quantity; or, the first quantity is different from the second quantity.

[0097] Illustratively, a rate adjustment module is installed in the first network card, and the first network card directly rewrites data in the rate adjustment module according to the data packet reception situation, thereby obtaining the second transmission rate.

[0098] In summary, the network congestion control method provided by the embodiment of the present application is to install a first network card in a first device, use the first network card to obtain a data packet sent to a second device, and send a data packet to the second device at a first transmission rate in a first sending cycle, and directly adjust the first transmission rate according to the data packet reception status received and fed back by the second network card through the first network card, so as to obtain a second transmission rate corresponding to the data packet sent in the second sending cycle. That is, the network card is directly used to monitor the data transmission status between devices, so as to timely adjust the transmission rate of the first device according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the transmission data packet of the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control.

[0099] In some embodiments, the first transmission rate is adjusted in different forms according to different data packet reception conditions. For example, please refer to Figure 3 , which shows a flow chart of a network congestion control method provided by an exemplary embodiment of the present application, that is, step 240 includes steps 241 to 2411, or steps 242 to 2422, or steps 243 to 2433, or steps 2401 to 2402, or steps 2403 to 2404, such as Figure 3 As shown, the method includes the following steps.

[0100] Schematically, the adjustment method of the first transmission rate is described in detail in two cases: the first sending period and the second sending period are the same or different.

[0101] The first one is that the first sending cycle is the same as the second sending cycle.

[0102] In this embodiment, the first sending cycle and the second sending cycle both include 1 RTT as an example for explanation. In the first sending cycle, multiple data packets are sent to the second network card in at least one data window, so the transmission mode at this time is the large window transmission mode.

[0103] Step 241: In response to the data packet reception including a first number of confirmation packets, a first adjustment number is added to the first number to obtain a second number.

[0104] The confirmation packet is used to indicate that the second device has received the data packet.

[0105] Illustratively, after receiving the data packet sent by the first network card, the second network card feeds back reception success information corresponding to the data packet to the first network card, indicating that the second network card has successfully received the data packet, wherein the reception success information is a confirmation packet corresponding to the data packet.

[0106] In this embodiment, a data packet corresponding to the first data window is taken as an example for description.

[0107] After the first network card sends a first number of data packets to the second network card within the first sending cycle, a first number of confirmation packets are received from the second network card within the first sending cycle, and each data packet has a corresponding confirmation packet, indicating that the current network transmission condition between the first device and the second device is good, network resources are sufficient, and there is no network congestion. Therefore, the first adjustment number is increased on the basis of the first number to obtain a second number corresponding to the data packets sent in the second sending cycle as the second transmission rate.

[0108] The first adjustment quantity is a quantity value set in advance by a user, and is used to indicate the value of the increased data packet transmission quantity in each sending cycle.

[0109] For illustration, please refer to Figure 4 , which shows a schematic diagram of a method for adjusting the number of data packets sent in a large window mode provided by an exemplary embodiment of the present application, including a variety of different data packet reception situations, and takes the first sending cycle as an RTT as an example for explanation, as shown in the data packet reception situation 410 (from right to left, the round-trip delay on the far right is recorded as the first RTT), the current first sending cycle is one RTT, and the first network card sends a data packet (not shown) to the second network card within the first RTT and then receives a confirmation packet 401 fed back by the second network card, so a data packet is added on the basis of one data packet, so that the first network card sends two data packets (not shown) to the second network card within the second RTT (second sending cycle), if two confirmation packets 402 fed back by the second network card are received within the second sending cycle, then a data packet is added on the basis of the two data packets, and so on, if the confirmation packet corresponding to the number of sent data packets can be received in time within the sending cycle, then the first adjustment number (that is, one data packet) is continuously increased based on the current number of data packets.

[0110] Among them, one data packet as the first adjustment quantity is the quantity set in advance by the user, and can also be set to other quantities, for example: 0.5 data packets, 2 data packets, 10 data packets, etc. without limitation.

[0111] In a feasible case, if the first adjustment quantity is implemented as a non-integer quantity, the second sending cycle is also adjusted. For example, the first adjustment quantity is 0.5 data packets, 2 data packets are sent within the first RTT and 2 confirmation packets are fed back. 2.5 data packets should be sent within the second RTT, but because data packets cannot be transmitted in non-integer quantities, the second sending cycle is extended from one RTT to two RTTs, that is, no data packets are sent within the second RTT until 3 data packets (2.5 data packets + 0.5 data packets) are sent within the third RTT.

[0112] Step 2411, determine a second transmission rate based on the second quantity and the second sending period.

[0113] The second transmission rate is greater than the first transmission rate.

[0114] In this embodiment, after adjusting the first quantity to obtain the second quantity in the above manner, the second transmission rate can be determined according to the second quantity and the second sending cycle (that is, the first sending cycle). For example: the first transmission rate is to send one data packet within the first RTT, and the second transmission rate is to send two data packets within the second RTT.

[0115] Since the second number is greater than the first number, the first sending period is the same as the second sending period, and therefore the second transmission rate is greater than the first transmission rate.

[0116] Step 242: Adjust the first quantity based on the confirmation packets not marked with the congestion indicator and the confirmation packets marked with the congestion indicator in the data packet reception situation to obtain the second quantity.

[0117] Schematically, the confirmation packet is marked with a congestion indicator, and the congestion indicator is used to indicate that the second network card is in a congested state when receiving the data packet.

[0118] In some embodiments, the data packet reception status received by the first network card includes a confirmation packet marked with a congestion indicator, which is used to indicate that the second device has received the data packet sent by the first device.

[0119] The congestion indicator is an indicator marked by the second network card in the confirmation packet fed back.

[0120] Optionally, the marking of the congestion indicator includes at least one of the following methods:

[0121] Illustratively, the second network card performs congestion marking on a confirmation packet corresponding to the data packet sent by the first network card according to the transmission status of the transmission path corresponding to the data packet sent by the first network card, so that the confirmation packet fed back to the first network card is marked with a congestion indicator.

[0122] Optionally, the transmission situation includes at least one of the following situations:

[0123] 1. During the process of sending a data packet from the first network card to the second network card via the network interconnection device, the data processing capacity of the network interconnection device reaches the capacity threshold. At this time, there is network congestion at the output port of the network interconnection device, that is, the output port of the network interconnection device is a congested node;

[0124] 2. During the process of sending the data packet from the first network card to the second network card via the network interconnection device, the number of data packets cached in the network interconnection device reaches the storage threshold. At this time, there is network congestion at the input port of the network interconnection device, that is, the input port of the network interconnection device is a congested node;

[0125] 3. When the second network card receives a data packet, the number of data packets cached in the second network card reaches a storage threshold. At this time, the input port of the second network card is congested, that is, the input port of the second network card is a congested node;

[0126] 4. When the second network card receives the data packet, the data processing capacity of the second network card reaches the capacity threshold. At this time, the output port of the second network card is congested, that is, the output port of the second network card is a congested node.

[0127] It is worth noting that the above transmission conditions are merely illustrative examples and are not limited to the embodiments of the present application.

[0128] In some embodiments, a second adjustment quantity is set for confirmation packets marked with a congestion indicator, and a third adjustment quantity is set for confirmation packets not marked with a congestion indicator; the first quantity is decremented based on the number of confirmation packets marked with a congestion indicator and the second adjustment quantity to obtain a first adjustment quantity; the first adjustment quantity is incrementally adjusted based on the number of confirmation packets not marked with a congestion indicator and the third adjustment quantity to obtain a second quantity as a second adjustment rate.

[0129] For illustration, please refer to Figure 4In the data packet reception situation 420, three data packets are sent in the first RTT (round trip delay 1) and three confirmation packets 421 without congestion marks are received. Therefore, one data packet is added in the second RTT (round trip delay 2), and it is updated to send four data packets to the second network card. At this time, three confirmation packets 422 (white boxes) without congestion marks and one confirmation packet 423 (gray box) with congestion marks are fed back in the second RTT, indicating that there is a congested node when the second network card receives the confirmation packet 423. Among them, the second adjustment quantity is preset to increase 0.25 data packets, and the third adjustment quantity is preset to reduce 0.25 data packets. Therefore, the 4 data packets are first reduced by 0.25 data packets to obtain the first adjustment quantity of 3.75 data packets, and then the 3.75 data packets are increased by 0.25*3 data packets to obtain 4.5 data packets, that is, the second quantity is 4.5 data packets.

[0130] Among them, since the data packets need to be transmitted as integers, 4 data packets are still transmitted in the third RTT (round-trip delay 3), and 4 confirmation packets 424 are fed back, one of which is marked with a congestion mark, so that according to the above method, the number of data packets in the fourth RTT is confirmed to be 4.5-0.25+3*0.25=5. Therefore, 5 data packets are transmitted in the fourth RTT. At this time, five confirmation packets 425 are fed back in the fourth RTT, including 3 marked with congestion marks and 2 not marked with congestion marks. Therefore, the number of data packets in the fifth RTT is 5-0.25*3+0.25*2=4.75 data packets, so four data packets are transmitted in the fifth RTT (not shown).

[0131] For illustration, please refer to Figure 4 In the data packet reception situation 430, four data packets are sent to the second network card within the first RTT (round trip delay 1), and four confirmation packets 431 fed back by the second network card are received, wherein the four confirmation packets 431 are all marked with congestion identifiers, indicating that the network congestion in the transmission path is serious at this time. The third adjustment quantity is preset to reduce 1 quantity packet. Therefore, the number of data packets sent within the second RTT (round trip delay 2) is 4-0.5*4=2. Within the second RTT, 2 confirmation packets 432 fed back by the second network card are received, wherein the two confirmation packets 432 are both marked with congestion identifiers, and the number of data packets sent within the third RTT (round trip delay 3) is 2-0.5*2=1. If 1 data packet 433 is received as feedback from the second network card and is not marked with a congestion identifier, it indicates that the network condition between the first device and the second device is good at this time, and the second quantity can be increased later.

[0132] Step 2422, determine a second transmission rate based on the second quantity and the second sending period.

[0133] In this embodiment, after adjusting the first number to obtain the second number in the above manner, the second transmission rate can be determined according to the second number and the second sending cycle (that is, the first sending cycle). For example: the first transmission rate is to send four data packets within the first RTT, and the second transmission rate is to send two data packets within the second RTT.

[0134] Since the second number is smaller than the first number, the first sending period is the same as the second sending period, and therefore the second transmission rate is smaller than the first transmission rate.

[0135] Step 243: In response to the confirmation that the number of packets is less than the first number in the data packet reception situation, reduce the first number by a fourth adjustment number to obtain a second number.

[0136] The second transmission rate is lower than the first transmission rate.

[0137] Illustratively, when the number of confirmation packets received by the first network card is less than the first number, it indicates that packet loss occurs when the first network card sends data packets to the second network card, resulting in the number of data packets received by the second network card being less than the first number.

[0138] At this time, the fourth adjustment quantity is preset, and the first quantity is adjusted according to the number of lost data packets and the fourth adjustment quantity, so as to obtain the second quantity.

[0139] For illustration, please refer to Figure 5 , which shows a schematic diagram of a transmission rate adjustment method in a packet loss scenario provided by an exemplary embodiment of the present application, such as Figure 5 As shown, a packet loss scenario transmission schematic diagram 500 is currently displayed. Within the first RTT (round trip delay 1), four data packets 510 (including M0, M1, M2, and M3) are sent to the second network card, and three confirmation packets 520 (including A0, A1, and A2) are obtained based on the feedback from the second network card. At this time, the number of confirmation packets fed back is less than the number of data packets sent, indicating that a data packet is lost in the process of sending from the first network card to the second network card, resulting in the second network card not receiving the data packet. Since the fourth adjustment number is preset to reduce 1 data packet, in the second RTT ( The number of data packets sent within the round-trip delay 2) is set to 4-1=3, so that three data packets 530 are sent to the second network card within the second sending cycle, and two data packets 540 are obtained based on the feedback from the second network card. At this time, the number of data packets fed back by the second network card still does not match the number of data packets sent by the first network card. At this time, there is still packet loss in the data packet transmission process between the first network card and the second network card. Therefore, according to the preset fifth adjustment number, the three data packets are reduced by one data packet to obtain two data packets, thereby determining to send two data packets 550 within the third RTT.

[0140] Step 2433, determine a second transmission rate based on the second quantity and the second sending period.

[0141] In this embodiment, after adjusting the first number to obtain the second number in the above manner, the second transmission rate can be determined according to the second number and the second sending cycle (that is, the first sending cycle). For example: the first transmission rate is to send four data packets within the first RTT, and the second transmission rate is to send two data packets within the second RTT.

[0142] Since the second number is smaller than the first number, the first sending period is the same as the second sending period, and therefore the second transmission rate is smaller than the first transmission rate.

[0143] That is, the second number is a dynamic adjustment process, and during the adjustment process, at least one of the first adjustment number, the second adjustment number and the third adjustment number can be used for adjustment according to the data packet reception situation.

[0144] The second type is that the first sending cycle is different from the second sending cycle.

[0145] Step 2401: In response to a confirmation packet marked with a congestion indicator in the data packet reception situation, the first sending cycle is extended to obtain a second sending cycle.

[0146] Illustratively, an example is taken in which only one data packet is sent to the second network card in the first sending cycle, that is, the current mode is a small window transmission mode.

[0147] In an illustrative manner, when a confirmation packet fed back after a data packet is sent in a first sending cycle is marked with a congestion indicator, the first sending cycle is extended to obtain a second sending cycle.

[0148] Because in the current small window transmission mode, the first network card only sends a single data packet to the second network card in a single sending cycle, and based on the condition that the data packet needs to be transmitted as a whole (that is, the sending quantity is a positive integer), a fifth adjustment quantity is pre-set (generally a decimal, but can also be an integer, without limitation). If the first network card sends a data packet to the second network card in the first sending cycle and then receives a confirmation packet in feedback, and the confirmation packet includes a congestion identifier, the quantity packet is adjusted by the fifth adjustment data while the first sending cycle remains unchanged to obtain a second quantity. Since the second quantity may be 0 or a decimal, the first sending cycle is extended until at least one data packet can be sent while the whole packet can be transmitted, thereby determining the start time of the second sending cycle based on the extended first sending cycle, and using the cycle duration of the extended first sending cycle as the cycle duration of the second sending cycle.

[0149] For illustration, please refer to Figure 6, which shows a schematic diagram of a rate adjustment method in a small window transmission mode provided by an exemplary embodiment of the present application, such as Figure 6 As shown, there are currently multiple data packet receiving situations. For data packet receiving situation 610, the data packet sending rate is to send one data packet within one RTT. Therefore, one data packet is sent within the first RTT (round trip delay 1), and a confirmation packet 601 is fed back, and there is a congestion mark in the confirmation packet 601 (the gray mark is the congestion mark). The fifth adjustment number is pre-set by the user to adjust the number of data packets, wherein the fifth adjustment number is to reduce the number of quantity packets by half. Therefore, currently when the first sending cycle is the same as the second sending cycle, the number of quantity packets sent in the second sending cycle is 0.5. Therefore, in order to meet the whole packet transmission demand of the quantity packet, the first sending cycle is extended from 1 RTT to 2 RTTs, that is, at the end of the second RTT (round trip delay 2), it is the start time of the second sending cycle (the start of round trip delay 3), and the second sending cycle includes two RTTs.

[0150] Step 2402: Adjust the first transmission rate based on the second sending period to obtain a second transmission rate.

[0151] Indicative, such as Figure 6 As shown, the first sending cycle is extended from 1 RTT to 2 RTTs, that is, the moment when the second RTT ends is the starting moment of the second sending cycle, and the second sending cycle includes two RTTs, that is, the second transmission rate is to send a data packet to the second network card after 2 RTTs.

[0152] Step 2403: In response to the confirmation packet in the data packet reception situation not being marked with a congestion indicator, the first sending cycle is shortened to obtain a second sending cycle.

[0153] Because in the current small window transmission mode, the first network card only sends a single data packet to the second network card in a single sending cycle, and based on the condition that the data packet needs to be transmitted as a whole packet (that is, the sending quantity is a positive integer), a sixth adjustment quantity (generally a decimal, but can also be an integer, without limitation) is pre-set. If the first network card sends a data packet to the second network card in the first sending cycle and then receives a confirmation packet in feedback, and the confirmation packet is not marked with a congestion mark, the quantity packet is adjusted by the sixth adjustment data while the first sending cycle remains unchanged to obtain a second quantity. Since the second quantity may be 0 or a decimal, the first sending cycle is shortened until at least one data packet can be sent while the whole packet can be transmitted, thereby determining the start time of the second sending cycle based on the shortened first sending cycle, and using the cycle length of the shortened first sending cycle as the cycle length of the second sending cycle.

[0154] Indicative, such as Figure 6 As shown, for the data packet receiving situation 620, the sending rate of the data packet is to send 0.5 data packets within one RTT, that is, one data packet is sent to the second network card every 2 RTTs. Therefore, after sending one data packet within the first RTT (round trip delay 1) and feedback to obtain a confirmation packet 621, and there is no congestion mark in the confirmation packet 621, the user pre-sets the sixth adjustment number for adjusting the number of data packets, wherein the sixth adjustment number is twice the number of packets, so the current sending rate is one, and the number of data packets sent within 1 RTT is 1. Therefore, in order to meet the full packet transmission requirements of the quantity packet, the first sending cycle is shortened from 2 RTTs to 1 RTT, that is, the moment when the second RTT ends is the starting moment of the second sending cycle, and the second sending cycle includes one RTT. Based on the above adjustment process, the sending cycle is adjusted until it is adjusted to a single sending cycle that only includes 1 RTT and sends one data packet. Finally, if the number of data packets sent in a single RTT is greater than 1, the small window transmission mode is adjusted to the large window mode, that is, the sending cycle is 1 RTT, and multiple data packets are sent in one RTT.

[0155] Step 2404: adjust the first transmission rate based on the second sending period to obtain a second transmission rate.

[0156] Illustratively, according to the data packet reception situation, the first sending cycle is shortened to obtain a second sending cycle, and the second transmission rate is determined by the number of data packets (1) in the second sending cycle.

[0157] It is worth noting that the above-mentioned first adjustment quantity to the sixth adjustment quantity are set by the designer according to actual needs. Therefore, the first adjustment quantity to the sixth adjustment quantity may be the same or may be different, and there is no limitation on this. In addition, in the process of quantity adjustment, different adjustment quantities can be flexibly applied for adjustment.

[0158] In some embodiments, for adjusting the transmission cycle in the first network card, a hardware circuit may be set in the first network card, and the transmission rate of the data packets in the first network card may be controlled by the hardware circuit. In this embodiment, the above transmission rate adjustment method may be implemented as a control algorithm, that is, the transmission rate is adjusted accordingly according to different data packet transmission conditions. The more serious the congestion phenomenon, the greater the adjustment range of the number of data packets sent (or the greater the range of extending the first transmission cycle); otherwise, the smaller the range.

[0159] For illustration, please refer to Figure 7 , which shows a schematic diagram of hardware congestion control provided by an exemplary embodiment of the present application, such as Figure 7 As shown, the device structure diagram corresponding to the first device 71 is currently displayed, and a first network card 710 is installed in the first device 71, wherein a hardware circuit 711 is provided in the first network card 710 for adjusting the transmission rate in the first network card 710. When the first network card 710 sends a data packet to a second network card (not shown) through the network, the second network card feeds back the data packet reception status to the first network card 710 through the network, so that the hardware circuit 711 adjusts the transmission rate of the data packet according to the data packet reception status.

[0160] In summary, the network congestion control method provided by the embodiment of the present application is to install a first network card in a first device, use the first network card to obtain a data packet sent to a second device, and send a data packet to the second device at a first transmission rate in a first sending cycle, and directly adjust the first transmission rate according to the data packet reception status received and fed back by the second network card through the first network card, so as to obtain a second transmission rate corresponding to the data packet sent in the second sending cycle. That is, the network card is directly used to monitor the data transmission status between devices, so as to timely adjust the transmission rate of the first device according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the transmission data packet of the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control.

[0161] In this embodiment, based on the fact that the first sending cycle and the second sending cycle are the same, when the number of confirmation packets received is consistent with the number of data packets sent, it indicates that the transmission network performance is good. Therefore, the first adjustment number is added to the first number to obtain the second number after the increase, so that the second transmission rate is greater than the first transmission rate, which can improve the data packet transmission rate while ensuring the transmission performance.

[0162] In this embodiment, based on the fact that the first sending cycle and the second sending cycle are the same, when a congestion flag is marked in the received confirmation packet, it indicates that congestion has occurred in the transmission network. Therefore, the first number is adjusted according to the number of congestion flags to obtain a second transmission rate that is less than the first transmission rate, thereby alleviating the congestion in the transmission network.

[0163] In this embodiment, the first number is decremented by the number of confirmation packets marked with congestion identifiers and the second adjustment number, and the first number is incremented by the number of confirmation packets not marked with congestion identifiers and the third adjustment number, thereby obtaining a second transmission rate that is lower than the first transmission rate, thereby improving the adaptability of the rate adjustment method to the network transmission conditions, thereby alleviating congestion in the transmission network.

[0164] In this embodiment, based on the fact that the first sending cycle and the second sending cycle are the same, when the number of confirmation packets received is less than the number of data packets sent to the second device, it indicates that a packet loss situation exists at this time. Therefore, the first number is reduced by the fourth adjustment number to obtain the second number, and then a second transmission rate that is less than the first transmission rate is obtained, thereby alleviating congestion in the transmission network.

[0165] In this embodiment, based on the fact that the first sending cycle and the second sending cycle are different, if a confirmation packet with a congestion indicator is received, the first sending cycle is extended to obtain the second sending cycle, and the first transmission rate is adjusted to obtain the second transmission rate, thereby alleviating the congestion of the transmission network based on the perspective of changing the length of the sending cycle.

[0166] In this embodiment, based on the fact that the first sending cycle and the second sending cycle are different, if a confirmation packet indicating that there is no congestion indicator is received, the first sending cycle is shortened to obtain the second sending cycle, and the first transmission rate is adjusted to obtain the second transmission rate, thereby reducing the congestion of the transmission network based on the perspective of changing the length of the sending cycle.

[0167] In some embodiments, in addition to receiving the packet reception status, congestion indication information is also received. For example, please refer to Figure 8 , which shows a flowchart of a network congestion control method provided by an exemplary embodiment of the present application, that is, step 220 also includes step 2201 after step 220, and step 221 to step 223 before step 220, such as Figure 8 As shown, the method includes the following steps.

[0168] Step 221, setting data transmission modes corresponding to a plurality of candidate network models respectively.

[0169] The candidate network model is used to indicate the transmission protocol type of the device during data transmission.

[0170] Illustratively, the transmission protocol refers to a transmission regulation that the first device and the second device need to comply with during data transmission, that is, the first device and the second device comply with the same protocol during data transmission.

[0171] Optionally, the first device / the second device supports one or more types of transmission protocols, which is not limited.

[0172] Optionally, the transmission protocol type includes at least one of multiple transmission protocols such as Telnet protocol, File Transfer Protocol (FTP), Hyper Text Transformer Protocol (HTTP), FTP protocol (FTPS) based on Secure Sockets Layer (SSL), Secure File Transfer Protocol (SFTP), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), etc.

[0173] Schematically, the user sets the sending period and the sending quantity of the data packet for different candidate network models in advance, so as to determine the data packet transmission rate corresponding to the different candidate network models.

[0174] For example, for the Transmission Control Protocol (TCP), the sending period is set to 1 RTT, and 4 data packets are sent to the second network card within 1 RTT as the transmission rate.

[0175] Step 222: read the target network model corresponding to the first device.

[0176] The target network model is used to indicate the type of transmission protocol configured by the first device, and the target network model corresponds to the target transmission mode.

[0177] In some embodiments, during the production process of the first device, a designer pre-configures a corresponding transmission protocol type as a target network model corresponding to the first device.

[0178] In an illustrative manner, the user determines the target network model corresponding to the first device according to the configuration information of the first device, wherein the configuration information is information pre-configured by the designer during the manufacturing process of the first device. For example, device a supports the TCP protocol, and device b supports the FTP protocol.

[0179] Step 223: Determine a first sending period and a first transmission rate based on the target transmission mode corresponding to the target model type.

[0180] In an illustrative manner, after determining the target network model corresponding to the first device, the target transmission mode corresponding to the target network model is determined from multiple data transmission modes, thereby determining the first transmission period and the first transmission rate according to the target transmission mode. That is, by reading the device configuration corresponding to the first device, the first transmission period and the first transmission efficiency corresponding to the first device can be obtained.

[0181] Step 220: Send a data packet to the second network card according to a first transmission rate configured by the first network card during a first sending cycle.

[0182] Illustratively, the relevant contents in step 220 have been described in detail in the above embodiments, and will not be described in detail in this embodiment.

[0183] Step 2201: Receive congestion indication information sent by the second network card.

[0184] The congestion indication information refers to the data processing status of the second device in the first sending cycle, and the congestion indication information is obtained by sorting the second network card based on the data packets transmitted in the first sending cycle.

[0185] In some embodiments, after the second network card receives a data packet sent by the first network card, it integrates information on the congested node conditions in the transmission network based on the received data packet and the network transmission conditions in the process of sending the data packet from the first network card to the second network card, generates corresponding congestion indication information for the congested nodes in the transmission network, and feeds it back to the first network card, thereby enabling the first device to understand the network congestion conditions in the entire transmission path.

[0186] In this embodiment, a congestion information integration circuit is provided in the second network card, and the congested nodes in the transmission network are sorted out by the congestion information integration circuit to generate congestion indication information which is fed back by the second network card to the first network card.

[0187] In summary, the network congestion control method provided by the embodiment of the present application is to install a first network card in a first device, use the first network card to obtain a data packet sent to a second device, and send a data packet to the second device at a first transmission rate in a first sending cycle, and directly adjust the first transmission rate according to the data packet reception status received and fed back by the second network card through the first network card, so as to obtain a second transmission rate corresponding to the data packet sent in the second sending cycle. That is, the network card is directly used to monitor the data transmission status between devices, so as to timely adjust the transmission rate of the first device according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the transmission data packet of the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control.

[0188] Schematically, the network interconnection device is implemented as a switch, which is used for data transmission between the first device and the second device. For schematic illustration, please refer to Fig. 9 , which shows a network transmission schematic diagram provided by an exemplary embodiment of the present application, wherein the current transmission process includes a first device 91, a second device 92 and a switch 930, wherein a first network card 910 is installed in the first device 91, and a second network card 920 is installed in the second device, a hardware circuit 9101 is provided in the first network card 910 for controlling the data packet sending rate, and a hardware circuit 9201 is provided in the second network card 920 for integrating information of congested nodes, wherein the hardware circuit 9101 and the hardware circuit 9202 can be implemented as a Field Programmable Gate Array (FPGA) circuit.

[0189] When the first application is installed in the first device 91, when the first network card 910 receives a data processing request sent by the first application, it divides the data processing request into multiple data packets and sends them to the second device 92 at a specified transmission rate.

[0190] Taking the first sending cycle as an example, in the first sending cycle, the first network card 910 sends a data packet to the switch 930 at the first transmission rate configured by the hardware circuit 9101, and forwards the data packet to the second device via the switch 930. When the second network card 920 in the second device 92 receives the data packet, it feeds back a confirmation packet corresponding to the data packet to the first device 91 according to the cache situation in the second network card 920, wherein the confirmation packet is marked with a congestion mark, indicating that the second network card 920 is currently congested. In addition, the hardware circuit 9202 in the second network card 920 organizes the node information corresponding to the congested nodes existing in the transmission network between the first network card 910, the switch 930 and the second network card 920, for example: the current transmission network includes congested nodes 9001, 9002 and 9003, and the hardware circuit 9202 in the second network card 920 generates congestion indication information after arranging the information of these three congested nodes, and feeds back the congestion indication information to the first network card 910.

[0191] The above scheme makes it unnecessary for the central processing unit (CPU) in the first device / second device to perceive the congestion situation in the device and the transmission network, nor does it need to perform relevant processing on the congestion phenomenon. The congestion control method in the entire transmission network does not consume any software processing flow, and the circuit overhead of implementing congestion control through hardware circuits is relatively small, saving computer data overhead.

[0192] Based on the above application scenarios, the transmission rate adjustment method of the data packet is described in detail. For illustration, please refer to Fig.10 , which shows a schematic diagram of a network congestion control method provided by an exemplary embodiment of the present application, such as Fig.10 As shown, the current process includes the following steps.

[0193] Step 1010, initialize the data window.

[0194] When the first network card in the first device receives the data processing request sent by the application, it divides the data into multiple data packets for sending to the second device, wherein the data packets are divided in the form of data windows during the process of sending the multiple data packets. In this embodiment, one data window includes one data packet, that is, the first network card in the first device sends a first number of data windows to the second network card in the second device within a first sending cycle, wherein each data window corresponds to one data packet.

[0195] Step 1020: There is network congestion in the data window.

[0196] In the process of sending data packets from the first network card to the second network card through the first network card in the first sending cycle, when the data packets cached in the second network card reach the cache threshold, network congestion will occur. Therefore, after the second network card feeds back the data packet reception status to the first network card, the first network card can determine whether a confirmation packet corresponding to the data packet is received through a hardware circuit. If no confirmation packet is received (or the number of confirmation packets received is less than the number of data packets sent to the second network card), it is considered that packet loss has occurred at this time, and step 1030 is executed; if confirmation packets corresponding to all sent data packets are received, it is determined whether it is a large window transmission mode (that is, the number of data windows sent within a single RTT is greater than 1, and the first sending cycle is 1 RTT at this time). TT), if it is a large window transmission mode, determine whether the confirmation packet is marked with a congestion mark, if there is a congestion mark, execute step 1040; if there is no congestion mark in the confirmation packet, execute step 1050; if it is not a large window transmission mode (that is, the number of data windows sent within a single RTT is less than 1, and the first sending cycle is greater than or equal to 1 RTT), determine whether the confirmation packet is marked with a congestion mark, if there is a congestion mark, execute step 1060; if there is no congestion mark in the confirmation packet, execute step 1070.

[0197] In step 1030, the data window may be reduced.

[0198] When the number of confirmation packets in the data packet reception situation fed back by the second network card and received by the first network card is less than the number of data packets sent to the second network card, or there is no confirmation packet in the data packet reception situation, the hardware circuit in the first network card determines that a packet loss situation has occurred, and therefore reduces the first number by a large margin to obtain a second number, which is used to send the second number of data packets to the second network card in a second sending cycle.

[0199] Step 1040, reducing the number of windows according to the number of data windows.

[0200] In the large window transmission mode, when the data packet reception status received by the first network card includes a confirmation packet corresponding to the data packet, and at least one confirmation packet is marked with a congestion flag, it indicates that congestion has occurred in the second network card, but packet loss has not occurred. Therefore, the first number is reduced, and the reduction range may be smaller than the reduction range in step 1030 to obtain a second number, which is used to send the second number of data packets to the second network card in a second sending cycle.

[0201] Step 1050, increase the number of fixed-configuration data windows.

[0202] In the large window transmission mode, when the data packet reception status received by the first network card includes a confirmation packet corresponding to the data packet, and the confirmation packet is not marked with a congestion mark, it indicates that the current transmission network condition is good. The first number can be increased, that is, the number of data windows can be increased to obtain a second number, which is used to send the second number of data packets to the second network card in the second sending cycle.

[0203] Step 1060, halve the number of data windows.

[0204] In the small window transmission mode, when the data packet reception status received by the first network card includes a confirmation packet corresponding to a data packet, and a confirmation packet is marked with a congestion flag, it indicates that congestion has occurred in the second network card, but packet loss has not occurred yet. Therefore, the first sending cycle is extended by at least one RTT, so that the extended first sending cycle is used as the cycle length of the second sending cycle, and the second sending cycle is started at the end of the extended first sending cycle, and a data packet is sent in the second sending cycle.

[0205] Step 1070, increase the number of data windows.

[0206] In the large window transmission mode, when the data packet reception status received by the first network card includes a confirmation packet corresponding to the data packet, and the confirmation packet is not marked with a congestion mark, it indicates that the current transmission network condition is good. Therefore, the first sending cycle is shortened by at least one RTT, so that the shortened first sending cycle is used as the cycle length of the second sending cycle, and the second sending cycle is started at the end of the shortened first sending cycle, and a data packet is sent in the second sending cycle.

[0207] For illustration, please refer to Fig.11 , which shows a schematic diagram of the comparison of the effects of a solution provided by an exemplary embodiment of the present application, such as Fig.11 As shown, the current includes a congestion control program performance curve 1110 and a hardware circuit performance curve 1120, which are Fig.11 It can be seen that the network congestion control method provided by the embodiment of the present application is superior to the network congestion control method implemented by the congestion control program in the related art.

[0208] The dark rod provided in the embodiment of the present application can realize configurable speed-up and speed-down configuration to adapt to different network environments, and has the ability to detect and pull up the closing path rate according to the network scenario.

[0209] In a specified network transmission scenario, when the bidirectional processing bandwidth of the address resolution protocol has reached 8MPPS (the number of data packets sent per second), it can save the computing power of at least 4-8 CPU threads. The subsequent processing performance will continue to improve, and this solution will continue to improve cost savings.

[0210] To sum up, there are two main benefits brought by this design. First, it reduces the interaction between software and hardware, reduces CPU computing power, and saves costs. Second, compared with the software congestion control solution, the feedback time is shorter, the jitter is smaller, and the network performance is better.

[0211] In summary, the network congestion control method provided by the embodiment of the present application is to install a first network card in a first device, use the first network card to obtain a data packet sent to a second device, and send a data packet to the second device at a first transmission rate in a first sending cycle, and directly adjust the first transmission rate according to the data packet reception status received and fed back by the second network card through the first network card, so as to obtain a second transmission rate corresponding to the data packet sent in the second sending cycle. That is, the network card is directly used to monitor the data transmission status between devices, so as to timely adjust the transmission rate of the first device according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the transmission data packet of the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control.

[0212] Fig.12 is a structural block diagram of a network congestion control device provided by an exemplary embodiment of the present application, such as Fig.12 As shown, the device comprises:

[0213] An acquisition module 1210 is used to acquire a data packet to be sent to a second device, where the data packet is a data packet sent to a second network card installed in the second device according to a sending cycle;

[0214] a sending module 1220, configured to send the data packet to the second network card in a first sending cycle according to a first transmission rate configured by the first network card, wherein the first network card is a network card installed in the first device, and the first transmission rate is used to indicate a first number of the data packets sent in the first sending cycle;

[0215] The receiving module 1230 is used to receive the data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle;

[0216] The adjustment module 1240 is used to adjust the first transmission rate based on the data packet reception situation to obtain a second transmission rate, where the second transmission rate is the rate at which the first network card sends data packets to the second network card in a second sending cycle, and the second transmission rate is used to indicate a second number of the data packets sent in the second sending cycle.

[0217] In some embodiments, the first sending period is the same as the second sending period;

[0218] The adjustment module 1240 is also used to increase a first adjustment quantity to the first quantity in response to a confirmation packet including the first quantity in the data packet reception situation, wherein the confirmation packet is used to indicate that the second device has received the data packet; and determine a second transmission rate based on the second quantity and the second sending period, wherein the second transmission rate is greater than the first transmission rate.

[0219] In some embodiments, the first sending cycle is the same as the second sending cycle, the confirmation packet is marked with a congestion indicator, and the congestion indicator is used to indicate that the second network card is in a congested state when receiving the data packet;

[0220] The adjustment module 1240 includes:

[0221] The adjustment unit 1241 is used to adjust the first quantity based on the confirmation packets not marked with the congestion indicator and the confirmation packets marked with the congestion indicator in the data packet reception situation to obtain the second quantity; and determine the second transmission rate based on the second quantity and the second sending period.

[0222] In some embodiments, the adjustment unit 1241 is used to set a second adjustment quantity for the confirmation packets marked with the congestion identifier, and to set a third adjustment quantity for the confirmation packets not marked with the congestion identifier; based on the number of confirmation packets marked with the congestion identifier and the second adjustment quantity, the first quantity is decremented to obtain the first adjustment quantity; based on the number of confirmation packets not marked with the congestion identifier and the third adjustment quantity, the first adjustment quantity is incremented to obtain the second quantity; and the second transmission rate is determined based on the second quantity and the second sending period.

[0223] In some embodiments, the first sending period is the same as the second sending period;

[0224] The adjustment module 1240 is also used to, in response to the number of confirmation packets in the data packet reception situation being less than the first number, reduce the first number by a fourth adjustment number to obtain the second number; and determine the second transmission rate based on the second number and the second sending period, wherein the second transmission rate is less than the first transmission rate.

[0225] In some embodiments, the first sending period is different from the second sending period;

[0226] The adjustment module 1240 is also used to extend the first sending period to obtain the second sending period in response to the data packet reception situation including a confirmation packet marked with a congestion indicator; and adjust the first transmission rate based on the second sending period to obtain the second transmission rate.

[0227] In some embodiments, the adjustment module 1240 is also used to shorten the first sending period in response to the confirmation packet in the data packet reception situation not being marked with the congestion identifier to obtain the second sending period; and adjust the first transmission rate based on the second sending period to obtain the second transmission rate.

[0228] In some embodiments, the receiving module 1230 is also used to receive congestion indication information sent by the second network card, and the congestion indication information refers to the data processing status of the second device during the first sending cycle, and the congestion indication information is obtained by the second network card based on the data packets transmitted during the first sending cycle.

[0229] In some embodiments, the method further comprises:

[0230] A setting module 1250, used to set data transmission modes corresponding to a plurality of candidate network models, wherein the candidate network models are used to indicate the transmission protocol type of the device during data transmission;

[0231] The acquisition module 1210 is further used to read a target network model corresponding to the first device, where the target network model is used to indicate a transmission protocol type configured by the first device, and the target network model corresponds to a target transmission mode;

[0232] The determination module 1260 is used to determine the first sending period and the first transmission rate based on the target transmission mode corresponding to the target network model.

[0233] In summary, the network congestion control device provided by the embodiment of the present application is to install a first network card in a first device, use the first network card to obtain a data packet sent to a second device, and send a data packet to the second device at a first transmission rate in a first sending cycle, and directly adjust the first transmission rate according to the data packet reception status received and fed back by the second network card through the first network card, so as to obtain a second transmission rate corresponding to sending a data packet in a second sending cycle. That is, the network card is directly used to monitor the data transmission status between devices, so as to timely adjust the transmission rate of the first device according to the data transmission status. On the one hand, since the network card controls the transmission rate corresponding to the transmission data packet of the device, the network card is used to directly adjust the transmission rate of the device according to the data packet reception status, so that the central processor in the device does not need to perceive the congestion status corresponding to the device, so that the central processor does not need to process the congestion status, thereby reducing the data overhead of the device. On the other hand, since the network card is used to send and receive data, the transmission rate of the device can be adjusted immediately after receiving the data packet reception status, thereby improving the efficiency of network congestion control.

[0234] It should be noted that the network congestion control device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the network congestion control device provided in the above embodiment and the network congestion control method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0235] Fig.14 The following is a schematic diagram showing the structure of a server provided by an exemplary embodiment of the present application. Specifically:

[0236] The server 1400 includes a central processing unit (CPU) 1401, a system memory 1404 including a random access memory (RAM) 1402 and a read-only memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the central processing unit 1401. The server 1400 also includes a mass storage device 1406 for storing an operating system 1413, application programs 1414, and other program modules 1415.

[0237] The mass storage device 1406 is connected to the central processing unit 1401 through a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1406 and its associated computer-readable media provide non-volatile storage for the server 1400. That is, the mass storage device 1406 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read only memory (CD-ROM) drive.

[0238] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1404 and mass storage device 1406 can be collectively referred to as memory.

[0239] According to various embodiments of the present application, the server 1400 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 1400 can be connected to the network 1412 through the network interface unit 1411 connected to the system bus 1405, or the network interface unit 1411 can be used to connect to other types of networks or remote computer systems (not shown).

[0240] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.

[0241] An embodiment of the present application also provides a computer device, which includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the network congestion control method provided by the above-mentioned method embodiments.

[0242] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the network congestion control method provided by the above-mentioned method embodiments.

[0243] The embodiment of the present application also provides a computer program product, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the network congestion control method described in any of the above embodiments.

[0244] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0245] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0246] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A network congestion control method, characterized in that: The method is applied to a first network card installed in a first device, and the method includes: Acquire a data packet to be sent to a second device, where the data packet is a data packet sent to a second network card installed in the second device according to a sending cycle; In a first sending cycle, sending the data packet to the second network card according to a first transmission rate configured by the first network card, where the first transmission rate is used to indicate a first number of the data packets sent in the first sending cycle; receiving a data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle; The first transmission rate is adjusted based on the data packet reception situation to obtain a second transmission rate, where the second transmission rate is the rate at which the first network card sends data packets to the second network card in a second sending cycle, and the second transmission rate is used to indicate a second number of the data packets sent in the second sending cycle.

2. The method according to claim 1, characterized in that: The first sending period is the same as the second sending period; The adjusting the first transmission rate based on the data packet reception situation to obtain a second transmission rate includes: In response to a confirmation packet including the first number in the data packet reception situation, adding a first adjustment number to the first number to obtain the second number, wherein the confirmation packet is used to indicate that the second device has received the data packet; A second transmission rate is determined based on the second number and the second transmission period, the second transmission rate being greater than the first transmission rate.

3. The method according to claim 1, characterized in that The first sending cycle is the same as the second sending cycle, the confirmation packet is marked with a congestion indicator, and the congestion indicator is used to indicate that the second network card is in a congested state when receiving the data packet; The adjusting the first transmission rate based on the data packet reception situation to obtain a second transmission rate includes: Adjusting the first quantity based on the confirmation packets not marked with the congestion indicator and the confirmation packets marked with the congestion indicator in the data packet reception situation to obtain the second quantity; The second transmission rate is determined based on the second number and the second transmission period.

4. The method according to claim 3, characterized in that The adjusting the first quantity based on the confirmation packets not marked with the congestion indicator and the confirmation packets marked with the congestion indicator in the data packet reception situation to obtain the second quantity as the second transmission rate includes: Setting a second adjustment quantity for the confirmation packet marked with the congestion indicator, and setting a third adjustment quantity for the confirmation packet not marked with the congestion indicator; Based on the number of confirmation packets marked with the congestion indicator and the second adjusted number, the first number is adjusted by a reduction amount to obtain a first adjusted number; Incrementally adjusting the first adjusted quantity based on the quantity of the confirmation packets not marked with the congestion indicator and the third adjusted quantity to obtain the second quantity; The second transmission rate is determined based on the second number and the second transmission period.

5. The method according to claim 1, characterized in that The first sending period is the same as the second sending period; The adjusting the first transmission rate based on the data packet reception situation to obtain a second transmission rate includes: In response to the number of the confirmation packets in the data packet reception situation being less than the first number, reducing the first number by a fourth adjustment number to obtain the second number; The second transmission rate is determined based on the second number and the second transmission period, wherein the second transmission rate is less than the first transmission rate.

6. The method according to claim 1, characterized in that The first sending period is different from the second sending period; The adjusting the first transmission rate based on the data packet reception situation to obtain a second transmission rate includes: In response to the data packet reception situation including a confirmation packet marked with a congestion indicator, extending the first sending cycle to obtain the second sending cycle; The first transmission rate is adjusted based on the second sending period to obtain the second transmission rate.

7. The method according to claim 6, characterized in that The method further comprises: In response to the confirmation packet in the data packet reception situation not being marked with the congestion identifier, shortening the first sending cycle to obtain the second sending cycle; The first transmission rate is adjusted based on the second sending period to obtain the second transmission rate.

8. The method according to any one of claims 1 to 7, characterized in that: After sending the data packet to the second network card according to the first transmission rate configured by the first network card in the first sending cycle, the method further includes: Receive congestion indication information sent by the second network card, where the congestion indication information refers to data processing status of the second device in the first sending cycle, and the congestion indication information is obtained by the second network card based on data packets transmitted in the first sending cycle.

9. The method according to any one of claims 1 to 7, characterized in that: Before sending the data packet to the second network card according to the first transmission rate configured by the first network card in the first sending cycle, the method further includes: Setting data transmission modes corresponding to a plurality of candidate network models, respectively, wherein the candidate network models are used to indicate the transmission protocol type of the device during data transmission; Reading a target network model corresponding to the first device, where the target network model is used to indicate a transmission protocol type configured by the first device, and the target network model corresponds to a target transmission mode; The first sending period and the first transmission rate are determined based on the target transmission mode corresponding to the target network model.

10. A network congestion control device, characterized in that: The device comprises: an acquisition module, configured to acquire a data packet to be sent to a second device, wherein the data packet is a data packet sent to a second network card installed in the second device according to a sending cycle; a sending module, configured to send the data packet to the second network card according to a first transmission rate configured by the first network card in a first sending cycle, wherein the first network card is a network card installed in a first device, and the first transmission rate is used to indicate a first number of the data packets sent in the first sending cycle; A receiving module, configured to receive a data packet reception status fed back by the second network card based on the data packets transmitted in the first sending cycle; An adjustment module is used to adjust the first transmission rate based on the data packet reception situation to obtain a second transmission rate, where the second transmission rate is the rate at which the first network card sends data packets to the second network card in a second sending cycle, and the second transmission rate is used to indicate a second number of the data packets sent in the second sending cycle.

11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the network congestion control method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the network congestion control method as described in any one of claims 1 to 9.

13. A computer program product, characterized in that It comprises computer instructions, which, when executed by a processor, implement the network congestion control method as claimed in any one of claims 1 to 9.