CN115514799A - TCP connection method, system, network device and storage medium - Google Patents

TCP connection method, system, network device and storage medium Download PDF

Info

Publication number
CN115514799A
CN115514799A CN202110699715.0A CN202110699715A CN115514799A CN 115514799 A CN115514799 A CN 115514799A CN 202110699715 A CN202110699715 A CN 202110699715A CN 115514799 A CN115514799 A CN 115514799A
Authority
CN
China
Prior art keywords
priority
tcp
response message
request message
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110699715.0A
Other languages
Chinese (zh)
Inventor
姜冰心
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202110699715.0A priority Critical patent/CN115514799A/en
Priority to PCT/CN2022/100561 priority patent/WO2022268137A1/en
Publication of CN115514799A publication Critical patent/CN115514799A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information

Abstract

The embodiment of the application provides a TCP connection method, a TCP connection system and network equipment, and belongs to the technical field of communication. The method comprises the following steps: the TCP request message with the highest priority sent by the terminal is sent to the server, and the TCP request message with the highest priority is analyzed to obtain a communication relation mode of the TCP request message; after receiving a first response message returned by the server, the network equipment verifies whether the first response message is a response message to the TCP request message with the highest priority based on the communication relation mode; if the first response message is determined to be the response message aiming at the TCP request message with the highest priority, the second response message is directly generated locally, the terminal does not need to wait for the response message to return, and the second response message is sent to the server, so that the time delay of TCP connection establishment between the terminal and the server is reduced, and the sensing effect of high-priority services is realized.

Description

TCP connection method, system, network device and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a TCP connection method, system, network device, and storage medium.
Background
With the development of information technology and network interconnection technology, the performance requirements of the internet-based terminal on service delay and jitter are higher and higher.
When an existing terminal interacts with a server based on the Internet, it needs to establish connection through a network device (such as an application gateway, an application level proxy or a data acquisition and analysis device) in a Transmission Control Protocol/Internet Protocol (TCP/IP) Protocol stack communication mode, where the network device transparently performs bidirectional Transmission of data, monitors interactive messages at two ends of the terminal and the server, and assists the terminal and the server in completing network communication. However, since the network device only proxies the TCP three-way handshake ACK packet, it is not able to perform optimized service on the service of the terminal, which results in incomplete processing of the TCP state packet, and thus the overall delay of the TCP service is relatively long, thereby affecting the service awareness of the terminal. Therefore, the existing technology for establishing connection between the terminal and the server has the problems that the overall time delay of the TCP service is long, and the terminal service cannot be sensed efficiently.
Disclosure of Invention
The embodiments of the present application mainly aim to provide a TCP connection method, system and network device, which aim to reduce the time delay for establishing a TCP connection between a terminal and a server and improve the perception effect on a terminal service.
In a first aspect, an embodiment of the present application provides a TCP connection method, including:
the TCP request message with the first priority is sent to a server, and the first priority is higher than any second priority;
analyzing the TCP request message with the first priority to obtain a communication relation mode of the TCP request message with the first priority;
receiving a first response message returned by the server, and verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode;
and if the first response message is determined to be a response message aiming at the TCP request message with the first priority, generating a second response message, and sending the second response message to the server.
In a second aspect, an embodiment of the present application further provides a TCP connection establishing system, where the system includes a terminal, a network device, and a server;
the terminal is used for sending a TCP request message;
the network device is used for sending the TCP request message with the first priority to the server, analyzing the TCP request message with the first priority and obtaining a communication relation mode of the TCP request message with the first priority; after receiving a first response message returned by the server, verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode, if the first response message is determined to be the response message to the TCP request message with the first priority, generating a second response message, and sending the second response message to the server;
and the server is used for returning a first response message after receiving the TCP request message with the first priority sent by the network equipment, and receiving the second response message.
In a third aspect, an embodiment of the present application further provides a network device, where the network device is configured to send a TCP request packet with a first priority to a server, and analyze the TCP request packet with the first priority to obtain a communication relationship mode of the TCP request packet with the first priority; after receiving a first response message returned by the server, verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode, if the first response message is determined to be the response message to the TCP request message with the first priority, generating a second response message, and sending the second response message to the server.
In a fourth aspect, an embodiment of the present application further provides a network device, including: a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the steps of the TCP connection method according to the first aspect when executing the computer program.
In a fifth aspect, the present embodiments further provide a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, causes the processor to implement the steps of the TCP connection method according to any one of claims 1 to 8.
The embodiment of the application provides a TCP connection method, a system, network equipment and a storage medium, and the method comprises the steps of firstly sending a received TCP request message with the highest priority sent by a terminal to a server through the network equipment, analyzing the TCP request message with the highest priority and obtaining a communication relation mode of the TCP request message; then, after receiving a first response message returned by the server, the network device verifies whether the first response message is a response message to the TCP request message with the highest priority based on the communication relation mode; if the first response message is determined to be the response message aiming at the TCP request message with the highest priority, the second response message is directly generated locally, the response message is not required to be returned by the terminal, and the second response message is sent to the server. The network equipment is used as intermediate equipment of the terminal and the server, resources are distributed for a high-priority TCP request message sent by the terminal, time delay of service establishment in the communication process can be shortened, success rate of TCP establishment is improved, the server is determined to analyze the TCP request sent by the terminal and generate a first response message, then a second response message is directly generated locally, the process of waiting for the terminal to generate a third response message and returning the third response message to the server is saved, and intelligent pre-scheduling authorization is carried out for the terminal to send the third response message and a GetHTTP request message (if the access is determined to be an HTTP webpage browsing request). The intelligent pre-scheduling can further effectively reduce the time delay of establishing the TCP connection between the terminal and the server. The whole process realizes the guarantee effect on the high-priority service.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a TCP connection system provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a network device provided in an embodiment of the present application;
fig. 3a is a flowchart of a first implementation of a TCP connection method provided in an embodiment of the present application;
fig. 3b is an interaction flowchart corresponding to the TCP connection method according to the first embodiment of the present application;
fig. 4 is a flowchart of a second implementation of a TCP connection method provided in an embodiment of the present application;
fig. 5a is a flowchart of a third implementation of a TCP connection method provided in an embodiment of the present application;
fig. 5b is a schematic diagram illustrating establishment of a TCP connection when air interface transmission of a first response packet is lost according to the embodiment of the present application;
fig. 5c is a schematic diagram illustrating TCP connection establishment when the second response packet is lost according to the embodiment of the present application;
fig. 6a is an interaction flow diagram of a TCP connection establishing method according to an embodiment of the present application;
fig. 6b is an interaction flow diagram of a TCP connection establishment method according to another embodiment of the present application;
fig. 7 is another schematic structural diagram of a network device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution order may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Before describing the TCP connection method, system and network device provided in this embodiment of the present application, it should be noted that, in a communication system, when a terminal establishes a TCP connection with a server, network services such as an HTTP proxy, an HTTP cache, application-based load balancing, deep content detection, gateway virus filtering, data collection audit and the like need to be provided through network devices, such as an application gateway, an application level proxy, and a data collection and analysis device. The application gateway, the application level proxy and the data acquisition and analysis equipment generally adopt a transparent proxy technology, act as a middle person between the terminal and the server, receive the TCP data packets flowing through and redirect the TCP data packets to a local network protocol stack of a kernel layer, perform protocol analysis processing and TCP recombination on the data packets by the protocol stack, inform the protocol stack to reconstruct the data packets by adopting a destination IP address and a destination port which redirect the original data packets, perform protocol encapsulation and send the data packets out, so that TCP connection is established between the terminal and the server. However, the existing TCP broker processing methods work in a normal TCP/IP protocol stack mode, and the broker establishes two socket connections with the terminal and the server respectively, transparently performs bidirectional data transmission, and monitors an interactive message between the terminal and the server as a broker, and assists the terminal and the server to complete network communication. There are two major problems, however: 1) The network device only proxies the TCP three-way handshake response message. 2) And the service priority of the terminal is not distinguished, and undifferentiated TCP optimization service is performed. As a result, the processing of the TCP state message is incomplete, so that the overall time delay of the TCP service is not small enough, and the perception effect of the server on the terminal service is influenced. And the TCP stream entering the network equipment is not differentially processed, so that the real value terminal/service experience cannot be guaranteed.
In order to solve the technical problem, embodiments of the present application provide a TCP connection method, a TCP connection system, and a network device. The TCP connection method is realized by network equipment which is in communication connection with a terminal and a server.
The following describes, with reference to the accompanying drawings, an implementation principle and a process of a TCP connection method provided by some embodiments of the present application. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic diagram of a TCP connection system according to an embodiment of the present disclosure. As shown in fig. 1, the TCP connection system 10 provided in this embodiment includes: a terminal 11, a network device 12 and a server 13.
The terminal 11 may be a portable electronic device for use by a user, including but not limited to a handheld computer, a tablet computer, a mobile phone, a media player, a Personal Digital Assistant (PDA), and the like, and may also include a combination of two or more thereof.
The network device 12, as a relay device for establishing a TCP connection between the terminal 11 and the server 13, may be generally located in a base station, and may be in communication connection with the terminal 11 and the server 13 through an air interface (also referred to as a wireless link). As shown in fig. 2, fig. 2 is a schematic structural diagram of a network device according to an embodiment of the present application. As shown in fig. 2, in the embodiment of the present application, the network device 12 includes a sending module 121, a receiving module 122, and an identifying module 123. The modules may communicate via one or more communication buses or signal lines, and the functions of each module may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits. Network devices 12 include, but are not limited to, application gateways, application level proxy devices, data collection and analysis devices, and the like, and may include combinations of two or more thereof.
The sending module 121 is configured to send a TCP request packet with a first priority or a second response packet to the server, where the TCP request packet with the first priority is a TCP request packet with a priority higher than any other priority sent by the terminal 11, the second response packet is a response packet of the first response packet locally generated by the network device 12, and the first response includes a response packet of the server for the TCP request packet with the first priority. Illustratively, the TCP request message may include, but is not limited to, a Radio Resource Control (RRC) message, a network slice parameter (initialcontextsetupprequest/pdusesestupprequest), a DNS request message, an IP message, and the like; the first response message is a message which is returned by the server after receiving the request message and confirms that the request message is received, and the second response message is a message which is generated locally after the network equipment receives the first response message and confirms that the first response message is received. For example, assuming that the TCP request message is represented as a SYN message, the corresponding first response message may be represented as a SYN ACK message, and the second response message may be represented as a proxyoack message. Wherein, SYN represents the flag symbol of the message, ACK represents the acknowledgement symbol, and Proxy represents the Proxy symbol. In a normal TCP connection process, proxyACK does not exist, after the network equipment receives SYN ACK returned by the server, the SYN ACK is sent to the terminal, the terminal generates ACK according to the SYN ACK, the ACK is sent to the network equipment, and the ACK is transferred to the server through the network equipment. In this embodiment, after receiving the SYN ACK returned by the server, the network device directly generates ProxyACK (equivalent to ACK of the terminal) locally after verifying the SYN ACK, without waiting for the terminal to return a real ACK, which can shorten the time delay of TCP establishment.
The receiving module 122 is configured to receive the TCP message sent by the diagnosis and the first response message returned by the server.
The identifying module 123 is configured to analyze the TCP request packet with the first priority, obtain a communication relation mode of the TCP request packet with the first priority, and verify whether the first response packet is a response packet to the TCP request packet with the first priority based on the communication relation mode; and if the first response message is determined to be a response message aiming at the TCP request message with the first priority, generating a second response message.
In addition, in some embodiments of the present application, network device 12 also includes a scheduling module 124 and a management interface 125 (shown in the figure in dashed boxes). The scheduling module 124 is configured to allocate uplink pre-scheduling of the third response packet and the GetHTTP packet for HTTP access.
And a management interface 125 for displaying the pre-configured terminal information and providing a retrieval function for the service identification information. For example, the management interface 125 may include an input box for a user to input service identification information or a selection item for a user to select service identification information, and trigger a retrieval function to retrieve the service identification information input or selected by the user from preset terminal information after detecting that the user inputs the service identification information or selects the service identification information. The priority of the TCP request message is determined according to the service identification information carried by the TCP request message.
The server 13 may be a single server or a server cluster, and is configured to provide a corresponding service to the terminal 11 after establishing a TCP connection with the terminal 11.
Referring to fig. 3a, fig. 3a is a flowchart illustrating a first implementation of a TCP connection method according to an embodiment of the present disclosure. As shown in fig. 3a, the TCP connection method is applied to the network device 12 shown in fig. 1, and includes S301 to S304. The details are as follows:
s301, the TCP request message with the first priority is sent to a server, and the first priority is higher than any second priority.
In an embodiment of the present application, the TCP request message may be a message sent when the terminal and the server establish a TCP handshake. Wherein, a network device (the network device is arranged in the base station) is arranged between the terminal and the server and is used as a transfer device for message transmission. Specifically, the terminal and the network device, and the server and the network device may be connected through an air interface.
Illustratively, the TCP request message may be a Radio Resource Control (RRC) message, a network slice message (Initial Context setup request), a DNS request message and/or an IP request message, etc.
The TCP request packet with the first priority may be a TCP request packet with a highest communication priority preset according to different service scenarios. For example, in a service scenario where the rrc message transmission is performed, a TCP request message representing the rrc message may be preset as a TCP request message with a first priority. Specifically, the determination of the priority of the TCP request packet needs to be preset according to a specific service scenario, which is not described herein again.
S302, the TCP request message with the first priority is analyzed, and the communication relation mode of the TCP request message with the first priority is obtained.
In this embodiment, the TCP request packet with the first priority may be a TCP request packet stored in a high priority queue, and after receiving the TCP request packet sent by the terminal, the network device first determines whether the priority of the TCP request packet is the first priority (high priority), and if yes, stores the TCP request packet in the high priority queue, so as to firstly and effectively allocate resources to a high priority user/service, provide a comprehensive TCP service for the high priority user/service, and provide differentiated services for users/services with different priorities while relieving the pressure of system resources.
The network equipment acquires the TCP request message with the first priority from the high-priority queue, analyzes the TCP request message with the first priority and obtains the communication relation mode of the TCP request message with the first priority.
Illustratively, the network device stores the communication relationship mode of the TCP request packet with the first priority, and transparently transmits the TCP request packet with the first priority to the server, so that the server performs parsing after receiving the TCP request packet with the first priority, and returns a first response packet, thereby implementing the first handshake between the terminal and the server. Specifically, the communication relationship mode of the TCP request packet with the first priority includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
S303, receive the first response packet returned by the server, and verify, based on the communication relationship mode, whether the first response packet is a response packet to the TCP request packet with the first priority.
Exemplarily, the network device receives a first response packet returned by the server, parses the first response packet, and determines that the first response packet is a response packet for a TCP packet with a first priority if the first response packet includes a communication relationship mode of the TCP request packet with the first priority; and if the first response message does not comprise the communication relation mode of the TCP request message with the first priority, determining that the first response message is not a response message aiming at the TCP message with the first priority.
S304, if it is determined that the first response packet is a response packet to the TCP request packet with the first priority, generating a second response packet, and sending the second response packet to the server.
In the embodiment of the application, after determining that the first response packet is a response packet to the TCP request packet with the first priority, the network device directly generates an acknowledgement packet, that is, a second response packet, to the first response packet locally, and sends the second response packet to the server, and the network device agent terminal completes three-way handshake with the server. The time delay of message interaction in three handshakes of the terminal and the server can be shortened.
In addition, the second response packet locally generated by the network device may be referred to as Proxy ACK, and when sending the locally generated second response packet to the server, the network device sends the first response packet, for example, SYN ACK to the terminal, so that the terminal correctly analyzes the first response packet SYN ACK, and replies a third response packet ACK for the first response packet, and after receiving the third response packet ACK, the network device may directly discard the third response packet locally, and does not transmit the third response packet to the server.
For example, the interaction flow corresponding to the TCP connection method provided in this embodiment may refer to fig. 3 b. As shown in fig. 3b, fig. 3b is an interaction flowchart corresponding to the TCP connection method provided in the first embodiment of the present application. As shown in fig. 3b, in the TCP connection process, after receiving the first response message syntack from the server to the TCP request message, the network device sends the first response message syntack to the terminal, without waiting for the acknowledgement message ActualACK returned by the terminal, and directly generates the second response message proxyoack locally and sends the second response message proxyoack to the server, so that the TCP connection between the terminal and the server is completed.
As can be seen from the above analysis, in the TCP connection method provided in the embodiment of the present application, first, the received TCP request packet with the highest priority sent by the terminal is sent to the server through the network device, and the TCP request packet with the highest priority is analyzed to obtain the communication relationship mode of the TCP request packet; then, after receiving a first response message returned by the server, the network device verifies whether the first response message is a response message to the TCP request message with the highest priority based on the communication relation mode; if the first response message is determined to be the response message aiming at the TCP request message with the highest priority, the second response message is directly generated locally, the terminal does not need to wait for the response message to return, and the second response message is sent to the server, so that the time delay of TCP connection establishment between the terminal and the server is reduced, and the sensing effect of high-priority services is realized.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a fourth implementation flow of a TCP connection method according to an embodiment of the present application. As shown in fig. 4, in this embodiment, compared with the embodiment shown in fig. 3, the specific implementation processes of S403 to S406 are the same as those of S301 to S304, except that S401 and S402 are further included before S403, which are detailed as follows:
s401, receiving a TCP request message sent by a terminal, and determining whether the priority of the TCP request message is the first priority.
Wherein the determining whether the priority of the TCP request packet is the first priority includes: and determining whether the priority of the TCP request message is the first priority or not according to the service identification information carried by the TCP request message.
Illustratively, the service identification information carried by the TCP request message includes: IP address, DNS domain name, slice ID, ARP value, and/or QoS index, etc.
The determining whether the priority of the TCP request message is the first priority according to the service identification information carried in the TCP request message includes: acquiring the service identification information carried by the TCP request message, and retrieving the service identification information from the pre-configured terminal information; if the service identification information is retrieved, determining that the priority of the TCP request message is the first priority; and if the service identification information cannot be retrieved, determining that the priority of the TCP request message is not the first priority.
The displaying of the preconfigured terminal information through a management interface of the network device, acquiring the service identifier information carried in the TCP request packet, and retrieving the service identifier information from the preconfigured terminal information may include: and acquiring the service identification information carried by the TCP request message, inputting or selecting the service identification information in an input frame or a selection item of a management interface, and triggering and retrieving the service identification information.
For example, when the network device receives a TCP request message of the terminal as a Radio Resource Control (RRC) message, the network device acquires an S-NSSAI or NSSAI parameter of the user as service identification information, matches the service identification information with a slice ID set preset in a management interface, and marks the user of the terminal as a high-priority user if one of the service identification information can be matched; when a TCP request message received by network equipment is InitialContextSetupRequest/PDSUSessenceSetupRequest from a core network, acquiring an ARP value and a QoS index of a user as service identification information, matching with an ARP value and a QoS index set preset by a management interface, and if one of the ARP value and the QoS index set can be matched, marking the user of the terminal as a high-priority user; when the network equipment receives a TCP request message from a terminal as a DNS request message, matching the DNS request message with DNS domain names preset on a management interface, and if one DNS request message can be matched with one DNS domain name, marking the service of the terminal as a high-priority service; when the TCP request message received by the network equipment is an IP message, the TCP request message is matched with the IP address preset by the management interface, and if one of the IP addresses can be matched, the service of the terminal is marked as a high-priority service.
S402, if the priority of the TCP request message is the first priority, the TCP request message is stored in a TCP priority queue.
Specifically, the TCP priority queue is a TCP optimized guarantee queue. The TCP request messages entering the TCP priority queue may enjoy TCP resource priority allocation.
And S403, sending the TCP request message with the first priority to a server, wherein the TCP request message with the first priority is a TCP request message which is sent by the terminal and has a priority higher than any other priority.
S404, analyzing the TCP request message with the first priority to obtain the communication relation mode of the TCP request message with the first priority.
S405, receiving a first response message returned by the server, and verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode.
S406, if it is determined that the first response packet is a response packet to the TCP request packet with the first priority, generating a second response packet, and sending the second response packet to the server.
In the TCP connection method provided in the above embodiment, by determining the priority of the received TCP request packet and storing the TCP request packet with the first priority in the TCP priority queue, the TCP service with a high priority can be optimized, which not only relieves the memory pressure, but also provides differentiated services for the TCP services with different priorities.
It should be noted that the specific implementation process of steps S403 to S406 is the same as the specific implementation process of steps S301 to S304 in fig. 3, and is not described herein again.
Referring to fig. 5a, fig. 5a is a flowchart illustrating a third implementation of a TCP connection method according to an embodiment of the present application. As can be seen from fig. 5a, in this embodiment, compared with the embodiment shown in fig. 4, the specific implementation processes of S501 to S506 are the same as those of S401 to S406, except that S507 to S511 are further included after S506. The details are as follows:
s501, receiving a TCP request message sent by a terminal, and determining whether the priority of the TCP request message is the first priority.
S502, if the priority of the TCP request message is the first priority, the TCP request message is stored in a TCP priority queue.
S503, the TCP request message with the first priority is sent to a server, and the TCP request message with the first priority is a TCP request message which is sent by the terminal and has a priority higher than any other priority.
S504, the TCP request message with the first priority is analyzed, and the communication relation mode of the TCP request message with the first priority is obtained.
And S505, receiving a first response message returned by the server, and verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode.
S506, if it is determined that the first response packet is a response packet to the TCP request packet with the first priority, generating a second response packet, and sending the second response packet to the server.
And S507, sending the first response message to the terminal, and judging whether the TCP connection is HTTP access according to the port number of the first response message.
In the embodiment of the application, after locally generating a second response message (e.g., proxy ACK), the network device sends a first response message (e.g., SYN ACK) to the terminal, and determines whether the TCP connection is an HTTP access according to a port number of the first response message, e.g., an 80 port or an 8080 port. For example, if the port number is 80 ports, it may be determined that this TCP connection is an HTTP access.
And S508, if the TCP connection is judged to be HTTP access, preparing uplink pre-scheduling authorization parameters for the third response message and the HTTP service request message with the preset format in the scheduling module, wherein the HTTP service request message with the preset format is in a message format correspondingly carried by the HTTP access.
In this embodiment, after determining that the TCP connection is an HTTP access, the network device prepares an air interface resource in advance for a third response packet (for example, ACK) returned by the terminal and an HTTP service request packet in a preset format and carried by the HTTP access in a pre-scheduling manner, so that the time delay for establishing the TCP service can be effectively shortened. The preset format HTTP service request message may be a GET type request message, such as a GetHTTP request message.
S509, if the TCP connection is judged not to be HTTP access, an uplink pre-scheduling authorization parameter is prepared for the third response message in the scheduling module;
it can be understood that if the TCP is only completed at this time, it is not necessary to prepare air interface resources in advance for the HTTP service request packet with the preset format returned by the terminal in a pre-scheduling manner.
Specifically, according to the response time of the TCP service group packet, it is determined whether to perform uplink pre-scheduling authorization on the TCP connection, and the third response packet is deleted. The determined parameters of the uplink pre-scheduling grant may include: at least one of response delay, pre-scheduling times, pre-scheduling intervals, pre-scheduling size and pre-scheduling guarantee strategies. Specifically, the implementation process of the pre-scheduling may refer to the description about the pre-scheduling in the prior art, and is not described herein again.
It can be understood that, after receiving a third response message (e.g., ACK) from the terminal, the network device determines that the third response message is a response message for the first response message (SYN ACK), and since the network device has locally generated a second response message Proxy ACK for the first response message and sent the second response message Proxy ACK to the server, the network device may directly delete the third response message locally, so as to shorten the time delay of TCP transparent transmission.
And S510, performing uplink pre-scheduling authorization on the third response message according to the prepared uplink pre-scheduling authorization parameter.
And S511, if the third response message from the terminal is determined to be received, deleting the TCP agent example.
In the same way, since the network device has already locally generated the second response message Proxy ACK and sent it to the server, it is determined that the processing flow is finished. Therefore, the network device can directly delete the current TCP proxy instance locally and release the cache space. And the HTTP service request message with the preset format is sent to the server in an uplink pre-scheduling authorization mode, so that the HTTP access efficiency can be effectively improved.
It can be understood that, when the network device transmits the first response message (e.g., SYN ACK) over the air interface to drop, the terminal may retransmit a TCP request message (e.g., SYN Retran) to request TCP establishment with the server. Exemplarily, as shown in fig. 5b, fig. 5b is a schematic diagram of TCP connection establishment when air interface transmission of a first response packet is lost according to the embodiment of the present application. As shown in fig. 5b, when the first response packet has an empty transmission loss problem, the network device already sends a second response packet (such as Proxy ACK) to the server; therefore, after receiving the retransmission TCP request message SYN of the terminal, the network device may directly regard the retransmission as an abnormal retransmission, and directly retransmit the first response message SYN ACK generated and stored before to the terminal.
In addition, when the network device sends the second response packet Proxy ACK to the server, there may be a problem that the second response packet Proxy ACK is lost. Exemplarily, as shown in fig. 5c, fig. 5c is a schematic diagram of TCP connection establishment when the second response packet is lost according to the embodiment of the present application. As can be seen from fig. 5b, when the network device sends the second response packet Proxy ACK to the server, if the second response packet Proxy ACK is lost, the network device may receive the first response packet sending request SYN ACK Retran from the server, and at this time, the network device may compare the current first response packet sending request SYN ACK Retran as a retransmission packet request according to the stored communication relationship mode, and may directly forward the locally generated second response packet Proxy ACK to the server.
After the network device receives the ACK packet from the terminal and determines that the ACK packet is a SYN ACK packet in response to the first response packet, the TCP connection is completed, and the TCP processing instance may be deleted.
As can be seen from the above analysis, in the TCP connection method provided in the embodiment of the present application, first, a TCP request packet with the highest priority sent by a terminal is sent to a server through a network device, and the TCP request packet with the highest priority is analyzed to obtain a communication relationship mode of the TCP request packet; then, after receiving a first response message returned by the server, the network device verifies whether the first response message is a response message to the TCP request message with the highest priority based on the communication relation mode; if the first response message is determined to be the response message aiming at the TCP request message with the highest priority, the second response message is directly generated locally, the terminal does not need to wait for the response message returned, and the second response message is sent to the server, so that the time delay of TCP connection establishment between the terminal and the server is reduced, and the sensing effect of high-priority services is realized.
It should be noted that the specific implementation process of steps S501 to S506 is the same as the specific implementation process of steps S401 to S406 in fig. 4, and specific reference may be made to the description in the embodiment of fig. 4, which is not repeated herein.
Please refer to fig. 6a and fig. 6b respectively, in which fig. 6a is a schematic interaction flow diagram of a TCP connection establishment method according to an embodiment of the present application. The details are as follows:
s601, establishing connection between a terminal and an air interface of network equipment;
s602, the terminal sends a TCP request message to the network equipment;
s603, the network equipment receives the TCP request message and sends the TCP request message to a rear server;
s604, the server analyzes the TCP request message and returns a first response message to the network equipment;
s606, the network equipment receives the first response message, locally generates a second response message, and sends the second response message to a server.
It can be determined through the interactive process of the TCP connection establishment method provided in this embodiment that, in the embodiment of the present application, the network device is used as an intermediary for establishing the TCP connection between the terminal and the server, and does not need to wait for the terminal to generate the third response message ACK for acknowledging the response after receiving the first response message SYN ACK, but directly generate the second response message Proxy ACK of the response class locally while sending the first response message SYN ACK to the terminal, and send the second response message Proxy ACK to the server, so that the server can acknowledge that the terminal has accepted and returned the response information, thereby prompting the server and the terminal to successfully establish the TCP connection. In the whole process, the time for the network equipment to wait for the terminal to return the third response message ACK can be saved, the efficiency of establishing TCP connection between the terminal and the server is improved, and the time delay is reduced.
Fig. 6b is an interaction flow diagram of a TCP connection establishment method according to another embodiment of the present application. Compared with the embodiment shown in fig. 6b, after the terminal establishes the TCP connection with the server, it needs to further determine whether the TCP connection is the TCP connection in the preset format, and if the TCP connection in the preset format is determined, the network device may prepare the pre-scheduling parameter for the TCP request packet in the preset format in advance, so as to implement that the TCP packet in the preset format accurately blanks resources in advance, thereby avoiding the time delay caused in the process of preparing the blank resources for the TCP packet in the preset format, and effectively shortening the time delay for establishing the TCP service in the preset format. The details are as follows:
s601, establishing connection between a terminal and an air interface of network equipment;
s602, the terminal sends a TCP request message to the network equipment;
s603, the network equipment receives the TCP request message and sends the TCP request message to a rear server;
s604, the server analyzes the TCP request message and returns a first response message to the network equipment;
s606, the network equipment receives the first response message, locally generates a second response message, and sends the second response message to a server;
s607, the network device determines whether the TCP connection is a preset format HTTP service request message according to the first response message, and then uplink pre-scheduling parameters are respectively prepared for a third response message and the preset format HTTP service request message in the scheduling module;
s608, the network device performs uplink pre-scheduling authorization on the third response message and the HTTP service request message with the preset format according to the prepared uplink pre-scheduling authorization parameter, and sends the third response message and the HTTP service request message with the preset format to the terminal;
s609, the terminal generates a third response message ACK and sends the third response message ACK to the network equipment;
s610, the network equipment determines that the third response message is received and deletes the TCP proxy example at this time;
s611, the terminal sends the HTTP service request message with the preset format to the network equipment.
Referring to fig. 7, fig. 7 is another schematic structural diagram of a network device provided in the present application. As shown in fig. 7, in the present embodiment, the network device 12 includes a processor 701 and a memory 702, and the processor 701 and the memory 702 are connected by a bus 703, such as an I2C (Inter-integrated Circuit) bus.
In particular, processor 701 is configured to provide computational and control capabilities that support the operation of the entire network device. The Processor 701 may be a Central Processing Unit (CPU), and the Processor 701 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Specifically, the Memory 702 may be a Flash chip, a Read-Only Memory (ROM) magnetic disk, an optical disk, a usb disk, or a removable hard disk.
Those skilled in the art will appreciate that the structure shown in fig. 7 is a block diagram of only a portion of the structure related to the embodiments of the present application, and does not constitute a limitation to the network devices to which the embodiments of the present application apply, and that a particular network device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
The processor is configured to run a computer program stored in the memory, and when executing the computer program, implement the network device functions provided by the embodiments of the present application.
In an embodiment, the processor is configured to execute a computer program stored in the memory and to implement the following steps when executing the computer program:
the TCP request message with the first priority is sent to a server, and the first priority is higher than any second priority;
analyzing the TCP request message with the first priority to obtain a communication relation mode of the TCP request message with the first priority;
receiving a first response message returned by the server, and verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode;
and if the first response message is determined to be a response message aiming at the TCP request message with the first priority, generating a second response message, and sending the second response message to the server.
In an embodiment, before sending the TCP request packet with the first priority to the server, the method further includes:
receiving a TCP request message sent by a terminal, and determining whether the priority of the TCP request message is higher than any second priority;
if the priority of the TCP request message is higher than any second priority, determining the priority of the TCP request message as the first priority;
if the priority of the TCP request message is the first priority, storing the TCP request message into a TCP priority queue;
the sending of the TCP request message with the first priority to a server includes:
and acquiring the TCP request message with the first priority from the TCP priority queue, and sending the TCP request message with the first priority to a server.
In an embodiment, the determining whether the priority of the TCP request packet is the first priority includes:
and determining whether the priority of the TCP request message is the first priority or not according to the service identification information carried by the TCP request message.
In an embodiment, the service identifier information carried in the TCP request packet includes: at least one of an IP address, a DNS domain name, a slice ID, an ARP value, a QoS index.
In an embodiment, the determining, according to service identifier information carried in the TCP request packet, whether the priority of the TCP request packet is the first priority includes:
acquiring the service identification information carried by the TCP request message, and searching the service identification information in a preset high-priority pool through an identification module;
if the service identification information is retrieved, determining that the priority of the TCP request message is the first priority;
and if the service identification information cannot be retrieved, determining that the priority of the TCP request message is not the first priority.
In an embodiment, after the sending the second response packet to the server, the method further includes:
sending the first response message to the terminal, and judging whether the TCP connection is HTTP access according to the port number of the first response message;
if the TCP connection is judged to be HTTP access, uplink pre-scheduling authorization parameters are prepared for a third response message and a preset format HTTP service request message in a scheduling module, wherein the preset format HTTP service request message is in a message format correspondingly carried by the HTTP access;
if the TCP connection is judged not to be HTTP access, an uplink pre-scheduling authorization parameter is prepared for the third response message in the scheduling module;
performing uplink pre-scheduling authorization on the TCP connection according to the prepared uplink pre-scheduling authorization parameter;
and if the third response message from the terminal is determined to be received, deleting the TCP proxy example.
In an embodiment, after generating a second response packet and sending the second response packet to the server if it is determined that the first response packet is a response packet to the TCP request packet with the first priority, the method further includes:
if a TCP request message retransmitted by a terminal is received, determining that the first response message is lost in the transmission process;
and retransmitting the first response message to the terminal.
In an embodiment, after sending the second response packet to the server, the method further includes:
if a first response message retransmission request from the server is received, determining that the second response message is lost in the transmission process;
and locally forwarding the second response message to the server.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the network device described above may refer to the description process of the corresponding function of the network device in the foregoing TCP connection method embodiment, and is not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to implement the steps of the TCP connection method provided in the foregoing embodiment.
The computer-readable storage medium may be an internal storage unit of the network device according to any of the foregoing embodiments, for example, a hard disk or a memory of the network device. The computer readable storage medium may also be an external storage device of the network device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the network device.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware embodiment, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
It should be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments. The above description is only for the specific embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A TCP connection method, comprising:
the TCP request message with the first priority is sent to a server, and the first priority is higher than any second priority;
analyzing the TCP request message with the first priority to obtain a communication relation mode of the TCP request message with the first priority;
receiving a first response message returned by the server, and verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode;
and if the first response message is determined to be a response message aiming at the TCP request message with the first priority, generating a second response message, and sending the second response message to the server.
2. The TCP connection method according to claim 1, wherein before sending the TCP request message with the first priority to the server, the TCP connection method further comprises:
receiving a TCP request message sent by a terminal, and determining whether the priority of the TCP request message is higher than any second priority;
if the priority of the TCP request message is higher than any second priority, determining the priority of the TCP request message as the first priority;
if the priority of the TCP request message is the first priority, storing the TCP request message into a TCP priority queue;
the sending of the TCP request packet with the first priority to a server includes:
and acquiring the TCP request message with the first priority from the TCP priority queue, and sending the TCP request message with the first priority to a server.
3. The TCP connection method according to claim 2, wherein the determining whether the priority of the TCP request packet is the first priority includes:
and determining whether the priority of the TCP request message is the first priority or not according to the service identification information carried by the TCP request message.
4. The TCP connection method according to claim 3, wherein the service identification information carried in the TCP request packet includes: at least one of an IP address, a DNS domain name, a slice ID, an ARP value, a QoS index.
5. The TCP connection method according to claim 4, wherein the determining whether the priority of the TCP request packet is the first priority according to the service identification information carried in the TCP request packet includes:
acquiring the service identification information carried by the TCP request message, and searching the service identification information in a preset high-priority pool through an identification module;
if the service identification information is retrieved, determining that the priority of the TCP request message is the first priority;
and if the service identification information cannot be retrieved, determining that the priority of the TCP request message is not the first priority.
6. The TCP connection method according to any one of claims 1 to 5, wherein after the sending the second response message to the server, the TCP connection method further comprises:
sending the first response message to the terminal, and judging whether the TCP connection is HTTP access according to the port number of the first response message;
if the TCP connection is judged to be HTTP access, uplink pre-scheduling authorization parameters are prepared for a third response message and a preset format HTTP service request message in a scheduling module, wherein the preset format HTTP service request message is in a message format correspondingly carried by the HTTP access;
if the TCP connection is judged not to be HTTP access, an uplink pre-scheduling authorization parameter is prepared for the third response message in a scheduling module;
performing uplink pre-scheduling authorization on the TCP connection according to the prepared uplink pre-scheduling authorization parameter;
and if the third response message from the terminal is determined to be received, deleting the TCP proxy example.
7. The TCP connection method according to claim 6, wherein after generating a second response packet and sending the second response packet to the server if it is determined that the first response packet is a response packet to the TCP request packet with the first priority, the method further comprises:
if a TCP request message retransmitted by a terminal is received, determining that the first response message is lost in the transmission process;
and retransmitting the first response message to the terminal.
8. The TCP connection establishment method according to claim 7, wherein after sending the second response packet to the server, the TCP connection establishment method further comprises:
if a first response message retransmission request from the server is received, determining that the second response message is lost in the transmission process;
and locally forwarding the second response message to the server.
9. A TCP connection establishment system is characterized by comprising a terminal, network equipment and a server;
the terminal is used for sending a TCP request message;
the network device is used for sending the TCP request message with the first priority to the server, analyzing the TCP request message with the first priority and obtaining a communication relation mode of the TCP request message with the first priority; after receiving a first response message returned by the server, verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode, if the first response message is determined to be the response message to the TCP request message with the first priority, generating a second response message, and sending the second response message to the server;
and the server is used for returning a first response message after receiving the TCP request message with the first priority sent by the network equipment, and receiving the second response message.
10. The network equipment is characterized in that the network equipment is used for sending a TCP request message with a first priority to a server, analyzing the TCP request message with the first priority and obtaining a communication relation mode of the TCP request message with the first priority; after receiving a first response message returned by the server, verifying whether the first response message is a response message to the TCP request message with the first priority based on the communication relation mode, if the first response message is determined to be the response message to the TCP request message with the first priority, generating a second response message, and sending the second response message to the server.
11. A network device, comprising:
a memory and a processor;
the memory is used for storing a computer program;
the processor for executing the computer program and implementing the steps of the TCP connection method according to any of claims 1 to 8 when executing the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the steps of the TCP connection method according to any one of claims 1 to 8.
CN202110699715.0A 2021-06-23 2021-06-23 TCP connection method, system, network device and storage medium Pending CN115514799A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110699715.0A CN115514799A (en) 2021-06-23 2021-06-23 TCP connection method, system, network device and storage medium
PCT/CN2022/100561 WO2022268137A1 (en) 2021-06-23 2022-06-22 Tcp connection method, system, network device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110699715.0A CN115514799A (en) 2021-06-23 2021-06-23 TCP connection method, system, network device and storage medium

Publications (1)

Publication Number Publication Date
CN115514799A true CN115514799A (en) 2022-12-23

Family

ID=84500488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110699715.0A Pending CN115514799A (en) 2021-06-23 2021-06-23 TCP connection method, system, network device and storage medium

Country Status (2)

Country Link
CN (1) CN115514799A (en)
WO (1) WO2022268137A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116977146B (en) * 2023-08-25 2024-02-09 山东省环科院环境工程有限公司 Instrument data management and control system for environmental protection monitoring based on Internet of things

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008172521A (en) * 2007-01-11 2008-07-24 Mitsubishi Electric Corp Communication equipment, and communication system
CN102026281A (en) * 2010-12-21 2011-04-20 大唐移动通信设备有限公司 Method and device for realizing TCP (transmission control protocol) proxy based on RNC (radio network controller)
CN102223266B (en) * 2011-06-17 2013-07-24 北京星网锐捷网络技术有限公司 Method and device for detecting protocol agent
CN108924138B (en) * 2018-07-05 2020-10-23 成都安恒信息技术有限公司 Method for realizing TCP proxy complete transparency

Also Published As

Publication number Publication date
WO2022268137A1 (en) 2022-12-29

Similar Documents

Publication Publication Date Title
KR101868070B1 (en) Service layer southbound interface and quality of service
US7984492B2 (en) Methods and apparatus for policy enforcement in a wireless communication system
CN106850402B (en) Message transmission method and device
US11949576B2 (en) Technologies for out-of-order network packet management and selective data flow splitting
CN110233881B (en) Service request processing method, device, equipment and storage medium
JP4909707B2 (en) System and method for resolving contention between applications requiring a data connection between a mobile communication device and a wireless network
EP3755024A1 (en) Message processing method, system, and user plane function device
CN106688277A (en) Efficient centralized resource and schedule management in time slotted channel hopping networks
CN103125141A (en) Aggregation of mobile broadband network interfaces
EP3227842A1 (en) Method for supporting negotiation service at a service layer
JP2021158664A (en) Method, device, and computer program product for error processing for indirect communication
CN110944039B (en) Micro-service discovery method, system and device for 5G access network
CN108432212B (en) Communication method, device and system based on Stream Control Transmission Protocol (SCTP)
WO2022268137A1 (en) Tcp connection method, system, network device, and storage medium
CN108809549B (en) Data transmission method and equipment
CN108184008A (en) A kind of terminal Communication Performance Evaluation method and apparatus
US11160139B2 (en) Method for optimizing per message type data exchange between connected objects
WO2015027931A1 (en) Method and system for realizing cross-domain remote command
CN116055403A (en) Message data transmission method, device and server
CN111225423B (en) Method and device for forwarding data
US20160149855A1 (en) Service processing method, system, and relevant device
US10849179B1 (en) Mobile network tool
CN114173429A (en) Communication method and system for wireless access network and edge computing platform under 5G private network
WO2014101046A1 (en) Network device deployment method, base station, and network element management device
CN105323848B (en) Data channel control method and device and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication