WO2021218520A1 - Method and apparatus for establishing tcp connection, and server - Google Patents
Method and apparatus for establishing tcp connection, and server Download PDFInfo
- Publication number
- WO2021218520A1 WO2021218520A1 PCT/CN2021/083415 CN2021083415W WO2021218520A1 WO 2021218520 A1 WO2021218520 A1 WO 2021218520A1 CN 2021083415 W CN2021083415 W CN 2021083415W WO 2021218520 A1 WO2021218520 A1 WO 2021218520A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- client
- address
- communication delay
- server
- database
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
Definitions
- This application relates to the field of network technology, and in particular to a method, device and server for establishing a TCP connection.
- the client When the client establishes a TCP (Transmission Control Protocol) connection with the server, the client first sends a SYN (Synchronize Sequence Numbers) signal to the server. After receiving the SYN signal, the server sends the SYN signal to the client. The end sends a SYN signal and an ACK (Acknowledge character) signal, and at the same time the server starts a timer and sets the timeout value of the timer.
- the timeout value is usually set according to the empirical value of RTT (Round-Trip Time). If the timer reaches the timeout value, the server has not received the ACK signal returned by the client.
- the server repeatedly sends the SYN signal and ACK signal to the client, and starts the timer again and sets the timer's timeout Value
- the timeout value is usually set according to the exponential value of the last timeout value.
- the server needs to send multiple SYN signals and ACK signals.
- the timeout value increases exponentially, and the timeout value becomes larger and larger, which causes the server to wait for the client to reply more time. The longer it comes, the slower the connection between the client and the server is established.
- the purpose of this application is to provide a method, device and server for establishing a TCP connection, so as to increase the speed of establishing a connection between the client and the server.
- an embodiment of the present application provides a method for establishing a TCP connection.
- the method includes: if a connection request from a client is received, sending a response signal corresponding to the connection request to the client; wherein the connection request carries the client Obtain the pre-saved communication delay corresponding to the client address; start the preset timer, and set the timeout value of the timer according to the communication delay; based on the timeout value, establish a TCP connection with the client.
- an embodiment of the present application provides a device for establishing a TCP connection, the device comprising: a signal sending module configured to send a response signal corresponding to the connection request to the client if a connection request from the client is received; wherein, The connection request carries the client address of the client; the delay acquisition module is set to obtain the pre-saved communication delay corresponding to the client address; the timeout value setting module is set to start the preset timer, which is set according to the communication delay The timeout value of the timer; the TCP connection module is set to establish a TCP connection with the client based on the timeout value.
- an embodiment of the present application provides a server, including a processor and a memory.
- the memory stores machine-executable instructions that can be executed by the processor.
- the processor executes the machine-executable instructions to implement any one of the embodiments of the first aspect.
- the method of establishing a TCP connection includes a server, including a processor and a memory.
- embodiments of the present application provide a machine-readable storage medium that stores machine-executable instructions.
- the machine-executable instructions When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt processing
- the device implements the method for establishing a TCP connection in any one of the embodiments of the first aspect.
- the embodiments of the present application provide a computer program product containing instructions.
- the computer program product containing instructions runs on a computer, the computer executes the steps of the method for establishing a TCP connection provided in the embodiments of the present application.
- an embodiment of the present application provides a computer program, which when the computer program runs on a computer, causes the computer to execute the steps of the method for establishing a TCP connection provided by the embodiment of the present application.
- the embodiments of the application provide a method, device and server for establishing a TCP connection. If a connection request from a client is received, a response signal corresponding to the connection request is sent to the client; the connection request carries the client address of the client. ; Obtain the pre-saved communication delay corresponding to the client address; at the same time, start the preset timer, and set the timeout value of the timer according to the communication delay; based on the timeout value, establish a TCP connection with the client.
- the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger. The time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
- FIG. 1 is a flowchart of a method for establishing a TCP connection provided by an embodiment of the application
- FIG. 2 is a flowchart of another method for establishing a TCP connection provided by an embodiment of the application
- FIG. 3 is a flowchart of a method for obtaining communication delay according to an embodiment of the application
- FIG. 4 is a flowchart of another method for obtaining communication delay according to an embodiment of the application.
- FIG. 5 is a flowchart of another method for obtaining communication delay according to an embodiment of this application.
- FIG. 6 is a flowchart of another method for establishing a TCP connection provided by an embodiment of the application.
- FIG. 7 is a schematic structural diagram of an apparatus for establishing a TCP connection provided by an embodiment of the application.
- FIG. 8 is a schematic structural diagram of a server provided by an embodiment of the application.
- the client when the client establishes a TCP connection with the server, the client first sends a SYN signal to the server. After receiving the SYN signal, the server sends a SYN signal and an ACK signal to the client. At the same time, the server starts the timer and sets it.
- the timeout value of the timer the timeout value is usually set according to the experience value of RTT. If the timer reaches the timeout value, but the ACK signal returned by the client has not been received, the server repeatedly sends the SYN signal and ACK signal to the client, and starts the timer again and sets the timer's timeout value.
- the timeout value is usually set according to the exponential value of the last timeout value.
- the server needs to send multiple SYN signals and ACK signals.
- the timeout value increases exponentially, and the timeout value becomes larger and larger, which causes the server to wait for the client to reply more time. The longer it comes, the slower the connection between the client and the server is established.
- the method, device, and server for establishing a TCP connection provided by the embodiments of this application can be applied to the network connections of clients such as computers and mobile phones, that is, the method provided in the embodiments of this application can be applied to the client In the process of establishing a TCP connection with the server.
- a method for establishing a TCP connection disclosed in the embodiment of this application is first introduced in detail.
- the embodiment of the present application provides a method for establishing a TCP connection.
- the method can be applied to the server. As shown in FIG. 1, the method includes the following steps:
- Step S102 if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
- the foregoing client may be a mobile terminal device such as a computer and a mobile phone
- the foregoing server may be a device such as a server.
- the aforementioned client may be a desktop computer, or a mobile terminal device such as a mobile phone or a tablet computer.
- the connection request may be a SYN signal sent by the client
- the response signal may be a SYN signal and an ACK signal sent by the server to notify the client to confirm receipt of the connection request signal.
- the client address of the above client may be the IP (Internet Protocol, Internet Protocol) address of the client.
- the IP address of the client is referred to as the client address for short.
- the client when a TCP connection is established, the client first sends a connection request SYN signal to the server, and the SYN signal includes the IP address of the client.
- the server After the server receives the SYN signal, it must confirm the SYN signal of the client, and the server also sends a response signal, which includes the SYN signal and the ACK signal.
- Step S104 Obtain a pre-saved communication delay corresponding to the client address.
- the above-mentioned communication delay can be RTT (Round-Trip Time), which is also an important performance indicator in a computer network. It means that from the server sending data to the server receiving the confirmation signal from the client, a total of The time delay experienced. Since the connection request carries the client address of the client, when the server and the client communicate and connect, the calculated RTT has the corresponding server address and client address of the connection, so the calculated RTT can be obtained Set the above-mentioned pre-saved communication delay.
- RTT Red-Trip Time
- Step S106 Start a preset timer, and set the timeout value of the timer according to the communication delay.
- the server has obtained the communication delay corresponding to the client address, and the server can set the timeout value of the preset timer according to the communication delay, and start the preset timer.
- a preset timer can record the time from when the server sends the signal to when the signal is received.
- the preset timer is referred to as a timer for short.
- the length of time from the moment when the server sends the response signal to the current moment can be determined. If the server receives the ACK signal returned by the client before the timer expires, when the server receives the ACK signal, the value of the timer can indicate: from the server sending the response signal to receiving the ACK signal returned by the client The time between.
- the above-mentioned timeout value can be set according to the calculated RTT during the communication connection between the server and the client before, that is, the communication delay setting.
- the communication delay is the communication delay corresponding to the client address stored in advance in step S104.
- Step S108 based on the timeout value, establish a TCP connection with the client.
- the server after the server starts the preset timer, if the timer time exceeds the timeout value, the server will send a response signal to the client again until the TCP connection is established with the client.
- the server if the server does not receive the ACK signal from the client after the timer expires, the server sends a response signal to the client again, and while sending the response signal to the client, restarts the aforementioned preset timing Device. Before the server establishes a TCP connection with the client, the steps of sending a response signal to the client again and restarting the timer are repeated cyclically until the server establishes a TCP connection with the client.
- the connection between the server and the client fails.
- the number of connections refers to the number of times the server sends a response signal to the client after receiving the connection request from the client.
- the preset value may be a preset number threshold. If the number of connections exceeds the preset number threshold, the server determines that the connection with the client fails.
- the embodiment of the application provides a method for establishing a TCP connection. If a connection request from a client is received, a response signal corresponding to the connection request is sent to the client; the connection request carries the client address of the client; and the pre-saved address is obtained.
- the communication delay corresponding to the client address is started; the preset timer is started at the same time, and the timeout value of the timer is set according to the communication delay; based on the timeout value, a TCP connection is established with the client.
- the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger.
- the time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
- the embodiment of the present application provides another method for establishing a TCP connection, which is implemented on the basis of the method in the above embodiment; this embodiment focuses on the specific implementation of the step of obtaining the pre-saved communication delay corresponding to the client address
- the process (implemented by step S204), as shown in Figure 2, the method includes the following steps:
- Step S202 if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
- Step S204 Obtain the communication delay corresponding to the client address from the pre-established database.
- the foregoing pre-established database may store multiple server addresses and multiple client addresses corresponding to multiple communication delays when a connection is established.
- the database is established in the following manner: acquiring the historical communication records of the client corresponding to the client address, extracting the communication delay from the historical communication record, and storing the extracted communication delay corresponding to the client address in the database.
- the server obtains multiple historical communication records corresponding to the client address, and the multiple historical communication records correspond to different servers, the communication delay is extracted from each historical communication record. And the extracted communication delay, the client address and the server address corresponding to the historical communication record are correspondingly saved in the database.
- the server can extract the communication delay from the latest historical communication record among the multiple historical communication records, or extract the smallest one from the multiple historical communication records Communication delay.
- the server then stores the extracted communication delay, client address, and server address in the database.
- the server can obtain its historical communication record through the client address, for example, the communication record of the client with the server in the past month.
- the connection request sent by the client to the server carries the client address, so the historical communication record stored in the server includes the historical communication Record the corresponding client address.
- the client's historical communication records can be obtained through the client's address.
- the aforementioned communication record may include information such as communication delay when establishing a connection with one or more servers.
- the server may extract the communication delay when the client establishes a connection with the current server from the historical communication record, and save the extracted communication delay corresponding to the client address in the database.
- step S204 referring to the flowchart of a method for obtaining communication delay shown in FIG. 3, the specific implementation process of the step of obtaining the communication delay corresponding to the client address from the pre-established database, the method includes the following step:
- Step S301 If the communication delay corresponding to the client address cannot be obtained from the database, determine the first area range to which the client address belongs.
- the first area range to which the client address belongs may be the geographic location of the geographic address corresponding to the client address. For example, it may be the area where the geographic address corresponding to the client address is located, within a range of one hundred meters, that is, the geographic address corresponding to the client address is the center and a radius of one hundred meters.
- Step S302 Obtain the communication delay corresponding to the client address within the first area from the database, and determine the communication delay as the communication delay corresponding to the client address of the client.
- the communication delay may be determined as the communication delay corresponding to the client address of the client.
- the server can also save the communication delay corresponding to the client address in the database to meet the richness and real-time nature of the database.
- the server can determine the IP addresses of other clients within the first area. Furthermore, the server obtains the communication delay corresponding to the IP address of the other client from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server can store the acquired communication delay in the database corresponding to the client address of the client currently sending the connection request.
- the aforementioned database also stores: the server address of the server communicating with the client corresponding to the client address in the historical communication record. Among them, the server address, client address, and communication delay are stored correspondingly. Referring to the flowchart of another method for obtaining communication delay shown in FIG. 4, the specific implementation process of the step of obtaining the communication delay corresponding to the client address from the pre-established database, the method includes the following steps:
- Step S401 Obtain the server address of the server that has received the connection request.
- Step S402 Obtain the communication delay corresponding to the client address and the server address from the pre-established database, and determine the communication delay as the communication delay corresponding to the client address of the client.
- the communication delay represents the delay when the server establishes a connection with the client, so the communication delay stored in the database not only needs to have a corresponding client address, but also a server address corresponding to it.
- the server can directly obtain the server address of the server that receives the connection request, and then obtain the communication delay corresponding to the client address and the obtained server address from the pre-established database, and set the The communication delay is determined as the communication delay corresponding to the client address of the client.
- the server address may be the IP address of the server, and if the server is a server, the server address is the IP address of the server. After the server receives the connection request from the client, it can obtain its own IP address. Then the server obtains the communication delay corresponding to the client address and its own IP address from the pre-established database, and determines the obtained communication delay as the communication delay corresponding to the client address of the client.
- step S402 referring to the flowchart of another method for obtaining communication delay shown in FIG. 5, the specific implementation process of the steps of obtaining the communication delay corresponding to the client address and the server address from the pre-established database is shown in FIG. As shown in Figure 5, the method includes the following steps:
- Step S501 If the communication delay corresponding to the client address and the server address cannot be obtained from the database, determine the second area range to which the client address belongs.
- the second area range to which the client address belongs may be the geographic location of the geographic address corresponding to the client address. For example, it may be the area where the geographic address corresponding to the client address is located, within a range of one hundred meters, that is, the geographic address corresponding to the client address is the center and a radius of one hundred meters.
- Step S502 Obtain the communication delay corresponding to the server address and the client address in the second area from the database.
- the server After the server obtains the addresses of other clients in the second area, it can search the database for the communication delays corresponding to the server addresses and the client addresses in the second area.
- the server can determine the IP addresses of other clients in the second area. Furthermore, the server obtains the communication delay corresponding to the server address and the IP address of the other client from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server may correspondingly save the acquired communication delay, server address, and client address of the client currently sending the connection request in the database.
- Step S503 If the communication delay corresponding to the server address and the client address within the second area range cannot be obtained from the database, determine the third area range to which the server address belongs.
- the third area range to which the server address belongs may be the geographic location of the geographic address corresponding to the server address. For example, it may be the area where the geographic address corresponding to the server address is located, within a range of one hundred meters, that is, the geographic address corresponding to the server address is the center and a radius of one hundred meters.
- Step S504 Obtain the communication delay corresponding to the client address in the second area and the server address in the third area from the database.
- the server After obtaining the addresses of other clients in the second area and the IP addresses of other servers in the third area, the server can obtain the corresponding communication delay from the database.
- the server can determine the IP addresses of other clients in the second area, and determine the IP addresses of other servers in the third area. Furthermore, the server obtains the communication delay corresponding to the IP address of the other client and the IP address of the other server from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server may correspondingly save the acquired communication delay, the server address currently receiving the connection request, and the client address currently sending the connection request in the database.
- Step S206 Start a preset timer, and set the timeout value of the timer according to the communication delay.
- Step S208 based on the timeout value, establish a TCP connection with the client.
- the above method also includes the implementation process of the database update step, including:
- the updated communication delay is extracted from the updated historical communication record
- the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the updated communication delay corresponding to the client address is saved in the database.
- the same client may have multiple communication records with the same server. If the communication delay between the same client and the server has been stored in the database, and then the client and the server communicate again, this The time server will update the communication delay of this time to the history record. At the same time, the server compares the updated communication delay with the historical communication delay previously saved in the database. If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the server saves the updated communication delay corresponding to the client address in the database to ensure the real-time performance of the database. In addition, if the updated communication delay is greater than the communication delay corresponding to the client address recorded in the database, the server does not perform any processing.
- the corresponding communication delay is extracted through the client's historical communication records; the database is established according to the client address, server address and the corresponding communication delay; the database is obtained from the client that is establishing a connection
- the communication delay corresponding to the address and the server address is used to set the timeout value of the started timer, that is, to configure the acquired communication delay as the timeout value of the timer by configuring the timer.
- the embodiment of this application provides another method for establishing a TCP connection, which is implemented on the basis of the method in the above-mentioned embodiment; this embodiment focuses on the specific implementation process of establishing a TCP connection with the client based on the timeout value (specifically (Implemented through steps S608-S610), as shown in Figure 6, the method includes the following steps:
- Step S602 if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
- Step S604 Obtain a pre-saved communication delay corresponding to the client address.
- Step S606 Start a preset timer, and set the timeout value of the timer according to the communication delay.
- Step S608 When the time duration of the timer is less than the timeout value, the response signal returned by the client is received, and it is determined that the TCP connection with the client is successfully established.
- the preset timer When the server sends the response signal corresponding to the connection request to the client, the preset timer is started. The timer keeps counting until the server receives the connection confirmation signal sent by the client. In the case that the timer duration is less than the timeout value, the server receives the connection confirmation signal sent by the client, and the timer stops timing, and at the same time, it is determined that the TCP connection with the client is successfully established.
- Step S610 if the timer duration reaches the timeout value, the response signal returned by the client is not received, continue to perform the step of sending the response signal corresponding to the connection request to the client until the response signal returned by the client is received, or Meet the preset conditions.
- the timer duration reaches the timeout value and the server does not receive the connection confirmation signal sent by the client, the timer will stop timing. Then the server will continue to send the response signal corresponding to the connection request to the client, and at the same time start the timer again, until the server receives the response signal returned by the client, it stops timing. Or, in the case that the server has not received the response signal returned by the client, after meeting the preset condition, the connection is stopped and the connection failure is displayed.
- the preset condition includes: after receiving the connection request, the number of times the response signal is sent reaches the preset number threshold, or the time interval between the current time and the first time the response signal is sent meets the preset time threshold.
- the above-mentioned frequency threshold and time threshold may be set according to the historical communication records of the specific client.
- the frequency threshold may be 10, 15, etc.
- the time threshold may be 1 minute, 5 minutes, etc.
- the server after receiving the connection request, the server sends a response signal to the client, and starts a timer to start counting. If the time duration reaches the timeout value, the server does not receive the connection confirmation signal sent by the client, the server will send a response signal to the client again, until the number of times the response signal is sent reaches the preset threshold, then the connection will be stopped , And show that the connection failed.
- the server will send a response signal to the client again, and start the timer again to start timing until the current time is equal to the first
- the connection is stopped and the connection failure is displayed.
- the connection is directly established; when the timing duration is greater than the timeout value, the timer is restarted and the preset is set Condition, terminate the connection in time, in the case of poor network status, avoid the situation that the server waits for the reply from the client to be longer and longer due to the increasing timeout value, and improves the establishment between the client and the server The speed of the TCP connection.
- an embodiment of the present application also provides a device for establishing a TCP connection.
- the device includes:
- the signal sending module 71 is configured to send a response signal corresponding to the connection request to the client if a connection request from the client is received. Among them, the client address of the client is carried in the connection request.
- the delay acquiring module 72 is configured to acquire a pre-saved communication delay corresponding to the client address.
- the timeout value setting module 73 is configured to start a preset timer, and set the timeout value of the timer according to the communication delay.
- the TCP connection module 74 is set to establish a TCP connection with the client based on the timeout value.
- the above-mentioned delay obtaining module 72 is configured to obtain the communication delay corresponding to the client address from a pre-established database.
- the database is established in the following manner: acquiring the historical communication records of the client corresponding to the client address, extracting the communication delay from the historical communication record, and storing the extracted communication delay corresponding to the client address in the database.
- the above-mentioned delay obtaining module 72 is configured to: if the communication delay corresponding to the client address cannot be obtained from the database, determine the first area range to which the client address belongs; obtain from the database The communication delay corresponding to the client address in the first area is determined as the communication delay corresponding to the client address of the client.
- the aforementioned database also stores: the server address of the server communicating with the client corresponding to the client address in the historical communication record; the server address, the client address, and the communication delay Corresponding to save.
- the above-mentioned delay obtaining module 72 is configured to: obtain the server address of the server that receives the connection request; obtain the communication time corresponding to the client address and the server address from a pre-established database. Delay, determine the communication delay as the communication delay corresponding to the client address of the client.
- the above-mentioned delay obtaining module 72 is configured to determine the second area range to which the client address belongs if the communication delay corresponding to the client address and the server address cannot be obtained from the database; Obtain the communication delay corresponding to the server address and the client address in the second area from the database; if the communication delay corresponding to the server address and the client address in the second area cannot be obtained from the database , Determine the third area range to which the server address belongs; obtain the communication delay corresponding to the client address in the second area range and the server address in the third area range from the database.
- the above-mentioned apparatus further includes a database update module, configured to extract the updated communication delay from the updated historical communication record if the updated historical communication record of the client corresponding to the client address is obtained; If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the updated communication delay corresponding to the client address is saved in the database.
- a database update module configured to extract the updated communication delay from the updated historical communication record if the updated historical communication record of the client corresponding to the client address is obtained; If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the updated communication delay corresponding to the client address is saved in the database.
- the above-mentioned TCP connection module 74 is set to: when the timer duration is less than the timeout value, the response signal returned by the client is received, and it is determined that the TCP connection with the client is successfully established; When the timing period reaches the timeout value, no response signal returned by the client is received, and the step of sending the response signal corresponding to the connection request to the client is continued until the response signal returned by the client is received or the preset condition is met.
- the preset condition includes: after receiving the connection request, the number of times the response signal is sent reaches the preset number threshold, or the time interval between the current time and the first time the response signal is sent meets the preset time threshold.
- the embodiment of the application provides a device for establishing a TCP connection. If a connection request from a client is received, it sends a response signal corresponding to the connection request to the client; the connection request carries the client address of the client; and obtains the pre-saved
- the communication delay corresponding to the client address is started; the preset timer is started at the same time, and the timeout value of the timer is set according to the communication delay; based on the timeout value, a TCP connection is established with the client.
- the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger.
- the time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
- the device for establishing a TCP connection provided by the embodiment of the present application has the same technical features as the method for establishing a TCP connection provided by the foregoing embodiment, so it can also solve the same technical problem and achieve the same technical effect.
- An embodiment of the present application also provides a server.
- the server includes a processor 80 and a memory 81.
- the memory 81 stores machine-executable instructions that can be executed by the processor 80.
- the processor 80 executes the machine The instructions can be executed to implement the above-mentioned method of establishing a TCP connection.
- the server shown in FIG. 8 further includes a bus 82 and a communication interface 83, and the processor 80, the communication interface 83, and the memory 81 are connected through the bus 82.
- the memory 81 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
- the communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 83 (which may be wired or wireless), and the Internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
- the bus 82 may be an ISA bus, a PCI bus, an EISA bus, or the like.
- the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one bidirectional arrow is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
- the processor 80 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 80 or instructions in the form of software.
- the aforementioned processor 80 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processor, DSP for short), etc. ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory 81, and the processor 80 reads the information in the memory 81, and completes the steps of the method of the foregoing embodiment in combination with its hardware.
- the embodiment of the present application also provides a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions, when the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor.
- the embodiments of the present application also provide a computer program product, including a computer-readable storage medium storing program code, and instructions included in the program code can be used to execute the method in the previous method embodiment.
- a computer program product including a computer-readable storage medium storing program code, and instructions included in the program code can be used to execute the method in the previous method embodiment.
- program code including a computer-readable storage medium storing program code, and instructions included in the program code can be used to execute the method in the previous method embodiment.
- instructions included in the program code can be used to execute the method in the previous method embodiment.
- the embodiments of the present application also provide a computer program, which when running on a computer, causes the computer to execute any method for establishing a TCP connection in the above-mentioned embodiments.
- the terms “installed”, “connected”, and “connected” should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection. , Or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components.
- installed should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection. , Or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the computer software product is stored in a storage medium, including several
- the instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
- the method, device, and server for establishing a TCP connection provided by the embodiments of the present application, during the process of establishing a connection between the client and TCP, even if the network status is poor, it can avoid that the timeout value becomes larger and larger and the server waits for the client to reply. If the time is getting longer and longer, the speed of establishing a TCP connection between the client and the server can be improved.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Telephonic Communication Services (AREA)
Abstract
Description
本申请要求于2020年4月30日提交中国专利局、申请号为202010369814.8,发明名称为“建立TCP连接的方法、装置和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 30, 2020, the application number is 202010369814.8, and the invention title is "Method, Device and Server for Establishing a TCP Connection", the entire content of which is incorporated herein by reference Applying.
本申请涉及网络技术领域,尤其是涉及一种建立TCP连接的方法、装置和服务器。This application relates to the field of network technology, and in particular to a method, device and server for establishing a TCP connection.
客户端与服务端建立TCP(Transmission Control Protocol,传输控制协议)连接时,首先由客户端向服务端发送SYN(Synchronize Sequence Numbers,同步序列编号)信号,服务端收到该SYN信号后,向客户端发送SYN信号和ACK(Acknowledge character,确认字符)信号,同时服务端启动定时器并设置该定时器的超时值,该超时值通常根据RTT(Round-Trip Time,往返时延)经验值设置。如果该定时器到达该超时值时,服务端还没有收到客户端返回的ACK信号,此时服务端重复向客户端发送SYN信号和ACK信号,并再次启动定时器并设置该定时器的超时值,该超时值通常根据上一次超时值的指数值设置。在网络状态较差的情况下,服务端需要发送多次SYN信号和ACK信号,此时超时值呈指数增长的方式递增,超时值越来越大,导致服务端等待客户端回复的时间就越来越长,进而导致客户端与服务端之间建立连接的速度较慢。When the client establishes a TCP (Transmission Control Protocol) connection with the server, the client first sends a SYN (Synchronize Sequence Numbers) signal to the server. After receiving the SYN signal, the server sends the SYN signal to the client. The end sends a SYN signal and an ACK (Acknowledge character) signal, and at the same time the server starts a timer and sets the timeout value of the timer. The timeout value is usually set according to the empirical value of RTT (Round-Trip Time). If the timer reaches the timeout value, the server has not received the ACK signal returned by the client. At this time, the server repeatedly sends the SYN signal and ACK signal to the client, and starts the timer again and sets the timer's timeout Value, the timeout value is usually set according to the exponential value of the last timeout value. In the case of poor network status, the server needs to send multiple SYN signals and ACK signals. At this time, the timeout value increases exponentially, and the timeout value becomes larger and larger, which causes the server to wait for the client to reply more time. The longer it comes, the slower the connection between the client and the server is established.
发明内容Summary of the invention
有鉴于此,本申请的目的在于提供一种建立TCP连接的方法、装置和服务器,以提高客户端与服务端之间建立连接的速度。In view of this, the purpose of this application is to provide a method, device and server for establishing a TCP connection, so as to increase the speed of establishing a connection between the client and the server.
第一方面,本申请实施例提供了一种建立TCP连接的方法,该方法包括:如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号;其中,连接请求中携带有客户端的客户端地址;获取预先保存的与客户端地址对应的通信时延;启动预设定时器,根据通信时延设置定时器的超时值;基于超时值,与客户端建立TCP连接。In the first aspect, an embodiment of the present application provides a method for establishing a TCP connection. The method includes: if a connection request from a client is received, sending a response signal corresponding to the connection request to the client; wherein the connection request carries the client Obtain the pre-saved communication delay corresponding to the client address; start the preset timer, and set the timeout value of the timer according to the communication delay; based on the timeout value, establish a TCP connection with the client.
第二方面,本申请实施例提供了一种建立TCP连接的装置,该装置包括:信号发送模块,设置为如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号;其中,连接请求中携带有客户端的客户端地址;时延获取模块,设置为获取预先保存的与客户端地址对应的通信时延;超时值设置模块,设置为启动预设定时器,根据通信时延设置定时器的超时值;TCP连接模块,设置为基于超时值,与客户端建立TCP连接。In the second aspect, an embodiment of the present application provides a device for establishing a TCP connection, the device comprising: a signal sending module configured to send a response signal corresponding to the connection request to the client if a connection request from the client is received; wherein, The connection request carries the client address of the client; the delay acquisition module is set to obtain the pre-saved communication delay corresponding to the client address; the timeout value setting module is set to start the preset timer, which is set according to the communication delay The timeout value of the timer; the TCP connection module is set to establish a TCP connection with the client based on the timeout value.
第三方面,本申请实施例提供了一种服务器,包括处理器和存储器,存储器存储有能够被处理器执行的机器可执行指令,处理器执行机器可执行指令以实现第一方面任一实施方式的建立TCP连接的方法。In a third aspect, an embodiment of the present application provides a server, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement any one of the embodiments of the first aspect. The method of establishing a TCP connection.
第四方面,本申请实施例提供了一种机器可读存储介质,该机器可读存储介质存储有机器可执行指令,机器可执行指令在被处理器调用和执行时,机器可执行指令促使处理器实现第一方面任一实施方式的建立TCP连接的方法。In a fourth aspect, embodiments of the present application provide a machine-readable storage medium that stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt processing The device implements the method for establishing a TCP connection in any one of the embodiments of the first aspect.
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,包含指令的计算机程序产品在计算机上运行时,使得计算机执行本申请实施例所提供的建立TCP连接的方法的步骤。In a fifth aspect, the embodiments of the present application provide a computer program product containing instructions. When the computer program product containing instructions runs on a computer, the computer executes the steps of the method for establishing a TCP connection provided in the embodiments of the present application.
第六方面,本申请实施例提供了一种计算机程序,计算机程序在计算机上运行时,使得计算机执行本申请实施例所提供的建立TCP连接的方法的步骤。In a sixth aspect, an embodiment of the present application provides a computer program, which when the computer program runs on a computer, causes the computer to execute the steps of the method for establishing a TCP connection provided by the embodiment of the present application.
本申请实施例带来了以下有益效果:The embodiments of the application bring the following beneficial effects:
本申请实施例提供了一种建立TCP连接的方法、装置和服务器,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号;其中的连接请求中携带有客户端的客户端地址;获取预先保存的与客户端地址对应的通信时延;同时启动预设定时器,根据通信时延设置定时器的超时值;基于该超时值,与客户端建立TCP连接。该方式中,通过预先存的服务端地址与对应的客户端地址的通信时延,设置启动的定时器的超时值,在网络状态较差的情况下,避免了超时值越来越大导致服务端等待客户端回复的时间就越来越长的情况,提高了客户端与服务端之间建立TCP连接的速度。The embodiments of the application provide a method, device and server for establishing a TCP connection. If a connection request from a client is received, a response signal corresponding to the connection request is sent to the client; the connection request carries the client address of the client. ; Obtain the pre-saved communication delay corresponding to the client address; at the same time, start the preset timer, and set the timeout value of the timer according to the communication delay; based on the timeout value, establish a TCP connection with the client. In this method, the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger. The time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
本申请实施例的其他特征和优点将在随后的说明书中阐述,并且,部分 地从说明书中变得显而易见,或者通过实施本申请而了解。本申请实施例的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the embodiments of the present application will be described in the following description, and part of them will become obvious from the description, or be understood by implementing the present application. The purpose and other advantages of the embodiments of the present application are realized and obtained by the structures specifically pointed out in the description, claims and drawings.
为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objectives, features and advantages of the present application more obvious and understandable, preferred embodiments are specifically described below in conjunction with the accompanying drawings.
为了更清楚地说明本申请实施例和相关技术的技术方案,下面对实施例和相关技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions of the embodiments of the present application and related technologies, the following briefly introduces the drawings that need to be used in the embodiments and related technologies. Obviously, the drawings in the following description are only of the present application. For some embodiments, those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的一种建立TCP连接的方法流程图;FIG. 1 is a flowchart of a method for establishing a TCP connection provided by an embodiment of the application;
图2为本申请实施例提供的另一种建立TCP连接的方法流程图;2 is a flowchart of another method for establishing a TCP connection provided by an embodiment of the application;
图3为本申请实施例提供的一种获取通信时延的方法流程图;FIG. 3 is a flowchart of a method for obtaining communication delay according to an embodiment of the application;
图4为本申请实施例提供的另一种获取通信时延的方法流程图;FIG. 4 is a flowchart of another method for obtaining communication delay according to an embodiment of the application;
图5为本申请实施例提供的另一种获取通信时延的方法流程图;FIG. 5 is a flowchart of another method for obtaining communication delay according to an embodiment of this application;
图6为本申请实施例提供的另一种建立TCP连接的方法流程图;FIG. 6 is a flowchart of another method for establishing a TCP connection provided by an embodiment of the application;
图7为本申请实施例提供的一种建立TCP连接的装置结构示意图;FIG. 7 is a schematic structural diagram of an apparatus for establishing a TCP connection provided by an embodiment of the application;
图8为本申请实施例提供的一种服务器的结构示意图。FIG. 8 is a schematic structural diagram of a server provided by an embodiment of the application.
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of the present application clearer, the following further describes the present application in detail with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
目前,客户端与服务端建立TCP连接时,首先由客户端向服务端发送SYN信号,服务端收到该SYN信号后,向客户端发送SYN信号和ACK信号,同时服务端启动定时器并设置该定时器的超时值,该超时值通常根据RTT经验值设置。如果该定时器到达该超时值时,还没有收到客户端返回的ACK信号,此时服务端重复向客户端发送SYN信号和ACK信号,并再次启动定时器并 设置该定时器的超时值,该超时值通常根据上一次超时值的指数值设置。在网络状态较差的情况下,服务端需要发送多次SYN信号和ACK信号,此时超时值呈指数增长的方式递增,超时值越来越大,导致服务端等待客户端回复的时间就越来越长,进而导致客户端与服务端之间建立连接的速度较慢。At present, when the client establishes a TCP connection with the server, the client first sends a SYN signal to the server. After receiving the SYN signal, the server sends a SYN signal and an ACK signal to the client. At the same time, the server starts the timer and sets it. The timeout value of the timer, the timeout value is usually set according to the experience value of RTT. If the timer reaches the timeout value, but the ACK signal returned by the client has not been received, the server repeatedly sends the SYN signal and ACK signal to the client, and starts the timer again and sets the timer's timeout value. The timeout value is usually set according to the exponential value of the last timeout value. In the case of poor network status, the server needs to send multiple SYN signals and ACK signals. At this time, the timeout value increases exponentially, and the timeout value becomes larger and larger, which causes the server to wait for the client to reply more time. The longer it comes, the slower the connection between the client and the server is established.
基于此,本申请实施例提供的一种建立TCP连接的方法、装置和服务器,该技术可以应用于各个计算机、手机等客户端的网络连接中,即本申请实施例提供的方法可以应用于客户端与服务端之间建立TCP连接的过程中。为便于对本实施例进行理解,首先对本申请实施例所公开的一种建立TCP连接的方法进行详细介绍。Based on this, the method, device, and server for establishing a TCP connection provided by the embodiments of this application can be applied to the network connections of clients such as computers and mobile phones, that is, the method provided in the embodiments of this application can be applied to the client In the process of establishing a TCP connection with the server. In order to facilitate the understanding of this embodiment, a method for establishing a TCP connection disclosed in the embodiment of this application is first introduced in detail.
首先,本申请实施例提供了一种建立TCP连接的方法,该方法可以应用于服务端,如图1所示,该方法包括如下步骤:First, the embodiment of the present application provides a method for establishing a TCP connection. The method can be applied to the server. As shown in FIG. 1, the method includes the following steps:
步骤S102,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号。其中,连接请求中携带有客户端的客户端地址。Step S102, if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
上述客户端可以是计算机、手机等移动终端设备,上述服务端可以是服务器等设备。例如,上述客户端可以为台式电脑,或者为手机、平板电脑等移动终端设备。The foregoing client may be a mobile terminal device such as a computer and a mobile phone, and the foregoing server may be a device such as a server. For example, the aforementioned client may be a desktop computer, or a mobile terminal device such as a mobile phone or a tablet computer.
上述连接请求可以是客户端发送的SYN信号,上述应答信号可以是服务端发送的SYN信号和ACK信号,以通知客户端确认收到连接请求信号。上述客户端的客户端地址可以是客户端的IP(Internet Protocol,网际互连协议)地址。在本申请实施例中,将客户端的IP地址简称为客户端地址。The connection request may be a SYN signal sent by the client, and the response signal may be a SYN signal and an ACK signal sent by the server to notify the client to confirm receipt of the connection request signal. The client address of the above client may be the IP (Internet Protocol, Internet Protocol) address of the client. In the embodiment of the present application, the IP address of the client is referred to as the client address for short.
在本申请一实施方式中,在建立TCP连接时,首先客户端向服务端发送连接请求SYN信号,该SYN信号包括客户端的IP地址。服务端接收到SYN信号后,必须确认客户端的SYN信号,同时服务端也发送一个应答信号,其中包括SYN信号和ACK信号。In an embodiment of the present application, when a TCP connection is established, the client first sends a connection request SYN signal to the server, and the SYN signal includes the IP address of the client. After the server receives the SYN signal, it must confirm the SYN signal of the client, and the server also sends a response signal, which includes the SYN signal and the ACK signal.
步骤S104,获取预先保存的与客户端地址对应的通信时延。Step S104: Obtain a pre-saved communication delay corresponding to the client address.
上述通信时延可以是RTT(Round-Trip Time,往返时延),在计算机网络中它也是一个重要的性能指标,表示从服务端发送数据开始,到服务端接收到来自客户端的确认信号,总共经历的时延。由于连接请求中携带有客户端的客户端地址,因此之前服务端与客户端之间通信连接时,计算得到的RTT 都具有对应的连接的服务端地址和客户端地址,因此可以通过计算得到的RTT设置上述预先保存的通信时延。The above-mentioned communication delay can be RTT (Round-Trip Time), which is also an important performance indicator in a computer network. It means that from the server sending data to the server receiving the confirmation signal from the client, a total of The time delay experienced. Since the connection request carries the client address of the client, when the server and the client communicate and connect, the calculated RTT has the corresponding server address and client address of the connection, so the calculated RTT can be obtained Set the above-mentioned pre-saved communication delay.
步骤S106,启动预设定时器,根据通信时延设置定时器的超时值。Step S106: Start a preset timer, and set the timeout value of the timer according to the communication delay.
在上述步骤S104中,服务端已获取与客户端地址对应的通信时延,服务端可根据该通信时延设置预设定时器的超时值,并启动预设定时器。In the above step S104, the server has obtained the communication delay corresponding to the client address, and the server can set the timeout value of the preset timer according to the communication delay, and start the preset timer.
通常在服务端发送SYN信号和ACK信号的同时,启动预设定时器,上述预设定时器可以记录从服务端发送信号到接收到信号之间的时间。Usually when the server sends the SYN signal and the ACK signal, a preset timer is started. The preset timer can record the time from when the server sends the signal to when the signal is received.
在本申请实施例中,将该预设定时器简称为定时器。通过上述定时器的计时,可以确定从服务端发送应答信号的时刻至当前时刻的时长。若在定时器超时前,服务端接收到客户端返回的ACK信号,则服务端接收到该ACK信号时,定时器的值可以表示:从服务端发送应答信号到接收到客户端返回的ACK信号之间的时间。In the embodiment of the present application, the preset timer is referred to as a timer for short. Through the timing of the above-mentioned timer, the length of time from the moment when the server sends the response signal to the current moment can be determined. If the server receives the ACK signal returned by the client before the timer expires, when the server receives the ACK signal, the value of the timer can indicate: from the server sending the response signal to receiving the ACK signal returned by the client The time between.
上述超时值可以根据服务端之前与客户端之间通信连接时,计算得到的RTT,也就是通信时延设置。其中,该通信时延为步骤S104中预先保存的与客户端地址对应的通信时延。The above-mentioned timeout value can be set according to the calculated RTT during the communication connection between the server and the client before, that is, the communication delay setting. Wherein, the communication delay is the communication delay corresponding to the client address stored in advance in step S104.
步骤S108,基于超时值,与客户端建立TCP连接。Step S108, based on the timeout value, establish a TCP connection with the client.
在本申请的一种实施方式中,服务端启动预设定时器后,若定时器的计时时间超过了超时值,服务端会再次发送应答信号至客户端,直到与客户端连接建立TCP连接。In an embodiment of the present application, after the server starts the preset timer, if the timer time exceeds the timeout value, the server will send a response signal to the client again until the TCP connection is established with the client.
在一实施方式中,若定时器超时后,服务端未收到客户端的ACK信号,则服务端再次向客户端发送应答信号,并在向客户端发送应答信号的同时,重新启动上述预设定时器。在服务端与客户端建立TCP连接之前,循环执行再次向客户端发送应答信号并重启定时器的步骤,直至服务端与客户端建立TCP连接。In one embodiment, if the server does not receive the ACK signal from the client after the timer expires, the server sends a response signal to the client again, and while sending the response signal to the client, restarts the aforementioned preset timing Device. Before the server establishes a TCP connection with the client, the steps of sending a response signal to the client again and restarting the timer are repeated cyclically until the server establishes a TCP connection with the client.
另外服务端经过多次应答信号发送、定时器超时,其连接次数超过预设值,或者定时器累计的计时时间超过预设时间,则服务端与客户端连接失败。In addition, after the server has sent multiple response signals and the timer expires, the number of connections exceeds the preset value, or the accumulated timing time of the timer exceeds the preset time, the connection between the server and the client fails.
在一实施方式中,连接次数是指服务端接收到客户端的连接请求后,向该客户端发送应答信号的次数。该预设值可以为预设的次数阈值,如果连接次数超过预设的次数阈值,则服务端确定与客户端连接失败。In one embodiment, the number of connections refers to the number of times the server sends a response signal to the client after receiving the connection request from the client. The preset value may be a preset number threshold. If the number of connections exceeds the preset number threshold, the server determines that the connection with the client fails.
本申请实施例提供了一种建立TCP连接的方法,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号;其中的连接请求中携带有客户端的客户端地址;获取预先保存的与客户端地址对应的通信时延;同时启动预设定时器,根据通信时延设置定时器的超时值;基于该超时值,与客户端建立TCP连接。该方式中,通过预先存的服务端地址与对应的客户端地址的通信时延,设置启动的定时器的超时值,在网络状态较差的情况下,避免了超时值越来越大导致服务端等待客户端回复的时间就越来越长的情况,提高了客户端与服务端之间建立TCP连接的速度。The embodiment of the application provides a method for establishing a TCP connection. If a connection request from a client is received, a response signal corresponding to the connection request is sent to the client; the connection request carries the client address of the client; and the pre-saved address is obtained. The communication delay corresponding to the client address is started; the preset timer is started at the same time, and the timeout value of the timer is set according to the communication delay; based on the timeout value, a TCP connection is established with the client. In this method, the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger. The time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
本申请实施例提供了另一种建立TCP连接的方法,该方法在上述实施例方法的基础上实现;本实施例重点描述获取预先保存的与客户端地址对应的通信时延的步骤的具体实现过程(通过步骤S204实现),如图2所示,该方法包括如下步骤:The embodiment of the present application provides another method for establishing a TCP connection, which is implemented on the basis of the method in the above embodiment; this embodiment focuses on the specific implementation of the step of obtaining the pre-saved communication delay corresponding to the client address The process (implemented by step S204), as shown in Figure 2, the method includes the following steps:
步骤S202,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号。其中,连接请求中携带有客户端的客户端地址。Step S202, if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
步骤S204,从预先建立的数据库中,获取与客户端地址对应的通信时延。Step S204: Obtain the communication delay corresponding to the client address from the pre-established database.
上述预先建立的数据库中,可以保存有多个服务端地址和多个客户端地址建立连接时对应的多个通信时延。The foregoing pre-established database may store multiple server addresses and multiple client addresses corresponding to multiple communication delays when a connection is established.
其中,数据库通过下述方式建立:获取与客户端地址对应的客户端的历史通信记录,从历史通信记录中提取通信时延,将提取出的通信时延与客户端地址对应保存至数据库中。The database is established in the following manner: acquiring the historical communication records of the client corresponding to the client address, extracting the communication delay from the historical communication record, and storing the extracted communication delay corresponding to the client address in the database.
在一种实施方式中,如果服务端获取到客户端地址对应的多条历史通信记录,且多条历史通信记录对应于不同的服务端,则分别从每条历史通信记录中提取通信时延。并将提取出的通信时延、客户端地址和该历史通信记录对应的服务端地址对应保存在数据库中。In one embodiment, if the server obtains multiple historical communication records corresponding to the client address, and the multiple historical communication records correspond to different servers, the communication delay is extracted from each historical communication record. And the extracted communication delay, the client address and the server address corresponding to the historical communication record are correspondingly saved in the database.
针对客户端地址与同一服务端地址之间的多条历史通信记录,服务端可以从多条历史通信记录中最新一条历史通信记录中提取通信时延,或者从多条历史通信记录中提取最小的通信时延。然后服务端将提取出的通信时延、客户端地址和服务端地址对应保存在数据库中。For multiple historical communication records between the client address and the same server address, the server can extract the communication delay from the latest historical communication record among the multiple historical communication records, or extract the smallest one from the multiple historical communication records Communication delay. The server then stores the extracted communication delay, client address, and server address in the database.
由于连接请求中携带有客户端的客户端地址,因此服务端可以通过该客户端地址,获得其历史通信记录,比如,该客户端近一个月内与服务端的通信记录。在一实施方式中,因服务端与客户端之间历史建立通信连接时,客户端向服务端发送的连接请求中携带有客户端地址,因此服务端中存储的历史通信记录中包括该历史通信记录对应的客户端地址。进而,在服务端建立上述数据库时,可以通过客户端的地址,获得客户端的历史通信记录。Since the connection request carries the client address of the client, the server can obtain its historical communication record through the client address, for example, the communication record of the client with the server in the past month. In one embodiment, when a communication connection is established historically between the server and the client, the connection request sent by the client to the server carries the client address, so the historical communication record stored in the server includes the historical communication Record the corresponding client address. Furthermore, when the above-mentioned database is established on the server, the client's historical communication records can be obtained through the client's address.
上述通信记录中可以包括与一个或者多个服务端建立连接时的通信时延等信息。服务端可以在该历史通信记录中提取该客户端与当前服务端建立连接时的通信时延,并将提取出的通信时延与该客户端地址对应保存至数据库中。The aforementioned communication record may include information such as communication delay when establishing a connection with one or more servers. The server may extract the communication delay when the client establishes a connection with the current server from the historical communication record, and save the extracted communication delay corresponding to the client address in the database.
针对上述步骤S204,参见图3所示的一种获取通信时延的方法流程图,从预先建立的数据库中,获取与客户端地址对应的通信时延的步骤的具体实现过程,该方法包括如下步骤:For the above step S204, referring to the flowchart of a method for obtaining communication delay shown in FIG. 3, the specific implementation process of the step of obtaining the communication delay corresponding to the client address from the pre-established database, the method includes the following step:
步骤S301,如果从数据库中获取不到与客户端地址对应的通信时延,确定客户端地址所属的第一区域范围。Step S301: If the communication delay corresponding to the client address cannot be obtained from the database, determine the first area range to which the client address belongs.
上述客户端地址所属的第一区域范围可以是,该客户端地址对应的地理地址所在地域。比如,可以是该客户端地址对应的地理地址所在区域,一百米的范围内,即以该客户端地址对应的地理地址为中心,方圆一百米的范围。The first area range to which the client address belongs may be the geographic location of the geographic address corresponding to the client address. For example, it may be the area where the geographic address corresponding to the client address is located, within a range of one hundred meters, that is, the geographic address corresponding to the client address is the center and a radius of one hundred meters.
步骤S302,从数据库中获取第一区域范围内的客户端地址对应的通信时延,将该通信时延确定为客户端的客户端地址对应的通信时延。Step S302: Obtain the communication delay corresponding to the client address within the first area from the database, and determine the communication delay as the communication delay corresponding to the client address of the client.
如果服务端通过第一区域范围获取得到客户端地址对应的通信时延,可以将该通信时延确定为客户端的客户端地址对应的通信时延。同时,服务端还可以将该通信时延与客户端地址对应保存至数据库中,以满足数据库的丰富性和实时性。If the server obtains the communication delay corresponding to the client address through the first area range, the communication delay may be determined as the communication delay corresponding to the client address of the client. At the same time, the server can also save the communication delay corresponding to the client address in the database to meet the richness and real-time nature of the database.
在一实施方式中,服务端可确定第一区域范围内其他客户端的IP地址。进而,服务端从数据库中获取上述其他客户端的IP地址对应的通信时延,将获取到的通信时延作为当前发送连接请求的客户端的通信时延。并且,服务端可将获取到的通信时延与当前发送连接请求的客户端的客户端地址对应保存至数据库中。In an embodiment, the server can determine the IP addresses of other clients within the first area. Furthermore, the server obtains the communication delay corresponding to the IP address of the other client from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server can store the acquired communication delay in the database corresponding to the client address of the client currently sending the connection request.
进一步的,上述数据库中还保存有:历史通信记录中的,与客户端地址对应的客户端进行通信的服务端的服务端地址。其中,服务端地址、客户端地址和通信时延对应保存。参见图4所示的另一种获取通信时延的方法流程图,从预先建立的数据库中,获取与客户端地址对应的通信时延的步骤的具体实现过程,该方法包括如下步骤:Further, the aforementioned database also stores: the server address of the server communicating with the client corresponding to the client address in the historical communication record. Among them, the server address, client address, and communication delay are stored correspondingly. Referring to the flowchart of another method for obtaining communication delay shown in FIG. 4, the specific implementation process of the step of obtaining the communication delay corresponding to the client address from the pre-established database, the method includes the following steps:
步骤S401,获取接收到连接请求的服务端的服务端地址。Step S401: Obtain the server address of the server that has received the connection request.
步骤S402,从预先建立的数据库中,获取与客户端地址和服务端地址对应的通信时延,将该通信时延确定为客户端的客户端地址对应的通信时延。Step S402: Obtain the communication delay corresponding to the client address and the server address from the pre-established database, and determine the communication delay as the communication delay corresponding to the client address of the client.
通信时延表示的是服务端与客户端建立连接时的时延,所以数据库中保存的通信时延不仅需要有与之对应的客户端地址,还可以有与之对应的服务端地址。在本申请实施例中,服务端可以直接获取接收到连接请求的服务端的服务器地址,然后从预先建立的数据库中,获取与客户端地址和获取到的服务端地址对应的通信时延,将该通信时延确定为客户端的客户端地址对应的通信时延。The communication delay represents the delay when the server establishes a connection with the client, so the communication delay stored in the database not only needs to have a corresponding client address, but also a server address corresponding to it. In the embodiment of the present application, the server can directly obtain the server address of the server that receives the connection request, and then obtain the communication delay corresponding to the client address and the obtained server address from the pre-established database, and set the The communication delay is determined as the communication delay corresponding to the client address of the client.
在一实施方式中,上述服务端地址可以为服务端的IP地址,如果该服务端是服务器,则上述服务端地址为服务器的IP地址。服务端接收到来自客户端的连接请求后,可以获取自身的IP地址。然后服务端从预先建立的数据库中,获取与客户端地址和自身的IP地址对应的通信时延,并将获取的通信时延确定为客户端的客户端地址对应的通信时延。In an embodiment, the server address may be the IP address of the server, and if the server is a server, the server address is the IP address of the server. After the server receives the connection request from the client, it can obtain its own IP address. Then the server obtains the communication delay corresponding to the client address and its own IP address from the pre-established database, and determines the obtained communication delay as the communication delay corresponding to the client address of the client.
针对上述步骤S402,参见图5所示的另一种获取通信时延的方法流程图,从预先建立的数据库中,获取与客户端地址和服务端地址对应的通信时延的步骤具体实现过程,如图5所示,该方法包括如下步骤:For the above step S402, referring to the flowchart of another method for obtaining communication delay shown in FIG. 5, the specific implementation process of the steps of obtaining the communication delay corresponding to the client address and the server address from the pre-established database is shown in FIG. As shown in Figure 5, the method includes the following steps:
步骤S501,如果从数据库中获取不到与客户端地址和服务端地址对应的通信时延,确定客户端地址所属的第二区域范围。Step S501: If the communication delay corresponding to the client address and the server address cannot be obtained from the database, determine the second area range to which the client address belongs.
上述客户端地址所属的第二区域范围可以是,该客户端地址对应的地理地址所在地域。比如,可以是该客户端地址对应的地理地址所在区域,一百米的范围内,即以该客户端地址对应的地理地址为中心,方圆一百米的范围。The second area range to which the client address belongs may be the geographic location of the geographic address corresponding to the client address. For example, it may be the area where the geographic address corresponding to the client address is located, within a range of one hundred meters, that is, the geographic address corresponding to the client address is the center and a radius of one hundred meters.
步骤S502,从数据库中获取与服务端地址和第二区域范围内的客户端地址对应的通信时延。Step S502: Obtain the communication delay corresponding to the server address and the client address in the second area from the database.
服务端获取到第二区域范围内其他客户端地址后,可以在数据库中查找与服务端地址和第二区域范围内的客户端地址对应的通信时延。After the server obtains the addresses of other clients in the second area, it can search the database for the communication delays corresponding to the server addresses and the client addresses in the second area.
在一实施方式中,服务端可确定第二区域范围内其他客户端的IP地址。进而,服务端从数据库中获取与服务端地址和上述其他客户端的IP地址对应的通信时延,将获取到的通信时延作为当前发送连接请求的客户端的通信时延。并且,服务器可将获取到的通信时延、服务端地址和当前发送连接请求的客户端的客户端地址对应保存至数据库中。In an embodiment, the server can determine the IP addresses of other clients in the second area. Furthermore, the server obtains the communication delay corresponding to the server address and the IP address of the other client from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server may correspondingly save the acquired communication delay, server address, and client address of the client currently sending the connection request in the database.
步骤S503,如果从数据库中获取不到与服务端地址和第二区域范围内的客户端地址对应的通信时延,确定服务端地址所属的第三区域范围。Step S503: If the communication delay corresponding to the server address and the client address within the second area range cannot be obtained from the database, determine the third area range to which the server address belongs.
上述服务端地址所属的第三区域范围可以是,该服务端地址对应的地理地址所在地域。比如,可以是该服务端地址对应的地理地址所在区域,一百米的范围内,即以该服务端地址对应的地理地址为中心,方圆一百米的范围。The third area range to which the server address belongs may be the geographic location of the geographic address corresponding to the server address. For example, it may be the area where the geographic address corresponding to the server address is located, within a range of one hundred meters, that is, the geographic address corresponding to the server address is the center and a radius of one hundred meters.
步骤S504,从数据库中获取与第二区域范围内的客户端地址、和第三区域范围内的服务端地址对应的通信时延。Step S504: Obtain the communication delay corresponding to the client address in the second area and the server address in the third area from the database.
服务端获取到第二区域范围内其他客户端地址、和第三区域范围内的其他服务端的IP地址后,可以从数据库中获取与之对应的通信时延。After obtaining the addresses of other clients in the second area and the IP addresses of other servers in the third area, the server can obtain the corresponding communication delay from the database.
在一实施方式中,服务端可以确定第二区域范围内其他客户端的IP地址,并确定第三区域范围内其他服务端的IP地址。进而,服务端从数据库中获取与上述其他客户端的IP地址和上述其他服务端的IP地址对应的通信时延,将获取到的通信时延作为当前发送连接请求的客户端的通信时延。并且,服务端可将获取到的通信时延、当前接收到连接请求的服务端地址和当前发送连接请求的客户端地址对应保存至数据库中。In one embodiment, the server can determine the IP addresses of other clients in the second area, and determine the IP addresses of other servers in the third area. Furthermore, the server obtains the communication delay corresponding to the IP address of the other client and the IP address of the other server from the database, and uses the obtained communication delay as the communication delay of the client currently sending the connection request. In addition, the server may correspondingly save the acquired communication delay, the server address currently receiving the connection request, and the client address currently sending the connection request in the database.
步骤S206,启动预设定时器,根据通信时延设置定时器的超时值。Step S206: Start a preset timer, and set the timeout value of the timer according to the communication delay.
步骤S208,基于超时值,与客户端建立TCP连接。Step S208, based on the timeout value, establish a TCP connection with the client.
另外,上述方法还包括数据库更新的步骤的实现过程,包括:In addition, the above method also includes the implementation process of the database update step, including:
如果获取到与客户端地址对应的客户端的更新的历史通信记录,从更新的历史通信记录中提取更新的通信时延;If the updated historical communication record of the client corresponding to the client address is obtained, the updated communication delay is extracted from the updated historical communication record;
如果更新的通信时延,小于数据库中记录的客户端地址对应的通信时延,将更新的通信时延与客户端地址对应保存至数据库中。If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the updated communication delay corresponding to the client address is saved in the database.
通常同一个客户端可能会与同一个服务端存在多次的通信记录,如果同一个客户端与服务端的通信延时已经保存在数据库中,之后该客户端与服务端又进行了通信连接,此时服务端会将该次的通信时延更新至历史记录中。同时,服务端将更新的通信时延与之前保存至数据库中的历史通信时延进行比较。如果更新的通信时延,小于数据库中记录的客户端地址对应的通信时延,则服务端将更新的通信时延与客户端地址对应保存至数据库中,以保证数据库的实时性。另外,如果更新的通信时延,大于数据库中记录的客户端地址对应的通信时延,则服务端不作任何处理。Usually the same client may have multiple communication records with the same server. If the communication delay between the same client and the server has been stored in the database, and then the client and the server communicate again, this The time server will update the communication delay of this time to the history record. At the same time, the server compares the updated communication delay with the historical communication delay previously saved in the database. If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the server saves the updated communication delay corresponding to the client address in the database to ensure the real-time performance of the database. In addition, if the updated communication delay is greater than the communication delay corresponding to the client address recorded in the database, the server does not perform any processing.
该方式中,通过客户端的历史通信记录,提取对应的通信时延;根据客户端地址、服务端地址以及与之对应的通信时延,建立了数据库;获取数据库中的与正在建立连接的客户端地址和服务端地址对应的通信时延,以设置启动的定时器的超时值,即通过配置定时器的方式,将获取的通信时延配置为定时器的超时值。在网络状态较差的情况下,避免了超时值越来越大导致服务端等待客户端回复的时间就越来越长的情况,提高了客户端与服务端之间建立TCP连接的速度。In this method, the corresponding communication delay is extracted through the client's historical communication records; the database is established according to the client address, server address and the corresponding communication delay; the database is obtained from the client that is establishing a connection The communication delay corresponding to the address and the server address is used to set the timeout value of the started timer, that is, to configure the acquired communication delay as the timeout value of the timer by configuring the timer. In the case of poor network status, it avoids the situation that the server waits for the client to reply longer and longer due to the increasing timeout value, and improves the speed of establishing the TCP connection between the client and the server.
本申请实施例提供了另一种建立TCP连接的方法,该方法在上述实施例方法的基础上实现;本实施例重点描述基于超时值,与客户端建立TCP连接的步骤的具体实现过程(具体通过步骤S608-S610实现),如图6所示,该方法包括如下步骤:The embodiment of this application provides another method for establishing a TCP connection, which is implemented on the basis of the method in the above-mentioned embodiment; this embodiment focuses on the specific implementation process of establishing a TCP connection with the client based on the timeout value (specifically (Implemented through steps S608-S610), as shown in Figure 6, the method includes the following steps:
步骤S602,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号。其中,连接请求中携带有客户端的客户端地址。Step S602, if a connection request from the client is received, a response signal corresponding to the connection request is sent to the client. Among them, the client address of the client is carried in the connection request.
步骤S604,获取预先保存的与客户端地址对应的通信时延。Step S604: Obtain a pre-saved communication delay corresponding to the client address.
步骤S606,启动预设定时器,根据通信时延设置定时器的超时值。Step S606: Start a preset timer, and set the timeout value of the timer according to the communication delay.
步骤S608,当定时器的计时时长小于超时值时,接收到客户端返回的响应信号,确定与客户端建立TCP连接成功。Step S608: When the time duration of the timer is less than the timeout value, the response signal returned by the client is received, and it is determined that the TCP connection with the client is successfully established.
在服务端向客户端发送连接请求对应的应答信号的同时,启动预设定时器。在服务端收到客户端发送的确认连接的信号之前,定时器一直在计时。在定时器的计时时长小于超时值的情况下,服务端接收到客户端发送的确认 连接的信号,定时器会停止计时,同时确定与客户端建立TCP连接成功。When the server sends the response signal corresponding to the connection request to the client, the preset timer is started. The timer keeps counting until the server receives the connection confirmation signal sent by the client. In the case that the timer duration is less than the timeout value, the server receives the connection confirmation signal sent by the client, and the timer stops timing, and at the same time, it is determined that the TCP connection with the client is successfully established.
步骤S610,如果定时器的计时时长到达超时值时,没有接收到客户端返回的响应信号,继续执行向客户端发送连接请求对应的应答信号的步骤,直至接收到客户端返回的响应信号,或者满足预设条件。Step S610, if the timer duration reaches the timeout value, the response signal returned by the client is not received, continue to perform the step of sending the response signal corresponding to the connection request to the client until the response signal returned by the client is received, or Meet the preset conditions.
如果定时器的计时时长到达超时值的情况下,服务端没有接收到客户端发送的确认连接的信号,计时器会停止计时。然后服务端会继续向客户端发送连接请求对应的应答信号,同时再次启动定时器,直到服务端接收到客户端返回的响应信号,则停止计时。或者,在服务端一直没有接收到客户端返回的响应信号的情况下,满足预设条件后,则停止连接,并显示连接失败。If the timer duration reaches the timeout value and the server does not receive the connection confirmation signal sent by the client, the timer will stop timing. Then the server will continue to send the response signal corresponding to the connection request to the client, and at the same time start the timer again, until the server receives the response signal returned by the client, it stops timing. Or, in the case that the server has not received the response signal returned by the client, after meeting the preset condition, the connection is stopped and the connection failure is displayed.
其中,预设条件包括:接收到连接请求之后,发送应答信号的次数到达预设的次数阈值,或者当前时间与第一次发送应答信号的时间间隔满足预设的时间阈值。The preset condition includes: after receiving the connection request, the number of times the response signal is sent reaches the preset number threshold, or the time interval between the current time and the first time the response signal is sent meets the preset time threshold.
上述次数阈值和时间阈值,可以根据具体的客户端的历史通信记录设置。比如,次数阈值可以是10、15等,时间阈值可以是1分钟、5分钟等。在本申请实施例中,服务端接收到连接请求之后,向客户端发送应答信号,并启动定时器开始计时。如果计时时长到达超时值时,服务端没有接收到客户端发送的确认连接的信号,服务端则会再次向客户端发送应答信号,直到发送应答信号的次数到达预设的次数阈值,则停止连接,并显示连接失败。或者,如果计时时长到达超时值时,服务端没有接收到客户端发送的确认连接的信号,服务端则会再次向客户端发送应答信号,并再次启动定时器开始计时,直到当前时间与第一次发送应答信号的时间间隔满足预设的时间阈值,则停止连接,并显示连接失败。The above-mentioned frequency threshold and time threshold may be set according to the historical communication records of the specific client. For example, the frequency threshold may be 10, 15, etc., and the time threshold may be 1 minute, 5 minutes, etc. In the embodiment of the present application, after receiving the connection request, the server sends a response signal to the client, and starts a timer to start counting. If the time duration reaches the timeout value, the server does not receive the connection confirmation signal sent by the client, the server will send a response signal to the client again, until the number of times the response signal is sent reaches the preset threshold, then the connection will be stopped , And show that the connection failed. Or, if the time duration reaches the timeout value, the server does not receive the connection confirmation signal sent by the client, the server will send a response signal to the client again, and start the timer again to start timing until the current time is equal to the first When the time interval for sending the reply signal meets the preset time threshold, the connection is stopped and the connection failure is displayed.
该方式中,通过将定时器的计时时长与超时值进行对比,在计时时长小于超时值的情况下,直接建立连接;在计时时长大于超时值的情况下,再次启动定时器,并设置预设条件,及时终止连接,在网络状态较差的情况下,避免了超时值越来越大导致服务端等待客户端回复的时间就越来越长的情况,提高了客户端与服务端之间建立TCP连接的速度。In this method, by comparing the timing duration of the timer with the timeout value, when the timing duration is less than the timeout value, the connection is directly established; when the timing duration is greater than the timeout value, the timer is restarted and the preset is set Condition, terminate the connection in time, in the case of poor network status, avoid the situation that the server waits for the reply from the client to be longer and longer due to the increasing timeout value, and improves the establishment between the client and the server The speed of the TCP connection.
对应上述的建立TCP连接的方法实施例,本申请实施例还提供了一种建 立TCP连接的装置,如图7所示,该装置包括:Corresponding to the foregoing embodiment of the method for establishing a TCP connection, an embodiment of the present application also provides a device for establishing a TCP connection. As shown in FIG. 7, the device includes:
信号发送模块71,设置为如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号。其中,连接请求中携带有客户端的客户端地址。The signal sending module 71 is configured to send a response signal corresponding to the connection request to the client if a connection request from the client is received. Among them, the client address of the client is carried in the connection request.
时延获取模块72,设置为获取预先保存的与客户端地址对应的通信时延。The delay acquiring module 72 is configured to acquire a pre-saved communication delay corresponding to the client address.
超时值设置模块73,设置为启动预设定时器,根据通信时延设置定时器的超时值。The timeout value setting module 73 is configured to start a preset timer, and set the timeout value of the timer according to the communication delay.
TCP连接模块74,设置为基于超时值,与客户端建立TCP连接。The TCP connection module 74 is set to establish a TCP connection with the client based on the timeout value.
在本申请的一个实施例中,上述时延获取模块72设置为:从预先建立的数据库中,获取与客户端地址对应的通信时延。其中,数据库通过下述方式建立:获取与客户端地址对应的客户端的历史通信记录,从历史通信记录中提取通信时延,将提取出的通信时延与客户端地址对应保存至数据库中。In an embodiment of the present application, the above-mentioned delay obtaining module 72 is configured to obtain the communication delay corresponding to the client address from a pre-established database. The database is established in the following manner: acquiring the historical communication records of the client corresponding to the client address, extracting the communication delay from the historical communication record, and storing the extracted communication delay corresponding to the client address in the database.
在本申请的一个实施例中,上述时延获取模块72设置为:如果从数据库中获取不到与客户端地址对应的通信时延,确定客户端地址所属的第一区域范围;从数据库中获取第一区域范围内的客户端地址对应的通信时延,将该通信时延确定为客户端的客户端地址对应的通信时延。In an embodiment of the present application, the above-mentioned delay obtaining module 72 is configured to: if the communication delay corresponding to the client address cannot be obtained from the database, determine the first area range to which the client address belongs; obtain from the database The communication delay corresponding to the client address in the first area is determined as the communication delay corresponding to the client address of the client.
在本申请的一个实施例中,上述数据库中还保存有:历史通信记录中的,与客户端地址对应的客户端进行通信的服务端的服务端地址;服务端地址、客户端地址和通信时延对应保存。In an embodiment of the present application, the aforementioned database also stores: the server address of the server communicating with the client corresponding to the client address in the historical communication record; the server address, the client address, and the communication delay Corresponding to save.
在本申请的一个实施例中,上述时延获取模块72设置为:获取接收到连接请求的服务端的服务端地址;从预先建立的数据库中,获取与客户端地址和服务端地址对应的通信时延,将该通信时延确定为客户端的客户端地址对应的通信时延。In an embodiment of the present application, the above-mentioned delay obtaining module 72 is configured to: obtain the server address of the server that receives the connection request; obtain the communication time corresponding to the client address and the server address from a pre-established database. Delay, determine the communication delay as the communication delay corresponding to the client address of the client.
在本申请的一个实施例中,上述时延获取模块72设置为:如果从数据库中获取不到与客户端地址和服务端地址对应的通信时延,确定客户端地址所属的第二区域范围;从数据库中获取与服务端地址和第二区域范围内的客户端地址对应的通信时延;如果从数据库中获取不到与服务端地址和第二区域范围内的客户端地址对应的通信时延,确定服务端地址所属的第三区域范围;从数据库中获取与第二区域范围内的客户端地址、和第三区域范围内的服务 端地址对应的通信时延。In an embodiment of the present application, the above-mentioned delay obtaining module 72 is configured to determine the second area range to which the client address belongs if the communication delay corresponding to the client address and the server address cannot be obtained from the database; Obtain the communication delay corresponding to the server address and the client address in the second area from the database; if the communication delay corresponding to the server address and the client address in the second area cannot be obtained from the database , Determine the third area range to which the server address belongs; obtain the communication delay corresponding to the client address in the second area range and the server address in the third area range from the database.
在本申请的一个实施例中,上述装置还包括数据库更新模块,设置为如果获取到与客户端地址对应的客户端的更新的历史通信记录,从更新的历史通信记录中提取更新的通信时延;如果更新的通信时延,小于数据库中记录的客户端地址对应的通信时延,将更新的通信时延与客户端地址对应保存至数据库中。In an embodiment of the present application, the above-mentioned apparatus further includes a database update module, configured to extract the updated communication delay from the updated historical communication record if the updated historical communication record of the client corresponding to the client address is obtained; If the updated communication delay is less than the communication delay corresponding to the client address recorded in the database, the updated communication delay corresponding to the client address is saved in the database.
在本申请的一个实施例中,上述TCP连接模块74设置为:当定时器的计时时长小于超时值时,接收到客户端返回的响应信号,确定与客户端建立TCP连接成功;如果定时器的计时时长到达超时值时,没有接收到客户端返回的响应信号,继续执行向客户端发送连接请求对应的应答信号的步骤,直至接收到客户端返回的响应信号,或者满足预设条件。其中,预设条件包括:接收到连接请求之后,发送应答信号的次数到达预设的次数阈值,或者当前时间与第一次发送应答信号的时间间隔满足预设的时间阈值。In an embodiment of the present application, the above-mentioned TCP connection module 74 is set to: when the timer duration is less than the timeout value, the response signal returned by the client is received, and it is determined that the TCP connection with the client is successfully established; When the timing period reaches the timeout value, no response signal returned by the client is received, and the step of sending the response signal corresponding to the connection request to the client is continued until the response signal returned by the client is received or the preset condition is met. The preset condition includes: after receiving the connection request, the number of times the response signal is sent reaches the preset number threshold, or the time interval between the current time and the first time the response signal is sent meets the preset time threshold.
本申请实施例提供了一种建立TCP连接的装置,如果接收到来自客户端的连接请求,向客户端发送连接请求对应的应答信号;其中的连接请求中携带有客户端的客户端地址;获取预先保存的与客户端地址对应的通信时延;同时启动预设定时器,根据通信时延设置定时器的超时值;基于该超时值,与客户端建立TCP连接。该方式中,通过预先存的服务端地址与对应的客户端地址的通信时延,设置启动的定时器的超时值,在网络状态较差的情况下,避免了超时值越来越大导致服务端等待客户端回复的时间就越来越长的情况,提高了客户端与服务端之间建立TCP连接的速度。The embodiment of the application provides a device for establishing a TCP connection. If a connection request from a client is received, it sends a response signal corresponding to the connection request to the client; the connection request carries the client address of the client; and obtains the pre-saved The communication delay corresponding to the client address is started; the preset timer is started at the same time, and the timeout value of the timer is set according to the communication delay; based on the timeout value, a TCP connection is established with the client. In this method, the timeout value of the started timer is set through the communication delay between the pre-stored server address and the corresponding client address. In the case of poor network status, the timeout value is prevented from becoming larger and larger. The time for the client to wait for the reply from the client is getting longer and longer, which improves the speed of establishing a TCP connection between the client and the server.
本申请实施例提供的建立TCP连接的装置,与上述实施例提供的建立TCP连接的方法具有相同的技术特征,所以也能解决相同的技术问题,达到相同的技术效果。The device for establishing a TCP connection provided by the embodiment of the present application has the same technical features as the method for establishing a TCP connection provided by the foregoing embodiment, so it can also solve the same technical problem and achieve the same technical effect.
本申请实施例还提供了一种服务器,参见图8所示,该服务器包括处理器80和存储器81,该存储器81存储有能够被处理器80执行的机器可执行指令,该处理器80执行机器可执行指令以实现上述建立TCP连接的方法。An embodiment of the present application also provides a server. As shown in FIG. 8, the server includes a
进一步地,图8所示的服务器还包括总线82和通信接口83,处理器80、 通信接口83和存储器81通过总线82连接。Further, the server shown in FIG. 8 further includes a bus 82 and a
其中,存储器81可能包含高速随机存取存储器(RAM,Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口83(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。总线82可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。The
处理器80可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器80中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器80可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器81,处理器80读取存储器81中的信息,结合其硬件完成前述实施例的方法的步骤。The
本申请实施例还提供了一种机器可读存储介质,该机器可读存储介质存储有机器可执行指令,该机器可执行指令在被处理器调用和执行时,该机器可执行指令促使处理器实现上述建立TCP连接的方法,具体实现可参见方法实施例,在此不再赘述。The embodiment of the present application also provides a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions, when the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor The foregoing method for establishing a TCP connection is implemented. For specific implementation, please refer to the method embodiment, which will not be repeated here.
本申请实施例还提供了一种计算机程序产品,包括存储了程序代码的计算机可读存储介质,该程序代码包括的指令可用于执行前面方法实施例中的 方法,具体实现可参见方法实施例,在此不再赘述。The embodiments of the present application also provide a computer program product, including a computer-readable storage medium storing program code, and instructions included in the program code can be used to execute the method in the previous method embodiment. For specific implementation, please refer to the method embodiment. I won't repeat them here.
本申请实施例中还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述实施例中任一建立TCP连接的方法。The embodiments of the present application also provide a computer program, which when running on a computer, causes the computer to execute any method for establishing a TCP connection in the above-mentioned embodiments.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
另外,在本申请实施例的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。In addition, in the description of the embodiments of the present application, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection. , Or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components. For those skilled in the art, the specific meaning of the above-mentioned terms in this application can be understood under specific circumstances.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this application essentially or the part that contributes to the related technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several The instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
在本申请的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of this application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the application and simplifying the description, and does not indicate or imply that the pointed device or element must have a specific orientation or a specific orientation. The structure and operation cannot therefore be understood as a limitation of this application. In addition, the terms "first", "second", and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance.
最后应说明的是:以上实施例,仅为本申请的具体实施方式,用以说明本申请的技术方案,而非对其限制,本申请的保护范围并不局限于此,尽管参照前述实施例对本申请进行了详细的说明,本领域技术人员应当理解:任 何熟悉本技术领域的技术人员在本申请揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本申请实施例技术方案的精神和范围,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。Finally, it should be noted that the above examples are only specific implementations of the application, to illustrate the technical solutions of the application, but not to limit it. The scope of protection of the application is not limited thereto, although referring to the foregoing examples This application has been described in detail, and those skilled in the art should understand that any person skilled in the art within the technical scope disclosed in this application can still modify the technical solutions described in the foregoing embodiments or can easily imagine Changes, or equivalent replacements of some of the technical features; these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should be covered by the scope of protection of this application Inside. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
基于本申请实施例提供的建立TCP连接的方法、装置和服务器,在客户端与TCP建立连接的过程中,即使网络状态较差,也能够避免超时值越来越大导致服务端等待客户端回复的时间越来越长的情况,可以提高客户端与服务器之间建立TCP连接的速度。Based on the method, device, and server for establishing a TCP connection provided by the embodiments of the present application, during the process of establishing a connection between the client and TCP, even if the network status is poor, it can avoid that the timeout value becomes larger and larger and the server waits for the client to reply. If the time is getting longer and longer, the speed of establishing a TCP connection between the client and the server can be improved.
Claims (18)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010369814.8A CN113596068B (en) | 2020-04-30 | 2020-04-30 | Method, device and server for establishing TCP connection |
| CN202010369814.8 | 2020-04-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021218520A1 true WO2021218520A1 (en) | 2021-11-04 |
Family
ID=78237760
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/083415 Ceased WO2021218520A1 (en) | 2020-04-30 | 2021-03-26 | Method and apparatus for establishing tcp connection, and server |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113596068B (en) |
| WO (1) | WO2021218520A1 (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114039884A (en) * | 2021-12-15 | 2022-02-11 | 中国建设银行股份有限公司 | Network link exception handling method and device |
| CN115066039A (en) * | 2022-04-12 | 2022-09-16 | 锐迪科创微电子(北京)有限公司 | Temporary compensation starting method and device for cell reselection and computer-readable storage medium |
| CN115208521A (en) * | 2022-08-22 | 2022-10-18 | 北京钢铁侠科技有限公司 | Communication guarantee and work flow control method for session layer client and server |
| CN115866109A (en) * | 2022-11-30 | 2023-03-28 | 长城信息股份有限公司 | Native drive control method and device for remote equipment |
| CN116016440A (en) * | 2022-12-28 | 2023-04-25 | 中国电子信息产业集团有限公司第六研究所 | IP address positioning method and IP address query system |
| CN116633997A (en) * | 2023-05-31 | 2023-08-22 | 中国银联股份有限公司 | Management method, device, equipment and medium based on TCP persistent connection communication |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6816910B1 (en) * | 2000-02-17 | 2004-11-09 | Netzentry, Inc. | Method and apparatus for limiting network connection resources |
| US20060045017A1 (en) * | 2004-08-26 | 2006-03-02 | Nec Corporation | Network-quality determining method and apparatus for use therewith |
| US20070064610A1 (en) * | 2005-09-19 | 2007-03-22 | Khandani Mehdi K | Detection of nonconforming network traffic flow aggregates for mitigating distributed denial of service attacks |
| CN101179360A (en) * | 2006-06-22 | 2008-05-14 | 国际商业机器公司 | Method and system for managing perceived response time |
| WO2014168524A1 (en) * | 2013-04-08 | 2014-10-16 | Telefonaktiebolaget L M Ericsson (Publ) | Controlling establishment of multiple tcp connections |
| CN105933242A (en) * | 2016-04-12 | 2016-09-07 | 北京大学深圳研究生院 | Method and system for improving TCP response speed of data center |
| CN106034073A (en) * | 2015-03-20 | 2016-10-19 | 网宿科技股份有限公司 | A method for optimizing multi-path transmission based on content distribution network |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070008884A1 (en) * | 2003-10-08 | 2007-01-11 | Bob Tang | Immediate ready implementation of virtually congestion free guarantedd service capable network |
| US8004983B2 (en) * | 2007-08-15 | 2011-08-23 | Blue Coat Systems, Inc. | Methods to improve transmission control protocol (TCP) performance over large bandwidth long delay links |
| JP5590825B2 (en) * | 2008-06-30 | 2014-09-17 | キヤノン株式会社 | Communication device and method for determining round trip time |
| US8583824B2 (en) * | 2010-12-16 | 2013-11-12 | Microsoft Corporation | Identifying an efficient destination server |
| CN102664958A (en) * | 2012-04-27 | 2012-09-12 | 中山大学 | Transparent computing system |
| US8914537B2 (en) * | 2012-08-07 | 2014-12-16 | Intel Mobile Communications GmbH | Methods and apparatuses for rate adaptation of quality of service based application |
| CN104184546B (en) * | 2013-05-27 | 2019-04-02 | 百度在线网络技术(北京)有限公司 | The method and system of message retransmission are reduced in a kind of mobile communications network |
| CN104243090B (en) * | 2013-06-19 | 2017-11-03 | 中国移动通信集团公司 | A kind of transmission rate method of adjustment and equipment fed back based on wireless channel |
| US20150012792A1 (en) * | 2013-07-03 | 2015-01-08 | Telefonaktiebolaget L M Ericsson (Publ) | Method and apparatus for providing a transmission control protocol minimum retransmission timer |
| CN104506383A (en) * | 2014-12-22 | 2015-04-08 | 深圳市博瑞得科技有限公司 | Method and system for measuring data processing efficiency of server in TCP (transmission control protocol) transmission |
| CN106713454B (en) * | 2016-12-22 | 2019-09-13 | 腾讯科技(深圳)有限公司 | A kind of method for connecting network and device |
| CN109032830A (en) * | 2018-07-25 | 2018-12-18 | 广东浪潮大数据研究有限公司 | A kind of fault recovery method of distributed memory system, system and associated component |
| CN110493820B (en) * | 2019-09-24 | 2022-12-20 | 辰芯科技有限公司 | Transmission delay evaluation method, device, communication node and storage medium |
| CN110839017B (en) * | 2019-10-21 | 2022-02-08 | 腾讯科技(深圳)有限公司 | Proxy IP address identification method, device, electronic equipment and storage medium |
-
2020
- 2020-04-30 CN CN202010369814.8A patent/CN113596068B/en active Active
-
2021
- 2021-03-26 WO PCT/CN2021/083415 patent/WO2021218520A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6816910B1 (en) * | 2000-02-17 | 2004-11-09 | Netzentry, Inc. | Method and apparatus for limiting network connection resources |
| US20060045017A1 (en) * | 2004-08-26 | 2006-03-02 | Nec Corporation | Network-quality determining method and apparatus for use therewith |
| US20070064610A1 (en) * | 2005-09-19 | 2007-03-22 | Khandani Mehdi K | Detection of nonconforming network traffic flow aggregates for mitigating distributed denial of service attacks |
| CN101179360A (en) * | 2006-06-22 | 2008-05-14 | 国际商业机器公司 | Method and system for managing perceived response time |
| WO2014168524A1 (en) * | 2013-04-08 | 2014-10-16 | Telefonaktiebolaget L M Ericsson (Publ) | Controlling establishment of multiple tcp connections |
| CN106034073A (en) * | 2015-03-20 | 2016-10-19 | 网宿科技股份有限公司 | A method for optimizing multi-path transmission based on content distribution network |
| CN105933242A (en) * | 2016-04-12 | 2016-09-07 | 北京大学深圳研究生院 | Method and system for improving TCP response speed of data center |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114039884A (en) * | 2021-12-15 | 2022-02-11 | 中国建设银行股份有限公司 | Network link exception handling method and device |
| CN114039884B (en) * | 2021-12-15 | 2023-08-08 | 中国建设银行股份有限公司 | Network link exception handling method and device |
| CN115066039A (en) * | 2022-04-12 | 2022-09-16 | 锐迪科创微电子(北京)有限公司 | Temporary compensation starting method and device for cell reselection and computer-readable storage medium |
| CN115208521A (en) * | 2022-08-22 | 2022-10-18 | 北京钢铁侠科技有限公司 | Communication guarantee and work flow control method for session layer client and server |
| CN115208521B (en) * | 2022-08-22 | 2023-07-04 | 北京钢铁侠科技有限公司 | Communication guarantee and workflow control method for session layer client and server |
| CN115866109A (en) * | 2022-11-30 | 2023-03-28 | 长城信息股份有限公司 | Native drive control method and device for remote equipment |
| CN116016440A (en) * | 2022-12-28 | 2023-04-25 | 中国电子信息产业集团有限公司第六研究所 | IP address positioning method and IP address query system |
| CN116633997A (en) * | 2023-05-31 | 2023-08-22 | 中国银联股份有限公司 | Management method, device, equipment and medium based on TCP persistent connection communication |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113596068B (en) | 2022-06-14 |
| CN113596068A (en) | 2021-11-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021218520A1 (en) | Method and apparatus for establishing tcp connection, and server | |
| JP6423059B2 (en) | Dynamic selection of security protocols | |
| CN102523178B (en) | Push-based heartbeat message sending method and terminal | |
| CN101889424B (en) | Mobile access to internet-based application with reduced polling | |
| CN110474975B (en) | Heartbeat processing method and device of application program, electronic equipment and storage medium | |
| US9537818B2 (en) | Enhanced DHCP method | |
| CN104813637A (en) | Push service without persistent TCP connection in mobile network | |
| CN108471369B (en) | Network dialing method, device and storage medium | |
| WO2016110087A1 (en) | Method and device for controlling time online, and computer storage medium | |
| WO2017206943A1 (en) | Optical network terminal and operating method thereof, communication system, and data storage medium | |
| WO2011091667A1 (en) | Data card and method for quickly building dialing connection thereof | |
| CN114338477B (en) | Communication link monitoring method, device, equipment and storage medium | |
| US20110225230A1 (en) | Method and apparatus for detecting active and orphan session-based connections | |
| WO2019085923A1 (en) | Data processing method and device, and computer | |
| WO2012131604A1 (en) | Sctp endpoint migration | |
| CN115422129B (en) | A conversation processing method, device, electronic device and storage medium | |
| WO2005004388A1 (en) | A method of calculating broadband access server dhcp user’s on-line time | |
| WO2016095323A1 (en) | Data transmission method and apparatus based on serial server | |
| EP3780519A1 (en) | Traffic control method and related device | |
| CN113852694A (en) | Message pushing system and pushing method for multi-terminal access client system | |
| WO2015021827A1 (en) | Method,device and system for offline reconnection of a web application | |
| WO2016206572A1 (en) | Method and device for processing terminal registration congestion by core network element | |
| CN111654505A (en) | UDP data packet reliable transmission method, system, computer equipment and storage medium | |
| CN115643628A (en) | Method, device, readable medium and electronic equipment for connecting to wireless network | |
| US20170127356A1 (en) | Method and apparatus for prolonging lasting time of inactive mode |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21797759 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21797759 Country of ref document: EP Kind code of ref document: A1 |