Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Long connection multi-timeout judgment method and device and computer readable storage medium

A judging device and long-term connection technology, applied in digital transmission systems, electrical components, transmission systems, etc., can solve the problem of TCP occupying server ports and other related resource information, and achieve the effect of saving resources and increasing access volume

Active Publication Date: 2018-11-27
NUBIA TECHNOLOGY CO LTD
View PDF7 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The main purpose of the present invention is to propose a long connection multiple timeout judging method, device and computer-readable storage medium, aiming to solve the technical problem that a large number of long connections will cause TCP to occupy server ports and other related resource information

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Long connection multi-timeout judgment method and device and computer readable storage medium
  • Long connection multi-timeout judgment method and device and computer readable storage medium
  • Long connection multi-timeout judgment method and device and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0095] Such as Figure 5 As shown, the embodiment of the present invention provides a kind of long connection multiple timeout judging method, and described method comprises the following steps:

[0096] S101. Establish a TCP long connection with the client, and push a message to the client,

[0097] The server of the application APP and the client installed on the mobile terminal establish a long connection through the TCP protocol to keep the data communication uninterrupted; when the server needs to push a message to the client, it can quickly push the message to the corresponding server.

[0098] S102. Perform timeout judgment on the TCP long connection according to connection time, heartbeat packet time and resource release time;

[0099] Due to the large number of clients, we know that the disconnection of TCP long-term connections needs to go through four processes, and the server will not actively disconnect TCP long-term connections under normal circumstances. If the...

Embodiment 2

[0139] Based on the same inventive idea, such as Figure 9 As shown, the embodiment of the present invention provides a hardware structure of a persistent connection multiple timeout judging device. Specifically, the persistent connection multiple timeout judging device 40 includes at least a processor 41 , a memory 42 and a data bus 43 . The data bus 43 is used to realize the connection and communication between the processor 41 and the memory 42. The memory 42, as a computer-readable storage medium, can store at least one computer program, and these computer programs can be read, compiled and executed by the processor 41. , so as to realize the corresponding processing flow. In this embodiment, the memory 42 is used as a computer-readable storage medium, in which is stored a long connection multiple timeout judging program, which can be executed by the processor 41, thereby realizing the steps of the following long connection multiple timeout judging method:

[0140] Establ...

Embodiment 3

[0156] Based on the same inventive concept, another aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a long connection multiple timeout judging program, and the long connection multiple timeout judging program is determined by the processor During execution, implement the steps of the following long connection multiple timeout judging method:

[0157] Establish a TCP long connection with the client, push messages to the client,

[0158] Carry out overtime judgment to described TCP long connection by connection time, heartbeat packet time and resource release time;

[0159] When any one of the connection time, the heartbeat packet time and the resource release time reaches a preset threshold, it is determined that the TCP long connection times out and the connection information of the client is deleted.

[0160] Wherein, the processor is used to execute the long connection multiple timeout judgment program s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a long connection multi-timeout judgment method and device and a computer readable storage medium. The long connection multi-timeout judgment method comprises the steps of establishing TCP (Transmission Control Protocol) long connection with a client, and pushing a message to the client; performing timeout judgment on the TCP long connection according to the connection time, heartbeat packet time and resource release time; and determining that the TCP long connection times out and deleting connection information of the client when any of the connection time, the heartbeat packet time and the resource release time reaches a preset threshold. Timeout judgment performed on the TCP long connection according to the connection time and the resource release time is additionally carried out on the basis of timeout judgment performed according to the heartbeat packet time, thereby forming a heartbeat timeout, connection timeout and resource release timeout triple-timeoutjudgment verification mechanism, being capable of judging whether certain TCP long connection is disconnected or not to the greatest extent, being capable of saving more resources for a server, and improving the access amount of TCP long connection.

Description

technical field [0001] The invention relates to the technical field of terminal networks, in particular to a long connection multiple timeout judging method, device and computer-readable storage medium. Background technique [0002] With the development of mobile network technology, the system or application program APP of the smart mobile terminal has a function of message push. By establishing a stable and reliable long-term connection between the server and the client, it provides the service of pushing real-time messages to the client application, helping network service providers to effectively motivate users. And all message push needs to be supported by the background server to be able to realize it. Only by maintaining a long link can the real-time nature of message sending and receiving be realized. [0003] A long connection refers to a connection established between a client and a server using TCP (Transmission Control Protocol). A long connection requires the cl...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/26H04L29/06H04L29/08
CPCH04L43/10H04L67/14H04L67/146H04L69/163H04L67/55
Inventor 郑秋燕
Owner NUBIA TECHNOLOGY CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products