Data processing method and apparatus, and network system

By introducing a second window configuration for the sending window in TCP communication, and combining the calculations of the first and third windows, the problem of limited sending rate is solved, and TCP transmission efficiency is improved.

WO2026233100A1PCT designated stage Publication Date: 2026-11-12HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/091895
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-09
Filing Date
2026-04-21
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

In TCP communication scenarios, the sender's data transmission rate is limited by the size of the receive window, resulting in low TCP transmission efficiency.

Method used

A second window is introduced to configure the sending window. The sending window is calculated by combining the first window and the third window (such as the congestion window), avoiding complete reliance on the receiving window and flexibly adjusting the size of the sending window.

Benefits of technology

It improves data transmission efficiency, especially when the receiving window is small. By introducing a second window, the sending window can be larger than the receiving window, avoiding the limitations on transmission caused by congestion or drastic changes in round-trip delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026091895_12112026_PF_FP_ABST
    Figure CN2026091895_12112026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a data processing method and apparatus, and a network system, which relate to the technical field of communications. In the method, a communication apparatus serving as a sender in a TCP connection acquires a first window and a second window of the TCP connection, and determines a sending window on the basis of the first window and the second window. The first window is a window carried in a message returned by a receiver to the sender in the TCP connection, and the second window is a window configured for the TCP connection. In this way, when a receiving window of the receiver is relatively small, the sender may also determine the sending window on the basis of a preset window value, and the size of the sending window may be greater than that of the receiving window, thereby improving the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing methods, devices and network systems

[0001] This application claims priority to Chinese Patent Application No. 202510601045.2, filed with the State Intellectual Property Office of China on May 9, 2025, entitled “Data Processing Method, Apparatus and Network System”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to a data processing method, apparatus and network system. Background Technology

[0003] In communication scenarios using the Transmission Control Protocol (TCP), after the sender sends a message to the receiver, the receiver replies with an acknowledgment character (ACK). The ACK data sent by the receiver carries a receive window, which indicates that the number of messages sent by the sender cannot exceed the receive window. Furthermore, the sender also calculates the number of messages that can be sent based on a congestion control algorithm to determine the congestion window.

[0004] Therefore, the sender determines the size of the sending window based on the receive window and the congestion window, and thus determines the range of data that can be sent but not yet acknowledged. The size of this window determines how much data the sender can send before waiting for acknowledgment from the receiver. When it is necessary to accelerate TCP transmission, current methods such as adjusting the initial window size or TCP congestion control algorithms limit the sender's data transmission rate to the size of the receive window, resulting in relatively low TCP transmission efficiency. Summary of the Invention

[0005] This application provides a data processing method, apparatus, and network system to solve the problem that the data transmission rate of the sender is limited by the size of the receiving window, resulting in low TCP transmission efficiency.

[0006] Firstly, a data processing method is provided. This method is executed by a communication device acting as the sender in a TCP connection within a network system, and includes: acquiring a first window of the TCP connection, and then determining a sending window for the TCP connection based on the first window and a second window. The first window is the window carried in the message replied by the receiver to the sender in the TCP connection, and the second window is a window configured for the TCP connection.

[0007] In some possible embodiments of this application, the first window may refer to the receiving window, and the second window may be larger than the first window.

[0008] The aforementioned TCP connection refers to a communication connection established between any two communication devices in a network system for data transmission based on TCP.

[0009] In current TCP scenarios, the sender's sending window size is determined based on the receiver's window size when the receiver window is small, thus limiting the sender's receiver window to the receiver's window size. Even if the sender calculates a large feasible sending window, subsequent data transmission can only be performed based on the receiver window size when the receiver window is small. The data processing method provided in this application calculates the sender's sending window not only based on the first window fed back by the receiver but also introduces a second window configured for the TCP connection. This allows for flexible second window configuration for different TCP connections, avoiding negative optimization caused by calculating the sending window globally based on the same second window. Thus, if the receiver's first window is small, the sender can also determine the sending window based on the second window. The second window can be larger than the first window, resulting in a final sending window size larger than the first window, improving data transmission efficiency.

[0010] As one possible implementation, in the data processing method, the sending window of the TCP connection is determined based on the first window and the second window. A third window can also be introduced, for example, the sending window of the TCP connection can be determined based on the first window, the second window, and the third window. The third window is determined by the sender in the TCP connection according to the congestion control algorithm.

[0011] In some possible embodiments of this application, the third window may refer to the congestion window.

[0012] As one possible implementation, the second window is configured before the sending window for the TCP connection is determined. The data processing method also includes configuring the second window for the TCP connection.

[0013] Thus, the second window is configured for TCP connections. In order to avoid the sender's sending window being limited by the receiver's receiving window, it can also control the number of packets sent in different states of the TCP connection, thereby improving the transmission efficiency under TCP congestion.

[0014] Optionally, a second window can be configured based on the interface of the TCP connection. The TCP connection interface can be an interface used to configure the socket, such as setting socket options (setsockopt), and the third window is carried by a structure. In this way, a corresponding second window can be configured for a single TCP connection.

[0015] Optionally, a second window can be configured based on the identity identifier of the TCP connection. This identity identifier includes the user identifier (UID) of the target application. Thus, a corresponding second window can be configured for multiple TCP connections belonging to a specific application.

[0016] Optionally, a second window is configured in response to a control message. The control message includes the second window.

[0017] As one possible implementation, the third window is determined by the sender in the TCP connection based on at least one of the target application's business traffic or the TCP connection's bandwidth limitations.

[0018] In this way, the sending window can be flexibly adjusted according to the bandwidth limitations of the business traffic or TCP connection, and is no longer limited by the receiving window of the receiver.

[0019] As one possible implementation, in this data processing method, determining the sending window of the TCP connection based on the first window, the second window, and the third window includes: performing a first processing on the two windows to obtain a pending window; the two windows are any two windows among the first window, the second window, and the third window; performing a second processing on the pending window and the remaining windows to obtain the sending window of the TCP connection; the remaining windows are the windows among the first window, the second window, and the third window other than the two windows mentioned above.

[0020] Optionally, the first process is used to retrieve the larger window from the two windows, and the second process is used to retrieve the smaller window from the two windows.

[0021] Optionally, the first process is used to retrieve the smaller window from the two windows, and the second process is used to retrieve the larger window from the two windows.

[0022] For example, two windows include a first window and a third window. A first process is used to obtain the smaller window in the first window and the third window, and a second process is used to obtain the pending window and the larger window in the second window.

[0023] For example, two windows include a first window and a second window. The first process is used to obtain the larger window between the first window and the second window, and the second process is used to obtain the smaller window between the pending window and the third window.

[0024] For example, two windows include a second window and a third window. The first process is used to obtain the larger window in the second window and the larger window in the third window, and the second process is used to obtain the pending window and the smaller window in the first window.

[0025] In this way, the receiver's receiving window does not completely restrict the sender's sending window, while the method of determining the sending window has high flexibility.

[0026] As one possible implementation, in this data processing method, determining the sending window of the TCP connection based on the first window, the second window, and the third window includes: determining the sending window of the TCP connection as the largest window among the first window, the second window, and the third window.

[0027] Optionally, the sending window of the TCP connection is larger than the smaller window between the first and third windows.

[0028] Optionally, the sending window of a TCP connection is larger than the first window and the third window.

[0029] By using the maximum value from the first, second, and third windows as the sending window, the transmission efficiency of the TCP connection is further improved.

[0030] As one possible implementation, the third window includes multiple windows corresponding to different stages of the TCP connection, including the slow start stage, normal transmission stage, and packet loss stage of the TCP connection. Before determining the sending window of the TCP connection based on the first window and the second window, the method further includes: determining the second window as one of the slow start window, normal transmission window, or packet loss window based on the current stage of the TCP connection.

[0031] In this way, the sending window can be adjusted according to different states of the TCP connection, further improving the overall transmission efficiency of the TCP connection.

[0032] Secondly, a data processing apparatus is provided, comprising an acquisition module and a processing module. The acquisition module is used to acquire a first window of a Transmission Control Protocol (TCP) connection; the first window is a window carried in the message replied by the receiver to the sender in the TCP connection. The processing module is used to determine the sending window of the TCP connection based on the first window and a second window; the second window is a window configured for the TCP connection.

[0033] As one possible implementation, the second window is larger than the first window.

[0034] As one possible implementation, the processing module is specifically used to: determine the sending window of the TCP connection based on the first window, the second window, and the third window; the third window is the window determined by the sender in the TCP connection according to the congestion control algorithm.

[0035] As one possible implementation, the processing module is also used to: configure a second window based on an interface of a TCP connection; the interface is used to configure a socket; or, configure a second window based on an identity identifier of a TCP connection; the identity identifier includes the user identifier (UID) of the target application; or, configure a second window in response to a control message; the control message includes the second window.

[0036] As one possible implementation, the second window is determined by the sender in the TCP connection based on at least one of the target application's business traffic or the TCP connection's bandwidth limitations.

[0037] As one possible implementation, the processing module is specifically used to: perform a first processing on two windows to obtain a pending window; the two windows can be any two windows from the first window, the second window, and the third window; perform a second processing on the pending window and the remaining windows to obtain the sending window for the TCP connection; the remaining windows are the windows in the first window, the second window, and the third window excluding the two windows.

[0038] As one possible implementation, the first process is used to select the larger window from the two windows, and the second process is used to select the smaller window from the pending window and the remaining window; or, the first process is used to select the smaller window from the two windows, and the second process is used to select the larger window from the pending window and the remaining window.

[0039] As one possible implementation, the two windows include a first window and a third window, a first process is used to obtain the smaller window between the first window and the third window, and a second process is used to obtain the larger window between the pending window and the second window; or, the two windows include a first window and a second window, a first process is used to obtain the larger window between the first window and the third window, and a second process is used to obtain the smaller window between the pending window and the third window; or, the two windows include a second window and a third window, a first process is used to obtain the larger window between the second window and the third window, and a second process is used to obtain the smaller window between the pending window and the first window.

[0040] As one possible implementation, the processing module is specifically used to: determine the sending window of the TCP connection as the largest window among the first window, second window, and third window.

[0041] As one possible implementation, the sending window of a TCP connection is larger than the smaller window in the first and third windows.

[0042] As one possible implementation, the sending window of a TCP connection is larger than the first and third windows.

[0043] As one possible implementation, the second window includes the slow start window, normal transmission window, or packet loss window of the TCP connection. The processing module is also used to determine whether the second window is a slow start window, a normal transmission window, or a packet loss window based on the current stage of the TCP connection.

[0044] For the beneficial effects of any possible implementation of the second aspect of this application, please refer to the description of the beneficial effects of any possible implementation of the first aspect above, which will not be repeated here.

[0045] Thirdly, a chip is provided, including a processing circuit and an interface circuit, wherein the interface circuit is used to transmit and receive data, and the processing circuit is used to perform a data processing method as described in the first aspect or any possible implementation thereof.

[0046] Fourthly, a communication device is provided, comprising a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the communication device to perform a data processing method as described in the first aspect or any possible implementation thereof.

[0047] Fifthly, a network system is provided, including at least one communication device for performing the data processing method as described in the first aspect or any possible implementation thereof.

[0048] A sixth aspect provides a computer program product including instructions that, when executed on a processor, implement the data processing method as described in the first aspect or any possible implementation thereof.

[0049] A seventh aspect provides a computer-readable storage medium including computer program instructions that, when executed, perform the data processing method as described in the first aspect or any possible implementation thereof.

[0050] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.

[0051] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description

[0052] Figure 1 is a schematic flowchart of a TCP connection data transmission method according to an embodiment of this application;

[0053] Figure 2 is a schematic diagram of the structure of a network system provided in an embodiment of this application;

[0054] Figure 3 is a schematic diagram of a network model of a network system provided in an embodiment of this application;

[0055] Figure 4 is a schematic flowchart of a data processing method provided in an embodiment of this application;

[0056] Figure 5 is a schematic diagram of a data transmission method for a TCP connection provided in an embodiment of this application;

[0057] Figure 6a is a schematic flowchart of a data processing method provided in an embodiment of this application;

[0058] Figure 6b is a schematic diagram of a TCP window provided in an embodiment of this application;

[0059] Figure 7 is a schematic flowchart of a data processing method provided in an embodiment of this application;

[0060] Figure 8 is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0061] Figure 9 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0062] Figure 10 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0063] Figure 11 is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Detailed Implementation

[0064] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. With the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0065] The terms "first," "second," "third," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of modules is not necessarily limited to those modules, but may include other modules not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0066] The technical solutions involved in this application may be applied not only to current communication technologies or communication devices, but also to future communication technologies or communication devices, or to communication systems and network systems that include communication devices. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.

[0067] TCP is a protocol used for reliable data transmission in computer networks. It is a connection-oriented protocol, meaning that the communicating parties need to establish a connection, such as a TCP connection, before data transmission can occur.

[0068] A TCP connection is a communication channel established between two network devices or communication equipment for transmitting data using the TCP protocol. Before data transmission, a TCP connection needs to be established to ensure reliable and orderly data transmission. This process includes a three-way handshake and a four-way handshake. After the three-way handshake, a reliable TCP connection is established between the client and server, and data transmission can begin. When data transmission ends, the connection needs to be closed; this disconnection process is called the four-way handshake.

[0069] In TCP connections, the send window, congestion window, and receive window are all important concepts related to flow control and congestion control. They work together to ensure reliable and efficient data transmission.

[0070] The sending window refers to the maximum amount of data a sender can send while waiting for acknowledgment. The TCP protocol allows the sender to send multiple data packets while waiting for acknowledgment from the receiver, without having to wait for confirmation after each packet. The size of the sending window is typically determined by the receiver's buffer and network conditions.

[0071] The receive window represents the available buffer size for the receiver, referring to the maximum amount of unacknowledged data the receiver can receive and store. The receive window is communicated to the sender by the receiver in the window size field of the TCP header.

[0072] A congestion window is a dynamic window maintained by the sender that reflects the current congestion state of the network. Its size is influenced by the network congestion control algorithm and is typically adjusted dynamically based on the network's condition. The congestion window is used to prevent network congestion and control the rate at which the sender transmits data.

[0073] As shown in Figure 1, the sender can send a synchronize sequence numbers (SYN) packet to the receiver to request a connection. The SYN packet carries an initial sequence number. Upon receiving the SYN packet, the receiver acknowledges the client's request to establish a TCP connection and replies with a SYN-ACK packet. The SYN-ACK packet carries the SYN and ACK flags, as well as the initial sequence number and acknowledgment number. After receiving the SYN-ACK packet, the sender sends an ACK packet to the receiver. After establishing a TCP connection based on the aforementioned TCP three-way handshake, the sender can send service data to the receiver. Upon receiving the service data, the receiver can reply with an ACK packet, which confirms successful data reception. The ACK packet carries the ACK flag and a sequence number, indicating the sequence number of the next byte expected to be received. Both the SYN-ACK and ACK packets can be referred to as ACK data, and the receiver's receive window can be carried in either the SYN-ACK or ACK packet.

[0074] In TCP transmission, the sender relies on the ACK data returned by the receiver to calculate the congestion window. If the round-trip delay between the sender and receiver in TCP transmission changes drastically or congestion occurs, the sender cannot obtain ACK data in time to determine the congestion window and the sending window, which will lead to a decrease in transmission performance.

[0075] Round-trip time (RTT) refers to the time elapsed from when the sender starts sending data until the sender receives an acknowledgment from the receiver (the receiver sends ACK data immediately after receiving the data).

[0076] When TCP transmission needs to be accelerated, current methods such as adjusting the initial window size or TCP congestion control algorithms can lead to a decrease in TCP connection transmission performance when the RTT between the sender and receiver changes drastically or congestion occurs. This is because the sender relies on the receiver's ACK data to calculate the congestion window. Furthermore, the sender's sending window is limited by the size of the receiving window carried in the ACK data. Even if the congestion window calculated by the sender according to the congestion control algorithm is large, if the receiving window is small, the sending window cannot achieve the data transmission efficiency corresponding to the congestion window.

[0077] The data processing method provided in this application solves the aforementioned problems. This application provides a data processing method applied to a network system, executed by a communication device acting as the sender in a TCP connection of the network system. The data processing method includes: obtaining a first window of the TCP connection, and determining a sending window based on the first window and a second window. The first window is the window carried in the message replied by the receiver to the sender in the TCP connection, and the second window is a window configured for the TCP connection. In some possible embodiments of this application, the first window may refer to the receiving window. Thus, when the receiver's receiving window is small, the sender can also determine the sending window based on the second window, and the size of the sending window can be larger than the receiving window, improving data transmission efficiency.

[0078] The application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings.

[0079] Figure 2 is a schematic diagram of a network system provided in an embodiment of this application. This network system can belong to a data center network topology, an interconnection between multiple data centers, or a wide area network. The service scenarios of the network system can be distributed storage, distributed computing, communication between terminals and cloud servers, etc. The communication protocol of the network system can be TCP.

[0080] For example, network system 200 includes one or more terminal devices, one or more network devices, and one or more servers.

[0081] Terminal devices typically refer to devices that directly interact with users, used to send, receive, process, and display data. Terminal devices can be directly connected to communication networks, acting as endpoints for data exchange. They are responsible for generating and receiving user data, or transmitting data from one location to another. Terminal devices are usually the start or end point of a communication network, exchanging data with other devices through various communication protocols.

[0082] Optionally, the terminal device can be a mobile phone terminal, tablet computer, laptop computer, virtual reality (VR) device, augmented reality (AR) device, mixed reality (MR) device, extended reality (ER) device, camera or vehicle terminal, etc., or it can be an edge device (e.g., a box carrying a chip with processing capabilities).

[0083] Network devices are hardware devices used to establish, manage, and maintain communication networks. These devices are responsible for transmitting, processing, routing, and controlling data flows within the network, ensuring effective and reliable communication between devices. Based on their functions and roles, network devices can be categorized into various types.

[0084] Alternatively, network devices may be routers, switches, network management systems, wireless access points (APs), network interface cards (NICs), data processing units (DPUs), virtual routers, virtual switches, etc.

[0085] A server is a computer or device that provides services, processes requests, and returns data. In communication, servers typically do not interact directly with end users, but are responsible for managing and processing data streams, providing resources, or storing information for access by multiple terminal devices.

[0086] Optionally, the server can be used to support services with different communication needs, such as AI training, file storage, web services, database access, cloud access, etc.

[0087] The terminal devices and servers in network system 200 communicate with each other through one or more network devices, or the terminal devices in network system 200 communicate with each other through one or more network devices, or the servers in network system 200 communicate with each other through one or more network devices.

[0088] Please continue referring to Figure 2, taking the example of a terminal device 201 in network system 200 communicating with server 203 via network device 202. The terminal device 201 can be a mobile phone, computer, etc., and the server 203 can be a cloud server. A cloud server is a virtualized server based on cloud computing technology. Cloud servers provide computing, storage, and network resources via the Internet without requiring users to own and maintain physical server hardware. The network device 202 can be a network device at any level in network system 200, such as an access layer switch, aggregation layer switch, core layer switch, or base station.

[0089] It should be understood that Figure 2 is a simplified schematic diagram for ease of understanding only. The network system 200 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary, which are not shown in Figure 2.

[0090] The data processing method provided in this application is applicable to TCP. The following description, in conjunction with Figure 3, illustrates the network system 200 shown in Figure 2 based on the TCP / Internet Protocol (IP) four-layer network model, to explain the applicable scenarios of the data processing method.

[0091] The TCP / IP four-layer network model is a protocol model used to describe the data transmission process in computer networks and is widely used in network communication. Based on the TCP / IP protocol suite, it divides network communication into four layers: application layer, transport layer, internet layer, and data link layer.

[0092] Taking the terminal device 201 as the sender and the server 203 as the receiver in the aforementioned network system 200 as an example, this paper explains how each layer of the terminal device 201 and the server 203 processes data during the communication process.

[0093] In the application layer of terminal device 201, when a user initiates a network communication request in the application of terminal device 201 (e.g., opening a webpage, sending an email, accessing the cloud, etc.), the application transmits the data to the application layer. The application layer encapsulates the data into application layer data based on the application layer protocol and then hands it over to the lower transport layer.

[0094] At the transport layer of terminal device 201, the transport layer divides application layer data into multiple data segments based on transport layer protocols. Each data segment contains transport layer header information, including source port, destination port, sequence number, and acknowledgment number. The transport layer then transmits the data segments (such as TCP packets) to the lower network layer.

[0095] Terminal device 201, acting as the sender, controls the data transmission rate through a sending window. In the data processing method provided in this application, the sending window is determined based on a congestion window (such as a second window), the receiver's (such as server 203) receiving window (such as a first window), and a preset window (such as a third window). For the specific method of determining the sending window, please refer to the relevant content shown in Figures 4, 6a, or 7, which will not be repeated here.

[0096] At the network layer of terminal device 201, the network layer encapsulates the transport layer data segments into a data packet, which contains the source IP address and the destination IP address. Based on the destination IP address, the network layer determines how to deliver the data packet to the target host (e.g., server 203), such as which network devices (e.g., network device 202) will forward the packet. The network layer then transmits the data packet to the lower data link layer.

[0097] At the data link layer of terminal device 201, the data link layer further encapsulates the network layer data packets into frames. These frames contain information such as the destination MAC address, source MAC address, frame header, and checksum. The data link layer then transmits the frames to the lower physical layer.

[0098] At the physical layer of terminal device 201, the physical layer is responsible for converting data into electrical or optical signals for transmission over physical media (such as network cables, optical fibers, radio waves, etc.). The physical layer transmits data to network device 202 through the physical media.

[0099] After the physical layer, data link layer, and network layer of network device 202 process the data transmitted from terminal device 201, they are forwarded to server 203. The processing method of server 203 for the data transmitted from network device 202 is the reverse processing of each layer of terminal device 201, which will not be described in detail here.

[0100] In the data processing method of this application, after receiving data sent by terminal device 201, the transport layer of server 203 sends ACK data to terminal device 201 through network device 202. The ACK data includes the receive window. For example, server 203 announces the current receive window size to terminal device 201 in the TCP header of the data packet through the window size field.

[0101] In the embodiments of this application, both the network devices and servers in the network system 200 described above can be referred to as communication devices. A communication device can also be a processor in a server (such as a neural network processing unit (NPU), central processing unit (CPU), GPU, etc.), a network interface card (NIC) in a server, a switching chip in a network device, or a CPU in a network device, etc., and this application does not limit it to these specific types.

[0102] It should be understood that Figure 3 only shows one network device, namely network device 202, between terminal device 201 and server 203. In other possible embodiments, terminal device 201 and server 203 can communicate through multiple network devices 202. Furthermore, the network model of terminal device 201, network device 202, and server 203 can also be divided in other ways, as long as the network model has a layer that implements the function of TCP connection.

[0103] Next, the data processing method provided in the embodiments of this application will be described in detail with reference to the accompanying drawings. Here, taking the terminal device 201 in the network system 200 in Figure 2 or Figure 3 as the sender in the TCP connection to execute the data processing method as an example, the specific steps of the data processing method will be explained.

[0104] Figure 4 is a schematic flowchart of a data processing method provided in an embodiment of this application. Referring to Figure 4, the data processing method may include the following steps S401-S402.

[0105] S401, Terminal device 201 obtains the first window of the TCP connection.

[0106] Terminal device 201 parses the ACK data sent by server 203 and obtains the first window returned by server 203.

[0107] As one possible implementation, the terminal device 201 and the server 203 perform a three-way handshake to establish a TCP connection before transmitting data.

[0108] Optionally, as shown in Figure 5, terminal device 201 sends a SYN packet to server 203, indicating a request to establish a connection. The SYN packet carries an initial sequence number. Server 203 receives the SYN packet, confirms the client's request to establish a TCP connection, and replies to terminal device 201 with a SYN-ACK packet. The SYN-ACK packet carries SYN and ACK flags, as well as an initial sequence number (which may be different from the initial sequence number carried in the SYN packet) and an acknowledgment number (the sequence number in the SYN packet sent by terminal device 201 is incremented by 1).

[0109] The first window of server 203 mentioned above can be carried by a SYN-ACK packet. For example, the first window is the receive window, which is carried by the receive window size field of the ACK data.

[0110] As one possible implementation, as shown in Figure 5, after the terminal device 201 and the server 203 establish a TCP connection through a three-way handshake, the terminal device 201 sends business data to the server 203, and the server 203 sends an ACK packet to the terminal device 201 after receiving the business data.

[0111] The first window of the aforementioned server 203 can be carried by an ACK packet.

[0112] In the embodiments of this application, both ACK packets and SYN-ACK packets can be regarded as ACK data. For example, the first window is the receiving window, which is carried by the receive window size field of the ACK data.

[0113] For example, server 203 can determine the first window based on the used and free space in the current receive buffer. In possible examples, the first window may also be related to TCP flow control mechanisms, operating system limitations, etc., which will not be elaborated here.

[0114] S402, Terminal device 201 determines the sending window of the TCP connection based on the first window and the second window.

[0115] Compared to the final value where the sending window cannot be larger than the receiving window, in this embodiment, the terminal device 201 introduces a second window to recalculate the sending window. After obtaining the first window and the second window, the terminal device 201 combines the first window and the second window to determine the sending window of the TCP connection.

[0116] The second window can be larger than the first window. The sending window determined by the terminal device 201 can be larger than the first window but smaller than the second window.

[0117] The above-described method for determining the sending window is merely an example, and this application does not impose any restrictions on the method for determining the sending window. For example, terminal device 201 may introduce a third window (such as a congestion window) to comprehensively calculate the sending window together with the first and second windows. The specific method is shown in Figure 6a, and will not be repeated here. As another example, terminal device 201 may determine the sending window of the TCP connection as the largest window among the first, second, and third windows. The specific method is shown in Figure 7, and will not be repeated here.

[0118] Based on the data processing method provided in this application embodiment, according to the above-described S401-S402, the sender's sending window is calculated by combining the first window (such as the receiving window) and the second window. Thus, even when the receiver's receiving window is small, the sender can still determine the sending window based on the second window, and the size of this sending window can be larger than the receiving window. This avoids the limitation of the receiving window on the sending window in cases of congestion or drastic changes in round-trip latency, improving data transmission efficiency. Simultaneously, it allows for flexible configuration of the second window for different TCP connections, avoiding negative optimization caused by calculating the sending window globally based on the same second window.

[0119] Next, the data processing method for calculating the sending window by introducing a third window, as provided in the embodiments of this application, will be described in detail with reference to the accompanying drawings. Here, taking the terminal device 201 in the network system 200 in Figure 2 or Figure 3 as the sender in the TCP connection to execute the data processing method as an example, the specific steps of the data processing method will be explained.

[0120] Figure 6a is a second schematic flowchart of a data processing method provided in an embodiment of this application. Referring to Figure 6a, the data processing method may include the following steps S601-S602.

[0121] S601, Terminal device 201 obtains the first window and third window of the TCP connection.

[0122] Terminal device 201 parses the ACK data sent by server 203 to obtain the first window returned by server 203, and calculates the third window according to the congestion control algorithm.

[0123] For details on how the terminal device 201 obtains the first window, please refer to S401 shown in Figure 4, which will not be repeated here.

[0124] As one possible implementation, the terminal device 201 can dynamically adjust the third window based on the network congestion status using a congestion control algorithm.

[0125] The congestion control algorithm can be the Bottleneck Bandwidth and Round-trip Propagation Time (BBR) algorithm, Reno algorithm, Tahoe algorithm, Newreno algorithm, etc., and this application does not limit it.

[0126] Optionally, taking the third window as an example of a congestion window, at the start of a TCP connection, the terminal device 201 determines the initial size of the third window (icwnd) to be a small value to avoid sending too much data at the start of the connection, thereby causing network congestion. For example, the initial size of the second window can be a maximum segment size (MSS) or multiple MSS.

[0127] Optionally, during the slow start phase of a TCP connection, the congestion window increases rapidly. Starting from its initial size, the congestion window increases by 1 MSS with each acknowledgment (ACK). The slow start phase continues until the congestion window reaches a threshold, called the slow start threshold (ssthresh).

[0128] Optionally, in the congestion avoidance phase, TCP enters the congestion avoidance phase when the congestion window size reaches the slow start threshold (ssthresh). In this phase, the congestion window growth rate slows down to avoid excessive network congestion. During the congestion avoidance phase, the congestion window size increases by 1 MSS / cwnd each time an acknowledgment packet is successfully received. The congestion avoidance phase continues until network congestion occurs (e.g., packet loss) or other mechanisms are triggered.

[0129] There are other corresponding third window calculation methods in other stages of TCP connection (such as fast retransmission and fast recovery, network packet loss and timeout, etc.), which will not be elaborated here.

[0130] S602, Terminal device 201 determines the sending window of the TCP connection based on the first window, the second window and the third window.

[0131] Compared to directly determining the smaller value between the receive window and the congestion window as the final value of the send window, in this embodiment, the terminal device 201 introduces a second window to recalculate the send window. After obtaining the first window and the third window, the terminal device 201 combines the first window, the third window, and the second window to determine the send window of the TCP connection.

[0132] As one possible implementation, the terminal device 201 performs a first processing on the two windows to obtain a pending window, and then performs a second processing on the pending window and the remaining window to obtain the sending window of the TCP connection.

[0133] The two windows refer to any two windows from the first, second, and third windows. The remaining windows are any windows from the first, second, and third windows other than the two windows mentioned above.

[0134] Optionally, the first process is used to retrieve the larger window from the two windows, and the second process is used to retrieve the smaller window from the two windows. Alternatively, the first process is used to retrieve the smaller window from the two windows, and the second process is used to retrieve the larger window from the two windows.

[0135] For example, two windows include a first window and a third window. A first process is used to obtain the smaller window in the first window and the third window, and a second process is used to obtain the pending window and the larger window in the second window.

[0136] Taking the first window as the sending window and the third window as the congestion window as an example, the sending window s1 = max(second window, min(receiving window w1, congestion window c1)).

[0137] For example, two windows include a first window and a second window. The first process is used to retrieve the larger window from the two windows, and the second process is used to retrieve the smaller window from the two windows.

[0138] Taking the first window as the sending window and the third window as the congestion window as an example, the sending window s1 = min(congestion window c1, max(second window, receiving window w1)).

[0139] For example, two windows include a second window and a third window. The first process is used to retrieve the larger window from the two windows, and the second process is used to retrieve the smaller window from the two windows.

[0140] Taking the first window as the sending window and the third window as the congestion window as an example, the sending window s1 = min(receiving window w1, max(second window, congestion window c1)).

[0141] The above method for determining the sending window is merely an example, and this application does not impose any restrictions on the method for determining the sending window. For example, terminal device 201 determines the sending window of the TCP connection as the largest window among the first window, second window, and third window. For the specific method, please refer to the relevant steps shown in Figure 7, which will not be repeated here.

[0142] This application does not restrict the specific configuration method of the second window. The second window is determined by the sender in the TCP connection based on the target application's business traffic and / or the bandwidth limitations of the TCP connection.

[0143] Among them, the business traffic of the target application can refer to the throughput, historical period traffic, traffic processing volume, etc. of the business traffic of the target application, and the bandwidth limit of the TCP connection can refer to the bandwidth of the physical link used for data transmission on which the TCP connection depends, the quality of service (QoS) configuration, etc.

[0144] As one possible implementation, the second window can be configured by the terminal device 201 in any way that corresponds to the TCP connection.

[0145] Optionally, terminal device 201 configures a second window based on the TCP connection interface.

[0146] For example, the interface for a TCP connection is used to configure the socket. The socket includes a structure, and the interface is used to configure the values ​​within that structure. A second window can be held by this structure.

[0147] Here, "interface" can refer to socket options (setsockopt). A socket is an abstraction of an endpoint for bidirectional communication between application processes on different hosts on a network. A socket represents one end of process communication on the network, providing a mechanism for application-layer processes to exchange data using network protocols. Sockets shield the communication details of the protocols, providing an abstraction of TCP and offering a unified and convenient interface for using TCP functionality.

[0148] The structure described above is a data type in programming languages ​​that allows data elements of different types to be combined into a single data structure. Within a structure, data elements are called members (or fields), and these members can be data of different types (such as integers, floating-point numbers, characters, etc.).

[0149] Terminal device 201 can determine the socket based on the socket's identity (ID), and then call the interface corresponding to the socket to configure the second window.

[0150] Optionally, terminal device 201 configures a second window based on the identity identifier of the TCP connection.

[0151] For example, the identifier of a TCP connection can be the user identifier of the target application. When configuring the second window based on the user identifier, the terminal device 201 configures the same second window for all TCP connections under the target application corresponding to the user identifier.

[0152] The data in the second window can be read from a configuration file in the system path of the terminal device 201.

[0153] Optionally, terminal device 201 configures a second window in response to a control message. The control message can be sent to terminal device 201 by a device such as a controller, and the control message carries the configured second window.

[0154] As one possible implementation, the second window can be configured with different windows for different stages of the TCP connection (such as slow start, packet loss, normal, etc.). Thus, at different stages of the TCP connection, the terminal device 201 determines the third window as the window corresponding to the current stage of the TCP connection among multiple windows (such as the slow start window, normal window, and packet loss window), and calculates the sending window based on the third window corresponding to that stage.

[0155] Optionally, as shown in Figure 6b, the horizontal axis represents the TCP connection time, and the vertical axis represents the value of the TCP window, also known as the sliding window (TCP window) of the TCP connection. This sliding window represents the amount of data the sender can send without receiving an acknowledgment, and is the basis for configuring the size of the sending window.

[0156] For example, the second window includes a slow start window corresponding to the slow start phase, a normal window corresponding to the normal phase, and a packet loss window corresponding to the packet loss phase.

[0157] In other possible implementations of this embodiment, the second window has a corresponding window value at any time during the TCP connection, that is, the second window includes any number of window values, which will not be elaborated here.

[0158] Based on the data processing method provided in this application embodiment, and based on the above-described S301-S302, the sender's sending window is calculated comprehensively based on a first window (such as a receiving window), a second window, and a third window (such as a congestion window). Thus, even when the receiver's receiving window is small, the sender can determine the sending window based on the third window, and the size of this sending window can be larger than the receiving window. This avoids the limitation imposed by the receiving window on the sending window in cases of congestion or drastic changes in round-trip time, thereby improving data transmission efficiency.

[0159] The foregoing description, in conjunction with Figures 4 to 6b, provides an overall explanation of how the data processing method provided in this application determines the sender's sending window. This application does not limit the specific method for determining the sending window. As an example, the calculation method of the sending window will be described again below with reference to Figure 7.

[0160] Please refer to Figure 7, which is a schematic flowchart of a data processing method provided in an embodiment of this application. This data processing method may include the following steps, and the calculation method of the sending window in this data processing method can be considered as another possible implementation of the calculation method of the sending window shown in Figure 4 or Figure 6b above.

[0161] S701, Terminal device 201 obtains the first window and third window of the TCP connection.

[0162] As one possible implementation, the specific method by which the terminal device 201 in S701 obtains the first and third windows of the TCP connection can be found in S601 shown in Figure 6a, and will not be repeated here.

[0163] S702, Terminal device 201 determines the pending window based on the first window and the third window.

[0164] After acquiring the first and third windows of the TCP connection, terminal device 201 determines that the pending windows include the first and third windows.

[0165] As one possible implementation, the pending window includes a receive window and a congestion window.

[0166] As another possible implementation, the pending window includes the larger value of the receiving window and the congestion window.

[0167] S703, when the first window or the third window is larger than the second window of the TCP connection, the terminal device 201 determines that the sending window of the TCP connection is equal to the larger window between the first window and the third window.

[0168] When the pending window includes a first window and a third window, if the first window and the third window are larger than the second window of the TCP connection, the terminal device 201 determines that the sending window of the TCP connection is equal to the larger window between the first window and the third window.

[0169] When the pending value of the sending window includes the larger value between the first window and the third window, the terminal device 201 determines that the sending window of the TCP connection is equal to the larger value between the first window and the third window if the larger value is greater than the second window of the TCP connection.

[0170] As described above, terminal device 201 determines the value of the sending window to be the maximum value among the first window, second window, and third window. This further improves the configuration independence and window size of the sending window, thereby increasing transmission efficiency.

[0171] Taking the first window w1=10, the third window c1=5, and the second window X=7 as an example, the sending window S=max(7,min(5,10))=7 is calculated using one of the sending window calculation methods shown in Figure 3.

[0172] Similarly, taking the first window w1=10, the third window c1=5, and the second window X=7 as an example, the sending window S=max(7,5,10)=10 is calculated using the sending window calculation method shown in Figure 5.

[0173] In the data processing method shown in Figures 3, 6a and 7 above, the terminal device 201 recalculated the sending window based on the second window. Subsequently, the terminal device 201 can also control the number of packets sent based on the value of the sending window of the TCP connection, which will not be elaborated here.

[0174] To complement the data processing method provided in the embodiments of this application, this application also provides a data processing apparatus 800. This data processing apparatus 800 is used to execute the aforementioned data processing method. As shown in FIG8, the data processing apparatus 800 includes an acquisition module 810 and a processing module 820.

[0175] For example, the data processing device 800 can implement the functions of any of the communication devices in the above embodiments, such as the terminal device 201 in FIG2, FIG3, FIG4, FIG6a or FIG7.

[0176] The acquisition module 810 is used to acquire the first window of a Transmission Control Protocol (TCP) connection; the first window is the window carried in the message sent by the receiver in the TCP connection.

[0177] The processing module 820 is used to determine the sending window of the TCP connection based on the first window and the second window; the second window is a window configured for the TCP connection.

[0178] The second window can be larger than the first window.

[0179] As one possible implementation, the processing module 820 is specifically used to: determine the sending window of the TCP connection based on the first window, the second window, and the third window; the third window is the window determined by the sender in the TCP connection according to the congestion control algorithm.

[0180] As one possible implementation, the processing module 820 is also used to: configure a second window based on an interface of a TCP connection; the interface is used to configure a socket; or, configure a second window based on an identity identifier of a TCP connection; the identity identifier includes the user identifier (UID) of the target application; or, configure a second window in response to a control message; the control message includes the second window.

[0181] As one possible implementation, the second window is determined by the sender in the TCP connection based on at least one of the target application's business traffic or the TCP connection's bandwidth limitations.

[0182] As one possible implementation, the processing module 820 is specifically used to: perform a first processing on two windows to obtain a pending window; the two windows are any two windows among the first window, the second window, and the third window; perform a second processing on the pending window and the remaining windows to obtain the sending window of the TCP connection; the remaining windows are the windows other than the two windows among the first window, the second window, and the third window.

[0183] As one possible implementation, the first process is used to select the larger window from the two windows, and the second process is used to select the smaller window from the pending window and the remaining window; or, the first process is used to select the smaller window from the two windows, and the second process is used to select the larger window from the pending window and the remaining window.

[0184] As one possible implementation, the two windows include a first window and a third window, a first process is used to obtain the smaller window between the first window and the third window, and a second process is used to obtain the larger window between the pending window and the second window; or, the two windows include a first window and a second window, a first process is used to obtain the larger window between the first window and the third window, and a second process is used to obtain the smaller window between the pending window and the third window; or, the two windows include a second window and a third window, a first process is used to obtain the larger window between the second window and the third window, and a second process is used to obtain the smaller window between the pending window and the first window.

[0185] As one possible implementation, the processing module 820 is specifically used to: determine the sending window of the TCP connection as the largest window among the first window, the second window, and the third window.

[0186] As one possible implementation, the sending window of a TCP connection is larger than the smaller window in the first and third windows.

[0187] As one possible implementation, the sending window of a TCP connection is larger than the first and third windows.

[0188] As one possible implementation, the second window includes a slow start window, a normal transmission window, or a packet loss window for the TCP connection. The processing module 820 is also configured to: determine whether the second window is a slow start window, a normal transmission window, or a packet loss window based on the current stage of the TCP connection.

[0189] It should be understood that the data processing device 800 provided in Figure 8 is only illustrated by the division of the above-described functional modules. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0190] For more detailed information on the functions performed by the aforementioned data processing device 800, please refer to the relevant descriptions of the data processing methods and their implementation methods provided in Figures 4-7.

[0191] All of the above modules can be implemented in software, hardware, or a combination of both. For example, the implementation methods of the acquisition module 810 and the processing module 820 will be described below.

[0192] As an example of a software functional unit, the acquisition module 810 or processing module 820 may include code running on a device instance. The device instance may be at least one of a physical device (e.g., a switch, router, server, etc.) or a virtualized device (e.g., a virtual machine, etc.). Furthermore, the aforementioned device instance may be one or more. For example, the acquisition module 810 or processing module 820 may include code running on multiple physical / virtualized devices.

[0193] As an example of a hardware functional unit, the acquisition module 810 or processing module 820 may include at least one hardware device. For example, the acquisition module 810 may include a network interface card, a transceiver, etc., and the processing module 820 may include any one or more processors such as a central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a neural network processing unit (NPU), a data processing unit (DPU), or a microprocessor (MP). Alternatively, the processing module 820 may be a device or device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).

[0194] This application also provides a communication device 900 as an example of a hardware device. The communication device 900 provided in this application can be any communication device (e.g., network device 202), any hardware device (e.g., terminal device 201, server 203), or any device with communication and processing capabilities (e.g., switch, router, server).

[0195] As shown in Figure 9, the communication device 900 includes a bus 902, a communication interface 904, a processor 906, and a memory 908. The communication interface 904, processor 906, and memory 908 communicate with each other via the bus 902. It should be understood that this application does not limit the number of processors and memories in the communication device 900. Optionally, the processor 906 of the communication device 900 can be connected to a display or input device (not shown in Figure 9) via the communication interface 904.

[0196] Bus 902 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one line is used to represent it in Figure 9, but this does not mean that there is only one bus or one type of bus. Bus 902 may include a path for transmitting information between various components of communication device 900 (e.g., communication interface 904, processor 906, memory 908).

[0197] Communication interface 904 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between communication device 900 and devices or communication networks. Communication interface 904 may include wired communication interfaces and wireless communication interfaces. Specifically, communication interface 904 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.

[0198] The display may include various display devices capable of display functions, such as plasma displays and liquid crystal displays. The communication device 900 can realize display functions through the display. Input devices may include various input devices capable of information / signal input, such as keyboards, mice, and touch screens.

[0199] Processor 906 may include a CPU, DSP, NP, NPU, DPU, MP, or one or more integrated circuits for implementing the solutions of this application. For example, processor 906 includes an ASIC, PLD, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of this invention. A processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. In the embodiments of this application, processor 906 can be used to execute the steps or operations in the data processing methods proposed in Figures 4, 6a, or 7 of the embodiments of this application.

[0200] Memory 908 may include volatile memory, such as random access memory (RAM). Memory 908 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Alternatively, memory 908 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer.

[0201] The memory 908 may store program code for executing the solution of this application, and the processor 906 may execute the program code stored in the memory 908. That is, the communication device 900 can implement the steps or operations in the data processing method proposed in FIG4, FIG6a or FIG7 in the embodiments of this application through the processor 906 and the program code in the memory 908. The program code may include one or more software modules. Optionally, the processor 906 itself may also store program code or instructions for executing the solution of this application.

[0202] In a specific embodiment, the communication device 900 may correspond to any of the aforementioned communication devices (e.g., terminal device 201, network device 202, server 203, etc.). The processor 906 reads the instructions in the memory 908, enabling the communication device 900 to execute the operations performed by any of the communication devices.

[0203] In a specific embodiment, the memory 908 stores executable program code for implementing the functions of the aforementioned acquisition module 810 and processing module 820. The processor 906 executes the executable program code to implement the functions of the aforementioned acquisition module 810 and processing module 820 respectively.

[0204] This application also provides a communication device 1000. The communication device 1000 is another example of a hardware device. The communication device 1000 provided in this application can be used as a network device (e.g., a switch, router, etc.) in this application. Any communication device proposed in this application (e.g., terminal device 201, network device 202, server 203, etc.) can be implemented on the communication device 1000.

[0205] As shown in Figure 10, the communication device 1000 includes a main control board 1010 and an interface board 1030.

[0206] The main control board 1010, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the communication device 1000, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1010 includes a central processing unit 1011 and a memory 1012.

[0207] Interface board 1030 is also known as a line processing unit (LPU), linecard, or service board. Interface board 1030 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, flexible Ethernet clients (FlexE Clients). Interface board 1030 includes: a central processing unit 1031, a network processor 1032, a forwarding table entry memory 1034, and a physical interface card (PIC) 1033.

[0208] The central processing unit 1031 on the interface board 1030 is used to control and manage the interface board 1030 and communicate with the central processing unit 1011 on the main control board 1010.

[0209] The network processor 1032 is used to implement packet forwarding processing. The network processor 1032 can be in the form of a forwarding chip. Specifically, the network processor 1032 forwards received packets based on the forwarding table stored in the forwarding table entry memory 1034. If the destination address of the packet is the address of the communication device 1000, the packet is sent to the CPU (such as the central processing unit 1011) for processing; if the destination address of the packet is not the address of the communication device 1000, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing includes: packet ingress interface processing, forwarding table lookup; downlink packet processing includes: forwarding table lookup, etc.

[0210] The physical interface card 1033 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1030 through this card, and processed packets are sent out from the physical interface card 1033. The physical interface card 1033, also called a daughter card, can be installed on the interface board 1030. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 1032 for processing. In some embodiments, the central processing unit can also perform the functions of the network processor 1032, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 1032 in the physical interface card 1033.

[0211] Optionally, the communication device 1000 includes multiple interface boards. For example, the communication device 1000 also includes an interface board 1040, which includes a central processing unit 1041, a network processor 1042, a forwarding table entry memory 1044, and a physical interface card 1043.

[0212] Optionally, the communication device 1000 also includes a switching fabric board 1020. The switching fabric board 1020 can also be referred to as a switch fabric unit (SFU). In cases where the communication device has multiple interface boards 1030, the switching fabric board 1020 is used to complete data exchange between the interface boards. For example, interface boards 1030 and 1040 can communicate via the switching fabric board 1020.

[0213] The main control board 1010 and the interface board 1030 are coupled. For example, the main control board 1010, interface boards 1030 and 1040, and the switching network board 1020 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and the main control board 1010 and the interface board 1030 communicate with each other through the IPC channel.

[0214] Logically, the communication device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processing unit 1031, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1032 looks up and forwards messages received by the physical interface card 1033 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table entry memory 1034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0215] In this embodiment, the operation on interface board 1040 is the same as that on interface board 1030, and will not be described again for simplicity. The communication device 1000 in this embodiment can correspond to the network device in the above method embodiments. The main control board 1010, interface board 1030 and / or 1040 in the communication device 1000 can realize the functions and / or various steps implemented by the communication device in the above method embodiments, and will not be described again for simplicity.

[0216] It's worth noting that a communication device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the stronger the data processing capability of the communication device, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching network board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the communication device may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the communication device can have at least one switching network board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture communication device are greater than those of a centralized architecture device. Alternatively, the communication device can also consist of a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this single board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to execute the combined functions. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.

[0217] In a specific embodiment, any of the aforementioned communication devices can be implemented on the communication device 1000. The memory 1012 of the main control board 1010 can store instructions for implementing the functions performed by the aforementioned communication devices (for example, instructions for implementing the functions of the aforementioned acquisition module 810 and processing module 820). The central processing unit 1011 of the main control board 1010 executes the instructions in the memory 1012 and can perform the functions performed by the aforementioned communication devices together with other components such as the interface board 1030 and the switching network board 1020.

[0218] In some possible implementations, any communication device proposed in the embodiments of this application can be a virtualization device. As an example, a virtualization device can be a virtual machine (VM), which is deployed on a hardware device (e.g., a physical host). A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Virtual machines can be configured as the communication devices involved in the embodiments of this application. For example, the various communication devices can be implemented based on a general-purpose physical host combined with network functions virtualization (NFV) technology. The communication device can be a virtual host, a virtual router, or a virtual switch. Those skilled in the art can, by reading this application, virtualize the various communication devices with the functions described in the embodiments of this application on a general-purpose physical host using NFV technology.

[0219] In some possible implementations, any communication device proposed in the embodiments of this application can be a processor or a chip. The chip may include a processor and a power supply circuit, the power supply circuit being used to supply power to the processor. In specific embodiments, the processor or chip may correspond to any of the aforementioned communication devices, and the processor or chip is capable of performing the operations performed by any of the communication devices.

[0220] This application also provides a communication system 1100 (or network system), as shown in FIG11. The communication system includes one or more communication devices. These communication devices can be any combination of one or more of the data processing devices 800. The combination of one or more communication devices can jointly execute the steps or operations in the data processing methods proposed in FIG4, FIG6a, or FIG7 of this application.

[0221] The memories of one or more communication devices in the communication system 1100 may contain the same instructions for executing the data processing methods proposed in Figures 4, 6a, or 7 of this application embodiment. Alternatively, the memories of one or more communication devices in the communication system 1100 may each contain partial instructions for executing the data processing methods proposed in Figures 4, 6a, or 7 of this application embodiment. In other words, a combination of one or more communication devices can jointly execute the instructions for implementing the data processing methods proposed in Figures 4, 6a, or 7 of this application embodiment.

[0222] In a specific embodiment, the memories in different communication devices within the communication system 1100 can store different instructions. That is, the instructions stored in the memories of the communication devices can implement the functions of the aforementioned acquisition module 810 and processing module 820.

[0223] In some possible implementations, one or more communication devices in the communication system 1100 can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.

[0224] This application also provides another communication system (or network system), which includes one or more processors and one or more memories. The one or more memories store instructions for implementing the data processing methods proposed in Figures 4, 6a, or 7 of this application. The one or more processors can execute the instructions in the one or more memories to perform the data processing methods proposed in Figures 4, 6a, or 7 of this application. For more detailed descriptions of the implementation of the processor and memory, please refer to the preceding descriptions of the processor and memory.

[0225] This application also provides a chip, including a processing circuit and an interface circuit. The interface circuit is used for transmitting and receiving data, and the processing circuit is used for executing the data processing method described above.

[0226] As one possible implementation, the chip also includes a storage circuit. The storage circuit, interface circuit, and processing circuit are connected via internal interconnection paths. The processing circuit is used to execute code in the storage circuit. When the code is executed, the processing circuit performs the aforementioned data processing method.

[0227] This application also provides a computer program product. The computer program product may be software or a program product containing instructions capable of running on a communication device or processor (e.g., running on one or more processors of the aforementioned data processing device 800, communication device 900, communication device 1000, or communication system 1100) or stored on any available medium. The instructions contained in the computer program product may include instructions for performing the steps or operations of the data processing methods proposed in FIG. 4, FIG. 6a, or FIG. 7 in the embodiments of this application. When the computer program product runs on a communication device or processor (e.g., running on one or more processors of the aforementioned data processing device 800, communication device 900, communication device 1000, or communication system 1100), it implements the steps or operations of the data processing methods proposed in FIG. 4, FIG. 6a, or FIG. 7 in the embodiments of this application.

[0228] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a communication device or processor to execute the steps or operations of the data processing method proposed in Figures 4, 6a, or 7 of this application.

[0229] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD). The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0230] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method, characterized in that, include: Obtain the first window of the Transmission Control Protocol (TCP) connection; The first window is the window carried in the message sent back by the receiver to the sender in the TCP connection; The sending window of the TCP connection is determined based on the first window and the second window; the second window is a window configured for the TCP connection.

2. The method according to claim 1, characterized in that, Determining the sending window of the TCP connection based on the first window and the second window includes: The sending window of the TCP connection is determined based on the first window, the second window, and the third window; the third window is the window determined by the sender in the TCP connection according to the congestion control algorithm.

3. The method according to claim 1 or 2, characterized in that, Before determining the sending window of the TCP connection based on the first window, the second window, and the third window, the method further includes: The second window is configured based on the interface of the TCP connection; the interface is used to configure the socket; or... The second window is configured based on the identity identifier of the TCP connection; the identity identifier includes the user identifier (UID) of the target application; or... The second window is configured in response to a control message; the control message includes the second window.

4. The method according to any one of claims 1-3, characterized in that, The second window is determined by the sender in the TCP connection based on at least one of the target application's service traffic or the bandwidth limit of the TCP connection.

5. The method according to claim 2, characterized in that, Determining the sending window of the TCP connection based on the first window, the second window, and the third window includes: The two windows are processed to obtain a window to be determined; the two windows can be any two windows from the first window, the second window, and the third window. The pending window and the remaining window are processed in a second way to obtain the sending window of the TCP connection; the remaining window is the window other than the first window, the second window and the third window.

6. The method according to claim 5, characterized in that, The first process is used to select the larger window from the two windows, and the second process is used to select the smaller window between the pending window and the remaining windows; or, The first process is used to select the smaller window from the two windows, and the second process is used to select the larger window from the pending window and the remaining windows.

7. The method according to claim 6, characterized in that, The two windows include the first window and the third window. The first process is used to obtain the smaller window between the first window and the third window, and the second process is used to obtain the undetermined window and the larger window between the second window; or, The two windows include a first window and a second window. The first processing is used to obtain the larger window between the first window and the third window, and the second processing is used to obtain the smaller window between the pending window and the third window; or, The two windows include the second window and the third window. The first process is used to obtain the larger window between the second window and the third window, and the second process is used to obtain the pending window and the smaller window between the first window.

8. The method according to claim 2, characterized in that, Determining the sending window of the TCP connection based on the first window, the second window, and the third window includes: The sending window of the TCP connection is determined to be the largest window among the first window, the second window, and the third window.

9. The method according to claim 7, characterized in that, The sending window of the TCP connection is larger than the smaller window between the first window and the third window.

10. The method according to claim 8, characterized in that, The sending window of the TCP connection is larger than the first window and the third window.

11. The method according to any one of claims 1-10, characterized in that, The second window includes a slow start window, a normal transmission window, or a packet loss window for the TCP connection. Before determining the sending window of the TCP connection based on the first window and the second window, the method further includes: The second window is determined to be one of the slow start window, the normal transmission window, or the packet loss window based on the current stage of the TCP connection.

12. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire the first window of a Transmission Control Protocol (TCP) connection; The first window is the window carried in the message sent back by the receiver to the sender in the TCP connection; The processing module is used to determine the sending window of the TCP connection based on the first window and the second window; the second window is a window configured for the TCP connection.

13. A communication device, characterized in that, The communication device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the communication device to perform the method as described in any one of claims 1-11.

14. A network system, characterized in that, The network system includes at least two communication devices, including the communication device as described in claim 13.

15. A computer program product containing instructions, characterized in that, When the instruction is executed, the method as described in any one of claims 1-11 is performed.

16. A computer-readable storage medium, characterized in that, It includes computer program instructions that, when executed, perform the method as described in any one of claims 1-11.