CN111641703B - Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server - Google Patents

Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server Download PDF

Info

Publication number
CN111641703B
CN111641703B CN202010461319.XA CN202010461319A CN111641703B CN 111641703 B CN111641703 B CN 111641703B CN 202010461319 A CN202010461319 A CN 202010461319A CN 111641703 B CN111641703 B CN 111641703B
Authority
CN
China
Prior art keywords
heartbeat
heartbeat cycle
terminal equipment
server
cycle
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.)
Active
Application number
CN202010461319.XA
Other languages
Chinese (zh)
Other versions
CN111641703A (en
Inventor
黄宏章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202010461319.XA priority Critical patent/CN111641703B/en
Publication of CN111641703A publication Critical patent/CN111641703A/en
Application granted granted Critical
Publication of CN111641703B publication Critical patent/CN111641703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a method for determining a TCP heartbeat cycle of terminal equipment, the terminal equipment and a server, which are used for realizing that the terminal equipment rapidly reaches a stable TCP heartbeat cycle state in different cells and reducing the power consumption of the terminal equipment. The method of the embodiment of the invention comprises the following steps: the method comprises the steps that a terminal device sends a heartbeat cycle request to a server, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server; the terminal equipment receives the heartbeat cycle data sent by the server; and the terminal equipment maintains the connection state of the TCP link according to the heartbeat period data.

Description

Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server
Technical Field
The present invention relates to the field of communications, and in particular, to a method for determining a heartbeat cycle of a terminal device TCP (transmission control protocol ), a terminal device and a server, and a computer readable storage medium.
Background
In order for the terminal device to receive or transmit data on the TCP link in real time, a heartbeat mechanism is required to maintain the constant connection state of the TCP link. The current terminal equipment maintains the TCP heartbeat to be detected step by step and then to be maintained at a reasonable heartbeat period. If the terminal device moves to a different cell, the time the new cell maintains an IP (internet protocol ) link for the terminal device may change from the value of the previous cell. If the time becomes shorter, a heartbeat timeout may occur on the new cell, so that the heartbeat cycle needs to be re-detected and then stabilized again, which will cause the terminal device to establish more network connections and consume resources of the TCP server while increasing the power consumption of the terminal device. If the IP link is maintained for the terminal device on this new cell for a longer period of time, unnecessary heartbeat data and power consumption may increase if the heartbeat data is sent using the previous heartbeat period.
Disclosure of Invention
The embodiment of the invention provides a method for determining a TCP heartbeat cycle of terminal equipment, the terminal equipment, a server and a computer readable storage medium, which are used for realizing that the terminal equipment rapidly reaches a stable TCP heartbeat cycle state in different cells and reducing the power consumption of the terminal equipment.
In view of this, a first aspect of the present invention provides a method for determining a TCP heartbeat cycle of a terminal device, which may include:
the method comprises the steps that a terminal device sends a heartbeat cycle request to a server, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server;
the terminal equipment receives the heartbeat cycle data sent by the server;
and the terminal equipment maintains the connection state of the TCP link according to the heartbeat period data.
Optionally, in some embodiments of the present invention, the heartbeat cycle data includes a reference heartbeat cycle, and the terminal device maintains a connection state of the TCP link according to the heartbeat cycle data, including:
if the reference heartbeat period does not meet the target period detection condition, the terminal equipment maintains the connection state of the TCP link by using the reference heartbeat period;
if the reference heartbeat period meets the target period detection condition, the terminal equipment increases the heartbeat period time for the reference heartbeat period to obtain a target heartbeat period; and maintaining the connection state of the TCP link by using the target heartbeat period.
Optionally, in some embodiments of the present invention, the heartbeat cycle data does not include a reference heartbeat cycle, and the terminal device maintains a connection state of the TCP link according to the heartbeat cycle data, including:
if the terminal equipment is in the target period detection state, the terminal equipment maintains the connection state of the TCP link by using the last obtained target heartbeat period;
if the terminal equipment is not in the target period detection state, the terminal equipment performs gradual detection to obtain a stable heartbeat period; and maintaining the connection state of the TCP link by using the stable heartbeat period.
Optionally, in some embodiments of the present invention, the method further includes:
and the terminal equipment sends a storage request to the server, wherein the storage request comprises the current heartbeat cycle of the current cell.
A second aspect of the present invention provides a method for determining a TCP heartbeat cycle of a terminal device, which may include:
the method comprises the steps that a server receives a heartbeat cycle request sent by a terminal device, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located;
the server determines heartbeat cycle data according to the information of the current cell;
and the server sends the heartbeat period data to the terminal equipment, wherein the heartbeat period data is used for the terminal equipment to maintain the connection state of the TCP link.
Optionally, in some embodiments of the invention, the heartbeat cycle data includes a reference heartbeat cycle, or the heartbeat cycle data does not include a reference heartbeat cycle.
Optionally, in some embodiments of the present invention, the method further includes:
the server receives a storage request sent by the terminal equipment, wherein the storage request comprises the current heartbeat cycle of the current cell;
and the server stores the current heartbeat cycle of the current cell according to the storage request.
A third aspect of the present invention provides a terminal device, which may include:
the system comprises a sending module, a server and a receiving module, wherein the sending module is used for sending a heartbeat cycle request to the server, the heartbeat cycle request comprises information of a current cell where the terminal equipment is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server;
the receiving module is used for receiving the heartbeat cycle data sent by the server;
and the processing module is used for maintaining the connection state of the TCP link according to the heartbeat period data.
Alternatively, in some embodiments of the invention,
the processing module is specifically configured to maintain a connection state of the TCP link using the reference heartbeat period if the reference heartbeat period does not meet a target period detection condition;
the processing module is specifically configured to increase a heartbeat cycle time for the reference heartbeat cycle if the reference heartbeat cycle meets a target cycle detection condition, so as to obtain a target heartbeat cycle; and maintaining the connection state of the TCP link by using the target heartbeat period.
Alternatively, in some embodiments of the invention,
the processing module is specifically configured to maintain a connection state of the TCP link by using a target heartbeat period obtained last time if the terminal device is in a target period detection state;
the processing module is specifically configured to perform gradual detection if the terminal device is not in a target period detection state, so as to obtain a stable heartbeat period; and maintaining the connection state of the TCP link by using the stable heartbeat period.
Optionally, in some embodiments of the present invention, the method further includes:
the sending module is further configured to send a storage request to the server, where the storage request includes a current heartbeat cycle of the current cell.
A fourth aspect of the present invention provides a server, which may include:
the receiving module is used for receiving a heartbeat cycle request sent by the terminal equipment, wherein the heartbeat cycle request comprises information of a current cell where the terminal equipment is located;
the processing module is used for determining heartbeat cycle data according to the information of the current cell;
and the sending module is used for sending the heartbeat period data to the terminal equipment, wherein the heartbeat period data is used for the terminal equipment to maintain the connection state of the TCP link.
Optionally, in some embodiments of the invention, the heartbeat cycle data includes a reference heartbeat cycle, or the heartbeat cycle data does not include a reference heartbeat cycle.
Alternatively, in some embodiments of the invention,
the receiving module is further configured to receive a storage request sent by the terminal device, where the storage request includes a current heartbeat cycle of the current cell;
the processing module is further configured to save a current heartbeat cycle of the current cell according to the storage request.
A fifth aspect of the present invention provides a terminal device, which may include:
a memory storing executable program code;
a processor coupled to the memory;
a transceiver coupled to the processor;
the transceiver, the processor invoke the executable program code stored in the memory for performing the steps of the method of determining a TCP heartbeat cycle of a terminal device as described in the first aspect of the invention and any alternative implementation of the first aspect.
A sixth aspect of the present invention provides a server, which may include:
a memory storing executable program code;
a processor coupled to the memory;
a transceiver coupled to the processor;
the transceiver and the processor invoke the executable program code stored in the memory for performing the steps of the method of determining a TCP heartbeat cycle of a terminal device as described in the second aspect of the invention and any alternative implementation of the second aspect.
A seventh aspect of the embodiments of the present invention provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of determining a TCP heartbeat cycle of a terminal device as described in any of the first aspect and the first alternative implementation manner of the present invention, or in any of the second aspect and the second alternative implementation manner of the present invention.
An eighth aspect of the embodiments of the present invention discloses a computer program product, which when run on a computer causes the computer to perform any one of the embodiments of the present invention or to implement part or all of the steps of the method for determining a TCP heartbeat cycle of a terminal device according to any one of the embodiments of the present invention as disclosed in the second aspect of the present invention.
A ninth aspect of the embodiment of the present invention discloses an application publishing platform, which is configured to publish a computer program product, where the computer program product when run on a computer causes the computer to execute any one of the first aspect of the embodiment of the present invention, or execute part or all of the steps of the method for determining a TCP heartbeat cycle of a terminal device disclosed in the second aspect of the present invention.
From the above technical solutions, the embodiment of the present invention has the following advantages:
in the embodiment of the invention, a terminal device sends information of a current cell to a server, wherein the information of the current cell is used for determining heartbeat cycle data of the current cell by the server; the terminal equipment receives the heartbeat cycle data sent by the server; and the terminal equipment maintains the connection state of the TCP link according to the heartbeat period data. Therefore, the heartbeat period of each cell provided by the terminal equipment through server big data statistics can effectively reduce the detection time of the heartbeat period of the terminal equipment and the problems of overlong or too short heartbeat period and the like caused by moving to a new cell, so that the terminal equipment can quickly reach a stable TCP heartbeat period state, the power consumption of the terminal equipment on TCP heartbeat is effectively reduced, and the standby time of the terminal equipment is prolonged.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments and the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings.
Fig. 1 is a schematic diagram of an embodiment of a method for determining a TCP heartbeat cycle of a terminal device according to an embodiment of the present invention;
fig. 2A is a schematic diagram of a flow executed by a terminal device in an embodiment of the present invention;
FIG. 2B is a schematic diagram illustrating a process performed by a server according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of a terminal device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of a server according to an embodiment of the present invention;
fig. 5 is a schematic diagram of another embodiment of a terminal device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of another embodiment of a server according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method for determining a TCP heartbeat cycle of terminal equipment, the terminal equipment, a server and a computer readable storage medium, which are used for realizing that the terminal equipment rapidly reaches a stable TCP heartbeat cycle state in different cells and reducing the power consumption of the terminal equipment.
In order that those skilled in the art will better understand the present invention, reference will now be made to the accompanying drawings in which embodiments of the invention are illustrated, it being apparent that the embodiments described are only some, but not all, of the embodiments of the invention. Based on the embodiments of the present invention, it should be understood that the present invention is within the scope of protection.
A terminal device, which may be referred to as a User Equipment (UE), a Mobile Station (MS), a mobile terminal device (mobile terminal), an intelligent terminal device, etc., may communicate with one or more core networks via a radio access network (radio access network, RAN). For example, the terminal device may be a mobile phone (or "cellular" phone), a computer with a mobile terminal device, etc., or a portable, pocket, hand-held, computer-built-in or vehicle-mounted mobile device, and a terminal device in a next generation (mobile communication system) (NR) network that exchanges voice or data with a radio access network. Description of terminal device: in the invention, the terminal equipment can also comprise a Relay and can be regarded as the terminal equipment with the base station capable of carrying out data communication.
As shown in fig. 1, an embodiment of a method for determining a TCP heartbeat cycle of a terminal device according to an embodiment of the present invention is shown, which may include:
101. the method comprises the steps that a terminal device sends a heartbeat cycle request to a server, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server.
After the terminal equipment sends the heartbeat cycle request to the server, the server receives the heartbeat cycle request sent by the terminal equipment, wherein the heartbeat cycle request comprises the information of the current cell where the terminal equipment is located. It is understood that the information of the current cell includes an Identity (ID) of the current cell. The cell in the embodiment of the invention refers to a cellular cell.
102. And the server determines heartbeat cycle data according to the information of the current cell.
And the server determines heartbeat cycle data according to the information of the current cell, wherein the heartbeat cycle data comprises a reference heartbeat cycle or the heartbeat cycle data does not comprise the reference heartbeat cycle.
For example, if the information of the current cell includes the ID of the current cell, it may also be determined whether the information of the current cell is information of the requested heartbeat cycle, if so, the server may query whether the reference heartbeat cycle of the current cell is locally stored, and if the reference heartbeat cycle of the current cell is stored, the determined heartbeat cycle data includes the reference heartbeat cycle. If the reference heartbeat period of the current cell is not stored, the heartbeat period data determined by the server does not include the reference heartbeat period, and the server can also be called as returning the idle heartbeat period data to the terminal equipment.
103. And the server sends the heartbeat period data to the terminal equipment, wherein the heartbeat period data is used for the terminal equipment to maintain the connection state of the TCP link.
After the server sends the heartbeat cycle data to the terminal equipment, the terminal equipment receives the heartbeat cycle data sent by the server.
104. And the terminal equipment maintains the connection state of the TCP link according to the heartbeat period data.
The terminal device maintains the connection state of the TCP link according to the heartbeat cycle data, which may include, but is not limited to, the following implementation manners:
the implementation mode is as follows: the heartbeat cycle data includes a reference heartbeat cycle;
and if the reference heartbeat period does not meet the target period detection condition, the terminal equipment maintains the connection state of the TCP link by using the reference heartbeat period.
If the reference heartbeat period meets the target period detection condition, the terminal equipment increases the heartbeat period time for the reference heartbeat period to obtain a target heartbeat period; and maintaining the connection state of the TCP link by using the target heartbeat period.
The implementation mode II is as follows: the heartbeat cycle data does not comprise a reference heartbeat cycle, namely the data of the hollow heartbeat cycle;
if the terminal equipment is in the target period detection state, the terminal equipment maintains the connection state of the TCP link by using the last obtained target heartbeat period; if the terminal device does not receive the heartbeat cycle data sent by the server, and if the terminal device is in a target cycle detection state, the terminal device maintains the connection state of the TCP link by using the target heartbeat cycle obtained last time.
If the terminal equipment is not in the target period detection state, the terminal equipment performs gradual detection to obtain a stable heartbeat period; and maintaining the connection state of the TCP link by using the stable heartbeat period. If the terminal equipment does not receive the heartbeat cycle data sent by the server and the terminal equipment is not in a target cycle detection state, the terminal equipment detects step by step to obtain a stable heartbeat cycle; and maintaining the connection state of the TCP link by using the stable heartbeat period.
It can be understood that the information of the current cell contained in the heartbeat data by the terminal device is sent to the server, and the server sends the reference heartbeat cycle of the current cell as the default heartbeat cycle through big data statistics.
If the heartbeat period issued by the server is within a reasonable range, i.e. does not meet the longer period detection condition (target period detection condition), the terminal device can maintain the TCP link using the reference heartbeat period for a long period of time.
If the heartbeat period issued by the server is too small, i.e., a longer period detection condition (target period detection condition) is satisfied, the terminal device can detect to the longer heartbeat period at an appropriate time, if the longer heartbeat period can normally maintain the TCP link, update the longer heartbeat period to the server and the terminal device maintains the TCP link using the longer heartbeat period. If so, the TCP link is maintained using a reference heartbeat cycle issued by the server.
Therefore, the heartbeat period of each cell provided by the terminal equipment through server big data statistics can effectively reduce the detection time of the heartbeat of the terminal equipment and the problems of overlong or too short heartbeat period and the like caused by moving to a new cell, so that the terminal equipment can quickly reach a stable TCP heartbeat period state, the power consumption of the terminal equipment on TCP heartbeat is effectively reduced, and the standby time of the terminal equipment is prolonged.
Optionally, in some embodiments of the present invention, the terminal device sends a storage request to the server, where the storage request includes a current heartbeat cycle of the current cell. It will be appreciated that the storage request includes the ID of the current cell.
The server receives a storage request sent by the terminal equipment, wherein the storage request comprises the current heartbeat cycle of the current cell; and the server stores the current heartbeat cycle of the current cell according to the storage request. It can be understood that the current heartbeat period can be a stable heartbeat period determined by the terminal device, and the current heartbeat period is reported to the server for storage, so that when the next time the terminal device is switched to the cell and the network is dropped or the heartbeat period is requested to the server under other conditions, the server can directly search from the stored data and issue the data to the terminal device, thereby reducing the consumption of system resources of the terminal device.
An exemplary embodiment of the present invention is shown in fig. 2A, which is a schematic diagram of a process performed by a terminal device in an embodiment of the present invention. And the terminal equipment sends a heartbeat cycle request to the server, and the server transmits heartbeat cycle data after the heartbeat cycle request comprises information (including the ID of the current cell) of the current cell where the terminal equipment is located.
The terminal equipment judges whether the heartbeat period data has heartbeat period response data or not, and can be understood as a reference heartbeat period; if so, the terminal device further judges whether the heartbeat period response data meets the longer period detection condition or not, and can be understood as a target period detection condition.
If the heartbeat cycle response data does not meet the longer cycle detection condition, it can be understood that the heartbeat cycle response data is already longer heartbeat cycle response data, and the terminal device can directly use the reference heartbeat cycle issued by the server to start the next heartbeat timer.
If the heartbeat cycle response data meets the longer cycle detection condition, the terminal device may increase the heartbeat cycle time based on the reference heartbeat cycle included in the heartbeat cycle response data, so as to obtain an increased heartbeat cycle, which may also be referred to as a target heartbeat cycle, at this time, the terminal device enters a long cycle detection state, that is, a target cycle detection state, and the terminal device starts the next heartbeat timer using the target heartbeat cycle.
For example, if the reference heartbeat period issued by the server to the terminal device is 5min, and the longest heartbeat period configured by the terminal device is 10min, then the 5min is less than 10min, so as to meet the detection condition of the longer period, the terminal device can add 5s on the basis of 5min, obtain the target heartbeat period of 5 minutes and 5 seconds, and start the next heartbeat timer by using the target heartbeat period. It will be appreciated that the value added here is generally not too great in order to obtain a stable heart cycle.
If the terminal device determines that the heartbeat period data does not have the heartbeat period response data, the terminal device may further determine whether the terminal device is in a long period detection state, that is, a target period detection state.
If the terminal device is in a long period detection state, namely a target period detection state, the terminal device can use the last stable target heartbeat period as a new heartbeat period and start the next heartbeat timer.
If the terminal equipment is not in the long period detection state, namely the target period detection state, the terminal equipment can gradually detect the heartbeat period, and after the heartbeat is stable, the updated stable heartbeat period is sent to the server; and starts the next heartbeat timer using the updated stable heartbeat period.
It will be appreciated that, when the timer expires, the terminal device may also report to the server the ID information containing the current cell.
Fig. 2B is a schematic diagram illustrating a flow executed by the server according to an embodiment of the present invention. The server receives terminal equipment data sent by the terminal equipment. The server may determine whether the terminal device data is heartbeat data, and if not, end. If so, the server can further judge whether the terminal equipment data contains the information of the current cell, if not, the terminal equipment data is ended, and if so, the server can further judge whether the terminal equipment data is the information of the request heartbeat period.
If the server judges that the data of the terminal equipment is the information of the request heartbeat period, the server searches and judges whether the heartbeat period information of the current cell is locally stored, if so, the server can return the effective heartbeat period data to the terminal equipment or can be called as returning the reference heartbeat period to the terminal equipment, and if not, the server can return the hollow heartbeat period data to the terminal equipment.
If the server judges that the terminal equipment data is not the information of the request heartbeat period, whether the information of the cell heartbeat period is stored or not can be judged, if so, the information of the cell heartbeat period can be stored in the local service area, and if not, the operation is ended.
Note that in fig. 2A and 2B, the terminal device that is present may also be referred to as a mobile terminal, or a mobile device.
In the embodiment of the invention, a terminal device sends information of a current cell to a server, wherein the information of the current cell is used for determining heartbeat cycle data of the current cell by the server; the terminal equipment receives the heartbeat cycle data sent by the server; and the terminal equipment maintains the connection state of the TCP link according to the heartbeat period data. Under different cells, TCP reconnection and heartbeat detection can be reduced, the stable heartbeat cycle state of the TCP can be quickly entered, power consumption is reduced, and power consumption of terminal equipment is prolonged. The method realizes that the terminal equipment can quickly reach stable TCP heartbeat cycle states in different cells by combining big data statistics and an effective heartbeat detection mechanism with the uniqueness of the global cells, and reduces the power consumption of the terminal equipment.
As shown in fig. 3, which is a schematic diagram of an embodiment of a terminal device in an embodiment of the present invention, may include:
a sending module 301, configured to send a heartbeat cycle request to a server, where the heartbeat cycle request includes information of a current cell in which the terminal device is located, where the information of the current cell is used by the server to determine heartbeat cycle data of the current cell;
a receiving module 302, configured to receive the heartbeat cycle data sent by the server;
and the processing module 303 is configured to maintain a connection state of the TCP link according to the heartbeat cycle data.
Alternatively, in some embodiments of the invention,
the processing module 303 is specifically configured to maintain the connection state of the TCP link using the reference heartbeat period if the reference heartbeat period does not meet the target period detection condition;
the processing module 303 is specifically configured to increase the heartbeat cycle time for the reference heartbeat cycle if the reference heartbeat cycle meets the target cycle detection condition, so as to obtain a target heartbeat cycle; and maintaining the connection state of the TCP link by using the target heartbeat period.
Alternatively, in some embodiments of the invention,
the processing module 303 is specifically configured to maintain the connection state of the TCP link by using the last obtained target heartbeat period if the terminal device is in the target period detection state;
the processing module 303 is specifically configured to perform gradual detection if the terminal device is not in the target period detection state, so as to obtain a stable heartbeat period; and maintaining the connection state of the TCP link by using the stable heartbeat period.
Optionally, in some embodiments of the present invention, the method further includes:
the sending module 301 is further configured to send a storage request to the server, where the storage request includes a current heartbeat cycle of the current cell.
As shown in fig. 4, which is a schematic diagram of an embodiment of a server in an embodiment of the present invention, may include:
a receiving module 401, configured to receive a heartbeat cycle request sent by a terminal device, where the heartbeat cycle request includes information of a current cell where the terminal device is located;
a processing module 402, configured to determine heartbeat cycle data according to the information of the current cell;
and the sending module 403 is configured to send the heartbeat cycle data to the terminal device, where the heartbeat cycle data is used for the terminal device to maintain a connection state of a TCP link.
Optionally, in some embodiments of the invention, the heartbeat cycle data includes a reference heartbeat cycle, or the heartbeat cycle data does not include a reference heartbeat cycle.
Alternatively, in some embodiments of the invention,
the receiving module 401 is further configured to receive a storage request sent by the terminal device, where the storage request includes a current heartbeat cycle of the current cell;
the processing module 402 is further configured to save a current heartbeat cycle of the current cell according to the storage request.
As shown in fig. 5, which is a schematic diagram of another embodiment of a terminal device in an embodiment of the present invention, may include:
a memory 501 in which executable program codes are stored;
a processor 502 coupled to the memory 501;
a transceiver 503 coupled to the processor 502;
a transceiver 503, configured to send a heartbeat cycle request to a server, where the heartbeat cycle request includes information of a current cell in which the terminal device is located, where the information of the current cell is used by the server to determine heartbeat cycle data of the current cell; receiving the heartbeat cycle data sent by the server;
the processor 502 invokes the executable program code stored in the memory 501 for maintaining the connection state of the TCP link according to the heartbeat cycle data.
Alternatively, in some embodiments of the invention,
the processor 502 invokes the executable program code stored in the memory 501, specifically configured to maintain the connection state of the TCP link using the reference heartbeat cycle if the reference heartbeat cycle does not meet the target cycle detection condition;
the processor 502 invokes the executable program code stored in the memory 501, and is specifically configured to increase the heartbeat cycle time for the reference heartbeat cycle if the reference heartbeat cycle meets the target cycle detection condition, so as to obtain a target heartbeat cycle; and maintaining the connection state of the TCP link by using the target heartbeat period.
Alternatively, in some embodiments of the invention,
the processor 502 invokes the executable program code stored in the memory 501, and is specifically configured to maintain the connection state of the TCP link by using the last obtained target heartbeat cycle if the terminal device is in the target cycle detection state;
the processor 502 invokes the executable program code stored in the memory 501, and is specifically configured to perform gradual detection if the terminal device is not in the target period detection state, so as to obtain a stable heartbeat period; and maintaining the connection state of the TCP link by using the stable heartbeat period.
Alternatively, in some embodiments of the invention,
the transceiver 503 is further configured to send a storage request to the server, where the storage request includes a current heartbeat cycle of the current cell.
As shown in fig. 6, which is a schematic diagram of another embodiment of a server in an embodiment of the present invention, may include:
a memory 601 in which executable program codes are stored;
a processor 602 coupled to the memory 601;
a transceiver 603 coupled to the processor 602;
a transceiver 603, configured to receive a heartbeat cycle request sent by a terminal device, where the heartbeat cycle request includes information of a current cell in which the terminal device is located;
the processor 602 invokes the executable program code stored in the memory 601 for determining heartbeat cycle data from the information of the current cell;
the transceiver 603 is further configured to send the heartbeat cycle data to the terminal device, where the heartbeat cycle data is used for the terminal device to maintain a connection state of a TCP link.
Optionally, in some embodiments of the invention, the heartbeat cycle data includes a reference heartbeat cycle, or the heartbeat cycle data does not include a reference heartbeat cycle.
Alternatively, in some embodiments of the invention,
the transceiver 603 is further configured to receive a storage request sent by the terminal device, where the storage request includes a current heartbeat cycle of the current cell;
the processor 602 invokes the executable program code stored in the memory 601 and is further configured to save a current heartbeat cycle of the current cell according to the storage request.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for determining a TCP heartbeat cycle of a terminal device, comprising:
the method comprises the steps that a terminal device sends a heartbeat cycle request to a server, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server;
the terminal equipment receives the heartbeat cycle data sent by the server;
if the heartbeat period data does not comprise the reference heartbeat period and the terminal equipment is not in the target period detection state, the terminal equipment gradually detects to obtain a stable heartbeat period; using the stable heartbeat period to maintain the connection state of the TCP link;
if the heartbeat cycle data comprises a reference heartbeat cycle and the terminal equipment is not in a target cycle detection state, the terminal equipment gradually detects and maintains the connection state of the TCP link by using the reference heartbeat cycle under the condition that the stable heartbeat cycle is not obtained.
2. The method of claim 1, wherein the heartbeat cycle data includes a reference heartbeat cycle, the method further comprising:
if the reference heartbeat period does not meet the target period detection condition, the terminal equipment maintains the connection state of the TCP link by using the reference heartbeat period;
if the reference heartbeat period meets the target period detection condition, the terminal equipment increases the heartbeat period time for the reference heartbeat period to obtain a target heartbeat period; and maintaining the connection state of the TCP link by using the target heartbeat period.
3. The method of claim 1, wherein the heartbeat cycle data does not include a reference heartbeat cycle, the method further comprising:
if the terminal equipment is in the target period detection state, the terminal equipment maintains the connection state of the TCP link by using the last obtained target heartbeat period.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
and the terminal equipment sends a storage request to the server, wherein the storage request comprises the current heartbeat cycle of the current cell.
5. A method for determining a TCP heartbeat cycle of a terminal device, comprising:
the method comprises the steps that a server receives a heartbeat cycle request sent by a terminal device, wherein the heartbeat cycle request comprises information of a current cell where the terminal device is located;
the server determines heartbeat cycle data according to the information of the current cell;
the server sends the heartbeat cycle data to the terminal equipment, wherein the heartbeat cycle data is used for gradually detecting the terminal equipment to obtain a stable heartbeat cycle when the heartbeat cycle data does not comprise a reference heartbeat cycle and the terminal equipment is not in a target cycle detection state; using the stable heartbeat period to maintain the connection state of the TCP link; and the heartbeat cycle data is used for maintaining the connection state of the TCP link by using the reference heartbeat cycle when the heartbeat cycle data comprises the reference heartbeat cycle and the terminal equipment is not in the target cycle detection state and the terminal equipment detects step by step and does not obtain the stable heartbeat cycle.
6. The method of claim 5, wherein the heartbeat cycle data includes a reference heartbeat cycle or the heartbeat cycle data does not include a reference heartbeat cycle.
7. The method according to any one of claims 5-6, further comprising:
the server receives a storage request sent by the terminal equipment, wherein the storage request comprises the current heartbeat cycle of the current cell;
and the server stores the current heartbeat cycle of the current cell according to the storage request.
8. A terminal device, characterized in that,
the system comprises a sending module, a server and a receiving module, wherein the sending module is used for sending a heartbeat cycle request to the server, the heartbeat cycle request comprises information of a current cell where the terminal equipment is located, and the information of the current cell is used for determining heartbeat cycle data of the current cell by the server;
the receiving module is used for receiving the heartbeat cycle data sent by the server;
the processing module is used for gradually detecting the terminal equipment to obtain a stable heartbeat cycle if the heartbeat cycle data does not comprise a reference heartbeat cycle and the terminal equipment is not in a target cycle detection state; using the stable heartbeat period to maintain the connection state of the TCP link;
if the heartbeat cycle data comprises a reference heartbeat cycle and the terminal equipment is not in a target cycle detection state, the terminal equipment gradually detects and maintains the connection state of the TCP link by using the reference heartbeat cycle under the condition that the stable heartbeat cycle is not obtained.
9. A server is characterized in that,
the receiving module is used for receiving a heartbeat cycle request sent by the terminal equipment, wherein the heartbeat cycle request comprises information of a current cell where the terminal equipment is located;
the processing module is used for determining heartbeat cycle data according to the information of the current cell;
the sending module is used for sending the heartbeat cycle data to the terminal equipment, wherein the heartbeat cycle data is used for gradually detecting the terminal equipment to obtain a stable heartbeat cycle when the heartbeat cycle data does not comprise a reference heartbeat cycle and the terminal equipment is not in a target cycle detection state; using the stable heartbeat period to maintain the connection state of the TCP link; and the heartbeat cycle data is used for maintaining the connection state of the TCP link by using the reference heartbeat cycle when the heartbeat cycle data comprises the reference heartbeat cycle and the terminal equipment is not in the target cycle detection state and the terminal equipment detects step by step and does not obtain the stable heartbeat cycle.
10. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-4 or to perform the method of any one of claims 5-7.
CN202010461319.XA 2020-05-27 2020-05-27 Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server Active CN111641703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010461319.XA CN111641703B (en) 2020-05-27 2020-05-27 Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010461319.XA CN111641703B (en) 2020-05-27 2020-05-27 Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server

Publications (2)

Publication Number Publication Date
CN111641703A CN111641703A (en) 2020-09-08
CN111641703B true CN111641703B (en) 2023-10-27

Family

ID=72332951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010461319.XA Active CN111641703B (en) 2020-05-27 2020-05-27 Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server

Country Status (1)

Country Link
CN (1) CN111641703B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114025416A (en) * 2021-10-28 2022-02-08 广东佳米科技有限公司 Dynamic adjustment method and system for detection interval of mobile terminal and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217402A (en) * 2008-05-02 2011-10-12 松谷投资公司 System and method for heartbeat signal generation
CN103209089A (en) * 2012-01-17 2013-07-17 华为技术有限公司 Method for obtaining heart beat period, terminal and server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217402A (en) * 2008-05-02 2011-10-12 松谷投资公司 System and method for heartbeat signal generation
CN103209089A (en) * 2012-01-17 2013-07-17 华为技术有限公司 Method for obtaining heart beat period, terminal and server

Also Published As

Publication number Publication date
CN111641703A (en) 2020-09-08

Similar Documents

Publication Publication Date Title
US9338674B2 (en) Systems, structures and associated processes for optimization of state transitions within wireless networks
CN108834213B (en) Low-downlink delay communication method and system in Internet of things
US8934451B2 (en) Deregistration with context retention for inter-RAT operations
US20130246641A1 (en) Method and apparatus for dynamic server client controlled connectivity logic
US8050218B2 (en) Mobile communications system PDIF and method for peer detection of mobile terminal
CN103209089A (en) Method for obtaining heart beat period, terminal and server
US10779234B2 (en) Transmission mode switching method and apparatus
CN109168171B (en) Configuration information acquisition method, device, equipment and system
TW201728201A (en) Wireless communication device and control method thereof
CN104811965B (en) A kind of method and device of terminal optimized Internet resources
CN111641703B (en) Method for determining TCP heartbeat period of terminal equipment, terminal equipment and server
US8676881B2 (en) Location update method, heterogeneous network communications system and device
CN111479302A (en) Data service switching method and communication device
US10070370B1 (en) Apparatus, systems and methods for initiating a cell selection
US11368909B2 (en) Data transmission method and apparatus
JP2014143461A (en) Radio base station, radio communication system using the same, and radio communication connection method
CN113115338A (en) Network parameter adjusting method and device
CN111565479B (en) Communication method, device and system thereof
WO2009115991A1 (en) System and method of providing network status information of a basic service set for selective access point association
US20220159575A1 (en) Method for controlling connection time of terminal, and amf node for performing method
CN112004258B (en) Data acquisition method and communication device
CN114697269A (en) Data communication method, apparatus, device and medium
US9125212B2 (en) Apparatus and method for switching a wireless communication scheme
EP3496468B1 (en) Network entity for creating a transmission session via a network system, roaming firewall, network system, method and computer program product
US9198107B1 (en) Managing network selection for wireless communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant