WO2023066125A1 - 降低通信设备休眠状态下功耗的方法、装置、设备及介质 - Google Patents

降低通信设备休眠状态下功耗的方法、装置、设备及介质 Download PDF

Info

Publication number
WO2023066125A1
WO2023066125A1 PCT/CN2022/125087 CN2022125087W WO2023066125A1 WO 2023066125 A1 WO2023066125 A1 WO 2023066125A1 CN 2022125087 W CN2022125087 W CN 2022125087W WO 2023066125 A1 WO2023066125 A1 WO 2023066125A1
Authority
WO
WIPO (PCT)
Prior art keywords
keep
detection period
current
alive detection
communication device
Prior art date
Application number
PCT/CN2022/125087
Other languages
English (en)
French (fr)
Inventor
宁勤勇
艾国
杨作兴
房汝明
向志宏
Original Assignee
杭州研极微电子有限公司
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 杭州研极微电子有限公司 filed Critical 杭州研极微电子有限公司
Priority to CN202280053031.6A priority Critical patent/CN117751631A/zh
Publication of WO2023066125A1 publication Critical patent/WO2023066125A1/zh

Links

Images

Classifications

    • 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/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power 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
    • 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

Definitions

  • the present application relates to the communication field, and in particular, relates to a method, an apparatus, a communication device, and a storage medium for reducing power consumption of a communication device in a dormant state.
  • TCP/IP-based communication is usually required, whether it is a remote call between applications (RPC) or calls between applications and databases (DAL), both.
  • the two parties When a TCP/IP connection is established, the two parties need to go through three handshakes to establish a connection. After the data transmission is over, they need to go through four handshakes to close the established connection.
  • long connections are often used, which means that after one data transmission, The connection is not closed, and the connection is maintained for a long time. If there is new data to be transmitted between the two applications, the connection will be reused directly without establishing a new connection.
  • a long connection requires extra effort to keep the connection available all the time, because network jitter, server failure, etc. will cause the connection to be unavailable, even due to firewalls. Therefore, the communication parties introduce a keep-alive detection mechanism that periodically sends detection heartbeat packets, that is, regularly sends detection packets to identify whether the other party is reachable, so as to ensure that the connection is available when it is used.
  • Embodiments of the present application provide a method, device, electronic device, and storage medium for reducing power consumption of a communication device in a sleep state, which not only ensures availability of long-term connections but also reduces power consumption.
  • a method for reducing power consumption of a communication device in a dormant state is executed by the communication device, and a long connection for data transmission is established between the communication device and the counterpart communication device, including:
  • the embodiment of the present application also provides a device for reducing power consumption of a communication device in a dormant state, the device is set in the communication device, and a long connection for data transmission is established between the communication device and the other party's communication device.
  • devices include,
  • the first detection module is used to detect the current network operation state when the communication device is in a dormant state
  • the first setting module is configured to set the next keep-alive detection period of the long connection according to the current network running state detected by the first detection module, so that at least when the current network running state is an idle state, the downlink of the long connection A keep-alive detection period is extended on the basis of the current keep-alive detection period.
  • the embodiment of the present application further provides a communication device, including: a processor; a memory connected to the processor; a machine-readable instruction module is stored in the memory; when the machine-readable instruction module is executed by the processor.
  • a communication device including: a processor; a memory connected to the processor; a machine-readable instruction module is stored in the memory; when the machine-readable instruction module is executed by the processor.
  • An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the method for reducing power consumption of a communication device in a sleep state are implemented.
  • the embodiment of the present application also provides a computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed, the above-mentioned reduced communication device Method for power consumption in sleep state.
  • the method for reducing the power consumption of a communication device in a dormant state sets the next keep-alive detection period of a long connection according to the current network operation state.
  • the set The keep-alive detection period can be different, so that the keep-alive detection period can be adjusted adaptively with the network operation status, which can not only ensure the normal operation of the keep-alive detection mechanism for long-term connections, but also help keep long-term connections available in real time. It is beneficial to reduce the frequency of detection heartbeat packets sent when the keep-alive detection mechanism is running, thereby reducing power consumption.
  • FIG. 1A and FIG. 1B are schematic flowcharts of a method for reducing power consumption of a communication device in a sleep state in an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of a method for reducing power consumption of a terminal device in a sleep state in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of changes in a keep-alive detection cycle in a dormant state according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an apparatus for reducing power consumption of a communication device in a sleep state according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the keep-alive detection period is usually set to a fixed and short period of time. For example, 3 or 5 minutes is used as the keep-alive detection period to send detection heartbeat packets. Higher conditions will result in higher power consumption.
  • the embodiment of the present application provides a method for reducing the power consumption of a communication device in a dormant state. Through the adaptive adjustment of the keep-alive detection period, the intelligent setting of the keep-alive detection period is realized, so as to ensure that the long connection is available and Conducive to the reduction of power consumption.
  • FIG. 1A is a schematic flowchart of a method for reducing power consumption of a communication device in a sleep state according to an embodiment of the present application.
  • the method can be executed by a communication device such as a terminal device or a server.
  • a long connection for data transmission is established between the communication device and the counterpart communication device.
  • the method includes,
  • Step 101 when the communication device is in a dormant state, detect the current network operation state.
  • Step 102 Set the length of the next keep-alive detection period of the persistent connection according to the current network operation state, so that at least when the current network operation state is idle, the length of the next keep-alive detection period of the long-term connection is less than the length of the current keep-alive detection period. was extended on the basis of .
  • setting the length of the next keep-alive detection period of the long connection according to the current network operation status in step 102 may include:
  • the length of the next keep-alive detection period of the long connection is the same as the length of the current keep-alive detection period. For example, if the length of the current keep-alive detection period is the first duration, then The length of the next keep-alive detection period remains unchanged at the first duration.
  • the next keep-alive detection period of the long connection may be set to be a predetermined duration added to the current keep-alive detection period. For example, if the length of the current keep-alive detection period is the first duration, the next keep-alive detection period may be set to the second duration, wherein the second duration is greater than the first duration.
  • a persistent connection between a terminal device and a server is used as an example for description below. It should be understood that it is not limited thereto, and any persistent connection between communication parties is applicable.
  • FIG. 2 is a schematic flowchart of reducing power consumption of a terminal device in a sleep state in an embodiment of the present application.
  • the communication device when the communication device is about to enter the dormant state, for example, when the terminal device detects that the trigger condition for entering the dormant state is currently met, the following steps are performed:
  • Step 201 setting the initial value of the keep-alive detection period, including the initial value of the keep-alive detection period under the network busy state, and the initial value of the keep-alive detection period under the network idle state, wherein the initial value of the keep-alive detection period under the network busy state is the first duration, and the initial value of the keep-alive detection period in the network idle state is the second duration, wherein the second duration is greater than the first duration;
  • Step 202 detect the current network running status, if the current network is busy, use the first duration, such as 5 minutes, so as to keep the long connection from being disconnected, and avoid closing the long connection due to the busy network; if the current network is idle , use a second duration, for example, 15 minutes.
  • the first duration such as 5 minutes
  • the way to detect the current network operation status may include:
  • the communication device sends a probe data packet, such as a ping data packet, to its long-connected peer device; receives a probe response data packet from the peer device, and according to the difference between the sent probe data packet and the received probe response data packet, The time interval between judges the current network operation status. If the time interval is greater than the set time threshold, it is determined that the current network operation status is the network busy, otherwise, the current network operation status is determined as the network idle;
  • a probe data packet such as a ping data packet
  • the communication device sends a detection heartbeat packet to its long-connected peer device, receives a detection heartbeat packet from the peer device reply, and judges the current network status based on the time interval between the sent detection heartbeat packet and the received detection heartbeat packet. If the time interval is greater than the set time threshold, it is determined that the current network operation status is network busy; otherwise, it is determined that the current network operation status is network idle.
  • the detection of the network operating status and the keep-alive detection can be integrated into one command, which not only performs the keep-alive detection, but also detects the current network operating status, reducing the number of commands in the dormant state processing, thereby helping to reduce power consumption;
  • the communication device sends a paging message to the base station it accesses, receives a paging response message from the base station, and judges the current network operation status according to the time interval between the sent paging message and the received paging response message, If the time interval is greater than the set time threshold, it is determined that the current network operation state is network busy; otherwise, it is determined that the current network operation state is network idle.
  • Step 203 after the keep-alive detection period is set, trigger the timing of the keep-alive detection period, and enter a dormant state.
  • Step 204 judging whether the timing of the current keep-alive detection period is over, if it is over, then go to step 205, if not, go back to step 204.
  • Step 205 check the current network running status, if the current network is busy, execute step 206, keep the current keep-alive detection period, that is, keep the length of the next keep-alive detection period the same as the current keep-alive detection period. If the network is in an idle state, step 207 is executed to extend the current keep-alive detection period, for example, adding a third duration to the current keep-alive detection period as the next keep-alive detection period.
  • Step 208 triggering the timing of the next keep-alive detection period, and maintaining the current dormant state.
  • Step 209 judge whether the dormant state is over, if so, end this procedure, and the communication device enters a normal working state after ending the dormant state, otherwise, return to step 204, and judge whether the timing of the current keep-alive detection period is over.
  • FIG. 3 is a schematic diagram of changes in a keep-alive detection cycle in a dormant state according to an embodiment of the present application.
  • the current keep-alive detection cycle is the first duration t1
  • the next keep-alive detection cycle can remain unchanged, which is the first duration t1
  • the current network is idle, the next keep-alive detection
  • the period can be extended on the basis of the current keep-alive detection period, for example, a third duration t3 is added to the current keep-alive detection period, that is, t1+t3; after n keep-alive detection periods, if the network has been idle state, the length of the keep-alive detection period after n times of extension may be t1+n*t3.
  • the current keep-alive detection period When the current keep-alive detection period is the second duration t2, if the current network is in a busy state, the current keep-alive detection period may be shortened as the next keep-alive detection period, for example, the next keep-alive detection period may be the first duration t1, If the current network is in an idle state, the current keep-alive detection period can be maintained, or the current keep-alive detection period can be extended as the next keep-alive detection period according to the time interval between the sent detection heartbeat packet and the received detection heartbeat packet, For example, a third duration t3 is added to the current keep-alive detection period, that is, t2+t3, and the length of the keep-alive detection period after n times of extension can be t2+n*t3, where n is the number of extensions, and t3 for the third duration.
  • a third duration t3 is added to the current keep-alive detection period, that is, t2+t3, and the length of the keep-a
  • the keep-alive detection period has various values depending on the network operation state and the continuous operation state, realizing the intelligent setting of the keep-alive detection period.
  • the time interval between sent probe heartbeat packets and received probe heartbeat packets can reflect the current busyness and idleness of the network to a certain extent.
  • the larger the current time interval the busier the current network is, otherwise, the idler the current network is. Therefore, according to the current
  • the first duration, the second duration, and the third duration are respectively determined according to the above time intervals.
  • the detection of the current network operation status occurs after the timing of the current keep-alive detection period ends. In view of the timing of the keep-alive detection period ends, it is usually necessary to send a detection heartbeat packet. In some embodiments, the heartbeat packet is used. Check the current network running status. After the setting of the next keep-alive detection period is completed, it remains in a dormant state and triggers the timing of the next keep-alive detection period.
  • the keep-alive detection period is set according to the network operation state in the dormant state, so that the keep-alive detection period can be intelligently set, and, as the network idle state continues, the duration of the keep-alive detection period can be cumulatively increased until Reaching the set maximum duration, for example, according to the duration stipulated in the protocol standard, can keep the long connection available and reduce the number of heartbeat detection packets sent, which is beneficial to reduce power consumption.
  • FIG. 4 is a schematic diagram of an apparatus for reducing power consumption of a communication device in a sleep state according to an embodiment of the present application.
  • the device may be set in a communication device, and a long connection for data transmission is established between the communication device and the counterpart communication device, and the device includes:
  • the first detection module 401 is configured to detect the current network operation state when the communication device is in the dormant state
  • the first setting module 402 is configured to set the next keep-alive detection period of the long connection according to the current network operation state detected by the first detection module 401, so that at least when the current network operation state is idle, the long connection
  • the next keep-alive detection period of is extended on the basis of the current keep-alive detection period.
  • the device further comprises:
  • the timing module 405 is configured to perform timing according to the set keep-alive detection period, and when the timing reaches the set keep-alive detection period, trigger the first detection module 401 to detect the network operation state;
  • the first detection module 401 is further configured to: detect the current network operation state in response to the expiration of the current keep-alive detection period of the timing module 405 .
  • the first setting module 402 is further configured to:
  • the length of the next keep-alive detection period of the long connection is set as a predetermined duration added to the current keep-alive detection period, for example, the predetermined duration may be a third duration.
  • the device further comprises:
  • the second detection module 403 is configured to detect the current network operation state in response to the trigger signal of the communication device entering the sleep state
  • the second setting module 404 is used to set the initial value of the keep alive detection period of the long connection according to the current network running state detected by the second detection module 403, if the current network running state is that the network is busy, then set the keep alive of the long connection
  • the initial value of the detection period is the first duration. If the current network operation status is the network is idle, the initial value of the keep-alive detection period of the long connection is set to the second duration; the second duration is greater than the first duration; the current keep-alive detection After the initial period value is set, the communication device is controlled to enter a dormant state, and the timing of the keep-alive detection period is triggered.
  • the first detection module 401 and the second detection module 403 are further used for:
  • the detection packet includes: a ping data packet and/or a detection heartbeat packet.
  • the first duration, the second duration, and the third duration are determined according to a transmission delay between the communication device and the counterpart communication device.
  • the transmission delay is the time interval between the sending time and the receiving time of the response probe packet and/or paging response message.
  • FIG. 5 is a schematic diagram of a communication device of the present application
  • the communication device includes a memory 501 and a processor 502
  • the memory 501 stores a computer program
  • the processor 502 is configured to execute the The computer program implements the steps of reducing the power consumption of the communication device in the dormant state of the present application.
  • the memory 501 may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • the memory 510 may also be at least one storage device located away from the aforementioned processor 502 .
  • the above-mentioned processor 502 can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the communication device may also include an apparatus for reducing power consumption of the communication device in a dormant state as shown in FIG. 4 .
  • An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method for reducing power consumption of a communication device in a sleep state is implemented.
  • the embodiment of the present application also provides a computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed, the above-mentioned reduction of communication device sleep is realized. method of power consumption in the state.
  • the description is relatively simple, and for the related parts, please refer to the part of the description of the embodiment of the method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种降低通信设备休眠状态下功耗的方法,该方法包括,当通信设备处于休眠状态时,检测当前网络运行状态,根据当前网络运行状态设置长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,长连接的下一保活探测周期在当前保活探测周期的基础上被延长。

Description

降低通信设备休眠状态下功耗的方法、装置、设备及介质
本申请要求于2021年10月22日提交中国专利局、申请号为202111231502.1,发明名称为“一种通信设备休眠状态下功耗的降低方法、装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别地,涉及一种降低通信设备休眠状态下功耗的方法、装置、通信设备及存储介质。
背景技术
两个进程之间在进行通信时需要建立一个连接来相互传输数据。当不同的进程被部署在不同的服务器上、或者不同的终端、或者一个进程部署在服务器、另一个进程部署在终端时,通常需要基于TCP/IP的通信方式,不管是应用程序间的远程调用(RPC)还是应用程序与数据库间的调用(DAL),皆是如此。
在TCP/IP连接建立时,通信的双方需要经过三次握手方能建立一个连接,数据传输结束后,需要经过四次握手方能关闭所建立的连接。为了在多次通信中可以省去连接建立和关闭连接的开销,并且从总体上来看,进行多次数据传输的总耗时更少,常采用长连接,长连接意味着进行一次数据传输后,不关闭连接,长期保持连通状态,如果两个应用程序之间有新的数据需要传输,则直接复用这个连接,无需再建立一个新的连接。但是,长连接需要花费额外的精力来保持这个连接一直是可用的,因为网络抖动、服务器故障等都会导致这个连接不可用,甚至是由于防火墙的原因。所以,通信双方引入了周期性地发送探测心跳包的保活探测机制,即,定时发送探测包来识别对方是否可达,以确保连接在被使用的时候是可用状态。
技术内容
本申请实施例提供了一种降低通信设备休眠状态下功耗的方法、装置、电子设备及存储介质,既保证长连接可用又降低功耗。
本申请实施例提供的一种降低通信设备休眠状态下功耗的方法,由通信设备执行,所述通信设备与对方通信设备之间建立有用于传输数据的长连接,包括,
当所述通信设备处于休眠状态时,检测当前网络运行状态;
根据当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长。
本申请实施例还提供一种用于降低通信设备休眠状态下功耗的装置,所述装置设置于通信设备中,所述通信设备与对方通信设备之间建立有用于传输数据的长连接,该装置包括,
第一检测模块,用于当通信设备处于休眠状态时,检测当前网络运行状态,
第一设置模块,用于根据第一检测模块检测到的当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长。
本申请实施例又提供一种通信设备,包括:处理器;与所述处理器相连接的存储器;所述存储器中存储有机器可读指令模块;所述机器可读指令模块被处理器执行时实现所述的用于降低通信设备休眠状态下功耗的方法。
本申请实施例还提供一种计算机可读存储介质,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如所述降低通信设备休眠状态下功耗的方法的步骤。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,当所述计算机指令被执行时,实现上述的降低通信设备休眠状态下功耗的方法。
本申请实施例提供的降低通信设备休眠状态下功耗的方法,根据当前网络运行状态设置长连接的下一保活探测周期,这样,随着网络运行的繁忙、空闲状态的不同,所设置的保活探测周期可以不同,使得保活探测周期可以随着网络运行状态而自适应地调整,既能够保证长连接的保活探测机制的正常运行,有利于保持长连接实时处于可用状态,又有利于减少保活探测机制运行时所发送探测心跳包的频次,从而有利于减少功耗。
附图简要说明
图1A和图1B为本申请实施例中降低通信设备休眠状态下功耗的方法的流程示意图。
图2为本申请实施例中终端设备降低休眠状态下功耗的方法另一流程示意图。
图3为本申请实施例在休眠状态下保活探测周期变化的示意图。
图4为本申请实施例用于降低通信设备休眠状态下的功耗的装置的结构示意图。
图5为本申请实施例一种通信设备的结构示意图。
具体实施方式
为了使本申请的目的、技术手段和优点更加清楚明白,以下结合附图对本申请做进一步详细说明。
为了保证长连接可用,通常设置保活探测周期为固定不变的较短时长,例如,以3或5分钟为保活探测周期来发送探测心跳包,在休眠状态下探测心跳包的发送频次较高的情形下,会导致功耗较高。有鉴于此,本申请实施例提供的一种降低通信设备休眠状态下功耗的方法,通过保活探测周期的自适应调整,实现保活探测周期的智能设置,从而既保证长连接可用又有利于功耗的降低。
参见图1A所示,图1A为本申请实施例中降低通信设备休眠状态下功耗的方法的流程示意图。该方法可以由终端设备或者服务器等通信设备执行。所述通信设备与对方通信设备之间建立有用于传输数据的长连接。该方法包括,
步骤101,当通信设备处于休眠状态时,检测当前网络运行状态。
步骤102,根据当前网络运行状态设置长连接的下一保活探测周期的长度,至少使得在当前网络运行状态为空闲状态时,长连接的下一保活探测周期的长度在当前保活探测周期的基础上被延长。
在一些实施例中,参见图1B,步骤102中根据当前网络运行状态设置长连接的下一保活探测周期的长度可以包括:
1021,如果当前网络运行状态为网络繁忙,则设置长连接的下一保活探测周期的长度与当前保活探测周期的长度相同,例如,如果当前保活探测周期的长度为第一时长,则下一保活探测周期的长度保持为第一时长不变。
1022,如果当前网络运行状态为网络空闲,则将长连接的下一保活探测周期的长度设置为在当前保活探测周期的基础上增加预定时长,例如,如果当前保活探测周期的长度为第一时长,则下一保活探测周期可以设置为第二时长,其中,第二时长大于第一时长。
为便于理解本申请,以下以一终端设备与服务器之间的长连接为例来进行说明,所应理解的是,其不限于此,任何通信双方之间的长连接均可适用。
参见图2所示,图2为本申请实施例中终端设备降低休眠状态下功耗的一种流程示意图。对于通信双方中任一通信设备,当该通信设备即将进入休眠状态时,例如,终端设备检测到当前符合进入休眠状态的触发条件时,执行如下步骤:
步骤201,设置保活探测周期初始值,包括网络繁忙状态下的保活探测周期初始值、以及网络空闲状态下的保活探测周期初始值,其中,网络繁忙状态下的保活探测周期初始值为第一时长,网络空闲状态下的保活探测周期初始值为第二时长,其中,第二时长大于 第一时长;
步骤202,检测当前网络运行状态,如果当前网络为繁忙状态,则使用第一时长,例如5分钟,以便保持长连接不被断开,避免由于网络繁忙而关闭长连接;如果当前网络为空闲状态,则使用第二时长,例如,15分钟。
在一些实施例中,检测当前网络运行状态的方式可以包括,
该通信设备向其长连接的对端设备发送一探测数据包,例如,ping数据包;接收来自对端设备的探测响应数据包,根据所发送的探测数据包与所接收的探测响应数据包之间的时间间隔判断当前网络运行状态,如果时间间隔大于设定的时间阈值,则判定当前网络运行状态为网络繁忙,否则,判定当前网络运行状态为网络空闲;
和/或
该通信设备向其长连接的对端设备发送探测心跳包,接收来自对端设备回复的探测心跳包,根据所发送的探测心跳包与所接收的探测心跳包之间的时间间隔,判断当前网络运行状态,如果时间间隔大于设定的时间阈值,则判定当前网络运行状态为网络繁忙,否则,判定当前网络运行状态为网络空闲。利用心跳包来检测当前网络运行状态,可以将网络运行状态的检测和保活探测集成为一条指令,既进行了保活探测,又进行了当前网络运行状态的检测,减少了休眠状态下的指令处理,从而有利于降低功耗;
和/或
该通信设备向其接入的基站发送寻呼消息,接收来自基站的寻呼响应消息,根据所发送的寻呼消息与所接收的寻呼响应消息之间的时间间隔,判断当前网络运行状态,如果时间间隔大于设定的时间阈值,则判定当前网络运行状态为网络繁忙,否则,判定当前网络运行状态为网络空闲。
步骤203,在保活探测周期设置完毕后,触发保活探测周期的计时,并进入休眠状态。
步骤204,判断当前保活探测周期的计时是否结束,如果结束,则执行步骤205,如果未结束,则返回步骤204。
步骤205,检测当前网络运行状态,如果当前网络为繁忙状态,则执行步骤206,保持当前保活探测周期,即,下一保活探测周期的长度保持与当前保活探测周期相同。如果网络为空闲状态,则执行步骤207,延长当前保活探测周期,例如,在当前保活探测周期的基础上增加第三时长,作为下一保活探测周期。
步骤208,触发下一保活探测周期的计时,并保持当前的休眠状态。
步骤209,判断休眠状态是否结束,如果结束,则结束本流程,通信设备结束休眠状态进入正常工作状态,否则,返回步骤204,判断当前保活探测周期的计时是否结束。
参见图3所示,图3为本申请实施例在休眠状态下保活探测周期变化的一种示意图。
当前保活探测周期为第一时长t1时,若当前网络处于繁忙状态,则下一保活探测周期可以保持不变,为第一时长t1,若当前网络处于空闲状态,则下一保活探测周期可以在当前保活探测周期的基础上延长,例如,在当前保活探测周期的基础上增加第三时长t3,即t1+t3;在经过n个保活探测周期之后,如果网络一直处于空闲状态,经过n次延长后的保活探测周期的长度可以为t1+n*t3。
当当前保活探测周期为第二时长t2时,若当前网络处于繁忙状态,则可以缩短当前保活探测周期作为下一保活探测周期,例如下一保活探测周期可以为第一时长t1,若当前网络处于空闲状态,则可以保持当前保活探测周期,或根据所发送的探测心跳包与所接收的探测心跳包之间的时间间隔延长当前保活探测周期作为下一保活探测周期,例如,在当前保活探测周期的基础上增加第三时长t3,即t2+t3,经过n次延长后的保活探测周期的长度可以为t2+n*t3其中,n为延长的次数,t3为第三时长。
由此可见,保活探测周期随着网络运行状态和持续运行状态的不同而具有多种数值,实现了保活探测周期的智能设置。
鉴于所发送的探测数据包与所接收的探测响应数据包之间的时间间隔、所发送的探测心跳包与所接收的探测心跳包之间的时间间隔、所发送的寻呼消息与所接收的寻呼响应消息之间的时间间隔能够一定程度上反映出当前网络繁忙和空闲状态程度,当前时间间隔越大,说明当前网络越繁忙,反之,说明当前网络越空闲,故而,可以根据当前各所述时间间隔来分别确定第一时长、第二时长、第三时长。在该步骤中,检测当前网络运行状态是发生在当前保活探测周期的计时结束之后,鉴于保活探测周期的计时结束时,通常需要发送探测心跳包,在一些实施例中,利用心跳包来检测当前网络运行状态。在下一保活探测周期设置完毕后,保持休眠状态,并触发下一保活探测周期的计时。
本实施例通过休眠状态下根据网络运行状态来设置保活探测周期,使得保活探测周期得以智能地设置,并且,随着网络空闲状态的持续,保活探测周期的时长可以累积地增加,直至到达设定的最大时长,例如,按照协议标准所规定的时长,这样,既能够保持长连接可用,又减少了所发送的探测心跳包的数量,从而有利于减少功耗。
参见图4所示,图4为本申请实施例用于降低通信设备休眠状态下的功耗的装置的一种示意图。在一些实施例中,所述装置可以设置于通信设备中,所述通信设备与对方通信设备之间建立有用于传输数据的长连接,该装置包括:
第一检测模块401,用于当所述通信设备处于休眠状态时,检测当前网络运行状态;
第一设置模块402,用于根据所述第一检测模块401检测到的当前网络运行状态设置 长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长。
在一些实施例中,所述装置进一步包括:
计时模块405,用于按照设置的保活探测周期进行计时,在计时到达设置的保活探测周期时,触发第一检测模块401进行网络运行状态检测;
所述第一检测模块401进一步用于:响应于所述计时模块405的当前保活探测周期计时结束,检测当前网络运行状态。
在一些实施例中,所述第一设置模块402进一步用于:
如果当前网络运行状态为网络繁忙,则设置长连接的下一保活探测周期的长度与当前保活探测周期的长度相同,即,保持当前保活探测周期;
如果当前网络运行状态为网络空闲,则将长连接的下一保活探测周期的长度设置为在当前保活探测周期的基础上增加预定时长,例如,所述预定时长可以为第三时长。
在一些实施例中,所述装置进一步包括:
第二检测模块403,用于响应于所述通信设备符合进入休眠状态的触发信号,检测当前网络运行状态;
第二设置模块404,用于根据第二检测模块403检测到的当前网络运行状态设置所述长连接的保活探测周期初始值,如果当前网络运行状态为网络繁忙,则设置长连接的保活探测周期初始值为第一时长,如果当前网络运行状态为网络空闲,则设置长连接的保活探测周期初始值为第二时长;所述第二时长大于所述第一时长;当前保活探测周期初始值设置完毕后,控制所述通信设备进入休眠状态,并触发保活探测周期的计时。
在一些实施例中,所述第一检测模块401和第二检测模块403进一步用于:
向所述对方通信设备发送探测包和/或寻呼消息;
接收来自所述对方通信设备的响应探测包和/或寻呼响应消息;
如果所述响应探测包和/或寻呼响应消息的发送时间与接收时间之间的时间间隔大于设定的时间阈值,则确定当前网络运行状态为网络繁忙;否则,确定当前网络运行状态为网络空闲。
在一些实施例中,所述探测包包括:ping数据包和/或探测心跳包。
在一些实施例中,所述第一时长、第二时长、第三时长根据所述通信设备与所述对方通信设备之间的传输时延确定。在一些实施例中,所述传输时延为所述响应探测包和/或寻呼响应消息的发送时间与接收时间之间的时间间隔。
参见图5所示,图5为本申请一种通信设备的一种示意图,该通信设备包括有存储器 501和处理器502,所述存储器501存储有计算机程序,所述处理器502被配置执行所述计算机程序实现本申请所述降低通信设备休眠状态下的功耗的步骤。所述存储器501可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器510还可以是至少一个位于远离前述处理器502的存储装置。
上述的处理器502可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
通信设备还可以是包括如图4所示用于降低通信设备休眠状态下的功耗的装置。
本申请实施例还提供了一种计算机可读存储介质,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现所述降低通信设备休眠状态下的功耗的方法。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,当所述计算机指令被执行时,实现上述降低通信设备休眠状态下的功耗的方法。
对于装置/网络侧设备/存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (17)

  1. 一种降低通信设备休眠状态下功耗的方法,由通信设备执行,所述通信设备与对方通信设备之间建立有用于传输数据的长连接,所述方法包括,
    当所述通信设备处于休眠状态时,检测当前网络运行状态;
    根据当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长。
  2. 如权利要求1所述的方法,其中,所述检测当前网络运行状态包括:
    响应于所述长连接的当前保活探测周期的计时结束,检测当前网络运行状态。
  3. 如权利要求1-2任一项所述的方法,进一步包括,
    响应于所述通信设备符合进入休眠状态的触发信号,检测当前网络运行状态,
    根据当前网络运行状态设置所述长连接的保活探测周期初始值,如果当前网络运行状态为网络繁忙,则设置长连接的保活探测周期初始值为第一时长,如果当前网络运行状态为网络空闲,则设置长连接的保活探测周期初始值为第二时长;所述第二时长大于所述第一时长;其中,所述第一时长和第二时长根据所述通信设备与所述对方通信设备之间的传输时延确定;
    当前保活探测周期初始值设置完毕后,控制所述通信设备进入休眠状态,并触发保活探测周期的计时。
  4. 如权利要求3所述的方法,其中,所述根据当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长,包括:
    若当前保活探测周期为第一时长:
    如果当前网络运行状态为网络繁忙,则设置所述长连接的下一保活探测周期与当前保活探测周期的长度相同,
    如果当前网络运行状态为网络空闲,则设置所述长连接的下一保活探测周期为在当前保活探测周期的基础上延长第三时长;其中,所述第三时长根据所述通信设备与所述对方通信设备之间的传输时延确定。
  5. 如权利要求4所述的方法,其中,所述根据当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述长连接的下一保活探测周期在当前保活探测周期的基础上被延长,进一步包括:
    若当前保活探测周期为第二时长:
    如果当前网络运行状态为网络繁忙,则缩短当前保活探测周期作为所述下一保活探测周期;
    如果当前网络运行状态为网络空闲,则设置所述下一保活探测周期与当前保活探测周期的长度相同。
  6. 如权利要求1所述的降低方法,其中,所述检测当前网络运行状态包括,
    向所述对方通信设备发送探测包和/或寻呼消息,
    接收来自对方通信设备的响应探测包和/或寻呼响应消息,
    如果所述探测包的发送时间与响应探测包的接收时间之间的时间间隔,和/或所述寻呼消息的发送时间与所述寻呼响应消息的接收时间之间的时间间隔大于设定的时间阈值,则判定当前网络繁忙,
    否则,判定当前网络空闲。
  7. 如权利要求6所述的方法,其中,所述探测包为ping数据包和/或探测心跳包。
  8. 一种用于降低通信设备休眠状态下功耗的装置,所述装置设置于通信设备中,所述通信设备与对方通信设备之间建立有用于传输数据的长连接,包括,
    第一检测模块,用于当通信设备处于休眠状态时,检测当前网络运行状态;
    第一设置模块,用于根据所述第一检测模块检测到的当前网络运行状态设置所述长连接的下一保活探测周期,至少使得在当前网络运行状态为空闲状态时,所述下一保活探测周期在当前保活探测周期的基础上被延长。
  9. 如权利要求8所述的装置,进一步包括:
    计时模块,用于按照设置的当前保活探测周期进行计时;
    所述第一检测模块进一步用于:响应于所述计时模块的当前保活探测周期计时结束,检测当前网络运行状态。
  10. 如权利要求8-9任一项所述的装置,其中,所述装置进一步包括,
    第二检测模块,用于响应于所述通信设备符合进入休眠状态的触发信号,检测当前网络运行状态;
    第二设置模块,用于根据第二检测模块所检测的当前网络运行状态,设置长连接的保活探测周期初始值,如果当前网络运行状态为网络繁忙,则设置长连接的保活探测周期初始值为第一时长,如果当前网络运行状态为网络空闲,则设置长连接的保活探测周期初始值为第二时长,当前保活探测周期初始值设置完毕后,控制所述通信设备进入休眠状态,并触发保活探测周期的计时;其中,所述第二时长大于所述第一时长;所述第一时长和第二时长根据所述通信设备与所述对方通信设备之间的传输时延确定。
  11. 如权利要求10所述的装置,其中,所述第一设置模块进一步用于:
    若当前保活探测周期为第一时长:
    如果当前网络运行状态为网络繁忙,则设置所述长连接的下一保活探测周期与当前保活探测周期的长度相同,
    如果当前网络运行状态为网络空闲,则设置所述长连接的下一保活探测周期为在当前保活探测周期的基础上延长第三时长;其中,所述第三时长根据所述通信设备与所述对方通信设备之间的传输时延确定。
  12. 如权利要求11所述的装置,其中所述第一设置模块进一步用于:
    若当前保活探测周期为第二时长:
    如果当前网络运行状态为网络繁忙,则缩短当前保活探测周期作为所述下一保活探测周期;
    如果当前网络运行状态为网络空闲,则设置所述下一保活探测周期与当前保活探测周期的长度相同。
  13. 如权利要求10所述的装置,其中,所述第一检测模块和第二检测模块分别进一步用于:
    向所述对方通信设备发送探测包和/或寻呼消息,
    接收来自对方通信设备的响应探测包和/或寻呼响应消息,
    如果所述探测包的发送时间与响应探测包的接收时间之间的时间间隔,和/或所述寻呼消息的发送时间与所述寻呼响应消息的接收时间之间的时间间隔大于设定的时间阈值,则判定当前网络繁忙,
    否则,判定当前网络空闲。
  14. 如权利要求13所述的装置,其中,所述探测包为ping数据包和/或探测心跳包。
  15. 一种通信设备,包括:处理器;与所述处理器相连接的存储器;所述存储器中存储有机器可读指令模块;所述机器可读指令模块被处理器执行时执行如权利要求1-7任一项所述的方法。
  16. 一种计算机可读存储介质,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一所述降低通信设备休眠状态下功耗的方法。
  17. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,当所述计算机指令被执行时,实现如权利要求1-7任一项所述的方法。
PCT/CN2022/125087 2021-10-22 2022-10-13 降低通信设备休眠状态下功耗的方法、装置、设备及介质 WO2023066125A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202280053031.6A CN117751631A (zh) 2021-10-22 2022-10-13 降低通信设备休眠状态下功耗的方法、装置、设备及介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111231502.1A CN113993195A (zh) 2021-10-22 2021-10-22 一种通信设备休眠状态下功耗的降低方法、装置
CN202111231502.1 2021-10-22

Publications (1)

Publication Number Publication Date
WO2023066125A1 true WO2023066125A1 (zh) 2023-04-27

Family

ID=79740220

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/125087 WO2023066125A1 (zh) 2021-10-22 2022-10-13 降低通信设备休眠状态下功耗的方法、装置、设备及介质

Country Status (2)

Country Link
CN (2) CN113993195A (zh)
WO (1) WO2023066125A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113993195A (zh) * 2021-10-22 2022-01-28 杭州研极微电子有限公司 一种通信设备休眠状态下功耗的降低方法、装置
CN114915569B (zh) * 2022-05-06 2024-06-04 杭州小电科技股份有限公司 心跳智能控制方法、装置、电子装置和存储介质
CN114816031B (zh) * 2022-05-09 2023-10-13 海信电子科技(深圳)有限公司 终端设备的省电方法、终端设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223257A (zh) * 2011-07-25 2011-10-19 莫雅静 一种心跳间隔调整方法、服务器、客户端及通信系统
WO2012167664A1 (zh) * 2011-11-15 2012-12-13 华为技术有限公司 一种支持应用客户端永久在线的方法、系统及装置
CN103139303A (zh) * 2013-02-07 2013-06-05 网易(杭州)网络有限公司 一种用于保持连接的心跳方法、装置及系统
CN103685241A (zh) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 一种维持tcp长连接的自适应心跳方法及其系统
CN107249136A (zh) * 2017-06-07 2017-10-13 北京潘达互娱科技有限公司 网络连接方法及装置
CN112637940A (zh) * 2020-12-31 2021-04-09 南京佑川网络技术有限公司 一种低功耗设备休眠保活系统及方法
CN113993195A (zh) * 2021-10-22 2022-01-28 杭州研极微电子有限公司 一种通信设备休眠状态下功耗的降低方法、装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223257A (zh) * 2011-07-25 2011-10-19 莫雅静 一种心跳间隔调整方法、服务器、客户端及通信系统
WO2012167664A1 (zh) * 2011-11-15 2012-12-13 华为技术有限公司 一种支持应用客户端永久在线的方法、系统及装置
CN103139303A (zh) * 2013-02-07 2013-06-05 网易(杭州)网络有限公司 一种用于保持连接的心跳方法、装置及系统
CN103685241A (zh) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 一种维持tcp长连接的自适应心跳方法及其系统
CN107249136A (zh) * 2017-06-07 2017-10-13 北京潘达互娱科技有限公司 网络连接方法及装置
CN112637940A (zh) * 2020-12-31 2021-04-09 南京佑川网络技术有限公司 一种低功耗设备休眠保活系统及方法
CN113993195A (zh) * 2021-10-22 2022-01-28 杭州研极微电子有限公司 一种通信设备休眠状态下功耗的降低方法、装置

Also Published As

Publication number Publication date
CN117751631A (zh) 2024-03-22
CN113993195A (zh) 2022-01-28

Similar Documents

Publication Publication Date Title
WO2023066125A1 (zh) 降低通信设备休眠状态下功耗的方法、装置、设备及介质
WO2022105611A1 (zh) 一种心跳超时检测方法、服务器及电子设备
US7996030B2 (en) System and method for reducing call establishment delay in a wireless network
Tsaoussidis et al. Open issues on TCP for mobile computing
KR101697080B1 (ko) 이동 네트워크에서 지속적인 tcp 접속 없는 푸시 서비스
US8374079B2 (en) Proxy server, communication system, communication method and program
WO2015061957A1 (zh) 一种业务代理的方法、调制解调器及终端
WO2009059545A1 (fr) Procédé, dispositif et système de transmission de données
US20080144613A1 (en) Maintaining Communication Between Network Nodes that are Subjected to a Packet Attack
US20090196281A1 (en) ENERGY STAR compliant Voice over Internet Protocol (VoIP) telecommunications network including ENERGY STAR compliant VoIP devices
US9055099B2 (en) Method of preventing TCP-based denial-of-service attacks on mobile devices
WO2020048410A1 (zh) 用于对齐唤醒的方法与移动设备
US9794109B2 (en) Method of maintaining network address translation mapping and client device employing same
CN105207949B (zh) 一种tcp优化方法和系统、sp服务器
US20110225230A1 (en) Method and apparatus for detecting active and orphan session-based connections
CN110753035B (zh) 一种基于tcp协议的fpga超低延迟通信传输方法
WO2017016837A1 (en) A method and computer program products for probing the status of an ip-based communication connection in order to receive an incoming communication
KR20020059431A (ko) 네트워크 인터페이스 드라이버 및 방법
US10397336B2 (en) Mechanism for managing a communication session
WO2020238895A1 (zh) 数据传输方法以及装置
CN108337171B (zh) 与dtn网络兼容的ip分组转发方法、网络节点及存储介质
Pavilanskas Analysis of TCP algorithms in the reliable IEEE 802.11 b LINK
JP2010220011A (ja) 通信制御装置、及びプログラム
CA3167507A1 (en) System and method for managing radio traffic for mobile and wireless devices
EP3550931A1 (en) Use of a user equipment connected to a mobile network, in which the user equipment uses an access point name for home operator services

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22882735

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202280053031.6

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 18700555

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE