CN110557301A - Method for realizing server-side heartbeat detection mechanism for reducing power consumption - Google Patents
Method for realizing server-side heartbeat detection mechanism for reducing power consumption Download PDFInfo
- Publication number
- CN110557301A CN110557301A CN201910781145.2A CN201910781145A CN110557301A CN 110557301 A CN110557301 A CN 110557301A CN 201910781145 A CN201910781145 A CN 201910781145A CN 110557301 A CN110557301 A CN 110557301A
- Authority
- CN
- China
- Prior art keywords
- terminal
- server
- data
- heartbeat detection
- connection
- 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.)
- Granted
Links
Classifications
-
- 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
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- 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
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0212—Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Abstract
The invention provides a method for realizing a server-side heartbeat detection mechanism for reducing power consumption, which comprises the following steps: after the speaking right of the terminal is idle for a certain time, the server actively sends heartbeat detection data A to the terminal through TCP connection; after receiving the heartbeat detection data A sent by the server through the TCP connection, the terminal sends the same heartbeat detection data B to the server through the TCP connection and the UDP connection so as to reply to the server; and the server receives and responds to the heartbeat detection data B of the terminal so as to complete data interaction between the server and the terminal and keep the connection effectiveness between the server and the terminal. The invention combines the heartbeat detection mechanism and the terminal dormancy mechanism, the communication connection between the terminal and the server is always kept in an active state, and the data transmission delay is low; and the terminal can enter deep sleep in an idle state, so that the service life is prolonged.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a method for realizing a server-side heartbeat detection mechanism for reducing power consumption.
Background
At present, due to the advantages of openness, rich hardware selection, low application development cost and the like of an Android system, a plurality of mobile terminal manufacturers are attracted to be added into an Android alliance, and various products with functional characteristics are provided according to different industry and scene requirements. Among them, terminals of the PoC (Push-To-Talk over Cellular) system have also used Android system devices.
Although the Android system has the advantages, the Android device consumes power quickly, and a large number of mobile terminal manufacturers continuously release high-capacity batteries, which does not achieve good effects. Particularly, the PoC terminal is used in an industrial production environment, and the power consumption problem is particularly prominent, so that the optimization of the power consumption problem is more urgent.
Disclosure of Invention
In order to solve the defects of the prior art, the invention aims to provide a method for realizing a server-side heartbeat detection mechanism for reducing power consumption, and solves the following two technical problems that (1) communication connection between a terminal and a server is kept smooth, data transmission delay caused by network activation is avoided, the terminal must actively send heartbeat data to the server at regular time, the terminal cannot be in deep sleep, and the power consumption is too high; and (2) by using the Android sleep mechanism, all AP layer network access (Application Processor, i.e. Application chip) is limited, so that heartbeat data cannot be sent out actively to keep the network smooth in the sleep state.
In order to achieve the above object, the present invention provides a method for implementing a server-side heartbeat detection mechanism to reduce power consumption, the method comprising the following steps: 1) after the terminal is started, two communication connections are established between the terminal and the server: TCP connection and UDP connection, the TCP connection is used for the business logic communication, UDP is used for the voice data transmission; when the speaking right of the terminal is idle, no data interaction exists between the terminal and the server, and the terminal enters a dormant state; after the speaking right of the terminal is idle for a certain time, the server actively sends heartbeat detection data A to the terminal through TCP connection; 2) after receiving the heartbeat detection data A sent by the server through the TCP connection, the terminal sends the same heartbeat detection data B to the server through the TCP connection and the UDP connection so as to reply to the server; 3) and the server receives and responds to the heartbeat detection data B of the terminal so as to complete data interaction between the server and the terminal and keep the connection effectiveness between the server and the terminal. Here, the data format of the heartbeat probe data a and the heartbeat probe data B is the same, but the data of the heartbeat probe data a and the heartbeat probe data B are different.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption in the present invention, preferably, in step 1), when the speaking right of the terminal is idle, the terminal is not plugged in a power supply, is in a static state, and the screen is closed, the terminal enters a sleep state, and when the server reaches the sleep time set by the system, the server actively sends heartbeat detection data a to the terminal.
As a further description of the method for implementing the server-side heartbeat detection mechanism for reducing power consumption in the present invention, preferably, in step 2), after receiving the heartbeat detection data a sent from the server through TCP connection, the terminal wakes up the BP layer of the terminal first, thereby indirectly waking up the AP layer of the terminal, and then sends the heartbeat detection data a to the server.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption, preferably, the BP layer is a baseband chip, and the AP layer is an application chip.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption, preferably, when the terminal is in the talkback state, data passes through both the TCP connection and the UDP connection, and the terminal maintains the connection and is in the unblocked state.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption according to the present invention, preferably, when the terminal does not transmit voice data nor receive voice data, the terminal is in the speaking right idle state.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption in the present invention, preferably, after the speaking right of the terminal is idle for 30s, the server actively sends heartbeat detection data a to the terminal through the TCP connection.
As a further description of the implementation method of the server-side heartbeat detection mechanism for reducing power consumption in the present invention, preferably, the system is used for managing data of a terminal.
The invention has the following beneficial effects: the invention combines the heartbeat detection mechanism and the terminal dormancy mechanism, the communication connection between the terminal and the server is always kept in an active state, and the data transmission delay is low; and the terminal can enter deep sleep in an idle state, so that the service life is prolonged.
Drawings
Fig. 1 is a schematic diagram of an implementation method of a server-side heartbeat detection mechanism for reducing power consumption according to the present invention.
Detailed Description
To further understand the structure, characteristics and other objects of the present invention, the following detailed description is given with reference to the accompanying preferred embodiments, which are only used to illustrate the technical solutions of the present invention and are not to limit the present invention.
As shown in fig. 1, fig. 1 is a schematic diagram of an implementation method of a server-side heartbeat detection mechanism for reducing power consumption according to the present invention. The terminal 1 is started and then establishes two communication connections, namely a TCP connection and a UDP connection, with the server 2, wherein the TCP connection is used for service logic communication, and the UDP connection is used for voice data transmission. When the terminal 1 is in the talkback state, data passes through both communication connections, and the terminal 1 maintains the connection and is in the unblocked state. When the terminal 1 does not transmit voice data nor receive voice data, the terminal 1 is in a state where the speaking right is idle.
When the terminal 1 is in the idle speaking right state, the two communication connections and the server have no data interaction, and a heartbeat detection mechanism at the calling server side can be adopted to keep the active state of the communication connection of the terminal. That is, when the speaking right of the terminal 1 is idle, the terminal 1 is not plugged with a power supply, is in a static state, and the screen is closed, and the terminal 1 enters a sleep state. After the terminal 1 is idle for 30s, the server 2 actively sends heartbeat detection data A to the terminal 1 through the TCP connection. When the sleep time set by the system is reached, the server 2 actively sends heartbeat detection data to the terminal 1 through the TCP connection, and wakes up the BP layer (namely the baseband chip) of the terminal 1, so as to indirectly wake up the AP layer (namely the application chip) of the terminal 1, and the terminal 1 sends the heartbeat detection data to the server 2 again, so that the communication connection between the terminal 1 and the server 2 is always kept in an active state, and the beneficial effect that the data transmission delay between the terminal 1 and the server 2 is low is achieved.
The specific implementation method of the server-side heartbeat detection mechanism for reducing power consumption is as follows.
Step 1): after a terminal 1 is started, two communication connections are established between the terminal 1 and a server 2, wherein the two communication connections are a TCP connection and a UDP connection, the TCP connection is used for service logic communication, and the UDP is used for voice data transmission; when the speaking right of the terminal 1 is idle, no data interaction exists between the terminal 1 and the server 2, and the terminal 1 enters a dormant state; after the terminal 1 has been idle for a certain time (preferably 30s), the server 2 actively sends heartbeat probe data a to the terminal 1 via said TCP connection. Here, the data format of the heartbeat probe data a and the heartbeat probe data B is the same, but the data of the heartbeat probe data a and the heartbeat probe data B are different. But one of the parameter values identifying the sender of the data is different. For example, the sender is the terminal 1, and the parameter value of the sender is the unique identifier of the terminal 1. In addition, in step 1), when the speaking right of the terminal 1 is idle, the terminal 1 is not plugged in a power supply, is in a static state, and the screen is closed, the terminal 1 enters a sleep state, and when the server 2 reaches the sleep time set by the system, the server 2 actively sends heartbeat detection data a to the terminal 1.
Step 2): after the terminal 1 receives the heartbeat detection data a sent by the server 2 through the TCP connection, the terminal 1 sends heartbeat detection data B to the server 2 through the TCP connection and the UDP connection to reply to the server 2. In step 2), after receiving the heartbeat probe data a sent from the server 2 through the TCP connection, the terminal 1 wakes up the BP layer of the terminal 1 first, thereby indirectly waking up the AP layer of the terminal 1, and then sends the heartbeat probe data a to the server 2. Preferably, the BP layer is a baseband chip, and the AP layer is an application chip.
Step 3): the server 2 receives and responds to the heartbeat detection data B of the terminal 1 so as to complete data interaction between the server 2 and the terminal 1 and maintain the connection validity of the server 2 and the terminal 1.
Two types of terminal machines sold in the market are randomly selected, before the mechanism of the invention is implemented, the power consumption data of the terminal is shown in a table 1, and after the mechanism of the invention is implemented, the power consumption data of the terminal is shown in a table 2.
TABLE 1
TABLE 2
As can be seen from tables 1 and 2, the application of the mechanism of the present invention significantly increases the standby time of the two terminal models. Therefore, the heartbeat detection mechanism and the terminal dormancy mechanism are combined, the communication connection between the terminal and the server is always kept in an active state, and the data transmission delay is low; and the terminal can enter deep sleep in an idle state, so that the service life is prolonged.
It should be noted that the above summary and the detailed description are intended to demonstrate the practical application of the technical solutions provided by the present invention, and should not be construed as limiting the scope of the present invention. Various modifications, equivalent substitutions, or improvements may be made by those skilled in the art within the spirit and principles of the invention. The scope of the invention is to be determined by the appended claims.
Claims (8)
1. A method for implementing a server-side heartbeat detection mechanism for reducing power consumption is characterized by comprising the following steps:
1) After a terminal (1) is started, two communication connections are established between the terminal (1) and a server (2), wherein the two communication connections are a TCP connection and a UDP connection, the TCP connection is used for service logic communication, and the UDP is used for voice data transmission; when the speaking right of the terminal (1) is idle, no data interaction exists between the terminal (1) and the server (2), and the terminal (1) enters a dormant state; after the speaking right of the terminal (1) is idle for a certain time, the server (2) actively sends heartbeat detection data A to the terminal (1) through the TCP connection;
2) After the terminal (1) receives the heartbeat detection data A sent by the server (2) through the TCP connection, the terminal (1) sends heartbeat detection data B to the server (2) through the TCP connection and the UDP connection so as to reply to the server (2);
3) The server (2) receives and responds to the heartbeat detection data B of the terminal (1) so as to complete data interaction between the server (2) and the terminal (1) and maintain the connection effectiveness of the server (2) and the terminal (1).
2. the implementation method of claim 1, wherein in step 1), when the speaking right is idle, the terminal (1) is not powered on, is in a static state and the screen is closed, the terminal (1) enters a sleep state, and when the server (2) reaches the sleep time set by the system, the server (2) actively sends heartbeat detection data a to the terminal (1).
3. An implementation method as claimed in claim 1, characterized in that in step 2), after receiving the heartbeat probe data a sent from the server (2) via the TCP connection, the terminal (1) wakes up the BP layer of the terminal (1) first, thereby indirectly waking up the AP layer of the terminal (1), and then sends the heartbeat probe data a to the server (2).
4. The method of claim 3, wherein the BP layer is a baseband chip and the AP layer is an application chip.
5. An implementation method as claimed in claim 2, characterized in that the terminal (1) is in a talk-back state, both communication connections of said TCP connection and said UDP connection have data to pass through, and the terminal (1) maintains the connection and is in a clear state.
6. An implementation method as claimed in claim 1, characterized in that when the terminal (1) does not transmit nor receive voice data, the terminal (1) is in the speaking right idle state.
7. An implementation method as claimed in claim 1 or 6, characterized in that the server (2) actively sends heartbeat probe data A to the terminal (1) over said TCP connection after the terminal (1) has been idle for 30 s.
8. An implementation method as claimed in claim 2, characterized in that the system is arranged to manage data of the terminal (1).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910781145.2A CN110557301B (en) | 2019-08-23 | 2019-08-23 | Method for realizing server-side heartbeat detection mechanism for reducing power consumption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910781145.2A CN110557301B (en) | 2019-08-23 | 2019-08-23 | Method for realizing server-side heartbeat detection mechanism for reducing power consumption |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110557301A true CN110557301A (en) | 2019-12-10 |
CN110557301B CN110557301B (en) | 2023-07-28 |
Family
ID=68737863
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910781145.2A Active CN110557301B (en) | 2019-08-23 | 2019-08-23 | Method for realizing server-side heartbeat detection mechanism for reducing power consumption |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110557301B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111371639A (en) * | 2020-02-21 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Network delay analysis method and device, storage medium and computer equipment |
CN113593192A (en) * | 2021-06-27 | 2021-11-02 | 广州智特信息科技有限公司 | Gas safety linkage control method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102036349A (en) * | 2009-09-29 | 2011-04-27 | 联想(北京)有限公司 | Method for maintaining connection of terminal and network server, terminal and network server |
CN103079285A (en) * | 2013-01-14 | 2013-05-01 | 东莞宇龙通信科技有限公司 | Mobile terminal and point-to-point connection retention method |
CN105578487A (en) * | 2014-10-09 | 2016-05-11 | 普天信息技术有限公司 | Terminal offline monitoring method, terminal and base station |
US20170118709A1 (en) * | 2014-06-18 | 2017-04-27 | Huawei Technologies Co., Ltd. | Heartbeat adjustment method, apparatus, and terminal |
CN107204999A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for realizing heartbeat |
CN108260010A (en) * | 2018-02-05 | 2018-07-06 | 南通大学 | A kind of VOD method and system based on network encoding and decoding and cooperation distribution |
-
2019
- 2019-08-23 CN CN201910781145.2A patent/CN110557301B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102036349A (en) * | 2009-09-29 | 2011-04-27 | 联想(北京)有限公司 | Method for maintaining connection of terminal and network server, terminal and network server |
CN103079285A (en) * | 2013-01-14 | 2013-05-01 | 东莞宇龙通信科技有限公司 | Mobile terminal and point-to-point connection retention method |
US20170118709A1 (en) * | 2014-06-18 | 2017-04-27 | Huawei Technologies Co., Ltd. | Heartbeat adjustment method, apparatus, and terminal |
CN105578487A (en) * | 2014-10-09 | 2016-05-11 | 普天信息技术有限公司 | Terminal offline monitoring method, terminal and base station |
CN107204999A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for realizing heartbeat |
CN108260010A (en) * | 2018-02-05 | 2018-07-06 | 南通大学 | A kind of VOD method and system based on network encoding and decoding and cooperation distribution |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111371639A (en) * | 2020-02-21 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Network delay analysis method and device, storage medium and computer equipment |
CN111371639B (en) * | 2020-02-21 | 2021-12-14 | 腾讯科技(深圳)有限公司 | Network delay analysis method and device, storage medium and computer equipment |
CN113593192A (en) * | 2021-06-27 | 2021-11-02 | 广州智特信息科技有限公司 | Gas safety linkage control method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110557301B (en) | 2023-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9942850B2 (en) | Techniques for managing idle state activity in mobile devices | |
CN100405260C (en) | Reduction of idle power expense in networked battery power supply apparatus | |
CN107204999B (en) | Method and device for realizing heartbeat | |
CN104796971A (en) | System and method for low power signaling in wireless local area network | |
CN106125621A (en) | Safety defense monitoring system and security-protecting and monitoring method | |
WO2014062345A1 (en) | Application-aware radio power saving | |
CN104813637A (en) | Push service without persistent TCP connection in mobile network | |
CN110557301B (en) | Method for realizing server-side heartbeat detection mechanism for reducing power consumption | |
CN101754479B (en) | Method and device for transmitting multicast/broadcast message through wireless access point | |
CN109997387A (en) | Protenchyma networked user devices differentiation | |
CN103516870B (en) | A kind of information processing method and a kind of electronic equipment | |
CN103118421A (en) | Method and device for reducing power consumption of terminal | |
CN111417182A (en) | Data transmission method, device, storage medium, processor and system | |
US20190215771A1 (en) | Beacon signal processing system and filtering method of reducing wake-up frequency | |
CN104955133A (en) | Mobile device and method for managing network connection and storage medium | |
CN102420967A (en) | Video conference system, terminal and control method thereof | |
CN101370255B (en) | Method for guaranteeing contact between base station and terminal in dormancy mode | |
CN109981232A (en) | Data transmission method and device, data receiver method and device | |
CN109429299B (en) | Communication method, communication device and communication equipment of wireless local area network | |
CN108064087B (en) | DRX cycle configuration method, terminal, access network equipment and storage medium | |
CN109429300A (en) | Communication means, device, access point apparatus and the site apparatus of WLAN | |
CN104427616B (en) | Method and device for paging terminal | |
WO2021030987A1 (en) | Method and device for conflict resolution | |
EP4274329A1 (en) | Information receiving method, information sending method, and communication apparatus | |
WO2024082226A1 (en) | Time domain determination method and apparatus |
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 |