CN113038425A - Method for maintaining long connection with low power consumption and computer readable storage medium - Google Patents
Method for maintaining long connection with low power consumption and computer readable storage medium Download PDFInfo
- Publication number
- CN113038425A CN113038425A CN201911353860.2A CN201911353860A CN113038425A CN 113038425 A CN113038425 A CN 113038425A CN 201911353860 A CN201911353860 A CN 201911353860A CN 113038425 A CN113038425 A CN 113038425A
- Authority
- CN
- China
- Prior art keywords
- heartbeat
- vehicle
- period
- remote server
- setting
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 230000007958 sleep Effects 0.000 claims abstract description 64
- 238000012423 maintenance Methods 0.000 claims abstract description 45
- 238000004891 communication Methods 0.000 claims abstract description 18
- 230000004044 response Effects 0.000 claims abstract description 17
- 238000004590 computer program Methods 0.000 claims description 4
- 230000003993 interaction Effects 0.000 description 5
- 230000006855 networking Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000005059 dormancy Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/40—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
- H04W4/44—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
-
- 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
- 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/0225—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
- H04W52/0248—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/20—Manipulation of established connections
- H04W76/25—Maintenance of established connections
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)
- Power Sources (AREA)
Abstract
The invention discloses a method for keeping long connection with low power consumption and a computer readable storage medium, wherein the method comprises the following steps: when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a normal heartbeat maintenance period, setting the first flag bit as failure, and setting the second flag bit as success; when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period; if the heartbeat response is received, setting the first flag bit as success; if the second flag bit is successful, updating the automatic wake-up signal period according to the condition that Ts + delta; if the heartbeat response is not received, setting the first flag bit and the second flag bit as failure, and updating the automatic awakening signal period according to the condition that Ts-delta is equal to Ts; and if the first flag bit is successful and the second flag bit is failed, setting an optimal sleep heartbeat cycle according to the automatic wake-up signal cycle. The invention can realize the balance of long-connection communication and low-power consumption functions.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for maintaining a long connection with low power consumption and a computer-readable storage medium.
Background
In the car networking system, the mobile car-mounted terminal often requires a data communication mode of long connection with the remote server when a car stops working so as to realize real-time issuing and response of a control instruction of the remote server, and simultaneously requires that the car-mounted terminal can be operated in a low power consumption state. The long connection communication and the low power consumption are opposite, and in the vehicle stop state, the mobile vehicle-mounted terminal can reduce the remote data interaction as much as possible under the state of keeping the long connection, so that the power consumption can be reduced better. Although a long connection with low power consumption is also realized in a DRX (Discontinuous Reception) mode and the like of the current LTE module, a base station or a remote server often disconnects an idle link due to a difference in operator network configuration and a difference in remote server configuration, resulting in a failure of a long connection function.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a method for maintaining a long connection with low power consumption and a computer-readable storage medium are provided, which can achieve a balance between long connection communication and low power consumption functions.
In order to solve the technical problems, the invention adopts the technical scheme that: a method of maintaining a long connection with low power consumption, comprising:
when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a preset normal heartbeat maintenance period, setting a preset first flag bit as failure, and setting a preset second flag bit as success;
when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period;
if receiving a heartbeat response sent by the remote server, setting a first flag bit as successful;
if the second flag bit is successful, updating the automatic wake-up signal period according to a first formula Ts + delta, wherein Ts is the automatic wake-up signal period, and delta is a preset stepping value;
if the heartbeat response sent by the remote server is not received, respectively setting the first flag bit and the second flag bit as failures, and updating the automatic awakening signal period according to a second formula Ts-delta;
judging whether the first flag bit is successful and the second flag bit is failed;
if not, executing the step that the vehicle-mounted terminal sends heartbeat data to a remote server according to the automatic wake-up signal period;
if so, setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle;
and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat cycle.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps as described above.
The invention has the beneficial effects that: when the vehicle flameout vehicle-mounted terminal enters the sleep state, the heartbeat interaction is carried out with the remote server, whether the heartbeat is received or not is taken as a basis, the network connection state is judged, the automatic wake-up signal period is dynamically adjusted, the optimal sleep heartbeat period is obtained, the heartbeat maintenance is carried out in the sleep state at this time subsequently according to the optimal sleep heartbeat period, and the balance of long connection communication and low power consumption functions is realized. The invention aims at different operator network configurations and remote server configurations, and realizes the optimal balance of low power consumption and long connection by dynamically acquiring the optimal sleep heartbeat cycle of different network environments and remote server configurations.
Drawings
FIG. 1 is a flow chart of a method of maintaining long connections with low power consumption in accordance with the present invention;
fig. 2 is a flowchart of dynamically adjusting an auto-wake-up signal period according to an embodiment of the invention.
Detailed Description
In order to explain technical contents, objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
The most key concept of the invention is as follows: by carrying out heartbeat interaction with the remote server and taking whether the heartbeat is received as a basis, the period of the automatic wake-up signal is dynamically adjusted to obtain the optimal dormancy heartbeat period.
Referring to fig. 1, a method for maintaining a long connection with low power consumption includes:
when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a preset normal heartbeat maintenance period, setting a preset first flag bit as failure, and setting a preset second flag bit as success;
when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period;
if receiving a heartbeat response sent by the remote server, setting a first flag bit as successful;
if the second flag bit is successful, updating the automatic wake-up signal period according to a first formula Ts + delta, wherein Ts is the automatic wake-up signal period, and delta is a preset stepping value;
if the heartbeat response sent by the remote server is not received, respectively setting the first flag bit and the second flag bit as failures, and updating the automatic awakening signal period according to a second formula Ts-delta;
judging whether the first flag bit is successful and the second flag bit is failed;
if not, executing the step that the vehicle-mounted terminal sends heartbeat data to a remote server according to the automatic wake-up signal period;
if so, setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle;
and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat cycle.
From the above description, the beneficial effects of the present invention are: the balance of long connection communication and low power consumption functions can be realized.
Further, still include:
when a vehicle is started, a communication link is established between a vehicle-mounted terminal and a remote server, and the maximum heartbeat maintenance period of the remote server is obtained;
setting a normal heartbeat maintenance period of the vehicle-mounted terminal and the remote server according to the maximum heartbeat maintenance period of the remote server;
and when the vehicle is in a starting state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the normal heartbeat maintenance cycle.
As can be seen from the above description, the normal heartbeat maintenance period is set according to the maximum heartbeat maintenance period of the remote server, and a better normal heartbeat maintenance period can be set for different remote server configurations.
Further, after the setting or updating of the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle, the method further includes:
and saving the optimal sleep heartbeat cycle to a nonvolatile storage medium.
As can be seen from the above description, persistent storage of data is guaranteed.
Further, when the vehicle is turned off, the setting of the automatic wake-up signal period as the optimal sleep heartbeat period or the preset normal heartbeat maintenance period specifically includes:
when the vehicle is flamed out, judging whether the nonvolatile storage medium stores the optimal sleep heartbeat cycle;
if yes, setting the automatic wake-up signal period as the optimal sleep heartbeat period;
and if not, setting the automatic wake-up signal period as a normal heartbeat maintenance period of the remote server corresponding to the vehicle-mounted terminal.
From the above description, if the optimal sleep heartbeat cycle is obtained before, the adjustment is performed based on the optimal sleep heartbeat cycle, so that the efficiency of dynamic adjustment is improved.
Further, the sending, by the vehicle-mounted terminal, the heartbeat data to the remote server according to the automatic wake-up signal period specifically includes:
the RTC module outputs a wake-up signal to wake up the vehicle-mounted terminal according to the period of the automatic wake-up signal;
and the vehicle-mounted terminal sends heartbeat data to the remote server immediately after being awakened.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps as described above.
Example one
Referring to fig. 2, a first embodiment of the present invention is: a method for keeping long connection with low power consumption can be applied to a mobile vehicle-mounted terminal; the method is based on a vehicle networking system, the vehicle networking system is composed of a remote server and a mobile vehicle-mounted terminal, and data communication is carried out between the remote server and the mobile vehicle-mounted terminal through a mobile network.
The remote server requires that a heartbeat maintenance period Tb is smaller than a certain value T1 for each mobile vehicle-mounted terminal link based on system resource balance consideration, and when the heartbeat data of the mobile vehicle-mounted terminal is not detected within the time T1 of the remote server, the data link is disconnected, and resources are recovered. Also in the mobile network, the mobile operator sets a life cycle T2 for the communication link of the mobile station (such as a mobile vehicle-mounted terminal) based on the consideration of effective utilization of channel resources, and when the base station detects that the idle time of the communication link of the mobile station is greater than T2, the base station will actively disconnect the communication link of the mobile station.
Under the condition that a vehicle stops working and long connection is guaranteed at the same time, a dormant heartbeat maintenance period Ts of a mobile vehicle-mounted terminal is close to min (T1 and T2) as far as possible, but for base stations in different regions and networks of different systems, T2 values are different, and T1 values of different remote servers are also different, so that the Ts needs to be dynamically adjusted to optimally realize balance of low power consumption and long connection.
In the present embodiment, the description will be made separately from the change of the heartbeat maintenance cycle in different vehicle states, in which the vehicle ON or off state is recognized by the ignition switch signal ACC or IG _ ON.
When a vehicle is started, a communication link is established between the vehicle-mounted terminal and a remote server, and the maximum heartbeat maintenance period T1 of the remote server is obtained; then setting a normal heartbeat maintenance period Tw between the vehicle-mounted terminal and the remote server according to the maximum heartbeat maintenance period T1 of the remote server; preferably, T1/2 < Tw < T1.
When the vehicle is in a starting state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the normal heartbeat maintenance period, namely heartbeat maintenance is carried out in a period of Tb Tw. In the normal working state of the vehicle, the mobile vehicle-mounted terminal still has a large amount of service data to interact with the remote server, so that the current state does not need to pay attention to whether Tb is larger than T2.
When the mobile vehicle-mounted terminal detects that the vehicle is flamed out, in order to maintain long connection and ensure low power consumption, interaction of other service data is stopped, the mobile vehicle-mounted terminal enters a dormant state, and only the operation of a heartbeat mechanism is reserved. At this time, firstly, judging whether the optimal sleep heartbeat cycle Tc is valid, that is, judging whether the optimal sleep heartbeat cycle Tc is stored in the nonvolatile storage medium, that is, judging whether the optimal sleep heartbeat cycle has been obtained before, if so, setting the initial sleep heartbeat cycle as the optimal sleep heartbeat cycle, that is, making Ts equal to Tc; if not, setting the initial sleep heartbeat period as the normal heartbeat maintenance period, namely setting Ts as Tw. And meanwhile, setting the period of the automatic wake-up signal of the RTC module as the initial sleep heartbeat period Ts. Therefore, the above steps correspond to setting an initial auto-wake-up signal period.
Then, the whole vehicle-mounted terminal enters a low-power-consumption sleep state, a first flag bit valid is initialized to false, and a second flag bit cnt is initialized to 0, wherein the first flag bit represents whether the current automatic wake-up signal period successfully receives a heartbeat response of the remote server, the value is true, the success is represented, and the value is false, the failure is represented; the second flag bit indicates whether the last automatic wake-up signal cycle successfully receives the heartbeat response of the remote server, the value is 1, which indicates failure, and the value is 0, which indicates success.
When the vehicle is in a flameout state, the vehicle-mounted terminal judges the network connection state according to whether the heartbeat response is received in the sleep state or not to dynamically adjust the automatic wake-up signal period to obtain an optimal sleep heartbeat period, and then the heartbeat maintenance is carried out according to the optimal sleep heartbeat period, so that the balance of the long-connection communication and low-power consumption functions can be realized. Specifically, as shown in fig. 2, the method includes the following steps:
s101: and the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period. Specifically, when the automatic wake-up signal period Ts is reached, the RTC module automatically outputs a wake-up signal to wake up the vehicle-mounted terminal, and the vehicle-mounted terminal immediately sends heartbeat data to the remote server after being awakened.
S102: and judging whether the heartbeat response sent by the remote server is successfully received, if so, indicating that the data link is normal, executing step S103, and if not, executing step S106.
S103: the first flag bit is set to success, i.e., value is set to true.
S104: and (4) judging whether the second flag bit is successful, namely judging whether cnt is equal to 0, if so, executing step S105, otherwise, keeping the period Ts of the automatic wake-up signal unchanged, and executing step S107.
S105: updating the automatic wake-up signal period in a mode of increasing a preset stepping value, namely enabling Ts to be equal to Ts + delta, wherein delta is the preset stepping value, and delta is less than Ts; preferably, δ is 10 s. Step S107 is performed.
S106: setting the first flag bit and the second flag bit as failures, respectively, and updating the auto-wake-up signal period by reducing a preset step value, i.e., making valid equal to false, cnt equal to 1, and Ts equal to Ts- δ. Step S107 is performed.
S107: and if the first flag bit is successful and the second flag bit is failed, determining whether valid is true and cnt is true at the same time, if so, executing step S108, if not, i.e., valid is false or cnt is 0, continuing to perform dynamic adjustment of Ts, i.e., continuing to execute step S101, and if the auto-wakeup signal period is updated, sending heartbeat data to the remote server according to the updated auto-wakeup signal period.
S108: and updating and setting an optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle, namely setting Tc to Ts, and storing the optimal sleep heartbeat cycle to a nonvolatile storage medium, namely to a storage medium which is not lost when power is off. When valid is equal to true and cnt is equal to 1, the value of the automatic wake-up signal period Ts reaches the optimal value under the current network environment, and then the current Ts is kept unchanged until the vehicle runs and starts.
S109: and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat period Tc.
After the vehicle runs and starts each time, different Ts and Tc under the corresponding network environment are obtained according to the method, and low-power-consumption long connection is realized.
The embodiment realizes the optimal balance of low power consumption and long connection by dynamically acquiring the optimal sleep heartbeat cycle of different network environments and remote server configurations aiming at different operator network configurations and remote server configurations.
Example two
The present embodiment is a computer-readable storage medium corresponding to the above-mentioned embodiments, on which a computer program is stored, which when executed by a processor implements the steps of:
when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a preset normal heartbeat maintenance period, setting a preset first flag bit as failure, and setting a preset second flag bit as success;
when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period;
if receiving a heartbeat response sent by the remote server, setting a first flag bit as successful;
if the second flag bit is successful, updating the automatic wake-up signal period according to a first formula Ts + delta, wherein Ts is the automatic wake-up signal period, and delta is a preset stepping value;
if the heartbeat response sent by the remote server is not received, respectively setting the first flag bit and the second flag bit as failures, and updating the automatic awakening signal period according to a second formula Ts-delta;
judging whether the first flag bit is successful and the second flag bit is failed;
if not, executing the step that the vehicle-mounted terminal sends heartbeat data to a remote server according to the automatic wake-up signal period;
if so, setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle;
and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat cycle.
Further, still include:
when a vehicle is started, a communication link is established between a vehicle-mounted terminal and a remote server, and the maximum heartbeat maintenance period of the remote server is obtained;
setting a normal heartbeat maintenance period of the vehicle-mounted terminal and the remote server according to the maximum heartbeat maintenance period of the remote server;
and when the vehicle is in a starting state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the normal heartbeat maintenance cycle.
Further, after the setting or updating of the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle, the method further includes:
and saving the optimal sleep heartbeat cycle to a nonvolatile storage medium.
Further, when the vehicle is turned off, the setting of the automatic wake-up signal period as the optimal sleep heartbeat period or the preset normal heartbeat maintenance period specifically includes:
when the vehicle is flamed out, judging whether the nonvolatile storage medium stores the optimal sleep heartbeat cycle;
if yes, setting the automatic wake-up signal period as the optimal sleep heartbeat period;
and if not, setting the automatic wake-up signal period as a normal heartbeat maintenance period of the remote server corresponding to the vehicle-mounted terminal.
Further, the sending, by the vehicle-mounted terminal, the heartbeat data to the remote server according to the automatic wake-up signal period specifically includes:
the RTC module outputs a wake-up signal to wake up the vehicle-mounted terminal according to the period of the automatic wake-up signal;
and the vehicle-mounted terminal sends heartbeat data to the remote server immediately after being awakened.
In summary, according to the method for maintaining long connection with low power consumption and the computer-readable storage medium provided by the present invention, when the vehicle-mounted terminal enters the sleep state, the heartbeat interaction with the remote server is performed, and the network connection state is determined according to whether the heartbeat is received, so as to dynamically adjust the automatic wake-up signal period, thereby obtaining the optimal sleep heartbeat period, and subsequently, the heartbeat maintenance is performed according to the optimal sleep heartbeat period in the current sleep state, so as to achieve the balance between long connection communication and low power consumption function. The invention aims at different operator network configurations and remote server configurations, and realizes the optimal balance of low power consumption and long connection by dynamically acquiring the optimal sleep heartbeat cycle of different network environments and remote server configurations.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method for maintaining long connections with low power consumption, comprising:
when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a preset normal heartbeat maintenance period, setting a preset first flag bit as failure, and setting a preset second flag bit as success;
when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period;
if receiving a heartbeat response sent by the remote server, setting a first flag bit as successful;
if the second flag bit is successful, updating the automatic wake-up signal period according to a first formula Ts + delta, wherein Ts is the automatic wake-up signal period, and delta is a preset stepping value;
if the heartbeat response sent by the remote server is not received, respectively setting the first flag bit and the second flag bit as failures, and updating the automatic awakening signal period according to a second formula Ts-delta;
judging whether the first flag bit is successful and the second flag bit is failed;
if not, executing the step that the vehicle-mounted terminal sends heartbeat data to a remote server according to the automatic wake-up signal period;
if so, setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle;
and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat cycle.
2. The method for maintaining long connections with low power consumption of claim 1, further comprising:
when a vehicle is started, a communication link is established between a vehicle-mounted terminal and a remote server, and the maximum heartbeat maintenance period of the remote server is obtained;
setting a normal heartbeat maintenance period of the vehicle-mounted terminal and the remote server according to the maximum heartbeat maintenance period of the remote server;
and when the vehicle is in a starting state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the normal heartbeat maintenance cycle.
3. The method for maintaining long connection with low power consumption according to claim 1, wherein after setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle, further comprising:
and saving the optimal sleep heartbeat cycle to a nonvolatile storage medium.
4. The method for maintaining long connection with low power consumption according to claim 3, wherein the setting of the automatic wake-up signal period to the optimal sleep heartbeat period or the preset normal heartbeat maintenance period when the vehicle is turned off is specifically as follows:
when the vehicle is flamed out, judging whether the nonvolatile storage medium stores the optimal sleep heartbeat cycle;
if yes, setting the automatic wake-up signal period as the optimal sleep heartbeat period;
and if not, setting the automatic wake-up signal period as a normal heartbeat maintenance period of the remote server corresponding to the vehicle-mounted terminal.
5. The method for maintaining the long connection with low power consumption according to claim 1, wherein the sending of the heartbeat data to the remote server by the vehicle-mounted terminal according to the automatic wake-up signal cycle specifically comprises:
the RTC module outputs a wake-up signal to wake up the vehicle-mounted terminal according to the period of the automatic wake-up signal;
and the vehicle-mounted terminal sends heartbeat data to the remote server immediately after being awakened.
6. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, performs the steps of:
when the vehicle is flamed out, setting the automatic wake-up signal period as an optimal sleep heartbeat period or a preset normal heartbeat maintenance period, setting a preset first flag bit as failure, and setting a preset second flag bit as success;
when the vehicle is in a flameout state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the automatic wake-up signal period;
if receiving a heartbeat response sent by the remote server, setting a first flag bit as successful;
if the second flag bit is successful, updating the automatic wake-up signal period according to a first formula Ts + delta, wherein Ts is the automatic wake-up signal period, and delta is a preset stepping value;
if the heartbeat response sent by the remote server is not received, respectively setting the first flag bit and the second flag bit as failures, and updating the automatic awakening signal period according to a second formula Ts-delta;
judging whether the first flag bit is successful and the second flag bit is failed;
if not, executing the step that the vehicle-mounted terminal sends heartbeat data to a remote server according to the automatic wake-up signal period;
if so, setting or updating the optimal sleep heartbeat cycle according to the current automatic wake-up signal cycle;
and the vehicle-mounted terminal sends heartbeat data to the remote server according to the optimal sleep heartbeat cycle.
7. The computer-readable storage medium of claim 6, further comprising:
when a vehicle is started, a communication link is established between a vehicle-mounted terminal and a remote server, and the maximum heartbeat maintenance period of the remote server is obtained;
setting a normal heartbeat maintenance period of the vehicle-mounted terminal and the remote server according to the maximum heartbeat maintenance period of the remote server;
and when the vehicle is in a starting state, the vehicle-mounted terminal sends heartbeat data to the remote server according to the normal heartbeat maintenance cycle.
8. The computer-readable storage medium according to claim 6, wherein after setting or updating the optimal sleep heartbeat cycle according to the current auto-wake-up signal cycle, further comprising:
and saving the optimal sleep heartbeat cycle to a nonvolatile storage medium.
9. The computer-readable storage medium according to claim 8, wherein the setting of the auto-wake-up signal period to the optimal sleep heartbeat period or the preset normal heartbeat maintenance period when the vehicle is turned off is specifically:
when the vehicle is flamed out, judging whether the nonvolatile storage medium stores the optimal sleep heartbeat cycle;
if yes, setting the automatic wake-up signal period as the optimal sleep heartbeat period;
and if not, setting the automatic wake-up signal period as a normal heartbeat maintenance period of the remote server corresponding to the vehicle-mounted terminal.
10. The computer-readable storage medium according to claim 6, wherein the sending, by the vehicle-mounted terminal, the heartbeat data to the remote server according to the automatic wake-up signal cycle specifically includes:
the RTC module outputs a wake-up signal to wake up the vehicle-mounted terminal according to the period of the automatic wake-up signal;
and the vehicle-mounted terminal sends heartbeat data to the remote server immediately after being awakened.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911353860.2A CN113038425A (en) | 2019-12-25 | 2019-12-25 | Method for maintaining long connection with low power consumption and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911353860.2A CN113038425A (en) | 2019-12-25 | 2019-12-25 | Method for maintaining long connection with low power consumption and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113038425A true CN113038425A (en) | 2021-06-25 |
Family
ID=76452405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911353860.2A Pending CN113038425A (en) | 2019-12-25 | 2019-12-25 | Method for maintaining long connection with low power consumption and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113038425A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114422557A (en) * | 2021-12-17 | 2022-04-29 | 浙江零跑科技股份有限公司 | Method for remotely controlling automobile by mobile phone |
CN114987580A (en) * | 2022-05-12 | 2022-09-02 | 南京恩瑞特实业有限公司 | Sleep awakening device and method for flexible marshalling train |
CN115102885A (en) * | 2022-06-17 | 2022-09-23 | 中建八局第二建设有限公司 | Variable-speed heartbeat method for low-power-consumption Internet of things equipment |
CN115499902A (en) * | 2022-08-16 | 2022-12-20 | 广州汽车集团股份有限公司 | Long connection holding method, device, vehicle, server and storage medium |
CN116010329A (en) * | 2023-03-27 | 2023-04-25 | 厦门立林科技有限公司 | USB communication synchronous control method, terminal, intelligent lock and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104144159A (en) * | 2014-06-26 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Intelligent heartbeat keeping method and system |
US20170134256A1 (en) * | 2015-09-08 | 2017-05-11 | Shenzhen Skyworth-Rgb Electronic Co., Ltd. | Long connection sharing method for multi-businesses, system and device, terminal |
-
2019
- 2019-12-25 CN CN201911353860.2A patent/CN113038425A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104144159A (en) * | 2014-06-26 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Intelligent heartbeat keeping method and system |
US20170134256A1 (en) * | 2015-09-08 | 2017-05-11 | Shenzhen Skyworth-Rgb Electronic Co., Ltd. | Long connection sharing method for multi-businesses, system and device, terminal |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114422557A (en) * | 2021-12-17 | 2022-04-29 | 浙江零跑科技股份有限公司 | Method for remotely controlling automobile by mobile phone |
CN114987580A (en) * | 2022-05-12 | 2022-09-02 | 南京恩瑞特实业有限公司 | Sleep awakening device and method for flexible marshalling train |
CN114987580B (en) * | 2022-05-12 | 2023-12-08 | 南京恩瑞特实业有限公司 | Sleep awakening device and method for flexible marshalling train |
CN115102885A (en) * | 2022-06-17 | 2022-09-23 | 中建八局第二建设有限公司 | Variable-speed heartbeat method for low-power-consumption Internet of things equipment |
CN115102885B (en) * | 2022-06-17 | 2024-05-14 | 中建八局第二建设有限公司 | Variable-speed heartbeat method for low-power-consumption Internet of things equipment |
CN115499902A (en) * | 2022-08-16 | 2022-12-20 | 广州汽车集团股份有限公司 | Long connection holding method, device, vehicle, server and storage medium |
CN116010329A (en) * | 2023-03-27 | 2023-04-25 | 厦门立林科技有限公司 | USB communication synchronous control method, terminal, intelligent lock and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113038425A (en) | Method for maintaining long connection with low power consumption and computer readable storage medium | |
CN107295025B (en) | Vehicle-mounted terminal awakening system and method, vehicle-mounted terminal, vehicle and server | |
CN102238595B (en) | Method and equipment for processing cell outage | |
CN103532684B (en) | 3GPP (the 3rd generation partnership project)-based MTC (machine type communication) terminal energy-saving method through self-adaptive mixed DRX (discontinuous reception) mechanism | |
CN105141704A (en) | Sleep wakeup method of vehicle-mounted communication controller assembly | |
US20050286454A1 (en) | Power saving method in wireless LAN system for permitting terminal station to promptly transition to doze state by transmitting empty data frame | |
CN112165697B (en) | Tbox sleep wake-up control method and device and terminal equipment | |
US8509134B2 (en) | Apparatus and method for negotiating sleep cycle setting between base station and mobile station in wireless communication system | |
CN110602771B (en) | Power consumption control method and device and vehicle networking terminal | |
CN111901898B (en) | Terminal attachment method and device based on narrowband Internet of things | |
CN107820305B (en) | Method and device for transmitting WUR message | |
CN105700418B (en) | Energy-saving mode control method and device applied to car-mounted terminal | |
CN113253648A (en) | Vehicle and network management method thereof, domain controller, storage medium, and electronic device | |
CN117651322B (en) | Power management method, device, terminal and storage medium | |
CN110475321B (en) | Power-saving optimization method and device for wireless local area network (AP) | |
KR100957400B1 (en) | System and method for operating control sleep mode in a communication system | |
CN102457948B (en) | Apparatus and method for updating sleeping-ID of a terminal operating in sleep mode | |
US8054771B2 (en) | Method and system for adding a new connection identifier to an existing power save class | |
CN112565359B (en) | Network connection method, system, vehicle-mounted terminal and storage medium | |
CN107888472B (en) | Vehicle network management method, control gateway, controller and automobile | |
CN113596803B (en) | Data interaction method for Bluetooth mesh low-power-consumption node and partner node | |
CN114379483A (en) | CAN network management method for new energy automobile | |
CN109891944B (en) | Method and device for establishing data communication | |
CN116033526A (en) | Method, equipment and medium for saving energy of 5G small base station | |
CN113329471A (en) | Method, system, storage medium, and electronic device for establishing peer-to-peer 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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 303-e, Zone C, innovation building, software park, torch hi tech Zone, Xiamen City, Fujian Province Applicant after: Xiamen Yaxun Zhilian Technology Co.,Ltd. Address before: 303-e, Zone C, innovation building, software park, torch hi tech Zone, Xiamen City, Fujian Province Applicant before: XIAMEN YAXON NETWORK Co.,Ltd. Country or region before: China |