Unlock instant, AI-driven research and patent intelligence for your innovation.

A kind of method and device for sending heartbeat packet of long connection center

A sending method and long-term connection technology, which is applied in the network field, can solve the problem of terminal battery life reduction, meet the needs of message timeliness, and reduce the consumption of device resources

Active Publication Date: 2020-10-09
MEIZU TECH CO LTD
View PDF11 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present application provides a method and device for sending long-term connection heartbeat packets to solve the problem in the prior art that the terminal battery life is greatly reduced due to the use of a fixed frequency to send heartbeat packets

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
  • A kind of method and device for sending heartbeat packet of long connection center
  • A kind of method and device for sending heartbeat packet of long connection center

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] Such as figure 1 As shown, it is a flow chart of a method for sending a persistent connection heartbeat packet provided in Embodiment 1 of the present application, including the following steps:

[0043] S101: Obtain operating parameters of a terminal establishing a persistent connection with the server.

[0044] Here, the operating parameters obtained from the terminal establishing a persistent connection with the server include more than one of the following parameters: the operating status of the instant messaging software in the terminal, the system time of the terminal, network signal, and remaining power.

[0045] S102: Determine the current scene of the terminal according to the operating parameters.

[0046] Here, the current scene of the terminal may include any of the following scenes: an instant messaging scene, a night scene, a low battery scene, a weak network scene, and a normal scene. Wherein, the normal scene may refer to a scene other than an instant ...

Embodiment 2

[0063] Such as figure 2 As shown, it is a structural diagram of a sending device for a long connection heartbeat packet provided in Embodiment 2 of the present application, including:

[0064] Obtaining module 21, is used for obtaining the operating parameter of the terminal that establishes long connection with server;

[0065] The first determining module 22 is configured to determine the current scene of the terminal according to the operating parameters;

[0066] The second determining module 23 is configured to determine a heartbeat packet sending strategy corresponding to the scene where the terminal is currently located;

[0067] The control module 24 is configured to control the sending of the heartbeat packets in the long connection according to the determined heartbeat packet sending policy.

[0068] Optionally, the current scenario of the terminal determined by the first determination module 22 includes any of the following scenarios: instant messaging scenario, ...

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 application relates to the technical field of a network, and particularly relates to a method and device for sending a heartbeat packet in a long connection, which are used for solving the problem that in the prior art, a fixed frequency is adopted to send a heartbeat packet so as to cause serious reduction of endurance of a terminal. The application provides the method for sending the heartbeat packet in the long connection, which comprises the steps of: acquiring operation parameters of the terminal which establishes the long connection with a server; according to the operation parameters, determining a scene where the terminal is positioned currently; determining a heartbeat packet sending strategy corresponding to the scene where the terminal is positioned currently; and controlling sending of the heartbeat packet in the long connection by the determined heartbeat packet sending strategy.

Description

technical field [0001] The present application relates to the field of network technologies, and in particular to a method and device for sending long connection heartbeat packets. Background technique [0002] With the continuous development of network technology, end users can obtain required network resources from servers through clients. [0003] When performing continuous communication between the client and the server, it is often necessary to establish a Transmission Control Protocol (TCP) long connection. Based on the established TCP long connection, the client and the server can continuously send data packets. for data exchange. However, if there is no data exchange on the TCP connection between the client and the server for a long time, the operator server will disconnect the TCP long connection. Therefore, if you want to continue to maintain a long TCP connection, you need to continuously send heartbeat packets between the client and the server. However, in the...

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 Patents(China)
IPC IPC(8): H04W52/02H04M1/725H04L12/26H04L29/08
CPCH04L43/10H04L67/145H04W52/0287H04M1/72454Y02D30/70
Inventor 张斌
Owner MEIZU TECH CO LTD